@ellipsis-dev/sdk 0.28.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,132 +1,39 @@
1
- import { c as components } from './types-B-jIFh4_.js';
2
- export { A as AttributionType, a as AutomationConfig, b as AutomationIdentity, B as BudgetConfig, d as BudgetSource, C as ClaudeAssistantEvent, e as ClaudeAssistantMessage, f as ClaudeConfig, g as ClaudeConversationResetEvent, h as ClaudeNativeEvent, i as ClaudeNativeSessionRecord, j as ClaudeNativeUsage, k as ClaudeRateLimitEvent, l as ClaudeRateLimitInfo, m as ClaudeResultEvent, n as ClaudeSessionRecord, o as ClaudeSystemEvent, p as ClaudeUserEvent, q as ClaudeUserMessage, r as CodexAgentMessage, s as CodexAgentMessageItem, t as CodexAppServerError, u as CodexAppServerEvent, v as CodexAppServerItem, w as CodexAppServerNotification, x as CodexAppServerSessionRecord, y as CodexCommandExecution, z as CodexCommandExecutionItem, D as CodexConfig, E as CodexContextCompaction, F as CodexEffortLevel, G as CodexErrorEvent, H as CodexErrorItem, I as CodexErrorParams, J as CodexEvent, K as CodexFileChange, L as CodexFileChangeItem, M as CodexFileUpdate, N as CodexItem, O as CodexItemCompleted, P as CodexItemCompletedEvent, Q as CodexItemParams, R as CodexItemStarted, S as CodexItemStartedEvent, T as CodexItemUpdatedEvent, U as CodexLocalImageInput, V as CodexMcpToolCall, W as CodexMcpToolCallAppContext, X as CodexMcpToolCallError, Y as CodexMcpToolCallItem, Z as CodexMcpToolCallResult, _ as CodexPlan, $ as CodexReasoning, a0 as CodexReasoningItem, a1 as CodexSessionRecord, a2 as CodexTextInput, a3 as CodexThread, a4 as CodexThreadStarted, a5 as CodexThreadStartedEvent, a6 as CodexThreadStartedParams, a7 as CodexThreadTokenUsage, a8 as CodexTodoListItem, a9 as CodexTokenUsageBreakdown, aa as CodexTokenUsageParams, ab as CodexTokenUsageUpdated, ac as CodexTurn, ad as CodexTurnCompleted, ae as CodexTurnCompletedEvent, af as CodexTurnError, ag as CodexTurnFailedEvent, ah as CodexTurnParams, ai as CodexTurnStarted, aj as CodexTurnStartedEvent, ak as CodexUsage, al as CodexUserInput, am as CodexUserMessage, an as CodexWebSearch, ao as CodexWebSearchItem, ap as ComputeConfig, aq as ConfigMetadata, ar as CreateReviewRequest, as as CronTrigger, at as DeltaFrame, au as DoneFrame, av as Duration, aw as EffortLevel, ax as EllipsisGrant, ay as EllipsisPermissions, az as EnvironmentConfig, aA as EnvironmentHooks, aB as EnvironmentImage, aC as EnvironmentSource, aD as EnvironmentVariable, aE as ErrorFrame, aF as ExecutionResult, aG as Finding, aH as GithubAccountFilter, aI as GithubAccountSelector, aJ as GithubAccountSnippet, aK as GithubAccountType, aL as GithubPermissions, aM as Harness, aN as HeartbeatFrame, aO as InputContract, aP as IssueAction, aQ as LegacyAssistantPayload, aR as LegacyNativeUsage, aS as LegacyResultPayload, aT as Level, aU as LifecycleSessionRecord, aV as LinearIssueAction, aW as McpRemoteServer, aX as McpServerRef, aY as McpStdioServer, aZ as MemorySize, a_ as MessageDeliveredPayload, a$ as MessageDeliveredRecord, b0 as MessageReceivedPayload, b1 as MessageReceivedRecord, b2 as MessageRequeuedPayload, b3 as MessageRequeuedRecord, b4 as OutboxCollectedPayload, b5 as OutboxCollectedRecord, b6 as OutputConfig, b7 as ParentKind, b8 as PermissionsConfig, b9 as PlatformSessionRecord, ba as PromptBlockedReason, bb as PullRequestAction, bc as ReactIssue, bd as ReactLinearIssue, be as ReactPullRequest, bf as ReactPush, bg as ReactSentry, bh as ReactSlackChannel, bi as ReactTrigger, bj as RecordsAppendFrame, bk as RepositoryFilter, bl as RepositoryRef, bm as ResolvedReviewScope, bn as Review, bo as ReviewConfiguration, bp as ReviewCounters, bq as ReviewFinding, br as ReviewRequester, bs as ReviewScope, bt as ReviewScopeKind, bu as ReviewStage, bv as ReviewedCommit, bw as ReviewsListResponse, bx as RunStatus, by as SandboxOutputPayload, bz as SandboxOutputRecord, bA as SandboxPhasePayload, bB as SandboxPhaseRecord, bC as SandboxReadyPayload, bD as SandboxReadyRecord, bE as SandboxStartingPayload, bF as SandboxStartingRecord, bG as SdkAssistantRecord, bH as SdkCacheCreation, bI as SdkContentBlock, bJ as SdkRateLimitRecord, bK as SdkRecord, bL as SdkResultRecord, bM as SdkServerToolResultBlock, bN as SdkServerToolUseBlock, bO as SdkSystemRecord, bP as SdkTextBlock, bQ as SdkThinkingBlock, bR as SdkToolResultBlock, bS as SdkToolUseBlock, bT as SdkUserRecord, bU as SendSessionMessageRequest, bV as SentryAction, bW as Session, bX as Session1, bY as SessionAttribution, bZ as SessionAutomation, b_ as SessionBudget, b$ as SessionCancelledPayload, c0 as SessionCancelledRecord, c1 as SessionClosedPayload, c2 as SessionClosedRecord, c3 as SessionConfig, c4 as SessionConfig1, c5 as SessionCost, c6 as SessionEnvironment, c7 as SessionExecution, c8 as SessionExecutionsListResponse, c9 as SessionExitStatus, ca as SessionFrame, cb as SessionGit, cc as SessionGitCommit, cd as SessionGitFile, ce as SessionGitPr, cf as SessionGitRepo, cg as SessionIdlePayload, ch as SessionIdleRecord, ci as SessionLiveness, cj as SessionMessage, ck as SessionMessageImage, cl as SessionMessageResponse, cm as SessionMessageStatus, cn as SessionParent, co as SessionPrompting, cp as SessionRecord, cq as SessionRecordsListResponse, cr as SessionResponse, cs as SessionResumedPayload, ct as SessionResumedRecord, cu as SessionRetryingPayload, cv as SessionRetryingRecord, cw as SessionScheduledPayload, cx as SessionScheduledRecord, cy as SessionSource, cz as SessionStartingPayload, cA as SessionStartingRecord, cB as SessionState, cC as SessionStatus, cD as SessionStopped, cE as SessionStreamFrame, cF as SessionSummary, cG as SessionSurface, cH as SessionTokens, cI as SessionTrigger, cJ as SessionTriggerActor, cK as SessionsListResponse, cL as SettingsRef, cM as SkillRef, cN as SnapshotFrame, cO as StreamFrame, cP as SystemFileRef, cQ as TokensInfo, cR as TurnCompletedPayload, cS as TurnCompletedRecord, cT as TurnFailedPayload, cU as TurnFailedRecord, cV as TurnStartedPayload, cW as TurnStartedRecord, cX as UnknownSessionRecord, cY as paths } from './types-B-jIFh4_.js';
1
+ import { c as components } from './types-BQxZcD0_.js';
2
+ export { A as AgentConfig, a as AgentIdentity, b as AttributionType, B as BudgetConfig, C as ClaudeAssistantEvent, d as ClaudeAssistantMessage, e as ClaudeConfig, f as ClaudeConversationResetEvent, g as ClaudeNativeEvent, h as ClaudeNativeSessionRecord, i as ClaudeNativeUsage, j as ClaudeRateLimitEvent, k as ClaudeRateLimitInfo, l as ClaudeResultEvent, m as ClaudeSessionRecord, n as ClaudeSystemEvent, o as ClaudeUserEvent, p as ClaudeUserMessage, q as CodexAgentMessage, r as CodexAgentMessageItem, s as CodexAppServerError, t as CodexAppServerEvent, u as CodexAppServerItem, v as CodexAppServerNotification, w as CodexAppServerSessionRecord, x as CodexCommandExecution, y as CodexCommandExecutionItem, z as CodexConfig, D as CodexContextCompaction, E as CodexEffortLevel, F as CodexErrorEvent, G as CodexErrorItem, H as CodexErrorParams, I as CodexEvent, J as CodexFileChange, K as CodexFileChangeItem, L as CodexFileUpdate, M as CodexItem, N as CodexItemCompleted, O as CodexItemCompletedEvent, P as CodexItemParams, Q as CodexItemStarted, R as CodexItemStartedEvent, S as CodexItemUpdatedEvent, T as CodexLocalImageInput, U as CodexMcpToolCall, V as CodexMcpToolCallAppContext, W as CodexMcpToolCallError, X as CodexMcpToolCallItem, Y as CodexMcpToolCallResult, Z as CodexPlan, _ as CodexReasoning, $ as CodexReasoningItem, a0 as CodexSessionRecord, a1 as CodexTextInput, a2 as CodexThread, a3 as CodexThreadStarted, a4 as CodexThreadStartedEvent, a5 as CodexThreadStartedParams, a6 as CodexThreadTokenUsage, a7 as CodexTodoListItem, a8 as CodexTokenUsageBreakdown, a9 as CodexTokenUsageParams, aa as CodexTokenUsageUpdated, ab as CodexTurn, ac as CodexTurnCompleted, ad as CodexTurnCompletedEvent, ae as CodexTurnError, af as CodexTurnFailedEvent, ag as CodexTurnParams, ah as CodexTurnStarted, ai as CodexTurnStartedEvent, aj as CodexUsage, ak as CodexUserInput, al as CodexUserMessage, am as CodexWebSearch, an as CodexWebSearchItem, ao as ComputeConfig, ap as ComputeConfig1, aq as ConfigMetadata, ar as CreateReviewRequest, as as CronTrigger, at as DeltaFrame, au as DoneFrame, av as Duration, aw as EffortLevel, ax as EllipsisGrant, ay as EllipsisPermissions, az as EnvironmentBaseBuild, aA as EnvironmentConfig, aB as EnvironmentHooks, aC as EnvironmentHooks1, aD as EnvironmentOutputPayload, aE as EnvironmentOutputRecord, aF as EnvironmentPhasePayload, aG as EnvironmentPhaseRecord, aH as EnvironmentReadyPayload, aI as EnvironmentReadyRecord, aJ as EnvironmentScript, aK as EnvironmentSource, aL as EnvironmentVariable, aM as ErrorFrame, aN as Finding, aO as GithubAccountFilter, aP as GithubAccountSelector, aQ as GithubAccountSnippet, aR as GithubAccountType, aS as GithubIssueEvent, aT as GithubPermissions, aU as GithubPullRequestEvent, aV as GithubPushEvent, aW as HandlerService, aX as HeartbeatFrame, aY as InputContract, aZ as IssueAction, a_ as LegacyAssistantPayload, a$ as LegacyNativeUsage, b0 as LegacyResultPayload, b1 as Level, b2 as LifecycleSessionRecord, b3 as LinearIssueAction, b4 as LinearIssueEvent, b5 as McpRemoteServer, b6 as McpServerRef, b7 as McpStdioServer, b8 as MemorySize, b9 as MessageDeliveredPayload, ba as MessageDeliveredRecord, bb as MessageReceivedPayload, bc as MessageReceivedRecord, bd as MessageRequeuedPayload, be as MessageRequeuedRecord, bf as OutboxCollectedPayload, bg as OutboxCollectedRecord, bh as OutputConfig, bi as PermissionsConfig, bj as PermissionsConfig1, bk as PlatformSessionRecord, bl as PromptBlockedReason, bm as PullRequestAction, bn as ReactIssue, bo as ReactLinearIssue, bp as ReactPullRequest, bq as ReactPush, br as ReactSentry, bs as ReactSlackChannel, bt as ReactTrigger, bu as RecordsAppendFrame, bv as RepositoryFilter, bw as RepositoryRef, bx as ResolvedReviewScope, by as Review, bz as ReviewConfiguration, bA as ReviewCounters, bB as ReviewFinding, bC as ReviewRequester, bD as ReviewScope, bE as ReviewScopeKind, bF as ReviewStage, bG as ReviewedCommit, bH as ReviewsListResponse, bI as SdkAssistantRecord, bJ as SdkCacheCreation, bK as SdkContentBlock, bL as SdkRateLimitRecord, bM as SdkRecord, bN as SdkResultRecord, bO as SdkServerToolResultBlock, bP as SdkServerToolUseBlock, bQ as SdkSystemRecord, bR as SdkTextBlock, bS as SdkThinkingBlock, bT as SdkToolResultBlock, bU as SdkToolUseBlock, bV as SdkUserRecord, bW as SendSessionMessageRequest, bX as SentryAction, bY as SentryAlertEvent, bZ as Session, b_ as Session1, b$ as SessionAgent, c0 as SessionArchived, c1 as SessionAttribution, c2 as SessionClosedPayload, c3 as SessionClosedRecord, c4 as SessionConfig, c5 as SessionConversation, c6 as SessionCost, c7 as SessionCost1, c8 as SessionEnvironment, c9 as SessionEventActor, ca as SessionFrame, cb as SessionGit, cc as SessionGitCommit, cd as SessionGitFile, ce as SessionGitPr, cf as SessionGitRepo, cg as SessionHandler, ch as SessionMessage, ci as SessionMessageImage, cj as SessionMessageResponse, ck as SessionMessageStatus, cl as SessionParent, cm as SessionPrompting, cn as SessionRecord, co as SessionRecordsListResponse, cp as SessionResponse, cq as SessionSource, cr as SessionState, cs as SessionStopped, ct as SessionStreamFrame, cu as SessionSummary, cv as SessionTokens, cw as SessionTokens1, cx as SessionTurn, cy as SessionTurnResponse, cz as SessionTurnsListResponse, cA as SessionsListResponse, cB as SettingsRef, cC as SkillRef, cD as SlackChannelCreatedEvent, cE as SlackMessageEvent, cF as SnapshotFrame, cG as StreamFrame, cH as TokensInfo, cI as TurnEndedPayload, cJ as TurnEndedRecord, cK as TurnReason, cL as TurnStartedPayload, cM as TurnStartedRecord, cN as TurnStatus, cO as UnknownSessionRecord, cP as UpdateSessionRequest, cQ as paths } from './types-BQxZcD0_.js';
3
3
 
4
4
  /**
5
- * Frames on /v1/sessions/stream, /v1/automations/stream and /v1/sandboxes/{id}/stream. Ignore unknown frame types.
5
+ * Frames on /v1/sessions/stream, /v1/agents/stream and /v1/vm-executions/{id}/stream. Ignore unknown frame types.
6
6
  */
7
- type CollectionStreamFrame = SessionListStreamMessage | AutomationListStreamMessage | CollectionStreamHeartbeat | SandboxSnapshotFrame | SandboxUpdateFrame;
8
- type AttributionType = 'github_user' | 'linear_user' | 'slack_user' | 'api_key';
9
- type GithubAccountType = 'User' | 'Organization' | 'Bot' | 'Mannequin';
10
- type EffortLevel = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
11
- type CodexEffortLevel = 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
7
+ type CollectionStreamFrame = SessionListStreamMessage | AgentListStreamMessage | CollectionStreamHeartbeat | SandboxSnapshotFrame | SandboxUpdateFrame;
12
8
  /**
13
- * What may be done to a resource. Strictly ordered: a grant at one level
14
- * includes every level below it (write-only would be a phantom capability —
15
- * no real client can create what it cannot read back).
9
+ * An agent session: one conversation with an agent. Returned by
10
+ * `GET /v1/sessions/{id}` and carried by the session stream's
11
+ * `session`/`snapshot` frames; REST and stream never disagree about what a
12
+ * session looks like.
16
13
  */
17
- type Level = 'read' | 'write' | 'delete';
18
- type GithubAccountFilter = {
19
- exclude?: string[];
20
- include?: string[] | boolean;
21
- } | boolean | string[];
22
- type IssueAction = 'opened' | 'closed' | 'commented';
23
- type RepositoryFilter = {
24
- exclude?: string[];
25
- include?: string[];
26
- } | string[];
27
- type LinearIssueAction = 'opened';
28
- type PullRequestAction = 'opened' | 'pushed' | 'merged' | 'closed' | 'review_submitted' | 'commented';
29
- type SentryAction = 'issue_alert' | 'metric_alert';
30
- /**
31
- * Where the resolved budget came from.
32
- */
33
- type BudgetSource = 'system' | 'account' | 'config' | 'run';
34
- /**
35
- * How a session's environment was chosen. None (the field is nullable)
36
- * when the config carried an inline environment block and no resolution ran —
37
- * an inline environment is not a reference, so there is nothing to record.
38
- *
39
- * Not derivable from the row: `environment_id` says WHICH environment, not
40
- * how it was chosen, and is null for the built-in basic sandbox.
41
- */
42
- type EnvironmentSource = 'request' | 'automation' | 'repo_default' | 'account_default' | 'platform_default';
43
- /**
44
- * Why a terminal agent session ended — a finer-grained reason than `status`.
45
- *
46
- * `status` (SessionStatus) is the lifecycle state: COMPLETED / ERROR /
47
- * CANCELLED. `exit_status` explains *why* a run reached that terminal state, so
48
- * the UI and metrics can tell a budget cutoff apart from a crashed tool call or
49
- * a deliberate cancellation. It is None until the run reaches a terminal state.
50
- */
51
- type SessionExitStatus = 'completed' | 'budget_hit' | 'payment_required' | 'tool_call_failed' | 'lifecycle_hook_failed' | 'missing_repo_access' | 'missing_token_permissions' | 'missing_sandbox_variables' | 'blocked' | 'contact_email_required' | 'cancelled' | 'interrupted' | 'error' | 'stopped';
52
- /**
53
- * The coding-agent harness the session runs on.
54
- */
55
- type Harness = 'claude_code' | 'codex';
56
- /**
57
- * How a session relates to its predecessor (parent_agent_session_id) —
58
- * the ONE "preceded-by" chain for every predecessor relationship. Routing
59
- * reads this when the distinction matters.
60
- *
61
- * CONTINUATION — a follow-up in the same conversation surface (e.g. a Slack
62
- * thread reply spawning a fresh session on the same thread).
63
- * RESUME — a conversation re-hosted on a new box after its sandbox was torn
64
- * down (interactive platform; later phase).
65
- */
66
- type ParentKind = 'continuation' | 'resume';
67
- /**
68
- * Why direct prompting is refused. Absent when prompting is allowed.
69
- */
70
- type PromptBlockedReason = 'mention_surface' | 'ephemeral_trigger' | 'non_interactive' | 'harness_single_turn' | 'closed';
71
- /**
72
- * Lifecycle of a keyed (multi-turn) session — the durable conversation.
73
- * Distinct from SessionStatus, which is per-execution (one turn's run) and
74
- * moves to agent_turns in a later slice. IDLE: alive, waiting for the next
75
- * message. RUNNING: a turn is executing. CLOSED: the conversation is done and
76
- * its sandbox/snapshots are torn down.
77
- */
78
- type SessionState = 'idle' | 'running' | 'closed';
79
- /**
80
- * Where the session came from (e.g. react, web, api, cli, mention, cron).
81
- */
82
- type SessionSource = 'react' | 'web' | 'api' | 'cli' | 'mention' | 'cron';
83
- /**
84
- * Execution status of the session.
85
- */
86
- type SessionStatus = 'scheduled' | 'creating_sandbox' | 'running' | 'retrying' | 'completed' | 'error' | 'cancelled' | 'stopped';
87
- /**
88
- * What the current (or most recent) execution is doing (backs `run`).
89
- */
90
- type RunStatus = 'scheduled' | 'starting' | 'working' | 'waiting' | 'done' | 'failed' | 'stopped' | 'cancelled' | 'retrying';
91
- /**
92
- * The durable conversation axis (backs the surfaced `session` field).
93
- */
94
- type SessionLiveness = 'alive' | 'idle' | 'closed';
95
- /**
96
- * Which writer owns this automation. "github" automations are defined by a file in a repository and are changed by editing that file; "api" automations have no file and are changed through this API.
97
- */
98
- type ConfigManagedBy = 'github' | 'api';
99
- /**
100
- * Which image-cache tier a sandbox creation took — the customer-facing
101
- * names for `create_sandbox_from_default`'s exact / latest / default tiers.
102
- * Rides on `Sandbox.cache_tier` and the sandbox_ready lifecycle record.
103
- */
104
- type SandboxCacheTier = 'exact' | 'incremental' | 'full';
105
- type SandboxSource = 'cli' | 'web_ui' | 'ingest_pull_request_job_run' | 'agent_session' | 'image_refresh' | 'test' | 'script';
106
- type SandboxStatus = 'scheduled' | 'building' | 'running' | 'released' | 'terminating' | 'terminated' | 'failed';
107
- type SandboxType = 'claude_code';
108
- interface SessionListStreamMessage {
109
- session: Session;
110
- type: 'session';
111
- }
112
- /**
113
- * An agent session: one conversation with an agent, from trigger to
114
- * terminal state. Returned by `GET /v1/sessions/{id}` and carried by the
115
- * session stream's `session`/`snapshot` frames — REST and stream never
116
- * disagree about what a session looks like.
117
- */
118
- interface Session {
14
+ type Session = {
15
+ /**
16
+ * The agent the session was started from, or null for a raw session started with POST /v1/sessions.
17
+ */
18
+ agent: SessionAgent | null;
19
+ /**
20
+ * When and by whom the session was archived; null when unarchived. Archiving does not stop or close a session.
21
+ */
22
+ archived: SessionArchived | null;
119
23
  attribution: SessionAttribution;
120
24
  /**
121
- * The automation the session was started from, or null for a raw session started with POST /v1/sessions.
25
+ * The spend budget enforced for this session, in US dollars, after resolving defaults and ceilings.
122
26
  */
123
- automation: SessionAutomation | null;
124
- budget: SessionBudget;
125
- config: SessionConfig1;
27
+ budget: number;
126
28
  /**
127
- * The "owner/name" repository context the session was started in, if any.
29
+ * Claude Code input and native options. Set exactly one of claude_code or codex.
128
30
  */
129
- context_repository: string | null;
31
+ claude_code: ClaudeConfig | null;
32
+ /**
33
+ * Codex input and native options. Set exactly one of claude_code or codex.
34
+ */
35
+ codex: CodexConfig | null;
36
+ conversation: SessionConversation;
130
37
  cost: SessionCost;
131
38
  /**
132
39
  * When the session was created.
@@ -134,112 +41,193 @@ interface Session {
134
41
  created_at: string;
135
42
  environment: SessionEnvironment;
136
43
  /**
137
- * How the session ended; null until it is terminal.
44
+ * The typed external event that started the session; null for direct and scheduled starts.
138
45
  */
139
- exit_status: SessionExitStatus | null;
46
+ event: (GithubPullRequestEvent | GithubIssueEvent | GithubPushEvent | LinearIssueEvent | SlackMessageEvent | SlackChannelCreatedEvent | SentryAlertEvent) | null;
140
47
  /**
141
48
  * What the session did to git, one entry per repository in its workspace: the commit and branch it sits on, per-file line counts for its uncommitted changes, and the pull requests it opened. Null if nothing was ever captured.
142
49
  */
143
50
  git: SessionGit | null;
144
- harness: Harness;
145
51
  /**
146
- * Unique identifier of the session.
52
+ * The saved handler and its effective display name when this session started, frozen at creation. Null for built-in responders, legacy sessions, and sessions started without a handler.
147
53
  */
148
- id: string;
54
+ handler: SessionHandler | null;
149
55
  /**
150
- * When the session last showed activity.
151
- */
152
- last_activity_at: string | null;
153
- /**
154
- * When the session last received a message.
56
+ * Unique identifier of the session.
155
57
  */
156
- last_message_at: string | null;
58
+ id: string;
157
59
  /**
158
60
  * Caller-supplied metadata key-value pairs.
159
61
  */
160
62
  metadata: {
161
63
  [k: string]: string;
162
64
  };
163
- parent: SessionParent;
164
65
  /**
165
- * The per-session prompt the session was started with.
66
+ * The structured-output exit contract for this session.
166
67
  */
167
- prompt: string | null;
168
- prompting: SessionPrompting;
68
+ output: OutputConfig | null;
169
69
  /**
170
- * Lifecycle state of the durable conversation, or null for sessions without one.
70
+ * The predecessor session this session continues; null when there is none.
171
71
  */
172
- session_state: SessionState | null;
173
- source: SessionSource;
174
- status: SessionStatus;
72
+ parent: SessionParent | null;
73
+ permissions: PermissionsConfig1;
175
74
  /**
176
- * Human-readable reason for the current status, when there is one.
75
+ * Skills installed for this session.
177
76
  */
178
- status_reason: string | null;
179
- stopped: SessionStopped;
77
+ skills: SkillRef[];
78
+ source: SessionSource;
180
79
  /**
181
80
  * The latest live summary of the session's progress while it runs, and when it was generated.
182
81
  */
183
82
  summary: SessionSummary | null;
184
- surface: SessionSurface;
185
83
  tokens: SessionTokens;
186
84
  /**
187
- * The external event that started the session.
85
+ * The turn in progress, or the latest one when none is running. Null until the session has a message. Wait on it: the message you sent is answered when the turn with your message's `turn_id` reaches a final status.
188
86
  */
189
- trigger: SessionTrigger | null;
87
+ turn: SessionTurn | null;
190
88
  /**
191
89
  * When the session was last updated.
192
90
  */
193
91
  updated_at: string;
194
- }
92
+ } & ({
93
+ claude_code: {
94
+ [k: string]: unknown;
95
+ };
96
+ codex: null;
97
+ } | {
98
+ claude_code: null;
99
+ codex: {
100
+ [k: string]: unknown;
101
+ };
102
+ });
195
103
  /**
196
- * The principal this session is attributed to.
104
+ * What one session runs on: its selected harness, where it runs, what it
105
+ * may touch, its skills, its exit contract, and its spend cap. Every session
106
+ * freezes one of these (`sessions.session_config`); an agent
107
+ * carries one under `session:` (`AgentConfig.session`); and
108
+ * `POST /v1/sessions` is this shape flattened onto the request body, plus the
109
+ * run settings. Nothing in here is an agent's identity or trigger —
110
+ * those belong to `AgentConfig`.
111
+ *
112
+ * Field order is the canonical key order for `session:` blocks and YAML
113
+ * exports: what runs (`claude_code` or `codex`), where (`environment`), what it may
114
+ * touch (`permissions`), then the rest.
197
115
  */
198
- interface SessionAttribution {
199
- /**
200
- * Identifier of the principal the session is attributed to.
201
- */
202
- id: string | null;
116
+ type SessionConfig = {
117
+ budget: BudgetConfig;
203
118
  /**
204
- * Kind of principal the session is attributed to (e.g. a GitHub user or an API key).
119
+ * Claude Code input and native options. Set exactly one of claude_code or codex.
205
120
  */
206
- type: AttributionType | null;
121
+ claude_code: ClaudeConfig | null;
207
122
  /**
208
- * The GitHub user the session is attributed to, resolved at read time. Null when the attribution is not a GitHub user.
123
+ * Codex input and native options. Set exactly one of claude_code or codex.
209
124
  */
210
- user: GithubAccountSnippet | null;
211
- }
125
+ codex: CodexConfig | null;
126
+ environment: string | EnvironmentConfig;
127
+ output: OutputConfig | null;
128
+ permissions: PermissionsConfig;
129
+ skills: SkillRef[];
130
+ } & ({
131
+ claude_code: {
132
+ [k: string]: unknown;
133
+ };
134
+ codex: null;
135
+ } | {
136
+ claude_code: null;
137
+ codex: {
138
+ [k: string]: unknown;
139
+ };
140
+ });
141
+ type EffortLevel = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
142
+ type CodexEffortLevel = 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
212
143
  /**
213
- * Sometimes the GitHub API returns a user of github (can include bots)
214
- * using this snippet instead of the full GithubAccount model. One example,
215
- * is when the API returns a pull request.
144
+ * What may be done to a resource. Strictly ordered: a grant at one level
145
+ * includes every level below it (write-only would be a phantom capability —
146
+ * no real client can create what it cannot read back).
147
+ */
148
+ type Level = 'read' | 'write' | 'delete';
149
+ type GithubAccountFilter = {
150
+ exclude: string[];
151
+ include: string[] | boolean;
152
+ } | boolean | string[];
153
+ type IssueAction = 'opened' | 'closed' | 'commented';
154
+ type RepositoryFilter = {
155
+ exclude: string[];
156
+ include: string[];
157
+ } | string[];
158
+ type LinearIssueAction = 'opened';
159
+ type PullRequestAction = 'opened' | 'pushed' | 'merged' | 'closed' | 'review_submitted' | 'commented';
160
+ type SentryAction = 'issue_alert' | 'metric_alert';
161
+ type GithubAccountType = 'User' | 'Organization' | 'Bot' | 'Mannequin';
162
+ type AttributionType = 'github_user' | 'linear_user' | 'slack_user' | 'api_key';
163
+ /**
164
+ * Why direct prompting is refused. Absent when prompting is allowed.
165
+ */
166
+ type PromptBlockedReason = 'mention_surface' | 'ephemeral_trigger' | 'non_interactive' | 'harness_single_turn' | 'budget_exhausted' | 'closed';
167
+ /**
168
+ * `open` while the session can take messages; `closed` is permanent.
169
+ */
170
+ type SessionState = 'open' | 'closed';
171
+ /**
172
+ * How a session's environment was chosen. None (the field is nullable)
173
+ * when the config carried an inline environment block and no resolution ran —
174
+ * an inline environment is not a reference, so there is nothing to record.
216
175
  *
217
- * This is the least amount of info we need to represent a GitHub account.
176
+ * Not derivable from the row: `environment_id` says WHICH environment, not
177
+ * how it was chosen, and is null for the built-in basic environment.
218
178
  */
219
- interface GithubAccountSnippet {
220
- avatar_url: string;
221
- id: number;
222
- login: string;
223
- type: GithubAccountType;
179
+ type EnvironmentSource = 'request' | 'agent' | 'repo_default' | 'account_default' | 'platform_default';
180
+ /**
181
+ * The service the handler responds to.
182
+ */
183
+ type HandlerService = 'slack' | 'github' | 'linear' | 'sentry';
184
+ /**
185
+ * Where the session came from (e.g. react, web, api, cli, mention, cron).
186
+ */
187
+ type SessionSource = 'react' | 'web' | 'api' | 'cli' | 'mention' | 'cron';
188
+ /**
189
+ * Why a turn failed or was cancelled. Null on every other outcome.
190
+ */
191
+ type TurnReason = 'error' | 'tool_call_failed' | 'budget_hit' | 'payment_required' | 'blocked' | 'contact_email_required' | 'lifecycle_hook_failed' | 'missing_repo_access' | 'missing_token_permissions' | 'missing_environment_variables' | 'missing_github_integration' | 'agent_unavailable' | 'upstream_unavailable' | 'unsupported_configuration' | 'execution_disabled' | 'interrupted';
192
+ /**
193
+ * Where the turn is.
194
+ */
195
+ type TurnStatus = 'pending' | 'running' | 'completed' | 'failed' | 'stopped' | 'cancelled';
196
+ /**
197
+ * Which writer owns this agent. "github" agents are defined by a file in a repository and are changed by editing that file; "api" agents have no file and are changed through this API.
198
+ */
199
+ type ConfigManagedBy = 'github' | 'api';
200
+ /**
201
+ * Which image-cache tier a sandbox creation took — the customer-facing
202
+ * names for `create_sandbox_from_default`'s exact / latest / default tiers.
203
+ * Rides on `Sandbox.cache_tier` and the sandbox_ready lifecycle record.
204
+ */
205
+ type SandboxCacheTier = 'exact' | 'incremental' | 'full';
206
+ type SandboxSource = 'cli' | 'web_ui' | 'ingest_pull_request_job_run' | 'session' | 'image_refresh' | 'test' | 'script';
207
+ type SandboxStatus = 'scheduled' | 'building' | 'running' | 'released' | 'terminating' | 'terminated' | 'failed';
208
+ type SandboxType = 'claude_code';
209
+ interface SessionListStreamMessage {
210
+ session: Session;
211
+ type: 'session';
224
212
  }
225
213
  /**
226
- * The automation this session was started from: the definition frozen
227
- * when the session was created, and the saved automation it came from as it
214
+ * The agent this session was started from: the definition frozen
215
+ * when the session was created, and the saved agent it came from as it
228
216
  * exists NOW. They diverge legitimately — a YAML edit after the session
229
217
  * started leaves the pointer describing something the session never ran.
230
218
  */
231
- interface SessionAutomation {
232
- config: AutomationConfig;
219
+ interface SessionAgent {
220
+ config: AgentConfig;
233
221
  /**
234
- * Identifier of the saved automation this session's snapshot was taken from. Null for a routing-file agent, a code-review stage agent, or the built-in mention agent, which have no saved automation behind them. Points at the automation as it exists now, which may have changed since.
222
+ * Identifier of the saved agent this session's snapshot was taken from. Null for a routing-file agent, a code-review stage agent, or the built-in mention agent, which have no saved agent behind them. Points at the agent as it exists now, which may have changed since.
235
223
  */
236
224
  id: string | null;
237
225
  }
238
226
  /**
239
- * The automation definition the session was started from, frozen when the session was created.
227
+ * The agent definition the session was started from, frozen when the session was created.
240
228
  */
241
- interface AutomationConfig {
242
- ellipsis: AutomationIdentity;
229
+ interface AgentConfig {
230
+ ellipsis: AgentIdentity;
243
231
  input: InputContract | null;
244
232
  session: SessionConfig;
245
233
  trigger: (CronTrigger | ReactTrigger) | null;
@@ -249,7 +237,7 @@ interface AutomationConfig {
249
237
  * (`version`), the human-facing identity (`name`/`description`), freeform
250
238
  * organizational `metadata`, and whether the agent is `enabled`. The
251
239
  * presence of a top-level `ellipsis:` mapping is what marks a YAML file as
252
- * an Ellipsis automation (vs arbitrary YAML that merely lives under a
240
+ * an Ellipsis agent (vs arbitrary YAML that merely lives under a
253
241
  * config directory) — see `yaml_is_ellipsis_config`.
254
242
  *
255
243
  * `enabled` is agent behavior, not freeform metadata, so it stays inside
@@ -257,9 +245,10 @@ interface AutomationConfig {
257
245
  * accepts messages is a per-run choice (POST /v1/sessions `interactive`),
258
246
  * not a config one.
259
247
  */
260
- interface AutomationIdentity {
248
+ interface AgentIdentity {
261
249
  description: string | null;
262
250
  enabled: boolean;
251
+ kind: 'agent';
263
252
  metadata: ConfigMetadata;
264
253
  name: string | null;
265
254
  version: string;
@@ -274,15 +263,15 @@ interface ConfigMetadata {
274
263
  * The typed input contract: what goes INTO a session (the trigger is
275
264
  * when it happens; this is what goes in).
276
265
  *
277
- * `json_schema` types the payload a caller-started session takes
278
- * (`POST /v1/sessions` `input`, validated at the door; required when
279
- * declared). It is illegal on a react-triggered agent — react payloads are
280
- * platform-shaped (the published surface field sets), not caller-shaped.
266
+ * `json_schema` validates customer data sent as `input` to
267
+ * `POST /v1/agents/{id}/sessions` and stored as `session.input`.
268
+ * Invocations require input when a schema is declared. React agents
269
+ * cannot declare schemas: the platform defines their event payloads.
281
270
  *
282
271
  * `message` is the initial-message template: exact `{{path}}` substitution
283
272
  * over the caller payload (or, on a react agent, over the surface's
284
273
  * published fields), no conditionals/loops/filters. Refs are validated at
285
- * deploy time against the governing field set (see AutomationConfig's
274
+ * deploy time against the governing field set (see AgentConfig's
286
275
  * `_check_input`).
287
276
  */
288
277
  interface InputContract {
@@ -291,49 +280,69 @@ interface InputContract {
291
280
  } | null;
292
281
  message: string | null;
293
282
  }
283
+ interface BudgetConfig {
284
+ day: number | null;
285
+ month: number | null;
286
+ session: number | null;
287
+ week: number | null;
288
+ }
294
289
  /**
295
- * What one session runs on: its selected harness, where it runs, what it
296
- * may touch, its skills, its exit contract, and its spend cap. Every session
297
- * freezes one of these (`agent_sessions.session_config`); an automation
298
- * carries one under `session:` (`AutomationConfig.session`); and
299
- * `POST /v1/sessions` is this shape flattened onto the request body, plus the
300
- * run settings. Nothing in here is an automation's identity or trigger —
301
- * those belong to `AutomationConfig`.
290
+ * Native Claude Code options for an explicitly selected harness.
291
+ */
292
+ interface ClaudeConfig {
293
+ effort: EffortLevel | null;
294
+ fallback_model: string | null;
295
+ max_turns: number | null;
296
+ model: string | null;
297
+ /**
298
+ * The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.
299
+ */
300
+ prompt: string | null;
301
+ settings: SettingsRef | null;
302
+ }
303
+ /**
304
+ * A config-declared Claude Code settings.json, resolved at run start and
305
+ * passed to `claude --settings <path>`. That is the CLI settings tier — BELOW
306
+ * Ellipsis's managed-settings.json floor — so it customizes behavior (model
307
+ * permissions, includeCoAuthoredBy, statusLine, ...) but can never weaken a
308
+ * security setting. Lets a team point the cloud agent at the same settings file
309
+ * they already use with Claude Code locally instead of re-encoding it as YAML.
310
+ */
311
+ interface SettingsRef {
312
+ path: string;
313
+ repository: RepositoryRef | null;
314
+ }
315
+ interface RepositoryRef {
316
+ name: string;
317
+ owner: string | null;
318
+ ref: string | null;
319
+ }
320
+ /**
321
+ * Native options supported by the current Codex adapter.
302
322
  *
303
- * Field order is the canonical key order for `session:` blocks and YAML
304
- * exports: what runs (`harness`, `instructions`), where (`environment`), what it may
305
- * touch (`permissions`), then the rest.
323
+ * Options and capabilities expand only when their runtime behavior is tested.
324
+ * Unknown options are rejected instead of silently ignored.
306
325
  */
307
- interface SessionConfig {
308
- budget: BudgetConfig;
309
- environment: string | EnvironmentConfig;
326
+ interface CodexConfig {
310
327
  /**
311
- * The explicitly selected harness and its native options.
328
+ * Reasoning effort for every turn. Omit to use the model default.
312
329
  */
313
- harness: ClaudeConfig | CodexConfig;
330
+ effort: CodexEffortLevel | null;
331
+ model: string;
314
332
  /**
315
- * Instructions appended to the harness's own prompt. Text and repository file references are resolved in order.
333
+ * The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.
316
334
  */
317
- instructions: string | SystemFileRef | (string | SystemFileRef)[];
318
- output: OutputConfig | null;
319
- permissions: PermissionsConfig;
320
- skills: SkillRef[];
321
- }
322
- interface BudgetConfig {
323
- day: number | null;
324
- month: number | null;
325
- session: number | null;
326
- week: number | null;
335
+ prompt: string | null;
327
336
  }
328
337
  /**
329
- * Everything about the environment (the sandbox) the agent runs in: which
338
+ * Everything about the environment the agent runs in: which
330
339
  * `repositories` are cloned into it, which environment `variables` it gets,
331
- * its `compute` sizing, how its `image` is customized, and lifecycle `hooks`.
340
+ * its `compute` sizing, and lifecycle `hooks`.
332
341
  * What the agent may *do* from that environment is the top-level
333
342
  * `permissions:` block, not this one.
334
343
  *
335
344
  * Each `variables` entry names a variable to inject; with an inline `value` it
336
- * is hardcoded, without one it is resolved from the account's sandbox-secrets
345
+ * is hardcoded, without one it is resolved from the account's secrets
337
346
  * store. Only the named variables reach this agent; the rest of the account's
338
347
  * stored variables never do. This is how a config brings in the config and
339
348
  * credentials a custom CLI needs.
@@ -341,32 +350,29 @@ interface BudgetConfig {
341
350
  interface EnvironmentConfig {
342
351
  compute: ComputeConfig;
343
352
  hooks: EnvironmentHooks;
344
- image: EnvironmentImage;
345
353
  mcp_servers: (string | McpServerRef | McpStdioServer | McpRemoteServer)[];
346
354
  repositories: RepositoryRef[];
347
355
  variables: EnvironmentVariable[];
348
356
  }
349
357
  /**
350
- * Sandbox compute sizing. Every field is optional; None inherits the
351
- * platform default (2 vCPU / 4096 MiB / 3600s — see DEFAULT_SANDBOX_* in
352
- * models/ellipsis/sandboxes/sandbox.py). A resolved value outside the platform
353
- * bounds fails validation loudly (a sync error on the config) rather than
354
- * being clamped silently.
358
+ * Environment compute sizing. Every field is optional; an omitted field
359
+ * inherits the platform default (2 vCPU / 4096 MiB / 3600s). A resolved value
360
+ * outside the platform bounds fails validation loudly (a sync error on the
361
+ * config) rather than being clamped silently.
355
362
  *
356
363
  * `memory` and `timeout` each accept a shorthand string ("8GB", "30m") or an
357
364
  * explicit units object ({gb: 8}, {minutes: 30}); the `memory_mib` /
358
365
  * `timeout_seconds` properties resolve either form to the canonical integer
359
- * the sandbox driver consumes.
366
+ * the environment is sized with.
360
367
  *
361
- * `timeout` is the max wall-clock the agent may run before its execution is
362
- * stopped, capped at 1h (MAX_SANDBOX_TIMEOUT_SECONDS — equal to the default, so
363
- * today the knob only shortens a session; the cap matches the 1-hour validity
364
- * of the sandbox's GitHub token). The worker's lease/visibility heartbeat
365
- * ceiling is derived from that cap, so a run at the max stays owned by its
366
- * worker for its whole life.
368
+ * `timeout` is the max wall-clock the agent may run in one environment before
369
+ * it is stopped, capped at 1h (equal to the default, so today the knob only
370
+ * shortens a session; the cap matches the 1-hour validity of the session's
371
+ * GitHub token).
367
372
  *
368
- * Compute currently uses a temporary flat one-cent amount per allocated
369
- * execution, subject to the account's existing free-compute exemptions.
373
+ * Compute currently uses a temporary flat one-cent amount each time an
374
+ * environment is started for a session, subject to the account's existing
375
+ * free-compute exemptions.
370
376
  */
371
377
  interface ComputeConfig {
372
378
  cpu: number | null;
@@ -393,45 +399,59 @@ interface Duration {
393
399
  seconds: number | null;
394
400
  }
395
401
  /**
396
- * Shell scripts run at points in the sandbox lifecycle, each as the sandbox
397
- * user with the sandbox's environment variables available. A non-zero exit
398
- * fails the run (exit_status = LIFECYCLE_HOOK_FAILED) and is not retried.
399
- *
400
- * `post_start` runs after the container starts, before any repo is cloned —
401
- * repo-independent setup (authenticate a CLI, e.g. `doppler setup`). On Freestyle
402
- * the repo is baked into the image so it is incidentally present, but
403
- * `post_start` must not depend on repo contents (that's `post_clone`).
402
+ * Environment lifecycle scripts, in order: build_base, after_checkout,
403
+ * before_start. The first two produce reusable snapshots; before_start runs
404
+ * before an agent starts or resumes its session. Scripts run as the environment's
405
+ * user in the workspace directory `/sandbox`. A nonzero exit fails the session.
404
406
  *
405
- * `post_clone` runs after all repos are cloned/checked out, before the agent —
406
- * repo-dependent setup (`pip install -r requirements.txt`, codegen).
407
- *
408
- * Hooks run on every run and their output is never cached. A dependency
409
- * install whose result should be reused across runs belongs in `image.setup`
410
- * (baked into the cached image) instead; keep hooks for per-run work — e.g.
411
- * anything that touches run-scoped credentials.
407
+ * Legacy post_start/post_clone scripts remain supported for existing configs;
408
+ * both run after workspace preparation, before the agent starts or resumes.
409
+ * They cannot be combined with the new lifecycle fields.
412
410
  */
413
411
  interface EnvironmentHooks {
412
+ /**
413
+ * Prepare the requested source revision after Ellipsis checks out all repositories, before saving the prepared environment. Skipped when that prepared environment is reused.
414
+ */
415
+ after_checkout: EnvironmentScript | string | null;
416
+ /**
417
+ * Run before the agent starts or resumes a session, after the environment is ready. This hook is not cached and adds to session startup time.
418
+ */
419
+ before_start: EnvironmentScript | string | null;
420
+ /**
421
+ * Build a reusable environment before full checkout. Cached by declared inputs, script, toolchain, resources, and build configuration. A string is shorthand for run with all repositories as inputs.
422
+ */
423
+ build_base: EnvironmentBaseBuild | string | null;
424
+ /**
425
+ * Legacy session startup script. Use before_start for session setup or after_checkout for cached source preparation.
426
+ */
414
427
  post_clone: string | null;
428
+ /**
429
+ * Legacy session startup script. Use before_start in new configurations.
430
+ */
415
431
  post_start: string | null;
416
432
  }
417
433
  /**
418
- * How to customize the container image the agent runs in. You
419
- * contribute appended layers (`dockerfile_append`) and a build-time script
420
- * (`setup`) only — Ellipsis owns FROM / base tooling / entrypoint / user.
421
- * Today only inline bodies are supported; a file reference (resolved at the
422
- * run's SHA) will come later.
423
- *
424
- * The split: `dockerfile_append` runs when the image is assembled, before any
425
- * repo exists — toolchain installs (a package manager binary, apt packages).
426
- * `setup` runs at image-build time *after* the configured repositories are
427
- * checked out, and its output is captured by the filesystem snapshot that
428
- * becomes the cached image — dependency installs (`poetry install`,
429
- * `npm install`), so later runs start with deps already on disk. Neither runs
430
- * per run; that's `hooks.post_start` / `hooks.post_clone`.
434
+ * An inline shell script run as the environment's user, with the workspace
435
+ * directory `/sandbox` as cwd.
436
+ */
437
+ interface EnvironmentScript {
438
+ /**
439
+ * Shell script to run in the workspace directory `/sandbox`.
440
+ */
441
+ run: string;
442
+ }
443
+ /**
444
+ * Create a reusable base, optionally using only selected repository files.
431
445
  */
432
- interface EnvironmentImage {
433
- dockerfile_append: string | null;
434
- setup: string | null;
446
+ interface EnvironmentBaseBuild {
447
+ /**
448
+ * Exact files relative to the workspace directory `/sandbox`, including the repository name. Only these files are available during build_base and their contents and modes determine reuse. Omit to use all repositories and invalidate on any source change; [] means no repository files.
449
+ */
450
+ inputs: string[] | null;
451
+ /**
452
+ * Shell script to run in the workspace directory `/sandbox`.
453
+ */
454
+ run: string;
435
455
  }
436
456
  /**
437
457
  * One built-in MCP server this agent opts into by name (`linear`/`slack`).
@@ -447,9 +467,9 @@ interface McpServerRef {
447
467
  }
448
468
  /**
449
469
  * A bring-your-own stdio MCP server: the harness spawns `command` inside
450
- * the sandbox and speaks JSON-RPC over its stdin/stdout. The command must be
451
- * runnable in the sandbox image — install its runtime via `image.setup` /
452
- * `image.dockerfile_append` if the base image lacks it.
470
+ * the environment and speaks JSON-RPC over its stdin/stdout. The command must
471
+ * be runnable in the environment image — install its runtime via `hooks.build_base` /
472
+ * `hooks.after_checkout` if the managed environment lacks it.
453
473
  *
454
474
  * `env` values may embed `${NAME}` references, resolved at run time from the
455
475
  * account's secrets store (see `mcp_secret_refs`); everything else is passed
@@ -465,7 +485,7 @@ interface McpStdioServer {
465
485
  }
466
486
  /**
467
487
  * A bring-your-own remote MCP server: the harness talks HTTP to `url`.
468
- * Nothing runs in the sandbox image. `headers` carry static auth (e.g.
488
+ * Nothing runs in the environment image. `headers` carry static auth (e.g.
469
489
  * `Authorization: Bearer ${TOKEN}`); values may embed `${NAME}` secret
470
490
  * references, resolved at run time from the account's secrets store.
471
491
  */
@@ -476,17 +496,12 @@ interface McpRemoteServer {
476
496
  name: string;
477
497
  url: string;
478
498
  }
479
- interface RepositoryRef {
480
- name: string;
481
- owner: string | null;
482
- ref: string | null;
483
- }
484
499
  /**
485
- * One environment variable injected into the agent's sandbox.
500
+ * One environment variable injected into the session's environment.
486
501
  *
487
502
  * `value`, when set, is a literal injected as-is — use it for non-secret
488
503
  * config (LOG_LEVEL, an API base URL). When `value` is omitted the value is
489
- * resolved at run time from the account's sandbox-secrets store (dashboard
504
+ * resolved at run time from the account's secrets store (dashboard
490
505
  * / `PUT /v1/secrets`) by `name`, so a secret can be injected without
491
506
  * ever putting it in the config file. Either way the variable only reaches
492
507
  * agents that name it.
@@ -495,47 +510,6 @@ interface EnvironmentVariable {
495
510
  name: string;
496
511
  value: string | null;
497
512
  }
498
- /**
499
- * Native Claude Code options for an explicitly selected harness.
500
- */
501
- interface ClaudeConfig {
502
- effort: EffortLevel | null;
503
- fallback_model: string | null;
504
- max_turns: number | null;
505
- model: string | null;
506
- settings: SettingsRef | null;
507
- type: 'claude_code';
508
- }
509
- /**
510
- * A config-declared Claude Code settings.json, resolved at run start and
511
- * passed to `claude --settings <path>`. That is the CLI settings tier — BELOW
512
- * Ellipsis's managed-settings.json floor — so it customizes behavior (model
513
- * permissions, includeCoAuthoredBy, statusLine, ...) but can never weaken a
514
- * security setting. Lets a team point the cloud agent at the same settings file
515
- * they already use with Claude Code locally instead of re-encoding it as YAML.
516
- */
517
- interface SettingsRef {
518
- path: string;
519
- repository: RepositoryRef | null;
520
- }
521
- /**
522
- * Native options supported by the current Codex adapter.
523
- *
524
- * Options and capabilities expand only when their runtime behavior is tested.
525
- * Unknown options are rejected instead of silently ignored.
526
- */
527
- interface CodexConfig {
528
- /**
529
- * Reasoning effort for every turn. Omit to use the model default.
530
- */
531
- effort: CodexEffortLevel | null;
532
- model: string;
533
- type: 'codex';
534
- }
535
- interface SystemFileRef {
536
- file: string;
537
- repository: RepositoryRef | null;
538
- }
539
513
  /**
540
514
  * JSON Schema for the harness's structured result, when certified.
541
515
  */
@@ -546,18 +520,18 @@ interface OutputConfig {
546
520
  }
547
521
  /**
548
522
  * What the agent is allowed to touch, per credential the platform mints
549
- * into its sandbox. Distinct from `environment:`, which is where the agent
550
- * runs; this is what it may do from there.
523
+ * into its session's environment. Distinct from `environment:`, which is
524
+ * where the agent runs; this is what it may do from there.
551
525
  *
552
- * `ellipsis` scopes the sandbox's Ellipsis API token
553
- * (`ELLIPSIS_API_TOKEN`, what the in-sandbox `agent` CLI authenticates
554
- * with). `true` / the string `all` (the default) grant the full sandbox
555
- * ceiling — everything a sandbox token can ever do. A map narrows it per
526
+ * `ellipsis` scopes the session's Ellipsis API token (`ELLIPSIS_API_TOKEN`,
527
+ * what the `agent` CLI running inside the session authenticates with).
528
+ * `true` / the string `all` (the default) grant the full session token
529
+ * ceiling — everything a session token can ever do. A map narrows it per
556
530
  * resource (see `EllipsisPermissions`); the minted token carries
557
531
  * the intersection, so a config can only ever reduce access. `false` fails
558
532
  * validation — an agent with no API token cannot report its own progress.
559
533
  *
560
- * `github` scopes the sandbox's GitHub installation token (`GH_TOKEN`) —
534
+ * `github` scopes the session's GitHub installation token (`GH_TOKEN`) —
561
535
  * see `GithubPermissions`. GitHub enforces it at mint time.
562
536
  */
563
537
  interface PermissionsConfig {
@@ -568,8 +542,8 @@ interface PermissionsConfig {
568
542
  * `permissions.ellipsis` as a map: resource → level | grant | list of
569
543
  * grants. Levels are hierarchical (read < write < delete), so `write`
570
544
  * includes `read`. An unlisted resource is denied. The whole block is
571
- * intersected with the platform's sandbox ceiling at token mint — it can
572
- * narrow what a sandbox token may do, never exceed it.
545
+ * intersected with the platform's session token ceiling at token mint — it can
546
+ * narrow what a session token may do, never exceed it.
573
547
  */
574
548
  interface EllipsisPermissions {
575
549
  [k: string]: Level | EllipsisGrant | (Level | EllipsisGrant)[];
@@ -585,8 +559,8 @@ interface EllipsisGrant {
585
559
  }
586
560
  /**
587
561
  * The agent's GitHub access: the scope of the installation token minted for
588
- * its sandbox — the credential `git`, `gh`, and the GitHub MCP server
589
- * authenticate with.
562
+ * its session's environment — the credential `git`, `gh`, and the GitHub MCP
563
+ * server authenticate with.
590
564
  *
591
565
  * By default the token carries the installation's full permissions on all of
592
566
  * the installation's repositories. `permissions` narrows what it may do:
@@ -597,7 +571,7 @@ interface EllipsisGrant {
597
571
  * the listed repos, by name (they must belong to the installation).
598
572
  *
599
573
  * Restriction is enforced by GitHub, not by Ellipsis: the token itself is
600
- * minted with the reduced scope, so nothing running in the sandbox can
574
+ * minted with the reduced scope, so nothing running in the environment can
601
575
  * exceed it.
602
576
  */
603
577
  interface GithubPermissions {
@@ -672,47 +646,80 @@ interface ReactSentry {
672
646
  interface ReactSlackChannel {
673
647
  }
674
648
  /**
675
- * The spend budget enforced for this session.
649
+ * When the session was archived and the GitHub user who archived it.
676
650
  */
677
- interface SessionBudget {
651
+ interface SessionArchived {
652
+ /**
653
+ * When the session was archived.
654
+ */
655
+ at: string;
678
656
  /**
679
- * The spend budget resolved for this session, in cents.
657
+ * The GitHub user who archived the session; null if unknown or unavailable.
680
658
  */
681
- cents: number;
682
- source: BudgetSource;
659
+ by: GithubAccountSnippet | null;
683
660
  }
684
661
  /**
685
- * What one session runs on: its selected harness, where it runs, what it
686
- * may touch, its skills, its exit contract, and its spend cap. Every session
687
- * freezes one of these (`agent_sessions.session_config`); an automation
688
- * carries one under `session:` (`AutomationConfig.session`); and
689
- * `POST /v1/sessions` is this shape flattened onto the request body, plus the
690
- * run settings. Nothing in here is an automation's identity or trigger —
691
- * those belong to `AutomationConfig`.
662
+ * Sometimes the GitHub API returns a user of github (can include bots)
663
+ * using this snippet instead of the full GithubAccount model. One example,
664
+ * is when the API returns a pull request.
692
665
  *
693
- * Field order is the canonical key order for `session:` blocks and YAML
694
- * exports: what runs (`harness`, `instructions`), where (`environment`), what it may
695
- * touch (`permissions`), then the rest.
666
+ * This is the least amount of info we need to represent a GitHub account.
696
667
  */
697
- interface SessionConfig1 {
698
- budget: BudgetConfig;
699
- environment: string | EnvironmentConfig;
668
+ interface GithubAccountSnippet {
669
+ avatar_url: string;
670
+ id: number;
671
+ login: string;
672
+ type: GithubAccountType;
673
+ }
674
+ /**
675
+ * The principal this session is attributed to.
676
+ */
677
+ interface SessionAttribution {
700
678
  /**
701
- * The explicitly selected harness and its native options.
679
+ * Identifier of the principal the session is attributed to.
702
680
  */
703
- harness: ClaudeConfig | CodexConfig;
681
+ id: string | null;
704
682
  /**
705
- * Instructions appended to the harness's own prompt. Text and repository file references are resolved in order.
683
+ * Kind of principal the session is attributed to (e.g. a GitHub user or an API key).
706
684
  */
707
- instructions: string | SystemFileRef | (string | SystemFileRef)[];
708
- output: OutputConfig | null;
709
- permissions: PermissionsConfig;
710
- skills: SkillRef[];
685
+ type: AttributionType | null;
686
+ /**
687
+ * The GitHub user the session is attributed to, resolved at read time. Null when the attribution is not a GitHub user.
688
+ */
689
+ user: GithubAccountSnippet | null;
690
+ }
691
+ /**
692
+ * Whether the session can take more messages, and whether an agent is warm to answer one.
693
+ */
694
+ interface SessionConversation {
695
+ /**
696
+ * Whether the session stays open after its first turn.
697
+ */
698
+ interactive: boolean;
699
+ prompting: SessionPrompting;
700
+ state: SessionState;
701
+ /**
702
+ * Whether an agent is ready to answer the next message right away. When false, the next message first prepares an environment, which takes longer. A hint only; clients need no logic on it.
703
+ */
704
+ warm: boolean;
711
705
  }
712
706
  /**
713
- * What the session cost, in millicents, broken down by leg and carrying its own total.
707
+ * The session's policy for direct messages. Caller authorization and message validation are checked separately.
708
+ */
709
+ interface SessionPrompting {
710
+ blocked_reason: PromptBlockedReason | null;
711
+ detail: string | null;
712
+ enabled: boolean;
713
+ surface_name: string | null;
714
+ }
715
+ /**
716
+ * What the session has cost so far, in millicents, broken down by leg and carrying its own total.
714
717
  */
715
718
  interface SessionCost {
719
+ /**
720
+ * CPU spend in millicents.
721
+ */
722
+ cpu: number;
716
723
  /**
717
724
  * Platform fee in millicents.
718
725
  */
@@ -722,41 +729,170 @@ interface SessionCost {
722
729
  */
723
730
  llm: number;
724
731
  /**
725
- * Sandbox CPU spend in millicents.
726
- */
727
- sandbox_cpu: number;
728
- /**
729
- * Sandbox memory spend in millicents.
732
+ * Memory spend in millicents.
730
733
  */
731
- sandbox_memory: number;
734
+ memory: number;
732
735
  /**
733
- * The grand total in millicents: llm + sandbox_cpu + sandbox_memory + fee.
736
+ * The grand total in millicents: llm + cpu + memory + fee.
734
737
  */
735
738
  total: number;
736
739
  }
737
740
  /**
738
- * The environment the session resolved: the saved environment's id and how it was chosen. The environment's frozen body is `config.environment`.
741
+ * The full environment configuration frozen when the session was created, with the saved environment's id and how it was chosen.
739
742
  */
740
743
  interface SessionEnvironment {
744
+ compute: ComputeConfig1;
745
+ hooks: EnvironmentHooks1;
741
746
  /**
742
- * Identifier of the saved environment the session's config resolved. Null for an inline environment block or the built-in basic sandbox.
747
+ * Identifier of the saved environment the session's config resolved. Null for an inline environment block or the built-in basic environment.
743
748
  */
744
- environment_id: string | null;
749
+ id: string | null;
750
+ mcp_servers: (string | McpServerRef | McpStdioServer | McpRemoteServer)[];
751
+ repositories: RepositoryRef[];
745
752
  /**
746
- * How the environment was chosen (request, automation, platform_default; repo_default and account_default on sessions from before those ladders were removed). Null when the config carried its own inline environment.
753
+ * How the environment was chosen (request, agent, platform_default; repo_default and account_default on sessions from before those ladders were removed). An inline request uses request; an inline environment declared in session configuration has no source.
747
754
  */
748
755
  source: EnvironmentSource | null;
756
+ variables: EnvironmentVariable[];
757
+ }
758
+ /**
759
+ * Environment compute sizing. Every field is optional; an omitted field
760
+ * inherits the platform default (2 vCPU / 4096 MiB / 3600s). A resolved value
761
+ * outside the platform bounds fails validation loudly (a sync error on the
762
+ * config) rather than being clamped silently.
763
+ *
764
+ * `memory` and `timeout` each accept a shorthand string ("8GB", "30m") or an
765
+ * explicit units object ({gb: 8}, {minutes: 30}); the `memory_mib` /
766
+ * `timeout_seconds` properties resolve either form to the canonical integer
767
+ * the environment is sized with.
768
+ *
769
+ * `timeout` is the max wall-clock the agent may run in one environment before
770
+ * it is stopped, capped at 1h (equal to the default, so today the knob only
771
+ * shortens a session; the cap matches the 1-hour validity of the session's
772
+ * GitHub token).
773
+ *
774
+ * Compute currently uses a temporary flat one-cent amount each time an
775
+ * environment is started for a session, subject to the account's existing
776
+ * free-compute exemptions.
777
+ */
778
+ interface ComputeConfig1 {
779
+ cpu: number | null;
780
+ memory: string | MemorySize | null;
781
+ timeout: string | Duration | null;
782
+ }
783
+ /**
784
+ * Environment lifecycle scripts, in order: build_base, after_checkout,
785
+ * before_start. The first two produce reusable snapshots; before_start runs
786
+ * before an agent starts or resumes its session. Scripts run as the environment's
787
+ * user in the workspace directory `/sandbox`. A nonzero exit fails the session.
788
+ *
789
+ * Legacy post_start/post_clone scripts remain supported for existing configs;
790
+ * both run after workspace preparation, before the agent starts or resumes.
791
+ * They cannot be combined with the new lifecycle fields.
792
+ */
793
+ interface EnvironmentHooks1 {
794
+ /**
795
+ * Prepare the requested source revision after Ellipsis checks out all repositories, before saving the prepared environment. Skipped when that prepared environment is reused.
796
+ */
797
+ after_checkout: EnvironmentScript | string | null;
798
+ /**
799
+ * Run before the agent starts or resumes a session, after the environment is ready. This hook is not cached and adds to session startup time.
800
+ */
801
+ before_start: EnvironmentScript | string | null;
802
+ /**
803
+ * Build a reusable environment before full checkout. Cached by declared inputs, script, toolchain, resources, and build configuration. A string is shorthand for run with all repositories as inputs.
804
+ */
805
+ build_base: EnvironmentBaseBuild | string | null;
806
+ /**
807
+ * Legacy session startup script. Use before_start for session setup or after_checkout for cached source preparation.
808
+ */
809
+ post_clone: string | null;
810
+ /**
811
+ * Legacy session startup script. Use before_start in new configurations.
812
+ */
813
+ post_start: string | null;
814
+ }
815
+ interface GithubPullRequestEvent {
816
+ action: PullRequestAction | 'review_commented';
817
+ actor: SessionEventActor | null;
818
+ branch: string;
819
+ number: number;
820
+ repository: string;
821
+ title: string;
822
+ type: 'github.pull_request';
823
+ url: string;
824
+ }
825
+ /**
826
+ * The event's initiator, when known; never inferred from resource ownership.
827
+ */
828
+ interface SessionEventActor {
829
+ avatar_url: string | null;
830
+ is_bot: boolean | null;
831
+ name: string;
832
+ }
833
+ interface GithubIssueEvent {
834
+ action: IssueAction;
835
+ actor: SessionEventActor | null;
836
+ number: number;
837
+ repository: string;
838
+ title: string;
839
+ type: 'github.issue';
840
+ url: string;
841
+ }
842
+ interface GithubPushEvent {
843
+ actor: SessionEventActor | null;
844
+ after: string;
845
+ before: string;
846
+ branch: string;
847
+ repository: string;
848
+ type: 'github.push';
849
+ url: string;
850
+ }
851
+ interface LinearIssueEvent {
852
+ action: LinearIssueAction | 'commented';
853
+ actor: SessionEventActor | null;
854
+ identifier: string | null;
855
+ number: number;
856
+ title: string;
857
+ type: 'linear.issue';
858
+ url: string;
859
+ }
860
+ interface SlackMessageEvent {
861
+ action: 'message' | 'app_mention';
862
+ actor: SessionEventActor | null;
863
+ channel_id: string;
864
+ channel_name: string | null;
865
+ message_ts: string;
866
+ thread_ts: string | null;
867
+ type: 'slack.message';
868
+ url: string;
869
+ }
870
+ interface SlackChannelCreatedEvent {
871
+ actor: SessionEventActor | null;
872
+ channel_id: string;
873
+ channel_name: string | null;
874
+ type: 'slack.channel_created';
875
+ url: string;
876
+ }
877
+ interface SentryAlertEvent {
878
+ action: SentryAction;
879
+ actor: SessionEventActor | null;
880
+ organization_slug: string;
881
+ project_slug: string | null;
882
+ title: string | null;
883
+ type: 'sentry.alert';
884
+ url: string | null;
749
885
  }
750
886
  /**
751
- * Every repo the session touched. Small enough to ride on `agent_sessions`
887
+ * Every repo the session touched. Small enough to ride on `sessions`
752
888
  * and be returned by every session read.
753
889
  */
754
890
  interface SessionGit {
755
891
  repos: SessionGitRepo[];
756
892
  }
757
893
  /**
758
- * One checkout in the session's sandbox and everything the session did to
759
- * it, split by whether it survived the sandbox.
894
+ * One checkout in the session's environment and everything the session did
895
+ * to it, split by whether it survived the environment.
760
896
  */
761
897
  interface SessionGitRepo {
762
898
  commits: SessionGitCommit[];
@@ -770,7 +906,7 @@ interface SessionGitRepo {
770
906
  }
771
907
  /**
772
908
  * One commit the session created in this repo (everything past the
773
- * provisioning checkout's sha), captured from the sandbox rather than the
909
+ * provisioning checkout's sha), captured from the environment rather than the
774
910
  * transcript so it stays correct through amends, rebases, and commits made by
775
911
  * scripts. The repo is the parent object, so it is not repeated here.
776
912
  */
@@ -804,74 +940,167 @@ interface SessionGitPr {
804
940
  url: string;
805
941
  }
806
942
  /**
807
- * What preceded this session, if anything.
943
+ * The saved handler and its display name when the session started.
944
+ */
945
+ interface SessionHandler {
946
+ /**
947
+ * The handler's effective display name when the session started: ellipsis.name, or the service default (Slack, GitHub, Linear, or sentry).
948
+ */
949
+ agent_name: string;
950
+ /**
951
+ * Identifier of the saved handler.
952
+ */
953
+ id: string;
954
+ service: HandlerService;
955
+ /**
956
+ * Content fingerprint of the validated handler configuration used when the session started. This is not the Git commit SHA.
957
+ */
958
+ sha: string;
959
+ }
960
+ /**
961
+ * The predecessor session this session continues.
808
962
  */
809
963
  interface SessionParent {
810
964
  /**
811
- * How this session relates to its parent session, if any.
965
+ * Identifier of the predecessor session this session continues, if any.
812
966
  */
813
- kind: ParentKind | null;
967
+ session_id: string | null;
968
+ }
969
+ /**
970
+ * What the session may touch, per minted credential.
971
+ */
972
+ interface PermissionsConfig1 {
973
+ ellipsis: (true | 'all') | EllipsisPermissions;
974
+ github: GithubPermissions;
975
+ }
976
+ /**
977
+ * A live one-line summary of what the session is doing, refreshed
978
+ * every few steps while it runs.
979
+ */
980
+ interface SessionSummary {
814
981
  /**
815
- * Identifier of the original session this one was replayed from, if it was started via replay.
982
+ * When this summary line was generated. Null on summaries written before generation time was tracked.
816
983
  */
817
- replayed_from_session_id: string | null;
984
+ created_at: string | null;
818
985
  /**
819
- * Identifier of the parent session that spawned this one, if any.
986
+ * One-line description of what the session is doing.
820
987
  */
821
- session_id: string | null;
988
+ description: string;
822
989
  }
823
990
  /**
824
- * Whether a client may send this session a message and, when it may not, the reason to show instead of a composer.
991
+ * The tokens the session spent and the model they went to. `total` includes the prompt-cache lanes.
825
992
  */
826
- interface SessionPrompting {
827
- blocked_reason: PromptBlockedReason | null;
828
- detail: string | null;
829
- enabled: boolean;
830
- surface_name: string | null;
993
+ interface SessionTokens {
994
+ /**
995
+ * Tokens written to the prompt cache.
996
+ */
997
+ cache_creation: number;
998
+ /**
999
+ * Tokens read from the prompt cache.
1000
+ */
1001
+ cache_read: number;
1002
+ /**
1003
+ * Input tokens used.
1004
+ */
1005
+ input: number;
1006
+ /**
1007
+ * The model the token counts are attributed to.
1008
+ */
1009
+ model: string;
1010
+ /**
1011
+ * Output tokens used.
1012
+ */
1013
+ output: number;
1014
+ /**
1015
+ * Total tokens consumed, INCLUDING the prompt-cache reads and writes — the same basis the token cost is priced on.
1016
+ */
1017
+ total: number;
831
1018
  }
832
1019
  /**
833
- * The stop request, if the session was stopped.
1020
+ * One message and the agent's answer to it. A turn is `pending` from the
1021
+ * moment its message is received until the agent starts on it, `running`
1022
+ * while the agent works, then `completed`, `failed`, `stopped`, or
1023
+ * `cancelled`.
834
1024
  */
835
- interface SessionStopped {
1025
+ interface SessionTurn {
1026
+ cost: SessionCost1;
1027
+ /**
1028
+ * When the turn's message was received.
1029
+ */
1030
+ created_at: string;
1031
+ /**
1032
+ * A human-readable explanation of a failed, stopped, or cancelled turn.
1033
+ */
1034
+ detail: string | null;
1035
+ /**
1036
+ * When the turn reached its final status.
1037
+ */
1038
+ ended_at: string | null;
1039
+ /**
1040
+ * Unique identifier of the turn.
1041
+ */
1042
+ id: string;
1043
+ /**
1044
+ * Position in the session, starting at 0.
1045
+ */
1046
+ index: number;
836
1047
  /**
837
- * When a stop was requested, if one was.
1048
+ * Why the turn failed or was cancelled; null on every other status.
838
1049
  */
839
- at: string | null;
1050
+ reason: TurnReason | null;
840
1051
  /**
841
- * GitHub account id of the user who stopped the session, if known.
1052
+ * When the agent started on the message.
842
1053
  */
843
- by: number | null;
1054
+ started_at: string | null;
1055
+ status: TurnStatus;
844
1056
  /**
845
- * The GitHub user who stopped the session, resolved at read time.
1057
+ * When and by whom a stop was requested; null when none was.
846
1058
  */
847
- by_user: GithubAccountSnippet | null;
1059
+ stopped: SessionStopped | null;
1060
+ tokens: SessionTokens1;
848
1061
  }
849
1062
  /**
850
- * A live one-line summary of what the session is working on, refreshed
851
- * every few steps while it runs.
1063
+ * What the turn cost so far, in millicents, broken down by leg.
852
1064
  */
853
- interface SessionSummary {
1065
+ interface SessionCost1 {
854
1066
  /**
855
- * When this summary line was generated. Null on summaries written before generation time was tracked.
1067
+ * CPU spend in millicents.
856
1068
  */
857
- created_at: string | null;
1069
+ cpu: number;
858
1070
  /**
859
- * One-line description of what the session is working on.
1071
+ * Platform fee in millicents.
860
1072
  */
861
- description: string;
1073
+ fee: number;
1074
+ /**
1075
+ * LLM spend in millicents.
1076
+ */
1077
+ llm: number;
1078
+ /**
1079
+ * Memory spend in millicents.
1080
+ */
1081
+ memory: number;
1082
+ /**
1083
+ * The grand total in millicents: llm + cpu + memory + fee.
1084
+ */
1085
+ total: number;
862
1086
  }
863
1087
  /**
864
- * The public status projection: the durable conversation (`session`), the current execution (`run`), and the one derived `status` word.
1088
+ * When a stop was requested and the GitHub user who requested it.
865
1089
  */
866
- interface SessionSurface {
867
- run: RunStatus | null;
868
- session: SessionLiveness | null;
869
- status: string | null;
1090
+ interface SessionStopped {
1091
+ /**
1092
+ * When a stop was requested.
1093
+ */
1094
+ at: string;
1095
+ /**
1096
+ * The GitHub user who stopped the session, resolved at read time. Null if the user is unknown or unavailable.
1097
+ */
1098
+ by: GithubAccountSnippet | null;
870
1099
  }
871
1100
  /**
872
- * The tokens the session spent and the model they went to. `total` includes the prompt-cache lanes.
1101
+ * The tokens the turn spent and the model they went to.
873
1102
  */
874
- interface SessionTokens {
1103
+ interface SessionTokens1 {
875
1104
  /**
876
1105
  * Tokens written to the prompt cache.
877
1106
  */
@@ -897,36 +1126,18 @@ interface SessionTokens {
897
1126
  */
898
1127
  total: number;
899
1128
  }
900
- /**
901
- * The external event that started a session, without raw webhook payloads.
902
- */
903
- interface SessionTrigger {
904
- action: string | null;
905
- actor: SessionTriggerActor | null;
906
- branch: string | null;
907
- number: number | null;
908
- repository: string | null;
909
- surface: string | null;
910
- title: string | null;
911
- url: string | null;
912
- }
913
- interface SessionTriggerActor {
914
- avatar_url: string | null;
915
- is_bot: boolean;
916
- name: string;
917
- }
918
- interface AutomationListStreamMessage {
919
- automations: Automation[];
920
- type: 'automations';
1129
+ interface AgentListStreamMessage {
1130
+ agents: Agent[];
1131
+ type: 'agents';
921
1132
  }
922
1133
  /**
923
- * An automation: a saved agent definition that runs on its trigger or
1134
+ * An agent: a saved agent definition that runs on its trigger or
924
1135
  * when invoked, plus where it syncs from and the state of that sync.
925
1136
  */
926
- interface Automation {
927
- config: AutomationConfig1;
1137
+ interface Agent {
1138
+ config: AgentConfig1;
928
1139
  /**
929
- * When the automation was created.
1140
+ * When the agent was created.
930
1141
  */
931
1142
  created_at: string;
932
1143
  /**
@@ -934,11 +1145,11 @@ interface Automation {
934
1145
  */
935
1146
  display_name: string | null;
936
1147
  /**
937
- * The GitHub account that last edited the automation, when the edit came from a known user.
1148
+ * The GitHub account that last edited the agent, when the edit came from a known user.
938
1149
  */
939
1150
  edited_by: GithubAccountSnippet | null;
940
1151
  /**
941
- * Unique identifier of the automation.
1152
+ * Unique identifier of the agent.
942
1153
  */
943
1154
  id: string;
944
1155
  /**
@@ -946,24 +1157,24 @@ interface Automation {
946
1157
  */
947
1158
  last_session_created_at: string | null;
948
1159
  /**
949
- * The most recent session this automation started, or null if it has never run.
1160
+ * The most recent session this agent started, or null if it has never run.
950
1161
  */
951
1162
  last_session_id: string | null;
952
1163
  /**
953
- * The parse or validation error from the most recent sync attempt, or null when it succeeded. A non-null value means the automation is not running the YAML currently on the branch.
1164
+ * The parse or validation error from the most recent sync attempt, or null when it succeeded. A non-null value means the agent is not running the YAML currently on the branch.
954
1165
  */
955
1166
  last_sync_error: string | null;
956
1167
  /**
957
- * The last commit the automation was synced from.
1168
+ * The last commit the agent was synced from.
958
1169
  */
959
1170
  last_synced_commit_sha: string | null;
960
1171
  managed_by: ConfigManagedBy;
961
1172
  /**
962
- * The automation's account-unique addressable name (a slug of its display name); usable anywhere an automation is referenced, interchangeably with the id.
1173
+ * The agent's account-unique addressable name (a slug of its display name); usable anywhere an agent is referenced, interchangeably with the id.
963
1174
  */
964
1175
  name: string | null;
965
1176
  /**
966
- * The open pull request that adds this automation's file. Non-null means the automation is not live yet: it starts running once the pull request merges and syncs.
1177
+ * The open pull request that adds this agent's file. Non-null means the agent is not live yet: it starts running once the pull request merges and syncs.
967
1178
  */
968
1179
  pending_pull_request_url: string | null;
969
1180
  /**
@@ -971,27 +1182,27 @@ interface Automation {
971
1182
  */
972
1183
  sha: string;
973
1184
  /**
974
- * The repository, path, and branch the automation syncs from. Null only transiently, before the creating pull request's file lands on the branch.
1185
+ * The repository, path, and branch the agent syncs from. Null only transiently, before the creating pull request's file lands on the branch.
975
1186
  */
976
1187
  source_details: GithubSourceDetails | null;
977
1188
  /**
978
- * When the automation was last updated.
1189
+ * When the agent was last updated.
979
1190
  */
980
1191
  updated_at: string;
981
1192
  }
982
1193
  /**
983
- * The automation definition itself, in the same schema as its YAML file: identity, trigger, input contract, and the session block.
1194
+ * The agent definition itself, in the same schema as its YAML file: identity, trigger, input contract, and the session block.
984
1195
  */
985
- interface AutomationConfig1 {
986
- ellipsis: AutomationIdentity;
1196
+ interface AgentConfig1 {
1197
+ ellipsis: AgentIdentity;
987
1198
  input: InputContract | null;
988
1199
  session: SessionConfig;
989
1200
  trigger: (CronTrigger | ReactTrigger) | null;
990
1201
  }
991
1202
  /**
992
- * Identifies the file a GitHub-sourced automation is synced from.
1203
+ * Identifies the file a GitHub-sourced agent is synced from.
993
1204
  *
994
- * Keyed on the repository ID (not owner/name) so repository and org renames
1205
+ * Identified by the repository ID (not owner/name) so repository and org renames
995
1206
  * don't orphan the config; resolve display names from gh_repositories at
996
1207
  * read time.
997
1208
  */
@@ -1004,20 +1215,19 @@ interface CollectionStreamHeartbeat {
1004
1215
  type: 'heartbeat';
1005
1216
  }
1006
1217
  interface SandboxSnapshotFrame {
1007
- sandbox: SandboxResponse;
1218
+ sandbox: VMExecutionResponse;
1008
1219
  type: 'snapshot';
1009
1220
  }
1010
- interface SandboxResponse {
1221
+ interface VMExecutionResponse {
1011
1222
  cache_tier: SandboxCacheTier | null;
1012
1223
  cost_sandbox_cpu: number;
1013
1224
  cost_sandbox_memory: number;
1014
1225
  cpu: number;
1015
- dockerfile: string | null;
1016
1226
  encrypted_ports: number[];
1017
1227
  environment_variable_keys: string[];
1018
1228
  failed_at: string | null;
1229
+ hooks: EnvironmentHooks2;
1019
1230
  id: string;
1020
- image_setup: string | null;
1021
1231
  memory_mib: number;
1022
1232
  phase_timings: {
1023
1233
  [k: string]: number;
@@ -1037,6 +1247,38 @@ interface SandboxResponse {
1037
1247
  type: SandboxType;
1038
1248
  unencrypted_ports: number[];
1039
1249
  }
1250
+ /**
1251
+ * Environment lifecycle scripts, in order: build_base, after_checkout,
1252
+ * before_start. The first two produce reusable snapshots; before_start runs
1253
+ * before an agent starts or resumes its session. Scripts run as the environment's
1254
+ * user in the workspace directory `/sandbox`. A nonzero exit fails the session.
1255
+ *
1256
+ * Legacy post_start/post_clone scripts remain supported for existing configs;
1257
+ * both run after workspace preparation, before the agent starts or resumes.
1258
+ * They cannot be combined with the new lifecycle fields.
1259
+ */
1260
+ interface EnvironmentHooks2 {
1261
+ /**
1262
+ * Prepare the requested source revision after Ellipsis checks out all repositories, before saving the prepared environment. Skipped when that prepared environment is reused.
1263
+ */
1264
+ after_checkout: EnvironmentScript | string | null;
1265
+ /**
1266
+ * Run before the agent starts or resumes a session, after the environment is ready. This hook is not cached and adds to session startup time.
1267
+ */
1268
+ before_start: EnvironmentScript | string | null;
1269
+ /**
1270
+ * Build a reusable environment before full checkout. Cached by declared inputs, script, toolchain, resources, and build configuration. A string is shorthand for run with all repositories as inputs.
1271
+ */
1272
+ build_base: EnvironmentBaseBuild | string | null;
1273
+ /**
1274
+ * Legacy session startup script. Use before_start for session setup or after_checkout for cached source preparation.
1275
+ */
1276
+ post_clone: string | null;
1277
+ /**
1278
+ * Legacy session startup script. Use before_start in new configurations.
1279
+ */
1280
+ post_start: string | null;
1281
+ }
1040
1282
  interface SandboxRepository {
1041
1283
  id: number;
1042
1284
  name: string;
@@ -1055,7 +1297,7 @@ interface SandboxPort {
1055
1297
  unencrypted_port: number | null;
1056
1298
  }
1057
1299
  interface SandboxUpdateFrame {
1058
- sandbox: SandboxResponse;
1300
+ sandbox: VMExecutionResponse;
1059
1301
  type: 'sandbox';
1060
1302
  }
1061
1303
 
@@ -1075,7 +1317,7 @@ declare class Page<ItemT, ResponseT extends CursorResponse> implements AsyncIter
1075
1317
  }
1076
1318
 
1077
1319
  type S$1 = components['schemas'];
1078
- declare const TERMINAL_STATUSES: ReadonlySet<string>;
1320
+ declare function isTurnFinal(status: string): boolean;
1079
1321
  interface SessionsApi {
1080
1322
  get(sessionId: string): Promise<S$1['SessionResponse']>;
1081
1323
  stop(sessionId: string): Promise<S$1['SessionResponse']>;
@@ -1084,26 +1326,25 @@ interface SessionsApi {
1084
1326
  images?: S$1['ImageAttachment'][];
1085
1327
  idempotency_key?: string | null;
1086
1328
  }): Promise<S$1['SessionMessageResponse']>;
1087
- records(sessionId: string, options?: {
1088
- cursor?: string;
1089
- limit?: number;
1090
- }): Promise<unknown>;
1329
+ turns: {
1330
+ get(sessionId: string, turnId: string): Promise<S$1['SessionTurnResponse']>;
1331
+ };
1091
1332
  }
1092
- declare function isSettled(session: S$1['Session']): boolean;
1093
1333
  declare class SessionHandle {
1094
1334
  private readonly sessions;
1095
1335
  readonly id: string;
1096
1336
  session: S$1['Session'];
1337
+ turnId: string | null;
1097
1338
  constructor(sessions: SessionsApi, session: S$1['Session']);
1098
1339
  refresh(): Promise<S$1['Session']>;
1099
1340
  wait(options?: {
1100
1341
  timeoutMs?: number;
1101
1342
  pollIntervalMs?: number;
1102
- }): Promise<S$1['Session']>;
1343
+ }): Promise<S$1['SessionTurn'] | null>;
1103
1344
  send(message: string, options?: {
1104
1345
  images?: S$1['ImageAttachment'][];
1105
1346
  idempotencyKey?: string;
1106
- }): Promise<S$1['SessionMessage']>;
1347
+ }): Promise<S$1['SessionMessageResponse']>;
1107
1348
  stop(): Promise<S$1['Session']>;
1108
1349
  }
1109
1350
 
@@ -1139,18 +1380,36 @@ declare class EllipsisAccountApiKeys {
1139
1380
  *
1140
1381
  * Authenticate as a dashboard user or with a user token. An organization
1141
1382
  * API key cannot create other keys. The secret is returned only once.
1383
+ *
1384
+ * Required permissions: write:tokens.
1385
+ * API key: Requires a CLI user token belonging to an account administrator.
1386
+ * CLI user token: Requires an account administrator.
1387
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1388
+ * Higher permission levels include lower levels: read < write < delete.
1142
1389
  */
1143
1390
  create(options: {
1144
1391
  name: string;
1145
1392
  }): Promise<S['CreateApiKeyResponse']>;
1146
1393
  /**
1147
1394
  * List Api Keys
1395
+ *
1396
+ * Required permissions: read:tokens.
1397
+ * API key: Supported.
1398
+ * CLI user token: Supported.
1399
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1400
+ * Higher permission levels include lower levels: read < write < delete.
1148
1401
  */
1149
1402
  list(): Promise<S['ListApiKeysResponse']>;
1150
1403
  /**
1151
1404
  * Revoke Api Key
1152
1405
  *
1153
1406
  * Revoke an organization key as a verified GitHub administrator.
1407
+ *
1408
+ * Required permissions: delete:tokens.
1409
+ * API key: Requires a CLI user token belonging to an account administrator.
1410
+ * CLI user token: Requires an account administrator.
1411
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1412
+ * Higher permission levels include lower levels: read < write < delete.
1154
1413
  */
1155
1414
  revoke(api_key_id: string): Promise<S['TokenRevokedResponse']>;
1156
1415
  }
@@ -1164,6 +1423,12 @@ declare class EllipsisAccountBillingAutoRecharge {
1164
1423
  *
1165
1424
  * An account without saved settings returns disabled defaults and no
1166
1425
  * card. No payment-method identifier or card details are exposed.
1426
+ *
1427
+ * Required permissions: read:account.
1428
+ * API key: Supported.
1429
+ * CLI user token: Supported.
1430
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1431
+ * Higher permission levels include lower levels: read < write < delete.
1167
1432
  */
1168
1433
  get(): Promise<S['AutoRechargeSettings']>;
1169
1434
  /**
@@ -1171,11 +1436,17 @@ declare class EllipsisAccountBillingAutoRecharge {
1171
1436
  *
1172
1437
  * Set your automatic credit recharge policy.
1173
1438
  *
1174
- * Requires a human account administrator; API keys and sandbox tokens
1439
+ * Requires a human account administrator; API keys and session tokens
1175
1440
  * cannot change this policy. Supply enabled explicitly. Saving amounts
1176
1441
  * with enabled=false keeps recharge off; enabling requires a saved card.
1177
1442
  * A recharge buys amount_cents of credit and charges the platform fee
1178
1443
  * in addition. Amounts and thresholds preserve exact cents.
1444
+ *
1445
+ * Required permissions: write:account.
1446
+ * API key: Requires a CLI user token belonging to an account administrator.
1447
+ * CLI user token: Requires an account administrator.
1448
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1449
+ * Higher permission levels include lower levels: read < write < delete.
1179
1450
  */
1180
1451
  set(options: {
1181
1452
  amount_cents: number;
@@ -1195,6 +1466,12 @@ declare class EllipsisAccountBilling {
1195
1466
  * Requires a human account administrator. Open the returned URL to
1196
1467
  * finish setup and return to Billing. Saving a card does not enable
1197
1468
  * auto-recharge or buy credit.
1469
+ *
1470
+ * Required permissions: write:account.
1471
+ * API key: Requires a CLI user token belonging to an account administrator.
1472
+ * CLI user token: Requires an account administrator.
1473
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1474
+ * Higher permission levels include lower levels: read < write < delete.
1198
1475
  */
1199
1476
  cardSetup(): Promise<S['BillingCheckout']>;
1200
1477
  /**
@@ -1206,6 +1483,12 @@ declare class EllipsisAccountBilling {
1206
1483
  * complete payment. Credit is granted only after payment succeeds;
1207
1484
  * the platform fee is charged in addition to amount_cents. Returning
1208
1485
  * to Billing carries the checkout session ID for receipt lookup.
1486
+ *
1487
+ * Required permissions: write:account.
1488
+ * API key: Requires a CLI user token belonging to an account administrator.
1489
+ * CLI user token: Requires an account administrator.
1490
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1491
+ * Higher permission levels include lower levels: read < write < delete.
1209
1492
  */
1210
1493
  checkout(options: {
1211
1494
  amount_cents: number;
@@ -1217,12 +1500,24 @@ declare class EllipsisAccountBilling {
1217
1500
  * bootstrap that otherwise fires lazily at the first session (Stripe
1218
1501
  * customer + usage subscription + the signup grant). A repeat call is
1219
1502
  * a no-op that returns the current state.
1503
+ *
1504
+ * Required permissions: write:account.
1505
+ * API key: Supported.
1506
+ * CLI user token: Supported.
1507
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1508
+ * Higher permission levels include lower levels: read < write < delete.
1220
1509
  */
1221
1510
  claimSignupCredit(): Promise<S['BillingStatus']>;
1222
1511
  /**
1223
1512
  * Get Fee Schedule
1224
1513
  *
1225
1514
  * Get the account's rate card, in US dollars.
1515
+ *
1516
+ * Required permissions: read:account.
1517
+ * API key: Supported.
1518
+ * CLI user token: Supported.
1519
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1520
+ * Higher permission levels include lower levels: read < write < delete.
1226
1521
  */
1227
1522
  feeSchedule(): Promise<S['FeeScheduleResponse']>;
1228
1523
  /**
@@ -1232,6 +1527,12 @@ declare class EllipsisAccountBilling {
1232
1527
  *
1233
1528
  * Returns only your account's grants. The total is before usage;
1234
1529
  * /v1/account/budget reports the available balance.
1530
+ *
1531
+ * Required permissions: read:account.
1532
+ * API key: Supported.
1533
+ * CLI user token: Supported.
1534
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1535
+ * Higher permission levels include lower levels: read < write < delete.
1235
1536
  */
1236
1537
  grants(): Promise<S['CreditGrantsResponse']>;
1237
1538
  /**
@@ -1241,6 +1542,12 @@ declare class EllipsisAccountBilling {
1241
1542
  *
1242
1543
  * The amount includes the platform fee and comes from Stripe. An
1243
1544
  * incomplete, missing, or other-account purchase returns 404.
1545
+ *
1546
+ * Required permissions: read:account.
1547
+ * API key: Supported.
1548
+ * CLI user token: Supported.
1549
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1550
+ * Higher permission levels include lower levels: read < write < delete.
1244
1551
  */
1245
1552
  purchase(checkout_id: string): Promise<S['CreditPurchaseReceipt']>;
1246
1553
  /**
@@ -1250,6 +1557,12 @@ declare class EllipsisAccountBilling {
1250
1557
  *
1251
1558
  * All amounts are integer US cents. The fee is added to the credit
1252
1559
  * amount; it does not reduce the credit granted.
1560
+ *
1561
+ * Required permissions: read:account.
1562
+ * API key: Supported.
1563
+ * CLI user token: Supported.
1564
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1565
+ * Higher permission levels include lower levels: read < write < delete.
1253
1566
  */
1254
1567
  purchaseOptions(): Promise<S['CreditPurchaseOptions']>;
1255
1568
  /**
@@ -1260,6 +1573,12 @@ declare class EllipsisAccountBilling {
1260
1573
  * Uses the same account gate as session admission, including credit,
1261
1574
  * contact email, and personal Claude subscription eligibility. Scoped
1262
1575
  * spend limits are reported separately by /v1/account/budget.
1576
+ *
1577
+ * Required permissions: read:account.
1578
+ * API key: Supported.
1579
+ * CLI user token: Supported.
1580
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1581
+ * Higher permission levels include lower levels: read < write < delete.
1263
1582
  */
1264
1583
  status(): Promise<S['BillingStatus']>;
1265
1584
  }
@@ -1279,6 +1598,12 @@ declare class EllipsisAccountModels {
1279
1598
  * Reads the same registry as the dashboard's rate table, so a
1280
1599
  * client's model picker can never drift from what's offered. The
1281
1600
  * selectable set is global; only the flag is account-scoped.
1601
+ *
1602
+ * Required permissions: read:templates.
1603
+ * API key: Supported.
1604
+ * CLI user token: Supported.
1605
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1606
+ * Higher permission levels include lower levels: read < write < delete.
1282
1607
  */
1283
1608
  list(): Promise<S['ModelsListResponse']>;
1284
1609
  }
@@ -1291,61 +1616,106 @@ declare class EllipsisAccountNotifications {
1291
1616
  * Send the alert email template to one address with sample data,
1292
1617
  * so a typo'd finance alias is caught by a human instead of failing
1293
1618
  * silently when a real alert fires.
1619
+ *
1620
+ * Required permissions: write:account.
1621
+ * API key: Supported.
1622
+ * CLI user token: Supported.
1623
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1624
+ * Higher permission levels include lower levels: read < write < delete.
1294
1625
  */
1295
1626
  testEmail(options: {
1296
1627
  email: string;
1297
1628
  }): Promise<S['AccountActionResponse']>;
1298
1629
  }
1630
+ declare class EllipsisAccountOnboarding {
1631
+ private readonly transport;
1632
+ constructor(transport: Transport);
1633
+ /**
1634
+ * Get Account Onboarding
1635
+ *
1636
+ * Read the account's saved onboarding answers, or null before setup.
1637
+ *
1638
+ * Required permissions: read:account.
1639
+ * API key: Supported.
1640
+ * CLI user token: Supported.
1641
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1642
+ * Higher permission levels include lower levels: read < write < delete.
1643
+ */
1644
+ get(): Promise<S['AccountOnboardingResponse']>;
1645
+ /**
1646
+ * Update Account Onboarding
1647
+ *
1648
+ * Save supplied onboarding answers, preserving omitted answers.
1649
+ *
1650
+ * Organizations can save their work email before selecting use cases.
1651
+ * Saving use cases requires a valid organization work email and at
1652
+ * least one choice. When Other is the only choice, describe it.
1653
+ * Personal accounts save a null work email. This does not change the
1654
+ * billing contact email. Session tokens cannot update answers.
1655
+ * Supplying an organization work email requires a human user and sends
1656
+ * a Slack Connect invitation. Slack failures do not undo saved answers.
1657
+ *
1658
+ * Required permissions: write:account.
1659
+ * API key: Supported.
1660
+ * CLI user token: Supported.
1661
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1662
+ * Higher permission levels include lower levels: read < write < delete.
1663
+ */
1664
+ update(options?: {
1665
+ other_use_case?: string | null;
1666
+ use_cases?: (S['AccountOnboardingUseCase'])[];
1667
+ work_email?: string | null;
1668
+ }): Promise<S['AccountOnboardingResponse']>;
1669
+ }
1299
1670
  declare class EllipsisAccountProvidersAnthropic {
1300
1671
  private readonly transport;
1301
1672
  constructor(transport: Transport);
1302
1673
  /**
1303
1674
  * Delete Anthropic Config
1675
+ *
1676
+ * Required permissions: delete:account.
1677
+ * API key: Supported.
1678
+ * CLI user token: Supported.
1679
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1680
+ * Higher permission levels include lower levels: read < write < delete.
1304
1681
  */
1305
1682
  delete(): Promise<void>;
1306
1683
  /**
1307
1684
  * Get Anthropic Config
1685
+ *
1686
+ * Required permissions: read:account.
1687
+ * API key: Supported.
1688
+ * CLI user token: Supported.
1689
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1690
+ * Higher permission levels include lower levels: read < write < delete.
1308
1691
  */
1309
1692
  get(): Promise<S['AnthropicConfigResponse']>;
1310
1693
  /**
1311
1694
  * Put Anthropic Config
1695
+ *
1696
+ * Required permissions: write:account.
1697
+ * API key: Supported.
1698
+ * CLI user token: Supported.
1699
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1700
+ * Higher permission levels include lower levels: read < write < delete.
1312
1701
  */
1313
1702
  set(options: {
1314
1703
  api_key: string;
1315
1704
  }): Promise<S['AnthropicConfigResponse']>;
1316
1705
  /**
1317
1706
  * Validate Anthropic Config
1707
+ *
1708
+ * Required permissions: write:account.
1709
+ * API key: Supported.
1710
+ * CLI user token: Supported.
1711
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1712
+ * Higher permission levels include lower levels: read < write < delete.
1318
1713
  */
1319
1714
  validate(): Promise<S['ValidateAnthropicConfigResponse']>;
1320
1715
  }
1321
- declare class EllipsisAccountProvidersBedrock {
1322
- private readonly transport;
1323
- constructor(transport: Transport);
1324
- /**
1325
- * Delete Bedrock Config
1326
- */
1327
- delete(): Promise<void>;
1328
- /**
1329
- * Get Bedrock Config
1330
- */
1331
- get(): Promise<S['BedrockConfigResponse']>;
1332
- /**
1333
- * Put Bedrock Config
1334
- */
1335
- set(options: {
1336
- model_map: Record<string, string>;
1337
- region: string;
1338
- role_arn: string;
1339
- }): Promise<S['BedrockConfigResponse']>;
1340
- /**
1341
- * Validate Bedrock Config
1342
- */
1343
- validate(): Promise<S['ValidateBedrockConfigResponse']>;
1344
- }
1345
1716
  declare class EllipsisAccountProviders {
1346
1717
  private readonly transport;
1347
1718
  readonly anthropic: EllipsisAccountProvidersAnthropic;
1348
- readonly bedrock: EllipsisAccountProvidersBedrock;
1349
1719
  constructor(transport: Transport);
1350
1720
  }
1351
1721
  declare class EllipsisAccountSettings {
@@ -1359,6 +1729,12 @@ declare class EllipsisAccountSettings {
1359
1729
  * Session model and budget defaults, code review and mention behavior,
1360
1730
  * analytics, retention, and notification contacts. PATCH replaces
1361
1731
  * supplied sections; PUT preserves its model-and-budget-only behavior.
1732
+ *
1733
+ * Required permissions: read:defaults.
1734
+ * API key: Supported.
1735
+ * CLI user token: Supported.
1736
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1737
+ * Higher permission levels include lower levels: read < write < delete.
1362
1738
  */
1363
1739
  get(): Promise<S['AccountSettings']>;
1364
1740
  /**
@@ -1371,8 +1747,14 @@ declare class EllipsisAccountSettings {
1371
1747
  * default a session's model resolves against);
1372
1748
  * `budget_ceiling.session` is in US dollars, at most the platform
1373
1749
  * ceiling, and null clears it.
1374
- * Refused for sandbox tokens (potentially prompt-injected code must
1750
+ * Refused for session tokens (potentially prompt-injected code must
1375
1751
  * not repoint the organization's defaults).
1752
+ *
1753
+ * Required permissions: write:defaults.
1754
+ * API key: Requires a CLI user token belonging to an account administrator.
1755
+ * CLI user token: Requires an account administrator.
1756
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1757
+ * Higher permission levels include lower levels: read < write < delete.
1376
1758
  */
1377
1759
  set(options: {
1378
1760
  budget_ceiling?: S['BudgetCeiling'];
@@ -1384,6 +1766,12 @@ declare class EllipsisAccountSettings {
1384
1766
  * Replace supplied settings sections without changing omitted sections.
1385
1767
  *
1386
1768
  * Changes to model or budget defaults require a GitHub administrator.
1769
+ *
1770
+ * Required permissions: write:defaults.
1771
+ * API key: Cannot set budget_ceiling, default_model to a non-null value; those changes require a CLI user token belonging to an account administrator.
1772
+ * CLI user token: Requires an account administrator when setting budget_ceiling, default_model to a non-null value.
1773
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1774
+ * Higher permission levels include lower levels: read < write < delete.
1387
1775
  */
1388
1776
  update(options?: {
1389
1777
  analytics?: S['AnalyticsSettings'] | null;
@@ -1391,7 +1779,6 @@ declare class EllipsisAccountSettings {
1391
1779
  code_review?: S['CodeReviewSettings'] | null;
1392
1780
  data_retention?: S['DataRetentionSettings'] | null;
1393
1781
  default_model?: string | null;
1394
- mention?: S['MentionSettings'] | null;
1395
1782
  notifications?: S['NotificationSettings'] | null;
1396
1783
  }): Promise<S['AccountSettings']>;
1397
1784
  }
@@ -1401,6 +1788,7 @@ declare class EllipsisAccount {
1401
1788
  readonly billing: EllipsisAccountBilling;
1402
1789
  readonly models: EllipsisAccountModels;
1403
1790
  readonly notifications: EllipsisAccountNotifications;
1791
+ readonly onboarding: EllipsisAccountOnboarding;
1404
1792
  readonly providers: EllipsisAccountProviders;
1405
1793
  readonly settings: EllipsisAccountSettings;
1406
1794
  constructor(transport: Transport);
@@ -1410,10 +1798,22 @@ declare class EllipsisAccount {
1410
1798
  * All-time per-surface activity flags: the dashboards' demo-data
1411
1799
  * fallback reads these instead of inferring "no history" from a
1412
1800
  * windowed, filtered response.
1801
+ *
1802
+ * Required permissions: read:account.
1803
+ * API key: Supported.
1804
+ * CLI user token: Supported.
1805
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1806
+ * Higher permission levels include lower levels: read < write < delete.
1413
1807
  */
1414
1808
  activity(): Promise<S['AccountActivity']>;
1415
1809
  /**
1416
1810
  * Get Customer Audit Log
1811
+ *
1812
+ * Required permissions: read:account.
1813
+ * API key: Supported.
1814
+ * CLI user token: Supported.
1815
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1816
+ * Higher permission levels include lower levels: read < write < delete.
1417
1817
  */
1418
1818
  auditLog(): Promise<S['AccountAuditLogResponse']>;
1419
1819
  /**
@@ -1424,15 +1824,27 @@ declare class EllipsisAccount {
1424
1824
  * Budgets cover the trailing 1, 7 and 28 days; they do not replenish
1425
1825
  * prepaid credit. Amounts include measured usage from active sessions.
1426
1826
  * Each paid LLM request requires positive credit and budget headroom.
1427
- * An admitted request can overshoot; concurrency is limited to five
1428
- * paid requests per account and one per session.
1827
+ * An admitted request can overshoot; concurrent paid requests are limited
1828
+ * by your account and per-session allowances.
1829
+ *
1830
+ * Required permissions: read:account.
1831
+ * API key: Supported.
1832
+ * CLI user token: Supported.
1833
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1834
+ * Higher permission levels include lower levels: read < write < delete.
1429
1835
  */
1430
1836
  budget(): Promise<S['BudgetSummary']>;
1431
1837
  /**
1432
1838
  * Update Customer
1839
+ *
1840
+ * Required permissions: write:account.
1841
+ * API key: Supported.
1842
+ * CLI user token: Supported.
1843
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1844
+ * Higher permission levels include lower levels: read < write < delete.
1433
1845
  */
1434
1846
  update(options?: {
1435
- can_start_job_runs?: boolean | null;
1847
+ can_start_sessions?: boolean | null;
1436
1848
  contact_email?: string | null;
1437
1849
  }): Promise<S['AccountResponse']>;
1438
1850
  /**
@@ -1444,28 +1856,222 @@ declare class EllipsisAccount {
1444
1856
  * preserved. Set policy.developer_defaults to null to disable developer
1445
1857
  * limits. Null override windows inherit their default. API keys use
1446
1858
  * their stable ID, not their secret. Changes apply to the next paid
1447
- * request, including sessions already running. API keys and sandbox
1448
- * credentials cannot edit budgets. The session ceiling remains at
1859
+ * request, including sessions already running. API keys and session
1860
+ * tokens cannot edit budgets. The session ceiling remains at
1449
1861
  * /account/settings; purchasing credits is separate from budget policy.
1862
+ *
1863
+ * Required permissions: write:defaults.
1864
+ * API key: Requires a CLI user token belonging to an account administrator.
1865
+ * CLI user token: Requires an account administrator.
1866
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1867
+ * Higher permission levels include lower levels: read < write < delete.
1868
+ */
1869
+ updateBudget(options?: {
1870
+ alerts?: S['BudgetAlerts'] | null;
1871
+ policy?: S['BudgetPolicy'] | null;
1872
+ }): Promise<S['BudgetSummary']>;
1873
+ /**
1874
+ * Get Usage
1875
+ *
1876
+ * Get usage for a calendar month, including its funding sources.
1877
+ *
1878
+ * Omit period_start for the current UTC month; select a period returned
1879
+ * in billing_periods to view history. Credit debits are distinct from
1880
+ * rated token usage through BYOK or a developer's Claude or Codex
1881
+ * subscription. Rated usage estimates are not provider invoices.
1882
+ * Pending and unresolved requests identify missing measurements.
1883
+ *
1884
+ * Required permissions: read:account.
1885
+ * API key: Supported.
1886
+ * CLI user token: Supported.
1887
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1888
+ * Higher permission levels include lower levels: read < write < delete.
1889
+ */
1890
+ usage(options?: {
1891
+ period_start?: string | null;
1892
+ }): Promise<S['GetUsageOverTimeResponse']>;
1893
+ }
1894
+ declare class EllipsisAgents {
1895
+ private readonly transport;
1896
+ constructor(transport: Transport);
1897
+ /**
1898
+ * Create Agent
1899
+ *
1900
+ * Create an agent, managed through the API: no file, live
1901
+ * immediately. To put its definition in a repository instead, create
1902
+ * it here and then POST /v1/agents/{agent_id}/link.
1903
+ *
1904
+ * 409 when another live agent already holds the name.
1905
+ *
1906
+ * Required permissions: write:configs.
1907
+ * API key: Supported.
1908
+ * CLI user token: Supported.
1909
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1910
+ * Higher permission levels include lower levels: read < write < delete.
1911
+ * Grant match patterns can further restrict access to individual resources.
1912
+ */
1913
+ create(options: {
1914
+ agent: S['AgentConfig-Input'];
1915
+ }): Promise<S['AgentResponse']>;
1916
+ /**
1917
+ * Delete Agent
1918
+ *
1919
+ * Delete an agent, by id or by name.
1920
+ *
1921
+ * It stops running and its name is freed immediately; its past
1922
+ * sessions remain readable. Only for agents managed through
1923
+ * this API — delete the file to remove one defined by a repository.
1924
+ *
1925
+ * Required permissions: write:configs.
1926
+ * API key: Supported.
1927
+ * CLI user token: Supported.
1928
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1929
+ * Higher permission levels include lower levels: read < write < delete.
1930
+ * Grant match patterns can further restrict access to individual resources.
1931
+ */
1932
+ delete(agent_id: string): Promise<void>;
1933
+ /**
1934
+ * Get Agent
1935
+ *
1936
+ * Return one agent, by id or by name.
1937
+ *
1938
+ * Required permissions: read:configs.
1939
+ * API key: Supported.
1940
+ * CLI user token: Supported.
1941
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1942
+ * Higher permission levels include lower levels: read < write < delete.
1943
+ * Grant match patterns can further restrict access to individual resources.
1944
+ */
1945
+ get(agent_id: string): Promise<S['AgentResponse']>;
1946
+ /**
1947
+ * Link Agent
1948
+ *
1949
+ * Move an agent into a repository, by id or by name.
1950
+ *
1951
+ * Opens a pull request adding its definition file. The agent
1952
+ * keeps running unchanged meanwhile; merging hands it over to the
1953
+ * file, after which the file is what changes it. Nothing happens
1954
+ * if the pull request is never merged.
1955
+ *
1956
+ * Required permissions: write:configs.
1957
+ * API key: Supported.
1958
+ * CLI user token: Supported.
1959
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1960
+ * Higher permission levels include lower levels: read < write < delete.
1961
+ * Grant match patterns can further restrict access to individual resources.
1962
+ */
1963
+ link(agent_id: string, options: {
1964
+ path?: string | null;
1965
+ repository: string;
1966
+ }): Promise<S['LinkAgentResponse']>;
1967
+ /**
1968
+ * List Agents
1969
+ *
1970
+ * List agents.
1971
+ *
1972
+ * Required permissions: read:configs.
1973
+ * API key: Supported.
1974
+ * CLI user token: Supported.
1975
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1976
+ * Higher permission levels include lower levels: read < write < delete.
1977
+ * Grant match patterns can further restrict access to individual resources.
1978
+ */
1979
+ list(): Promise<S['AgentsListResponse']>;
1980
+ /**
1981
+ * Get Agent Metrics
1982
+ *
1983
+ * Return an agent's session distribution and trailing spend,
1984
+ * by id or by name.
1985
+ *
1986
+ * `samples` carries one entry per finished session (duration, cost,
1987
+ * tokens) for distributions; `spend_windows` carries what the
1988
+ * agent's sessions cost over the last 1, 7, and 28 days against
1989
+ * its budget for each window.
1990
+ *
1991
+ * Required permissions: read:configs.
1992
+ * API key: Supported.
1993
+ * CLI user token: Supported.
1994
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1995
+ * Higher permission levels include lower levels: read < write < delete.
1996
+ * Grant match patterns can further restrict access to individual resources.
1997
+ */
1998
+ metrics(agent_id: string): Promise<S['AgentMetricsResponse']>;
1999
+ /**
2000
+ * Start Agent Session
2001
+ *
2002
+ * Invoke an agent.
2003
+ *
2004
+ * Runs a certified agent with its configured instructions, model,
2005
+ * environment, permissions, skills, and budget, and returns
2006
+ * the session it started. The session runs once and does not accept
2007
+ * follow-up messages. If the agent declares input.json_schema,
2008
+ * send only `input` for its initial message. Otherwise send a non-empty
2009
+ * `prompt`, which becomes the initial message verbatim. Both fields
2010
+ * together, neither field, and input that renders an empty message are
2011
+ * rejected with 422. An optional `budget` lowers the session cap;
2012
+ * `metadata` tags the session. Codex invocations are not supported.
2013
+ *
2014
+ * Required permissions: write:sessions.
2015
+ * API key: Supported.
2016
+ * CLI user token: Supported.
2017
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2018
+ * Higher permission levels include lower levels: read < write < delete.
2019
+ * Grant match patterns can further restrict access to individual resources.
2020
+ */
2021
+ run(agent_id: string, options?: {
2022
+ budget?: number | null;
2023
+ input?: Record<string, unknown> | null;
2024
+ metadata?: Record<string, string>;
2025
+ prompt?: string | null;
2026
+ }): Promise<S['SessionResponse']>;
2027
+ /**
2028
+ * Get Agents Stream Ticket
2029
+ *
2030
+ * Required permissions: read:configs.
2031
+ * API key: Supported.
2032
+ * CLI user token: Supported.
2033
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2034
+ * Higher permission levels include lower levels: read < write < delete.
2035
+ * Grant match patterns can further restrict access to individual resources.
2036
+ */
2037
+ streamTicket(): Promise<S['StreamTicketResponse']>;
2038
+ /**
2039
+ * Unlink Agent
2040
+ *
2041
+ * Take over an agent from its file, by id or by name.
2042
+ *
2043
+ * The file stops governing it immediately and further changes go
2044
+ * through this API. The file is left in place, inert — delete it
2045
+ * whenever you like.
2046
+ *
2047
+ * Required permissions: write:configs.
2048
+ * API key: Supported.
2049
+ * CLI user token: Supported.
2050
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2051
+ * Higher permission levels include lower levels: read < write < delete.
2052
+ * Grant match patterns can further restrict access to individual resources.
1450
2053
  */
1451
- updateBudget(options?: {
1452
- alerts?: S['BudgetAlerts'] | null;
1453
- policy?: S['BudgetPolicy'] | null;
1454
- }): Promise<S['BudgetSummary']>;
2054
+ unlink(agent_id: string): Promise<S['AgentResponse']>;
1455
2055
  /**
1456
- * Get Usage
2056
+ * Update Agent
1457
2057
  *
1458
- * Get usage for a calendar month, including its funding sources.
2058
+ * Replace an agent's definition, by id or by name.
1459
2059
  *
1460
- * Omit period_start for the current UTC month; select a period returned
1461
- * in billing_periods to view history. Credit debits are distinct from
1462
- * rated token usage through BYOK, customer Bedrock, or a developer's
1463
- * Claude subscription. Rated usage estimates are not provider invoices.
1464
- * Pending and unresolved requests identify missing measurements.
2060
+ * The whole definition is replaced, and the change is live at
2061
+ * once. Only for agents managed through this API: one defined
2062
+ * by a repository file is a 409, since the next push to that file
2063
+ * would revert the change — unlink it first to take ownership.
2064
+ *
2065
+ * Required permissions: write:configs.
2066
+ * API key: Supported.
2067
+ * CLI user token: Supported.
2068
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2069
+ * Higher permission levels include lower levels: read < write < delete.
2070
+ * Grant match patterns can further restrict access to individual resources.
1465
2071
  */
1466
- usage(options?: {
1467
- period_start?: string | null;
1468
- }): Promise<S['GetUsageOverTimeResponse']>;
2072
+ update(agent_id: string, options: {
2073
+ agent: S['AgentConfig-Input'];
2074
+ }): Promise<S['AgentResponse']>;
1469
2075
  }
1470
2076
  declare class EllipsisAlerts {
1471
2077
  private readonly transport;
@@ -1476,6 +2082,12 @@ declare class EllipsisAlerts {
1476
2082
  * Dismiss an open alert and return it.
1477
2083
  *
1478
2084
  * 409 when the alert is not open; 404 when it doesn't exist.
2085
+ *
2086
+ * Required permissions: write:alerts.
2087
+ * API key: Supported.
2088
+ * CLI user token: Supported.
2089
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2090
+ * Higher permission levels include lower levels: read < write < delete.
1479
2091
  */
1480
2092
  dismiss(alert_id: string): Promise<S['AlertResponse']>;
1481
2093
  /**
@@ -1484,6 +2096,12 @@ declare class EllipsisAlerts {
1484
2096
  * Return one alert by id.
1485
2097
  *
1486
2098
  * 404 if it doesn't exist or belongs to another organization.
2099
+ *
2100
+ * Required permissions: read:alerts.
2101
+ * API key: Supported.
2102
+ * CLI user token: Supported.
2103
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2104
+ * Higher permission levels include lower levels: read < write < delete.
1487
2105
  */
1488
2106
  get(alert_id: string): Promise<S['AlertResponse']>;
1489
2107
  /**
@@ -1495,6 +2113,12 @@ declare class EllipsisAlerts {
1495
2113
  *
1496
2114
  * Available to all credential types, so an agent can check "is
1497
2115
  * this org near budget?" mid-task.
2116
+ *
2117
+ * Required permissions: read:alerts.
2118
+ * API key: Supported.
2119
+ * CLI user token: Supported.
2120
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2121
+ * Higher permission levels include lower levels: read < write < delete.
1498
2122
  */
1499
2123
  list(options?: {
1500
2124
  status?: S['AlertStatus'] | null;
@@ -1518,6 +2142,12 @@ declare class EllipsisAnalytics {
1518
2142
  * the apps/agents). Available to all credential types: the
1519
2143
  * responses expose the organization's own GitHub PR/review activity,
1520
2144
  * no secrets.
2145
+ *
2146
+ * Required permissions: read:account.
2147
+ * API key: Supported.
2148
+ * CLI user token: Supported.
2149
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2150
+ * Higher permission levels include lower levels: read < write < delete.
1521
2151
  */
1522
2152
  metrics(options?: {
1523
2153
  days?: number | null;
@@ -1535,6 +2165,12 @@ declare class EllipsisAnalytics {
1535
2165
  *
1536
2166
  * Windowing: pass explicit start/end, or days (default: the last
1537
2167
  * 30 days). account_type in all|user|bot scopes the authors.
2168
+ *
2169
+ * Required permissions: read:account.
2170
+ * API key: Supported.
2171
+ * CLI user token: Supported.
2172
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2173
+ * Higher permission levels include lower levels: read < write < delete.
1538
2174
  */
1539
2175
  pullRequests(options?: {
1540
2176
  days?: number | null;
@@ -1554,6 +2190,12 @@ declare class EllipsisAnalytics {
1554
2190
  * review the most PRs?" is the reviewer facets here with
1555
2191
  * account_type=bot. Windowing: pass explicit start/end, or days
1556
2192
  * (default: the last 30 days).
2193
+ *
2194
+ * Required permissions: read:account.
2195
+ * API key: Supported.
2196
+ * CLI user token: Supported.
2197
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2198
+ * Higher permission levels include lower levels: read < write < delete.
1557
2199
  */
1558
2200
  reviews(options?: {
1559
2201
  days?: number | null;
@@ -1574,6 +2216,8 @@ declare class EllipsisAuthCli {
1574
2216
  * Poll a device-code auth flow for its token.
1575
2217
  *
1576
2218
  * Unauthenticated; the device code identifies the flow.
2219
+ *
2220
+ * Authentication: No token required.
1577
2221
  */
1578
2222
  poll(options: {
1579
2223
  device_code: string;
@@ -1586,6 +2230,8 @@ declare class EllipsisAuthCli {
1586
2230
  * Unauthenticated: the CLI has no credential yet — that's what
1587
2231
  * it's obtaining. The human authorizes out-of-band in the
1588
2232
  * dashboard.
2233
+ *
2234
+ * Authentication: No token required.
1589
2235
  */
1590
2236
  start(): Promise<S['StartCliAuthResponse']>;
1591
2237
  }
@@ -1594,118 +2240,6 @@ declare class EllipsisAuth {
1594
2240
  readonly cli: EllipsisAuthCli;
1595
2241
  constructor(transport: Transport);
1596
2242
  }
1597
- declare class EllipsisAutomations {
1598
- private readonly transport;
1599
- constructor(transport: Transport);
1600
- /**
1601
- * Create Automation
1602
- *
1603
- * Create an automation, managed through the API: no file, live
1604
- * immediately. To put its definition in a repository instead, create
1605
- * it here and then POST /v1/automations/{automation_id}/link.
1606
- *
1607
- * 409 when another live automation already holds the name.
1608
- */
1609
- create(options: {
1610
- automation: S['AutomationConfig'];
1611
- }): Promise<S['AutomationResponse']>;
1612
- /**
1613
- * Delete Automation
1614
- *
1615
- * Delete an automation, by id or by name.
1616
- *
1617
- * It stops running and its name is freed immediately; its past
1618
- * sessions remain readable. Only for automations managed through
1619
- * this API — delete the file to remove one defined by a repository.
1620
- */
1621
- delete(automation_id: string): Promise<void>;
1622
- /**
1623
- * Get Automation
1624
- *
1625
- * Return one automation, by id or by name.
1626
- */
1627
- get(automation_id: string): Promise<S['AutomationResponse']>;
1628
- /**
1629
- * Link Automation
1630
- *
1631
- * Move an automation into a repository, by id or by name.
1632
- *
1633
- * Opens a pull request adding its definition file. The automation
1634
- * keeps running unchanged meanwhile; merging hands it over to the
1635
- * file, after which the file is what changes it. Nothing happens
1636
- * if the pull request is never merged.
1637
- */
1638
- link(automation_id: string, options: {
1639
- path?: string | null;
1640
- repository: string;
1641
- }): Promise<S['LinkAutomationResponse']>;
1642
- /**
1643
- * List Automations
1644
- *
1645
- * List automations.
1646
- */
1647
- list(): Promise<S['AutomationsListResponse']>;
1648
- /**
1649
- * Get Automation Metrics
1650
- *
1651
- * Return an automation's session distribution and trailing spend,
1652
- * by id or by name.
1653
- *
1654
- * `samples` carries one entry per finished session (duration, cost,
1655
- * tokens) for distributions; `spend_windows` carries what the
1656
- * automation's sessions cost over the last 1, 7, and 28 days against
1657
- * its budget for each window.
1658
- */
1659
- metrics(automation_id: string): Promise<S['AutomationMetricsResponse']>;
1660
- /**
1661
- * Start Automation Session
1662
- *
1663
- * Invoke an automation.
1664
- *
1665
- * Runs a certified automation with its configured instructions, model,
1666
- * environment, permissions, skills, and budget, and returns
1667
- * the session it started. The session runs once and does not accept
1668
- * follow-up messages. If the automation declares input.json_schema,
1669
- * send only `input` for its initial message. Otherwise send a non-empty
1670
- * `prompt`, which becomes the initial message verbatim. Both fields
1671
- * together, neither field, and input that renders an empty message are
1672
- * rejected with 422. An optional `budget` lowers the session cap;
1673
- * `metadata` tags the session. Codex invocations are not supported.
1674
- */
1675
- run(automation_id: string, options?: {
1676
- budget?: number | null;
1677
- input?: Record<string, unknown> | null;
1678
- metadata?: Record<string, string>;
1679
- prompt?: string | null;
1680
- }): Promise<S['SessionResponse']>;
1681
- /**
1682
- * Get Automations Stream Ticket
1683
- */
1684
- streamTicket(): Promise<S['StreamTicketResponse']>;
1685
- /**
1686
- * Unlink Automation
1687
- *
1688
- * Take over an automation from its file, by id or by name.
1689
- *
1690
- * The file stops governing it immediately and further changes go
1691
- * through this API. The file is left in place, inert — delete it
1692
- * whenever you like.
1693
- */
1694
- unlink(automation_id: string): Promise<S['AutomationResponse']>;
1695
- /**
1696
- * Update Automation
1697
- *
1698
- * Replace an automation's definition, by id or by name.
1699
- *
1700
- * The whole definition is replaced, and the change is live at
1701
- * once. Only for automations managed through this API: one defined
1702
- * by a repository file is a 409, since the next push to that file
1703
- * would revert the change — unlink it first to take ownership.
1704
- */
1705
- update(automation_id: string, options: {
1706
- automation: S['AutomationConfig'];
1707
- }): Promise<S['AutomationResponse']>;
1708
- }
1709
2243
  declare class EllipsisEnvironments {
1710
2244
  private readonly transport;
1711
2245
  constructor(transport: Transport);
@@ -1717,9 +2251,15 @@ declare class EllipsisEnvironments {
1717
2251
  * `kind: environment` YAML under an agents directory.
1718
2252
  *
1719
2253
  * 409 when another live environment already holds the name.
2254
+ *
2255
+ * Required permissions: write:environments.
2256
+ * API key: Supported.
2257
+ * CLI user token: Supported.
2258
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2259
+ * Higher permission levels include lower levels: read < write < delete.
1720
2260
  */
1721
2261
  create(options: {
1722
- environment: S['EnvironmentDocument'];
2262
+ environment: S['EnvironmentDocument-Input'];
1723
2263
  }): Promise<S['EnvironmentResponse']>;
1724
2264
  /**
1725
2265
  * Delete Environment
@@ -1731,18 +2271,36 @@ declare class EllipsisEnvironments {
1731
2271
  * environment. Past sessions remain readable. Only for environments
1732
2272
  * managed through this API — delete the file to remove one defined
1733
2273
  * by a repository.
2274
+ *
2275
+ * Required permissions: delete:environments.
2276
+ * API key: Supported.
2277
+ * CLI user token: Supported.
2278
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2279
+ * Higher permission levels include lower levels: read < write < delete.
1734
2280
  */
1735
2281
  delete(environment_id: string): Promise<void>;
1736
2282
  /**
1737
2283
  * Get Environment
1738
2284
  *
1739
2285
  * Return one saved environment, by id or by name.
2286
+ *
2287
+ * Required permissions: read:environments.
2288
+ * API key: Supported.
2289
+ * CLI user token: Supported.
2290
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2291
+ * Higher permission levels include lower levels: read < write < delete.
1740
2292
  */
1741
2293
  get(environment_id: string): Promise<S['EnvironmentResponse']>;
1742
2294
  /**
1743
2295
  * List Environments
1744
2296
  *
1745
2297
  * List saved environments.
2298
+ *
2299
+ * Required permissions: read:environments.
2300
+ * API key: Supported.
2301
+ * CLI user token: Supported.
2302
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2303
+ * Higher permission levels include lower levels: read < write < delete.
1746
2304
  */
1747
2305
  list(): Promise<S['EnvironmentsListResponse']>;
1748
2306
  /**
@@ -1754,77 +2312,71 @@ declare class EllipsisEnvironments {
1754
2312
  * resolve the new body; running sessions keep the one frozen at
1755
2313
  * their start. Only for environments managed through this API: one
1756
2314
  * defined by a repository file is a 409.
2315
+ *
2316
+ * Required permissions: write:environments.
2317
+ * API key: Supported.
2318
+ * CLI user token: Supported.
2319
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2320
+ * Higher permission levels include lower levels: read < write < delete.
1757
2321
  */
1758
2322
  update(environment_id: string, options: {
1759
- environment: S['EnvironmentDocument'];
2323
+ environment: S['EnvironmentDocument-Input'];
1760
2324
  }): Promise<S['EnvironmentResponse']>;
1761
2325
  }
1762
- declare class EllipsisFiles {
2326
+ declare class EllipsisHandlers {
1763
2327
  private readonly transport;
1764
2328
  constructor(transport: Transport);
1765
2329
  /**
1766
- * Create File
2330
+ * List Handlers
1767
2331
  *
1768
- * Upload a file that outlives the sandbox.
2332
+ * List the account's Slack, GitHub, Linear, and Sentry handlers.
1769
2333
  *
1770
- * v1: PNG images only, base64 in the JSON body, 10 MiB cap. The
1771
- * primary caller is the in-sandbox `agent file upload` CLI (an
1772
- * agent persisting a screenshot to link on a PR), but all
1773
- * credential types work. Returns the org-membership-gated
1774
- * dashboard URL so callers never hard-code URL shapes.
1775
- */
1776
- create(options: {
1777
- content_type: string;
1778
- data_b64: string;
1779
- filename: string;
1780
- }): Promise<S['CreateFileResponse']>;
1781
- /**
1782
- * Delete File
2334
+ * Returns at most one handler per service, from the current .ellipsis
2335
+ * repository. Disabled handlers and last valid definitions with sync
2336
+ * errors are included. Missing handlers are omitted. This reads saved
2337
+ * state without fetching GitHub or triggering synchronization.
1783
2338
  *
1784
- * Delete a file.
2339
+ * Requires configs:read; scoped grants match handlers/{service}.
2340
+ * Session tokens with that grant may read handlers.
1785
2341
  *
1786
- * A foreign, missing, or already-deleted id is an
1787
- * indistinguishable 404, so ids can't be enumerated. Sandbox
1788
- * tokens get a 403 (a sandbox token sits next to
1789
- * potentially-untrusted code and must not be able to destroy the
1790
- * account's files — uploading is fine, destruction is not); API
1791
- * keys and user tokens may delete.
2342
+ * Required permissions: read:configs.
2343
+ * API key: Supported.
2344
+ * CLI user token: Supported.
2345
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2346
+ * Higher permission levels include lower levels: read < write < delete.
2347
+ * Grant match patterns can further restrict access to individual resources.
1792
2348
  */
1793
- delete(file_id: string): Promise<void>;
2349
+ list(): Promise<S['HandlersListResponse']>;
1794
2350
  /**
1795
- * Get File
2351
+ * Get Handler Metrics
1796
2352
  *
1797
- * Return one file's metadata and download link.
2353
+ * Return session counts and accumulated spend for a saved handler.
1798
2354
  *
1799
- * Includes the gated dashboard URL and a short-lived presigned
1800
- * `download_url`, plus the owning account's GitHub login.
2355
+ * Filters only by session creation time. Omitted bounds include all
2356
+ * history. Counts use the current turn and conversation state, so an open
2357
+ * conversation awaiting another message remains active. Spend includes the selected sessions' full
2358
+ * accumulated cost, including activity after the creation-time window.
2359
+ * Only sessions carrying this exact saved handler id are counted;
2360
+ * legacy sessions without handler provenance are excluded.
1801
2361
  *
1802
- * Signed-in dashboard users are checked against the file's owning
1803
- * account, regardless of their selected organization. API keys,
1804
- * CLI user tokens, and sandbox tokens remain restricted to their
1805
- * own account. Missing, deleted, and inaccessible files return 404.
1806
- *
1807
- * To fetch the bytes locally, call this and then GET download_url
1808
- * immediately — the JSON API never carries the file. The CLI's
1809
- * `agent file get` wraps exactly that two-step.
1810
- */
1811
- get(file_id: string): Promise<S['GetFileResponse']>;
1812
- /**
1813
- * List Files
2362
+ * spend_windows reports current trailing 1-, 7-, and 28-day credit
2363
+ * debits and effective handler budgets across all attributed sessions.
2364
+ * Those windows use usage timestamps and are independent of start/end.
1814
2365
  *
1815
- * List uploaded files, newest first.
2366
+ * Requires configs:read matching handlers/{service} and unrestricted
2367
+ * sessions:read. Session tokens with both grants may read metrics.
1816
2368
  *
1817
- * Metadata only by default. Set include_download_urls=true to get
1818
- * a download_urls map keyed by file id for thumbnails or batch
1819
- * downloads. URLs expire within about a minute. session_id scopes
1820
- * the list to one session's uploads.
2369
+ * Required permissions: read:sessions, read:configs.
2370
+ * API key: Supported.
2371
+ * CLI user token: Supported.
2372
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2373
+ * Higher permission levels include lower levels: read < write < delete.
2374
+ * Grant match patterns can further restrict access to individual resources.
1821
2375
  */
1822
- list(options?: {
1823
- session_id?: string | null;
1824
- limit?: number;
1825
- cursor?: string | null;
1826
- include_download_urls?: boolean;
1827
- }): Promise<Page<S['File'], S['FilesListResponse']>>;
2376
+ metrics(handler_id: string, options?: {
2377
+ start?: string | null;
2378
+ end?: string | null;
2379
+ }): Promise<S['HandlerMetricsResponse']>;
1828
2380
  }
1829
2381
  declare class EllipsisIntegrationsGithub {
1830
2382
  private readonly transport;
@@ -1839,16 +2391,34 @@ declare class EllipsisIntegrationsGithub {
1839
2391
  *
1840
2392
  * Members carry their linked Slack identity when a Slack-GitHub
1841
2393
  * link exists, and /slack/members carries the reverse link.
2394
+ *
2395
+ * Required permissions: read:integrations.
2396
+ * API key: Supported.
2397
+ * CLI user token: Supported.
2398
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2399
+ * Higher permission levels include lower levels: read < write < delete.
1842
2400
  */
1843
2401
  members(): Promise<S['GithubMembersListResponse']>;
1844
2402
  /**
1845
2403
  * List Github Repositories
1846
2404
  *
1847
2405
  * List GitHub repositories connected to the installation.
2406
+ *
2407
+ * Required permissions: read:integrations.
2408
+ * API key: Supported.
2409
+ * CLI user token: Supported.
2410
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2411
+ * Higher permission levels include lower levels: read < write < delete.
1848
2412
  */
1849
2413
  repos(): Promise<S['GithubRepositoriesListResponse']>;
1850
2414
  /**
1851
2415
  * Uninstall Github App
2416
+ *
2417
+ * Required permissions: write:integrations.
2418
+ * API key: Supported.
2419
+ * CLI user token: Supported.
2420
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2421
+ * Higher permission levels include lower levels: read < write < delete.
1852
2422
  */
1853
2423
  uninstall(options: {
1854
2424
  confirm_account_login: string;
@@ -1859,16 +2429,34 @@ declare class EllipsisIntegrationsLinear {
1859
2429
  constructor(transport: Transport);
1860
2430
  /**
1861
2431
  * Delete Linear Integration
2432
+ *
2433
+ * Required permissions: delete:integrations.
2434
+ * API key: Supported.
2435
+ * CLI user token: Supported.
2436
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2437
+ * Higher permission levels include lower levels: read < write < delete.
1862
2438
  */
1863
2439
  delete(): Promise<S['AccountActionResponse']>;
1864
2440
  /**
1865
2441
  * List Linear Teams
1866
2442
  *
1867
2443
  * List the teams of the connected Linear workspace.
2444
+ *
2445
+ * Required permissions: read:integrations.
2446
+ * API key: Supported.
2447
+ * CLI user token: Supported.
2448
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2449
+ * Higher permission levels include lower levels: read < write < delete.
1868
2450
  */
1869
2451
  teams(): Promise<S['LinearTeamsListResponse']>;
1870
2452
  /**
1871
2453
  * Update Linear Teams
2454
+ *
2455
+ * Required permissions: write:integrations.
2456
+ * API key: Supported.
2457
+ * CLI user token: Supported.
2458
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2459
+ * Higher permission levels include lower levels: read < write < delete.
1872
2460
  */
1873
2461
  updateSettings(options: {
1874
2462
  mcp_inclusion?: S['McpInclusionMode'] | null;
@@ -1880,12 +2468,24 @@ declare class EllipsisIntegrationsSentry {
1880
2468
  constructor(transport: Transport);
1881
2469
  /**
1882
2470
  * Delete Sentry Integration
2471
+ *
2472
+ * Required permissions: delete:integrations.
2473
+ * API key: Supported.
2474
+ * CLI user token: Supported.
2475
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2476
+ * Higher permission levels include lower levels: read < write < delete.
1883
2477
  */
1884
2478
  delete(integration_id: string): Promise<S['AccountActionResponse']>;
1885
2479
  /**
1886
2480
  * List Sentry Organizations
1887
2481
  *
1888
2482
  * List the connected Sentry organizations.
2483
+ *
2484
+ * Required permissions: read:integrations.
2485
+ * API key: Supported.
2486
+ * CLI user token: Supported.
2487
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2488
+ * Higher permission levels include lower levels: read < write < delete.
1889
2489
  */
1890
2490
  organizations(): Promise<S['SentryOrganizationsListResponse']>;
1891
2491
  }
@@ -1897,14 +2497,32 @@ declare class EllipsisIntegrationsSlack {
1897
2497
  *
1898
2498
  * List the channels of the connected Slack workspace, fetched
1899
2499
  * live from the Slack API.
2500
+ *
2501
+ * Required permissions: read:integrations.
2502
+ * API key: Supported.
2503
+ * CLI user token: Supported.
2504
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2505
+ * Higher permission levels include lower levels: read < write < delete.
1900
2506
  */
1901
2507
  channels(): Promise<S['SlackChannelsListResponse']>;
1902
2508
  /**
1903
2509
  * Create Operations Channel
2510
+ *
2511
+ * Required permissions: write:integrations.
2512
+ * API key: Supported.
2513
+ * CLI user token: Supported.
2514
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2515
+ * Higher permission levels include lower levels: read < write < delete.
1904
2516
  */
1905
2517
  createOperationsChannel(): Promise<S['SlackChannel']>;
1906
2518
  /**
1907
2519
  * Delete Slack Integration
2520
+ *
2521
+ * Required permissions: delete:integrations.
2522
+ * API key: Supported.
2523
+ * CLI user token: Supported.
2524
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2525
+ * Higher permission levels include lower levels: read < write < delete.
1908
2526
  */
1909
2527
  delete(): Promise<S['AccountActionResponse']>;
1910
2528
  /**
@@ -1912,10 +2530,22 @@ declare class EllipsisIntegrationsSlack {
1912
2530
  *
1913
2531
  * List the members of the connected Slack workspace, fetched
1914
2532
  * live from the Slack API.
2533
+ *
2534
+ * Required permissions: read:integrations.
2535
+ * API key: Supported.
2536
+ * CLI user token: Supported.
2537
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2538
+ * Higher permission levels include lower levels: read < write < delete.
1915
2539
  */
1916
2540
  members(): Promise<S['SlackMembersListResponse']>;
1917
2541
  /**
1918
2542
  * Update Slack Settings
2543
+ *
2544
+ * Required permissions: write:integrations.
2545
+ * API key: Supported.
2546
+ * CLI user token: Supported.
2547
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2548
+ * Higher permission levels include lower levels: read < write < delete.
1919
2549
  */
1920
2550
  updateSettings(options: {
1921
2551
  mcp_inclusion: S['McpInclusionMode'];
@@ -1935,10 +2565,16 @@ declare class EllipsisIntegrations {
1935
2565
  *
1936
2566
  * A read-only view, so an agent authoring another agent's
1937
2567
  * config can learn which repositories, channels, teams, and
1938
- * organizations it may name before POST /automations.
2568
+ * organizations it may name before POST /agents.
1939
2569
  *
1940
- * Available to all credential types including sandbox tokens: the
2570
+ * Available to all credential types including session tokens: the
1941
2571
  * responses never include OAuth tokens or any other secret.
2572
+ *
2573
+ * Required permissions: read:integrations.
2574
+ * API key: Supported.
2575
+ * CLI user token: Supported.
2576
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2577
+ * Higher permission levels include lower levels: read < write < delete.
1942
2578
  */
1943
2579
  list(): Promise<S['GetIntegrationsResponse']>;
1944
2580
  }
@@ -1957,6 +2593,13 @@ declare class EllipsisMemories {
1957
2593
  *
1958
2594
  * Creating never overwrites: a path that already exists is a 409, so
1959
2595
  * correcting an existing memory is an explicit edit.
2596
+ *
2597
+ * Required permissions: write:memories.
2598
+ * API key: Supported.
2599
+ * CLI user token: Supported.
2600
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2601
+ * Higher permission levels include lower levels: read < write < delete.
2602
+ * Grant match patterns can further restrict access to individual resources.
1960
2603
  */
1961
2604
  create(options: {
1962
2605
  content: string;
@@ -1971,6 +2614,13 @@ declare class EllipsisMemories {
1971
2614
  * Available to every credential type, agents included — a wrong
1972
2615
  * memory is worse than a missing one. The deleted content is kept in
1973
2616
  * the memory's history for forensics, not for an undo API.
2617
+ *
2618
+ * Required permissions: delete:memories.
2619
+ * API key: Supported.
2620
+ * CLI user token: Supported.
2621
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2622
+ * Higher permission levels include lower levels: read < write < delete.
2623
+ * Grant match patterns can further restrict access to individual resources.
1974
2624
  */
1975
2625
  delete(memory_id: string, options?: {
1976
2626
  if_sha256?: string | null;
@@ -1986,6 +2636,13 @@ declare class EllipsisMemories {
1986
2636
  *
1987
2637
  * Pass `if_sha256` (from a previous read) to make a concurrent write
1988
2638
  * a 409 instead of silently overwriting it.
2639
+ *
2640
+ * Required permissions: write:memories.
2641
+ * API key: Supported.
2642
+ * CLI user token: Supported.
2643
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2644
+ * Higher permission levels include lower levels: read < write < delete.
2645
+ * Grant match patterns can further restrict access to individual resources.
1989
2646
  */
1990
2647
  edit(memory_id: string, options?: {
1991
2648
  content?: string | null;
@@ -1998,6 +2655,13 @@ declare class EllipsisMemories {
1998
2655
  * Read one memory's full content.
1999
2656
  *
2000
2657
  * The id comes from the index returned by listing memories.
2658
+ *
2659
+ * Required permissions: read:memories.
2660
+ * API key: Supported.
2661
+ * CLI user token: Supported.
2662
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2663
+ * Higher permission levels include lower levels: read < write < delete.
2664
+ * Grant match patterns can further restrict access to individual resources.
2001
2665
  */
2002
2666
  get(memory_id: string): Promise<S['MemoryResponse']>;
2003
2667
  /**
@@ -2009,6 +2673,13 @@ declare class EllipsisMemories {
2009
2673
  * memory, carrying its id, path, and description) plus the same
2010
2674
  * entries structured, each with every field except `content`. Read
2011
2675
  * the index, then fetch the ids whose content you want.
2676
+ *
2677
+ * Required permissions: read:memories.
2678
+ * API key: Supported.
2679
+ * CLI user token: Supported.
2680
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2681
+ * Higher permission levels include lower levels: read < write < delete.
2682
+ * Grant match patterns can further restrict access to individual resources.
2012
2683
  */
2013
2684
  list(options?: {
2014
2685
  prefix?: string | null;
@@ -2019,6 +2690,12 @@ declare class EllipsisReviews {
2019
2690
  constructor(transport: Transport);
2020
2691
  /**
2021
2692
  * List Review Configs
2693
+ *
2694
+ * Required permissions: read:reviews.
2695
+ * API key: Supported.
2696
+ * CLI user token: Supported.
2697
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2698
+ * Higher permission levels include lower levels: read < write < delete.
2022
2699
  */
2023
2700
  configs(): Promise<S['GetCodeReviewConfigsResponse']>;
2024
2701
  /**
@@ -2032,10 +2709,16 @@ declare class EllipsisReviews {
2032
2709
  * the automatic one.
2033
2710
  *
2034
2711
  * A review is one pipeline run over one commit range, with one
2035
- * agent session per stage: `review.id` is the run id, and
2712
+ * agent session per stage: `review.id` is the review id, and
2036
2713
  * `stages[].session_id` is where a client streams
2037
2714
  * (/sessions/{id}/stream on a stage session), since the review
2038
2715
  * itself is a pipeline rather than one process.
2716
+ *
2717
+ * Required permissions: write:reviews.
2718
+ * API key: Supported.
2719
+ * CLI user token: Supported.
2720
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2721
+ * Higher permission levels include lower levels: read < write < delete.
2039
2722
  */
2040
2723
  create(options: {
2041
2724
  owner: string;
@@ -2055,6 +2738,12 @@ declare class EllipsisReviews {
2055
2738
  * Findings only exist after a stage session finalizes — a running
2056
2739
  * review honestly reports [] / null, which is why a client
2057
2740
  * streams a stage session and then re-fetches the review.
2741
+ *
2742
+ * Required permissions: read:reviews.
2743
+ * API key: Supported.
2744
+ * CLI user token: Supported.
2745
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2746
+ * Higher permission levels include lower levels: read < write < delete.
2058
2747
  */
2059
2748
  get(review_id: string): Promise<S['Review']>;
2060
2749
  /**
@@ -2069,6 +2758,12 @@ declare class EllipsisReviews {
2069
2758
  *
2070
2759
  * Webhook-created reviews appear here too, so this answers "show
2071
2760
  * me every review on this PR".
2761
+ *
2762
+ * Required permissions: read:reviews.
2763
+ * API key: Supported.
2764
+ * CLI user token: Supported.
2765
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2766
+ * Higher permission levels include lower levels: read < write < delete.
2072
2767
  */
2073
2768
  list(options?: {
2074
2769
  repository?: (string)[];
@@ -2080,22 +2775,6 @@ declare class EllipsisReviews {
2080
2775
  cursor?: string | null;
2081
2776
  }): Promise<Page<S['Review'], S['ReviewsListResponse']>>;
2082
2777
  }
2083
- declare class EllipsisSandboxes {
2084
- private readonly transport;
2085
- constructor(transport: Transport);
2086
- /**
2087
- * Get Single Sandbox
2088
- */
2089
- get(sandbox_id: string): Promise<S['SandboxResponse']>;
2090
- /**
2091
- * Get Sandboxes
2092
- */
2093
- list(): Promise<void>;
2094
- /**
2095
- * Get Sandbox Stream Ticket
2096
- */
2097
- streamTicket(sandbox_id: string): Promise<S['StreamTicketResponse']>;
2098
- }
2099
2778
  declare class EllipsisSecrets {
2100
2779
  private readonly transport;
2101
2780
  constructor(transport: Transport);
@@ -2104,8 +2783,15 @@ declare class EllipsisSecrets {
2104
2783
  *
2105
2784
  * Delete a secret by name.
2106
2785
  *
2107
- * Refused for sandbox tokens; mutations require an API key or
2786
+ * Refused for session tokens; mutations require an API key or
2108
2787
  * user token.
2788
+ *
2789
+ * Required permissions: delete:secrets.
2790
+ * API key: Supported.
2791
+ * CLI user token: Supported.
2792
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2793
+ * Higher permission levels include lower levels: read < write < delete.
2794
+ * Grant match patterns can further restrict access to individual resources.
2109
2795
  */
2110
2796
  delete(name: string): Promise<void>;
2111
2797
  /**
@@ -2115,6 +2801,13 @@ declare class EllipsisSecrets {
2115
2801
  *
2116
2802
  * Values are write-only: the response carries only names and
2117
2803
  * timestamps, never the stored value.
2804
+ *
2805
+ * Required permissions: read:secrets.
2806
+ * API key: Supported.
2807
+ * CLI user token: Supported.
2808
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2809
+ * Higher permission levels include lower levels: read < write < delete.
2810
+ * Grant match patterns can further restrict access to individual resources.
2118
2811
  */
2119
2812
  list(): Promise<S['SecretsListResponse']>;
2120
2813
  /**
@@ -2123,117 +2816,203 @@ declare class EllipsisSecrets {
2123
2816
  * Upsert secrets.
2124
2817
  *
2125
2818
  * Returns only the secrets this call wrote, names and timestamps
2126
- * only — values are write-only. Refused for sandbox tokens (held by
2127
- * potentially-untrusted in-sandbox code); mutations require an
2128
- * API key or user token.
2819
+ * only — values are write-only. Refused for session tokens (held by
2820
+ * potentially-untrusted code running inside a session); mutations
2821
+ * require an API key or user token.
2822
+ *
2823
+ * Required permissions: write:secrets.
2824
+ * API key: Supported.
2825
+ * CLI user token: Supported.
2826
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2827
+ * Higher permission levels include lower levels: read < write < delete.
2828
+ * Grant match patterns can further restrict access to individual resources.
2129
2829
  */
2130
2830
  set(options: {
2131
2831
  secrets: (S['SecretInput'])[];
2132
2832
  }): Promise<S['SecretsListResponse']>;
2133
2833
  }
2834
+ declare class EllipsisSessionsTurns {
2835
+ private readonly transport;
2836
+ constructor(transport: Transport);
2837
+ /**
2838
+ * Get Session Turn
2839
+ *
2840
+ * Return one turn.
2841
+ *
2842
+ * Poll this after sending a message: the message is answered when
2843
+ * the turn's status is completed, failed, stopped, or cancelled.
2844
+ *
2845
+ * Required permissions: read:sessions.
2846
+ * API key: Supported.
2847
+ * CLI user token: Supported.
2848
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2849
+ * Higher permission levels include lower levels: read < write < delete.
2850
+ * Grant match patterns can further restrict access to individual resources.
2851
+ */
2852
+ get(session_id: string, turn_id: string): Promise<S['SessionTurnResponse']>;
2853
+ /**
2854
+ * Get Session Turns
2855
+ *
2856
+ * Return the session's turns and messages, oldest first.
2857
+ *
2858
+ * One turn per message: pending until the agent starts on it,
2859
+ * running while it works, then completed, failed, stopped, or
2860
+ * cancelled.
2861
+ *
2862
+ * Required permissions: read:sessions.
2863
+ * API key: Supported.
2864
+ * CLI user token: Supported.
2865
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2866
+ * Higher permission levels include lower levels: read < write < delete.
2867
+ * Grant match patterns can further restrict access to individual resources.
2868
+ */
2869
+ list(session_id: string): Promise<S['SessionTurnsListResponse']>;
2870
+ }
2134
2871
  declare class EllipsisSessions {
2135
2872
  private readonly transport;
2873
+ readonly turns: EllipsisSessionsTurns;
2136
2874
  constructor(transport: Transport);
2137
2875
  /**
2138
- * Get Agent Session Analytics
2876
+ * Get Session Analytics
2139
2877
  *
2140
2878
  * Measured tokens and spend over time, plus estimated content cost.
2141
2879
  *
2142
2880
  * Token lanes use the request's saved rates. Content attribution
2143
2881
  * apportions input/cache spend by text size, counting carried context
2144
- * on every request. It is an estimate, not a tool execution fee.
2882
+ * on every request. It is an estimate, not a tool call fee.
2145
2883
  * Only the latest 200 retained request bodies are inspected; missing
2146
2884
  * or unsupported context remains explicitly unattributed. No raw
2147
- * prompts or tool results are returned. Sandbox tokens may read only
2885
+ * prompts or tool results are returned. Session tokens may read only
2148
2886
  * their own session's analytics.
2887
+ *
2888
+ * Required permissions: read:sessions.
2889
+ * API key: Supported.
2890
+ * CLI user token: Supported.
2891
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
2892
+ * Higher permission levels include lower levels: read < write < delete.
2893
+ * Grant match patterns can further restrict access to individual resources.
2149
2894
  */
2150
2895
  analytics(session_id: string): Promise<S['SessionAnalytics']>;
2151
2896
  /**
2152
- * Get Agent Session Diff
2897
+ * Get Session Diff
2153
2898
  *
2154
2899
  * Return the session's uncommitted changes as a patch.
2155
2900
  *
2156
2901
  * One unified-diff section per changed file, captured from the
2157
- * sandbox's working tree when the session ended. The per-file
2902
+ * environment's working tree when the session ended. The per-file
2158
2903
  * counts ride on the session itself (`git.repos[].files`); this
2159
2904
  * is the text behind them. Empty when the tree was clean. A
2160
- * sandbox token may read only its own session's diff.
2161
- */
2162
- diff(session_id: string): Promise<S['SessionDiffResponse']>;
2163
- /**
2164
- * List Session Executions
2165
- *
2166
- * Return the session's execution attempts, oldest first.
2905
+ * session token may read only its own session's diff.
2167
2906
  *
2168
- * Includes the selected harness, model, resolved instructions, initial
2169
- * query, and common result summary. Complete native outputs remain in
2170
- * the session's records. Internal launch options and checkpoint storage
2171
- * references are excluded.
2907
+ * Required permissions: read:sessions.
2908
+ * API key: Supported.
2909
+ * CLI user token: Supported.
2910
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
2911
+ * Higher permission levels include lower levels: read < write < delete.
2912
+ * Grant match patterns can further restrict access to individual resources.
2172
2913
  */
2173
- executions(session_id: string): Promise<S['SessionExecutionsListResponse']>;
2914
+ diff(session_id: string): Promise<S['SessionDiffResponse']>;
2174
2915
  /**
2175
- * Export Agent Session
2916
+ * Download Session
2176
2917
  *
2177
- * Export the complete session history.
2918
+ * Download the complete session history.
2178
2919
  *
2179
2920
  * The complete, ordered history of the session (agent output, tool calls, thinking,
2180
- * lifecycle events, sandbox output, message events) as an ordered
2921
+ * lifecycle events, environment output, message events) as an ordered
2181
2922
  * manifest of presigned segment URLs.
2182
2923
  *
2183
2924
  * Segments are gzip members: download in order and concatenate
2184
2925
  * for one file. The JSON API never carries the bytes (same
2185
2926
  * two-step as files). /records is the paged live view of the
2186
2927
  * same data.
2928
+ *
2929
+ * Required permissions: read:sessions.
2930
+ * API key: Supported.
2931
+ * CLI user token: Supported.
2932
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2933
+ * Higher permission levels include lower levels: read < write < delete.
2934
+ * Grant match patterns can further restrict access to individual resources.
2187
2935
  */
2188
- export(session_id: string): Promise<S['GetSessionLogResponse']>;
2936
+ download(session_id: string): Promise<S['GetSessionLogResponse']>;
2189
2937
  /**
2190
- * Get Agent Session
2938
+ * Get Session
2191
2939
  *
2192
2940
  * Return one session.
2193
2941
  *
2194
- * The public wire shape — the same shape the stream's session
2195
- * frames carry, with attributed_user and stopped_by_user resolved
2196
- * at read time.
2942
+ * The public wire shape, the same shape the stream's session frames
2943
+ * carry, with attribution, stop, and archive actors resolved at read
2944
+ * time. `turn` is the turn in progress or the latest one.
2197
2945
  *
2198
2946
  * The heavy near-static blobs (config snapshot, input/output)
2199
2947
  * live on the detail endpoints, not here.
2948
+ *
2949
+ * Required permissions: read:sessions.
2950
+ * API key: Supported.
2951
+ * CLI user token: Supported.
2952
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2953
+ * Higher permission levels include lower levels: read < write < delete.
2954
+ * Grant match patterns can further restrict access to individual resources.
2200
2955
  */
2201
2956
  get(session_id: string): Promise<S['SessionResponse']>;
2202
2957
  /**
2203
- * Get Agent Session Git
2958
+ * Get Session Git
2204
2959
  *
2205
2960
  * The session's GitHub-side git view: its commits, and each PR it
2206
2961
  * opened joined to the live gh_prs row and reviews. The identity list
2207
2962
  * (output_git) rides the session itself over the WebSocket; this is
2208
2963
  * the join a "run" notify tells an open pane to refetch.
2964
+ *
2965
+ * Required permissions: read:sessions.
2966
+ * API key: Supported.
2967
+ * CLI user token: Supported.
2968
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2969
+ * Higher permission levels include lower levels: read < write < delete.
2970
+ * Grant match patterns can further restrict access to individual resources.
2209
2971
  */
2210
2972
  git(session_id: string): Promise<S['SessionGitResponse']>;
2211
2973
  /**
2212
- * Ingest Agent Session Transcript
2974
+ * Ingest Session Transcript
2213
2975
  *
2214
2976
  * Append transcript lines to a session's record.
2215
2977
  *
2216
- * The in-sandbox tailer for interactive sessions.
2978
+ * The transcript tailer running inside the session's environment, for
2979
+ * interactive sessions.
2217
2980
  *
2218
- * A sandbox token may only push its own session's transcript.
2219
- * Idempotent by transcript line uuid; tolerant of malformed lines.
2981
+ * A session token may only push its own session's transcript.
2982
+ * Idempotent by transcript line uuid; tolerant of malformed lines.
2983
+ *
2984
+ * Required permissions: write:sessions.
2985
+ * API key: Supported.
2986
+ * CLI user token: Supported.
2987
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
2988
+ * Higher permission levels include lower levels: read < write < delete.
2989
+ * Grant match patterns can further restrict access to individual resources.
2220
2990
  */
2221
2991
  ingestTranscript(session_id: string, options: {
2222
2992
  lines: (string)[];
2223
2993
  offset?: number;
2224
2994
  }): Promise<S['TranscriptIngestResult']>;
2225
2995
  /**
2226
- * List Agent Sessions
2996
+ * List Sessions
2227
2997
  *
2228
2998
  * List cloud agent sessions, newest first.
2229
2999
  *
2230
- * Optionally filtered by automation (id or name), source, time
3000
+ * Optionally filtered by agent (id or name), source, service, handler, time
2231
3001
  * window, attributed author, repository, and whether the session is
2232
3002
  * still going.
3003
+ *
3004
+ * Required permissions: read:sessions.
3005
+ * API key: Supported.
3006
+ * CLI user token: Supported.
3007
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3008
+ * Higher permission levels include lower levels: read < write < delete.
3009
+ * Grant match patterns can further restrict access to individual resources.
2233
3010
  */
2234
3011
  list(options?: {
2235
- automation?: string | null;
3012
+ agent?: string | null;
2236
3013
  source?: (S['SessionSource'])[] | null;
3014
+ service?: S['HandlerService'] | null;
3015
+ handler?: string | null;
2237
3016
  days?: number | null;
2238
3017
  start?: string | null;
2239
3018
  end?: string | null;
@@ -2245,57 +3024,86 @@ declare class EllipsisSessions {
2245
3024
  exclude_code_review?: boolean;
2246
3025
  }): Promise<Page<S['Session'], S['SessionsListResponse']>>;
2247
3026
  /**
2248
- * Get Agent Session Output
3027
+ * Get Session Output
2249
3028
  *
2250
3029
  * Return the session's typed output.
2251
3030
  *
2252
3031
  * The payload the agent submitted through its config-declared
2253
3032
  * output.json_schema, as the raw JSON body with no envelope. 404
2254
3033
  * while the session is still running (poll GET /v1/sessions/{id}),
2255
- * when the agent declares no output block, or when no execution
3034
+ * when the agent declares no output block, or when no turn
2256
3035
  * produced output.
3036
+ *
3037
+ * Required permissions: read:sessions.
3038
+ * API key: Supported.
3039
+ * CLI user token: Supported.
3040
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3041
+ * Higher permission levels include lower levels: read < write < delete.
3042
+ * Grant match patterns can further restrict access to individual resources.
2257
3043
  */
2258
3044
  output(session_id: string): Promise<Record<string, unknown>>;
2259
3045
  /**
2260
- * Get Agent Session Records
3046
+ * Get Session Records
2261
3047
  *
2262
3048
  * Return the session's stored transcript records, oldest first.
2263
3049
  *
2264
3050
  * Pagination is opt-in (cursor/limit); a bare call returns the
2265
- * full retained transcript. Available to sandbox tokens too: an
3051
+ * full retained transcript. Available to session tokens too: an
2266
3052
  * agent answering "did X look into Y?" needs to read the sessions
2267
3053
  * it finds, and any org member sees the same transcript in the
2268
3054
  * dashboard.
3055
+ *
3056
+ * Required permissions: read:sessions.
3057
+ * API key: Supported.
3058
+ * CLI user token: Supported.
3059
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3060
+ * Higher permission levels include lower levels: read < write < delete.
3061
+ * Grant match patterns can further restrict access to individual resources.
2269
3062
  */
2270
3063
  records(session_id: string, options?: {
2271
3064
  cursor?: string | null;
2272
3065
  limit?: number | null;
2273
3066
  }): Promise<Page<S['SessionRecord'], S['SessionRecordsListResponse']>>;
2274
3067
  /**
2275
- * Search Agent Sessions
3068
+ * Search Sessions
3069
+ *
3070
+ * Required permissions: read:sessions.
3071
+ * API key: Supported.
3072
+ * CLI user token: Supported.
3073
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3074
+ * Higher permission levels include lower levels: read < write < delete.
3075
+ * Grant match patterns can further restrict access to individual resources.
2276
3076
  */
2277
3077
  search(options?: {
2278
3078
  q?: string;
2279
3079
  scope?: S['SessionSearchScope'];
2280
3080
  source?: (S['SessionSource'])[] | null;
3081
+ service?: S['HandlerService'] | null;
3082
+ handler?: string | null;
2281
3083
  author_id?: (number)[] | null;
2282
- automation_id?: (string)[] | null;
3084
+ agent_id?: (string)[] | null;
2283
3085
  session_ids?: (string)[] | null;
2284
3086
  repo?: (string)[] | null;
2285
- status?: (S['SessionStatus'])[] | null;
3087
+ status?: (S['TurnStatus'])[] | null;
2286
3088
  start?: string | null;
2287
3089
  end?: string | null;
2288
3090
  limit?: number;
2289
3091
  }): Promise<S['SessionSearchResponse']>;
2290
3092
  /**
2291
- * Send Agent Session Message
3093
+ * Send Session Message
2292
3094
  *
2293
3095
  * Send a message to a session.
2294
3096
  *
2295
- * 409 for react/cron, non-interactive, and closed sessions.
2296
- * Returns the created message so the caller can track it by id; a
2297
- * retried send with the same idempotency_key returns the original
2298
- * message.
3097
+ * 409 for react/cron, non-interactive, closed, and out-of-budget
3098
+ * sessions. Returns the created message and its turn; a retried send
3099
+ * with the same idempotency_key returns the original ones.
3100
+ *
3101
+ * Required permissions: write:sessions.
3102
+ * API key: Supported.
3103
+ * CLI user token: Supported.
3104
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3105
+ * Higher permission levels include lower levels: read < write < delete.
3106
+ * Grant match patterns can further restrict access to individual resources.
2299
3107
  */
2300
3108
  sendMessage(session_id: string, options: {
2301
3109
  idempotency_key?: string | null;
@@ -2304,52 +3112,105 @@ declare class EllipsisSessions {
2304
3112
  }): Promise<S['SessionMessageResponse']>;
2305
3113
  /**
2306
3114
  * Get Session Stream Ticket
3115
+ *
3116
+ * Required permissions: read:sessions.
3117
+ * API key: Supported.
3118
+ * CLI user token: Supported.
3119
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3120
+ * Higher permission levels include lower levels: read < write < delete.
3121
+ * Grant match patterns can further restrict access to individual resources.
2307
3122
  */
2308
3123
  sessionStreamTicket(session_id: string): Promise<S['StreamTicketResponse']>;
2309
3124
  /**
2310
- * Start Agent Session
3125
+ * Start Session
2311
3126
  *
2312
3127
  * Start a cloud agent session.
2313
3128
  *
2314
3129
  * The daily driver: a prompt, optionally where to run it
2315
- * (`environment`) and the run's own settings, in the AutomationConfig
3130
+ * (`environment`) and the session's own settings, in the AgentConfig
2316
3131
  * vocabulary. What you send is what runs: omit `environment` and the
2317
- * session runs in the built-in basic sandbox. A missing model or
3132
+ * session runs in the built-in basic environment. A missing model or
2318
3133
  * budget comes from the organization's settings, so
2319
- * `{"prompt": "..."}` alone is a complete request. `prompt` is the
2320
- * first message; omit it and the session starts idle, waiting for
2321
- * one. 400 when `interactive` is false and there is no prompt, or
2322
- * when `budget` exceeds the organization's per-session ceiling. To
2323
- * run a saved automation, use POST /v1/automations/{automation_id}/sessions.
2324
- */
2325
- start(options: {
3134
+ * `{"claude_code": {"prompt": "..."}}` is a complete request.
3135
+ * Set exactly one of `claude_code` or `codex`. Its `prompt` is the
3136
+ * first message; omit the prompt and the session starts with no
3137
+ * turn, waiting for one. 400 when `conversation.interactive` is false
3138
+ * and there is no prompt, or when `budget` exceeds the organization's
3139
+ * per-session ceiling. To run a saved agent, use
3140
+ * POST /v1/agents/{agent_id}/sessions.
3141
+ *
3142
+ * Required permissions: write:sessions.
3143
+ * API key: Supported.
3144
+ * CLI user token: Supported.
3145
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3146
+ * Higher permission levels include lower levels: read < write < delete.
3147
+ * Grant match patterns can further restrict access to individual resources.
3148
+ */
3149
+ start(options?: {
2326
3150
  budget?: number | null;
2327
- environment?: string | S['EnvironmentConfig'] | null;
3151
+ claude_code?: S['ClaudeConfig-Input'] | null;
3152
+ codex?: S['CodexConfig-Input'] | null;
3153
+ conversation?: S['SessionConversationConfig'];
3154
+ environment?: string | S['EnvironmentConfig-Input'] | null;
2328
3155
  force_rebuild?: boolean;
2329
- harness: S['HarnessOptions'];
2330
3156
  images?: (S['ImageAttachment'])[];
2331
- instructions?: S['Instructions'];
2332
- interactive?: boolean;
2333
3157
  metadata?: Record<string, string>;
2334
3158
  output?: S['OutputConfig'] | null;
2335
- permissions?: S['PermissionsConfig'] | null;
2336
- prompt?: string | null;
3159
+ permissions?: S['PermissionsConfig-Input'] | null;
2337
3160
  repositories?: (string)[] | null;
2338
- skills?: (S['SkillRef'])[] | null;
3161
+ skills?: (S['SkillRef-Input'])[] | null;
2339
3162
  }): Promise<S['SessionResponse']>;
2340
3163
  /**
2341
- * Stop Agent Session
3164
+ * Stop Session
2342
3165
  *
2343
- * Stop an in-flight session and return it.
3166
+ * Stop the turn in progress and return the session.
2344
3167
  *
2345
- * stopped_by is recorded only when the caller's credential maps
2346
- * to a GitHub account.
3168
+ * The turn ends `stopped`; the conversation stays open. 409 when no
3169
+ * turn is pending or running. The stopping user is recorded only
3170
+ * when the caller's credential maps to a GitHub account.
3171
+ *
3172
+ * Required permissions: write:sessions.
3173
+ * API key: Supported.
3174
+ * CLI user token: Supported.
3175
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3176
+ * Higher permission levels include lower levels: read < write < delete.
3177
+ * Grant match patterns can further restrict access to individual resources.
2347
3178
  */
2348
3179
  stop(session_id: string): Promise<S['SessionResponse']>;
2349
3180
  /**
2350
3181
  * Get Sessions Stream Ticket
3182
+ *
3183
+ * Required permissions: read:sessions.
3184
+ * API key: Supported.
3185
+ * CLI user token: Supported.
3186
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3187
+ * Higher permission levels include lower levels: read < write < delete.
3188
+ * Grant match patterns can further restrict access to individual resources.
2351
3189
  */
2352
3190
  streamTicket(): Promise<S['StreamTicketResponse']>;
3191
+ /**
3192
+ * Update Session
3193
+ *
3194
+ * Archive or unarchive a session and return it.
3195
+ *
3196
+ * Set archived to true to record the current server time and the
3197
+ * authenticated GitHub user. API-key requests record no user.
3198
+ * Repeated archive requests preserve the original time and user.
3199
+ * Set archived to false to clear both fields. Archiving is available
3200
+ * in any session state and does not stop a running session.
3201
+ *
3202
+ * Changes are delivered to session and session-list streams.
3203
+ *
3204
+ * Required permissions: write:sessions.
3205
+ * API key: Supported.
3206
+ * CLI user token: Supported.
3207
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3208
+ * Higher permission levels include lower levels: read < write < delete.
3209
+ * Grant match patterns can further restrict access to individual resources.
3210
+ */
3211
+ update(session_id: string, options: {
3212
+ archived: boolean;
3213
+ }): Promise<S['SessionResponse']>;
2353
3214
  /** Start a session and return a handle over it. */
2354
3215
  run(options: Parameters<EllipsisSessions['start']>[0]): Promise<SessionHandle>;
2355
3216
  /** A handle over an existing session. */
@@ -2360,6 +3221,12 @@ declare class EllipsisSupportSlack {
2360
3221
  constructor(transport: Transport);
2361
3222
  /**
2362
3223
  * Request Slack Help
3224
+ *
3225
+ * Required permissions: write:account.
3226
+ * API key: Requires a CLI user token.
3227
+ * CLI user token: Supported.
3228
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3229
+ * Higher permission levels include lower levels: read < write < delete.
2363
3230
  */
2364
3231
  create(options: {
2365
3232
  emails: (string)[];
@@ -2367,10 +3234,22 @@ declare class EllipsisSupportSlack {
2367
3234
  }): Promise<S['SlackHelpResponse']>;
2368
3235
  /**
2369
3236
  * Get Slack Help
3237
+ *
3238
+ * Required permissions: read:account.
3239
+ * API key: Supported.
3240
+ * CLI user token: Supported.
3241
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3242
+ * Higher permission levels include lower levels: read < write < delete.
2370
3243
  */
2371
3244
  get(): Promise<void>;
2372
3245
  /**
2373
3246
  * Invite To Slack Help
3247
+ *
3248
+ * Required permissions: write:account.
3249
+ * API key: Requires a CLI user token.
3250
+ * CLI user token: Supported.
3251
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3252
+ * Higher permission levels include lower levels: read < write < delete.
2374
3253
  */
2375
3254
  invite(options: {
2376
3255
  emails: (string)[];
@@ -2389,6 +3268,12 @@ declare class EllipsisTemplates {
2389
3268
  * Get Agent Template
2390
3269
  *
2391
3270
  * Return one built-in agent template by slug.
3271
+ *
3272
+ * Required permissions: read:templates.
3273
+ * API key: Supported.
3274
+ * CLI user token: Supported.
3275
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3276
+ * Higher permission levels include lower levels: read < write < delete.
2392
3277
  */
2393
3278
  get(template_id: string): Promise<S['AgentTemplate']>;
2394
3279
  /**
@@ -2398,6 +3283,12 @@ declare class EllipsisTemplates {
2398
3283
  *
2399
3284
  * Behind auth but not account-scoped — the data is static
2400
3285
  * product content shared by the dashboard, landing site, and CLI.
3286
+ *
3287
+ * Required permissions: read:templates.
3288
+ * API key: Supported.
3289
+ * CLI user token: Supported.
3290
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3291
+ * Higher permission levels include lower levels: read < write < delete.
2401
3292
  */
2402
3293
  list(): Promise<S['AgentTemplatesListResponse']>;
2403
3294
  }
@@ -2411,6 +3302,12 @@ declare class EllipsisUserSubscriptionTokens {
2411
3302
  *
2412
3303
  * Your sessions stop billing your subscription immediately, and the
2413
3304
  * usage reading goes with it — it described that token's plan.
3305
+ *
3306
+ * Required permissions: delete:user.
3307
+ * API key: Requires a CLI user token.
3308
+ * CLI user token: Supported.
3309
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3310
+ * Higher permission levels include lower levels: read < write < delete.
2414
3311
  */
2415
3312
  delete(provider: S['SubscriptionProvider']): Promise<void>;
2416
3313
  /**
@@ -2420,6 +3317,12 @@ declare class EllipsisUserSubscriptionTokens {
2420
3317
  *
2421
3318
  * `configured` is false when nothing is saved. The token itself is
2422
3319
  * never returned, only `token_last4`.
3320
+ *
3321
+ * Required permissions: read:user.
3322
+ * API key: Requires a CLI user token.
3323
+ * CLI user token: Supported.
3324
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3325
+ * Higher permission levels include lower levels: read < write < delete.
2423
3326
  */
2424
3327
  get(provider: S['SubscriptionProvider']): Promise<S['SubscriptionToken']>;
2425
3328
  /**
@@ -2430,6 +3333,12 @@ declare class EllipsisUserSubscriptionTokens {
2430
3333
  * One entry per supported provider, whether or not you have saved a
2431
3334
  * token for it. Tokens are write-only: the response carries only
2432
3335
  * `token_last4`, never the token.
3336
+ *
3337
+ * Required permissions: read:user.
3338
+ * API key: Requires a CLI user token.
3339
+ * CLI user token: Supported.
3340
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3341
+ * Higher permission levels include lower levels: read < write < delete.
2433
3342
  */
2434
3343
  list(): Promise<S['SubscriptionTokensListResponse']>;
2435
3344
  /**
@@ -2442,6 +3351,12 @@ declare class EllipsisUserSubscriptionTokens {
2442
3351
  * succeeds. For Claude, use `claude setup-token`. For Codex, paste
2443
3352
  * the auth.json credentials from a ChatGPT login. Each subscription
2444
3353
  * pays only for models from its corresponding provider.
3354
+ *
3355
+ * Required permissions: write:user.
3356
+ * API key: Requires a CLI user token.
3357
+ * CLI user token: Supported.
3358
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3359
+ * Higher permission levels include lower levels: read < write < delete.
2445
3360
  */
2446
3361
  set(provider: S['SubscriptionProvider'], options: {
2447
3362
  token: string;
@@ -2456,6 +3371,12 @@ declare class EllipsisUserSubscriptionTokens {
2456
3371
  * real windows without us seeing them. Null unless a token is
2457
3372
  * enabled for the provider: a disabled token routes nothing, so any
2458
3373
  * reading behind it is stale by construction.
3374
+ *
3375
+ * Required permissions: read:user.
3376
+ * API key: Requires a CLI user token.
3377
+ * CLI user token: Supported.
3378
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3379
+ * Higher permission levels include lower levels: read < write < delete.
2459
3380
  */
2460
3381
  usage(provider: S['SubscriptionProvider']): Promise<S['SubscriptionUsageResponse']>;
2461
3382
  /**
@@ -2469,6 +3390,12 @@ declare class EllipsisUserSubscriptionTokens {
2469
3390
  * token is how you stop it routing. A 200 with `ok: false` is the
2470
3391
  * normal way a bad token is reported — it is an answer, not a
2471
3392
  * transport failure.
3393
+ *
3394
+ * Required permissions: write:user.
3395
+ * API key: Requires a CLI user token.
3396
+ * CLI user token: Supported.
3397
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3398
+ * Higher permission levels include lower levels: read < write < delete.
2472
3399
  */
2473
3400
  verify(provider: S['SubscriptionProvider']): Promise<S['VerifySubscriptionTokenResponse']>;
2474
3401
  }
@@ -2477,10 +3404,22 @@ declare class EllipsisUserTokens {
2477
3404
  constructor(transport: Transport);
2478
3405
  /**
2479
3406
  * List User Tokens
3407
+ *
3408
+ * Required permissions: read:user.
3409
+ * API key: Requires a CLI user token.
3410
+ * CLI user token: Supported.
3411
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3412
+ * Higher permission levels include lower levels: read < write < delete.
2480
3413
  */
2481
3414
  list(): Promise<S['ListUserTokensResponse']>;
2482
3415
  /**
2483
3416
  * Revoke User Token
3417
+ *
3418
+ * Required permissions: delete:user.
3419
+ * API key: Requires a CLI user token.
3420
+ * CLI user token: Supported.
3421
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3422
+ * Higher permission levels include lower levels: read < write < delete.
2484
3423
  */
2485
3424
  revoke(token_id: string): Promise<S['TokenRevokedResponse']>;
2486
3425
  }
@@ -2490,6 +3429,106 @@ declare class EllipsisUser {
2490
3429
  readonly tokens: EllipsisUserTokens;
2491
3430
  constructor(transport: Transport);
2492
3431
  }
3432
+ declare class EllipsisVmExecutions {
3433
+ private readonly transport;
3434
+ constructor(transport: Transport);
3435
+ /**
3436
+ * Get Single Vm Execution
3437
+ *
3438
+ * Required permissions: read:environments.
3439
+ * API key: Supported.
3440
+ * CLI user token: Supported.
3441
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
3442
+ * Higher permission levels include lower levels: read < write < delete.
3443
+ */
3444
+ get(vm_execution_id: string): Promise<S['VMExecutionResponse']>;
3445
+ /**
3446
+ * Get Vm Executions
3447
+ *
3448
+ * Required permissions: read:environments.
3449
+ * API key: Supported.
3450
+ * CLI user token: Supported.
3451
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
3452
+ * Higher permission levels include lower levels: read < write < delete.
3453
+ */
3454
+ list(): Promise<void>;
3455
+ /**
3456
+ * Get Vm Execution Stream Ticket
3457
+ *
3458
+ * Required permissions: read:environments.
3459
+ * API key: Supported.
3460
+ * CLI user token: Supported.
3461
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
3462
+ * Higher permission levels include lower levels: read < write < delete.
3463
+ */
3464
+ streamTicket(vm_execution_id: string): Promise<S['StreamTicketResponse']>;
3465
+ }
3466
+ declare class EllipsisVmImages {
3467
+ private readonly transport;
3468
+ constructor(transport: Transport);
3469
+ /**
3470
+ * Get Vm Image
3471
+ *
3472
+ * Get metadata for a reusable VM image.
3473
+ *
3474
+ * Required permissions: read:environments.
3475
+ * API key: Supported.
3476
+ * CLI user token: Supported.
3477
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3478
+ * Higher permission levels include lower levels: read < write < delete.
3479
+ */
3480
+ get(image_id: string): Promise<S['VMImageResponse']>;
3481
+ /**
3482
+ * List Vm Images
3483
+ *
3484
+ * List reusable VM images.
3485
+ *
3486
+ * Includes expiration, repository revisions, and build identity.
3487
+ *
3488
+ * Required permissions: read:environments.
3489
+ * API key: Supported.
3490
+ * CLI user token: Supported.
3491
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3492
+ * Higher permission levels include lower levels: read < write < delete.
3493
+ */
3494
+ list(options?: {
3495
+ limit?: number;
3496
+ offset?: number;
3497
+ }): Promise<S['VMImageListResponse']>;
3498
+ }
3499
+ declare class EllipsisVms {
3500
+ private readonly transport;
3501
+ constructor(transport: Transport);
3502
+ /**
3503
+ * Get Vm
3504
+ *
3505
+ * Get a VM and its most recent execution.
3506
+ *
3507
+ * Required permissions: read:environments.
3508
+ * API key: Supported.
3509
+ * CLI user token: Supported.
3510
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.
3511
+ * Higher permission levels include lower levels: read < write < delete.
3512
+ */
3513
+ get(vm_id: string): Promise<S['VM']>;
3514
+ /**
3515
+ * List Vms
3516
+ *
3517
+ * List VMs and their last recorded state.
3518
+ *
3519
+ * Each machine appears once, including paused and deleted VMs, newest execution first.
3520
+ *
3521
+ * Required permissions: read:environments.
3522
+ * API key: Supported.
3523
+ * CLI user token: Supported.
3524
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.
3525
+ * Higher permission levels include lower levels: read < write < delete.
3526
+ */
3527
+ list(options?: {
3528
+ limit?: number;
3529
+ offset?: number;
3530
+ }): Promise<S['VMListResponse']>;
3531
+ }
2493
3532
  declare class EllipsisWebhooksDeliveries {
2494
3533
  private readonly transport;
2495
3534
  constructor(transport: Transport);
@@ -2500,6 +3539,12 @@ declare class EllipsisWebhooksDeliveries {
2500
3539
  *
2501
3540
  * Payloads are immutable across retries. Attempt details include HTTP
2502
3541
  * status, timing, and errors. Response bodies are not retained.
3542
+ *
3543
+ * Required permissions: read:webhooks.
3544
+ * API key: Supported.
3545
+ * CLI user token: Supported.
3546
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3547
+ * Higher permission levels include lower levels: read < write < delete.
2503
3548
  */
2504
3549
  get(delivery_id: string): Promise<S['WebhookDeliveryResponse']>;
2505
3550
  /**
@@ -2509,6 +3554,12 @@ declare class EllipsisWebhooksDeliveries {
2509
3554
  *
2510
3555
  * Includes verification pings and deliveries for deleted webhooks.
2511
3556
  * History is retained for 30 days. Retries belong to the same delivery.
3557
+ *
3558
+ * Required permissions: read:webhooks.
3559
+ * API key: Supported.
3560
+ * CLI user token: Supported.
3561
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3562
+ * Higher permission levels include lower levels: read < write < delete.
2512
3563
  */
2513
3564
  list(options?: {
2514
3565
  webhook_id?: string | null;
@@ -2530,9 +3581,15 @@ declare class EllipsisWebhooks {
2530
3581
  * Create a webhook and send a verification ping.
2531
3582
  *
2532
3583
  * Save the signing secret from this response; it is returned once.
2533
- * Accounts can have three webhooks, including unverified and pending
2534
- * ones. A ping returning HTTP 200 moves unverified to pending. Contact
3584
+ * Accounts default to three webhook slots, including unverified and
3585
+ * pending ones; your account may have a custom allowance. A ping returning HTTP 200 moves unverified to pending. Contact
2535
3586
  * Ellipsis to activate it and receive session.create events.
3587
+ *
3588
+ * Required permissions: write:webhooks.
3589
+ * API key: Supported.
3590
+ * CLI user token: Supported.
3591
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3592
+ * Higher permission levels include lower levels: read < write < delete.
2536
3593
  */
2537
3594
  create(options: {
2538
3595
  description?: string | null;
@@ -2545,19 +3602,37 @@ declare class EllipsisWebhooks {
2545
3602
  * Delete a webhook and cancel outstanding deliveries.
2546
3603
  *
2547
3604
  * An HTTP request already in flight may finish. Delivery history remains
2548
- * available for 30 days. Deletion frees one of the account's three slots.
3605
+ * available for 30 days. Deletion frees a webhook slot.
3606
+ *
3607
+ * Required permissions: delete:webhooks.
3608
+ * API key: Supported.
3609
+ * CLI user token: Supported.
3610
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3611
+ * Higher permission levels include lower levels: read < write < delete.
2549
3612
  */
2550
3613
  delete(webhook_id: string): Promise<void>;
2551
3614
  /**
2552
3615
  * Get Webhook
2553
3616
  *
2554
3617
  * Get a webhook's configuration and approval state.
3618
+ *
3619
+ * Required permissions: read:webhooks.
3620
+ * API key: Supported.
3621
+ * CLI user token: Supported.
3622
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3623
+ * Higher permission levels include lower levels: read < write < delete.
2555
3624
  */
2556
3625
  get(webhook_id: string): Promise<S['WebhookResponse']>;
2557
3626
  /**
2558
3627
  * List Webhooks
2559
3628
  *
2560
3629
  * List your webhooks and their delivery summaries.
3630
+ *
3631
+ * Required permissions: read:webhooks.
3632
+ * API key: Supported.
3633
+ * CLI user token: Supported.
3634
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3635
+ * Higher permission levels include lower levels: read < write < delete.
2561
3636
  */
2562
3637
  list(): Promise<S['WebhooksListResponse']>;
2563
3638
  /**
@@ -2566,8 +3641,15 @@ declare class EllipsisWebhooks {
2566
3641
  * Send a signed verification or test ping.
2567
3642
  *
2568
3643
  * Available in every state. Only HTTP 200 verifies a destination;
2569
- * successful pings never activate it. At most five pings per account
2570
- * per minute, including pings from creation and URL changes.
3644
+ * successful pings never activate it. The default limit is five pings per
3645
+ * account per minute, including creation and URL changes. Custom
3646
+ * account allowances apply.
3647
+ *
3648
+ * Required permissions: write:webhooks.
3649
+ * API key: Supported.
3650
+ * CLI user token: Supported.
3651
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3652
+ * Higher permission levels include lower levels: read < write < delete.
2571
3653
  */
2572
3654
  ping(webhook_id: string): Promise<void>;
2573
3655
  /**
@@ -2578,6 +3660,12 @@ declare class EllipsisWebhooks {
2578
3660
  * Changing the URL cancels outstanding deliveries, clears verification
2579
3661
  * and approval, and sends another ping. State and signing secret cannot
2580
3662
  * be set here. Updating description or subscriptions preserves approval.
3663
+ *
3664
+ * Required permissions: write:webhooks.
3665
+ * API key: Supported.
3666
+ * CLI user token: Supported.
3667
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3668
+ * Higher permission levels include lower levels: read < write < delete.
2581
3669
  */
2582
3670
  update(webhook_id: string, options: {
2583
3671
  description?: string | null;
@@ -2588,27 +3676,35 @@ declare class EllipsisWebhooks {
2588
3676
  declare class Ellipsis {
2589
3677
  private readonly transport;
2590
3678
  readonly account: EllipsisAccount;
3679
+ readonly agents: EllipsisAgents;
2591
3680
  readonly alerts: EllipsisAlerts;
2592
3681
  readonly analytics: EllipsisAnalytics;
2593
3682
  readonly auth: EllipsisAuth;
2594
- readonly automations: EllipsisAutomations;
2595
3683
  readonly environments: EllipsisEnvironments;
2596
- readonly files: EllipsisFiles;
3684
+ readonly handlers: EllipsisHandlers;
2597
3685
  readonly integrations: EllipsisIntegrations;
2598
3686
  readonly memories: EllipsisMemories;
2599
3687
  readonly reviews: EllipsisReviews;
2600
- readonly sandboxes: EllipsisSandboxes;
2601
3688
  readonly secrets: EllipsisSecrets;
2602
3689
  readonly sessions: EllipsisSessions;
2603
3690
  readonly support: EllipsisSupport;
2604
3691
  readonly templates: EllipsisTemplates;
2605
3692
  readonly user: EllipsisUser;
3693
+ readonly vmExecutions: EllipsisVmExecutions;
3694
+ readonly vmImages: EllipsisVmImages;
3695
+ readonly vms: EllipsisVms;
2606
3696
  readonly webhooks: EllipsisWebhooks;
2607
3697
  constructor(options: TransportOptions);
2608
3698
  /**
2609
3699
  * Current Identity
2610
3700
  *
2611
3701
  * Return the identity behind the caller's credential.
3702
+ *
3703
+ * Required permissions: read:account.
3704
+ * API key: Supported.
3705
+ * CLI user token: Supported.
3706
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3707
+ * Higher permission levels include lower levels: read < write < delete.
2612
3708
  */
2613
3709
  identity(): Promise<S['Identity']>;
2614
3710
  }
@@ -2645,4 +3741,4 @@ declare class RateLimitError extends APIError {
2645
3741
  declare class ServerError extends APIError {
2646
3742
  }
2647
3743
 
2648
- export { APIError, AuthenticationError, type AutomationListStreamMessage, type CollectionStreamFrame, type CollectionStreamHeartbeat, ConflictError, DEFAULT_BASE_URL, Ellipsis, EllipsisError, ForbiddenError, NotFoundError, Page, RateLimitError, type SandboxSnapshotFrame, type SandboxUpdateFrame, ServerError, SessionHandle, type SessionListStreamMessage, TERMINAL_STATUSES, Transport, TransportError, type TransportOptions, UnprocessableError, components, isSettled };
3744
+ export { APIError, type AgentListStreamMessage, AuthenticationError, type CollectionStreamFrame, type CollectionStreamHeartbeat, ConflictError, DEFAULT_BASE_URL, Ellipsis, EllipsisError, ForbiddenError, NotFoundError, Page, RateLimitError, type SandboxSnapshotFrame, type SandboxUpdateFrame, ServerError, SessionHandle, type SessionListStreamMessage, Transport, TransportError, type TransportOptions, UnprocessableError, components, isTurnFinal };