@ellipsis-dev/sdk 0.25.0 → 0.28.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,5 +1,1063 @@
1
- import { c as components } from './types-DJzmFABi.js';
2
- export { A as AttributionType, B as BudgetSource, C as ClaudeSessionRecord, a as CodexEvent, b as CodexItem, d as CodexSessionRecord, e as CreateReviewRequest, D as DeltaFrame, f as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, g as GithubAccountType, H as Harness, h as HeartbeatFrame, L as LifecycleSessionRecord, P as ParentKind, i as PromptBlockedReason, R as RecordsAppendFrame, j as ResolvedReviewScope, k as Review, l as ReviewConfiguration, m as ReviewCounters, n as ReviewFinding, o as ReviewRequester, p as ReviewScope, q as ReviewScopeKind, r as ReviewStage, s as ReviewedCommit, t as ReviewsListResponse, S as SdkAssistantRecord, u as SdkContentBlock, v as SdkRateLimitRecord, w as SdkRecord, x as SdkResultRecord, y as SdkSystemRecord, z as SdkUserRecord, I as SendSessionMessageRequest, J as Session, K as SessionExitStatus, M as SessionFrame, N as SessionGit, O as SessionLiveness, Q as SessionMessage, T as SessionMessageResponse, U as SessionMessageStatus, V as SessionPrompting, W as SessionRecord, X as SessionRecordsListResponse, Y as SessionResponse, Z as SessionSource, _ as SessionState, $ as SessionStatus, a0 as SessionStreamFrame, a1 as SessionSurface, a2 as SessionsListResponse, a3 as SnapshotFrame, a4 as StreamFrame, a5 as TokensInfo, a6 as paths } from './types-DJzmFABi.js';
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';
3
+
4
+ /**
5
+ * Frames on /v1/sessions/stream, /v1/automations/stream and /v1/sandboxes/{id}/stream. Ignore unknown frame types.
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';
12
+ /**
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).
16
+ */
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 {
119
+ attribution: SessionAttribution;
120
+ /**
121
+ * The automation the session was started from, or null for a raw session started with POST /v1/sessions.
122
+ */
123
+ automation: SessionAutomation | null;
124
+ budget: SessionBudget;
125
+ config: SessionConfig1;
126
+ /**
127
+ * The "owner/name" repository context the session was started in, if any.
128
+ */
129
+ context_repository: string | null;
130
+ cost: SessionCost;
131
+ /**
132
+ * When the session was created.
133
+ */
134
+ created_at: string;
135
+ environment: SessionEnvironment;
136
+ /**
137
+ * How the session ended; null until it is terminal.
138
+ */
139
+ exit_status: SessionExitStatus | null;
140
+ /**
141
+ * 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
+ */
143
+ git: SessionGit | null;
144
+ harness: Harness;
145
+ /**
146
+ * Unique identifier of the session.
147
+ */
148
+ id: string;
149
+ /**
150
+ * When the session last showed activity.
151
+ */
152
+ last_activity_at: string | null;
153
+ /**
154
+ * When the session last received a message.
155
+ */
156
+ last_message_at: string | null;
157
+ /**
158
+ * Caller-supplied metadata key-value pairs.
159
+ */
160
+ metadata: {
161
+ [k: string]: string;
162
+ };
163
+ parent: SessionParent;
164
+ /**
165
+ * The per-session prompt the session was started with.
166
+ */
167
+ prompt: string | null;
168
+ prompting: SessionPrompting;
169
+ /**
170
+ * Lifecycle state of the durable conversation, or null for sessions without one.
171
+ */
172
+ session_state: SessionState | null;
173
+ source: SessionSource;
174
+ status: SessionStatus;
175
+ /**
176
+ * Human-readable reason for the current status, when there is one.
177
+ */
178
+ status_reason: string | null;
179
+ stopped: SessionStopped;
180
+ /**
181
+ * The latest live summary of the session's progress while it runs, and when it was generated.
182
+ */
183
+ summary: SessionSummary | null;
184
+ surface: SessionSurface;
185
+ tokens: SessionTokens;
186
+ /**
187
+ * The external event that started the session.
188
+ */
189
+ trigger: SessionTrigger | null;
190
+ /**
191
+ * When the session was last updated.
192
+ */
193
+ updated_at: string;
194
+ }
195
+ /**
196
+ * The principal this session is attributed to.
197
+ */
198
+ interface SessionAttribution {
199
+ /**
200
+ * Identifier of the principal the session is attributed to.
201
+ */
202
+ id: string | null;
203
+ /**
204
+ * Kind of principal the session is attributed to (e.g. a GitHub user or an API key).
205
+ */
206
+ type: AttributionType | null;
207
+ /**
208
+ * The GitHub user the session is attributed to, resolved at read time. Null when the attribution is not a GitHub user.
209
+ */
210
+ user: GithubAccountSnippet | null;
211
+ }
212
+ /**
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.
216
+ *
217
+ * This is the least amount of info we need to represent a GitHub account.
218
+ */
219
+ interface GithubAccountSnippet {
220
+ avatar_url: string;
221
+ id: number;
222
+ login: string;
223
+ type: GithubAccountType;
224
+ }
225
+ /**
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
228
+ * exists NOW. They diverge legitimately — a YAML edit after the session
229
+ * started leaves the pointer describing something the session never ran.
230
+ */
231
+ interface SessionAutomation {
232
+ config: AutomationConfig;
233
+ /**
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.
235
+ */
236
+ id: string | null;
237
+ }
238
+ /**
239
+ * The automation definition the session was started from, frozen when the session was created.
240
+ */
241
+ interface AutomationConfig {
242
+ ellipsis: AutomationIdentity;
243
+ input: InputContract | null;
244
+ session: SessionConfig;
245
+ trigger: (CronTrigger | ReactTrigger) | null;
246
+ }
247
+ /**
248
+ * The Ellipsis product namespace for a config file: which schema this is
249
+ * (`version`), the human-facing identity (`name`/`description`), freeform
250
+ * organizational `metadata`, and whether the agent is `enabled`. The
251
+ * 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
253
+ * config directory) — see `yaml_is_ellipsis_config`.
254
+ *
255
+ * `enabled` is agent behavior, not freeform metadata, so it stays inside
256
+ * the config `sha` (only `metadata` is sha-excluded). Whether a session
257
+ * accepts messages is a per-run choice (POST /v1/sessions `interactive`),
258
+ * not a config one.
259
+ */
260
+ interface AutomationIdentity {
261
+ description: string | null;
262
+ enabled: boolean;
263
+ metadata: ConfigMetadata;
264
+ name: string | null;
265
+ version: string;
266
+ }
267
+ interface ConfigMetadata {
268
+ annotations: {
269
+ [k: string]: string;
270
+ };
271
+ labels: string[];
272
+ }
273
+ /**
274
+ * The typed input contract: what goes INTO a session (the trigger is
275
+ * when it happens; this is what goes in).
276
+ *
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.
281
+ *
282
+ * `message` is the initial-message template: exact `{{path}}` substitution
283
+ * over the caller payload (or, on a react agent, over the surface's
284
+ * published fields), no conditionals/loops/filters. Refs are validated at
285
+ * deploy time against the governing field set (see AutomationConfig's
286
+ * `_check_input`).
287
+ */
288
+ interface InputContract {
289
+ json_schema: {
290
+ [k: string]: unknown;
291
+ } | null;
292
+ message: string | null;
293
+ }
294
+ /**
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`.
302
+ *
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.
306
+ */
307
+ interface SessionConfig {
308
+ budget: BudgetConfig;
309
+ environment: string | EnvironmentConfig;
310
+ /**
311
+ * The explicitly selected harness and its native options.
312
+ */
313
+ harness: ClaudeConfig | CodexConfig;
314
+ /**
315
+ * Instructions appended to the harness's own prompt. Text and repository file references are resolved in order.
316
+ */
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;
327
+ }
328
+ /**
329
+ * Everything about the environment (the sandbox) the agent runs in: which
330
+ * `repositories` are cloned into it, which environment `variables` it gets,
331
+ * its `compute` sizing, how its `image` is customized, and lifecycle `hooks`.
332
+ * What the agent may *do* from that environment is the top-level
333
+ * `permissions:` block, not this one.
334
+ *
335
+ * 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
337
+ * store. Only the named variables reach this agent; the rest of the account's
338
+ * stored variables never do. This is how a config brings in the config and
339
+ * credentials a custom CLI needs.
340
+ */
341
+ interface EnvironmentConfig {
342
+ compute: ComputeConfig;
343
+ hooks: EnvironmentHooks;
344
+ image: EnvironmentImage;
345
+ mcp_servers: (string | McpServerRef | McpStdioServer | McpRemoteServer)[];
346
+ repositories: RepositoryRef[];
347
+ variables: EnvironmentVariable[];
348
+ }
349
+ /**
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.
355
+ *
356
+ * `memory` and `timeout` each accept a shorthand string ("8GB", "30m") or an
357
+ * explicit units object ({gb: 8}, {minutes: 30}); the `memory_mib` /
358
+ * `timeout_seconds` properties resolve either form to the canonical integer
359
+ * the sandbox driver consumes.
360
+ *
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.
367
+ *
368
+ * Compute currently uses a temporary flat one-cent amount per allocated
369
+ * execution, subject to the account's existing free-compute exemptions.
370
+ */
371
+ interface ComputeConfig {
372
+ cpu: number | null;
373
+ memory: string | MemorySize | null;
374
+ timeout: string | Duration | null;
375
+ }
376
+ /**
377
+ * A memory size as explicit units, summed (binary: 1GB = 1024MB = 1024MiB).
378
+ * Set any of `gb`/`mb` (at least one). The alternative to the `8GB`-style
379
+ * shorthand string.
380
+ */
381
+ interface MemorySize {
382
+ gb: number | null;
383
+ mb: number | null;
384
+ }
385
+ /**
386
+ * A duration as explicit units, summed. Set any of `hours`/`minutes`/
387
+ * `seconds` (at least one). The alternative to the `30m`-style shorthand
388
+ * string wherever a duration is accepted.
389
+ */
390
+ interface Duration {
391
+ hours: number | null;
392
+ minutes: number | null;
393
+ seconds: number | null;
394
+ }
395
+ /**
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`).
404
+ *
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.
412
+ */
413
+ interface EnvironmentHooks {
414
+ post_clone: string | null;
415
+ post_start: string | null;
416
+ }
417
+ /**
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`.
431
+ */
432
+ interface EnvironmentImage {
433
+ dockerfile_append: string | null;
434
+ setup: string | null;
435
+ }
436
+ /**
437
+ * One built-in MCP server this agent opts into by name (`linear`/`slack`).
438
+ * A name reference over the connected built-in set — the platform manages the
439
+ * server's transport and credentials. It only matters when the named
440
+ * integration is set to `opt_in` inclusion; an integration in the default
441
+ * `all_sessions` mode is added regardless. For a server the platform does not
442
+ * provide, define it instead (`McpStdioServer` /
443
+ * `McpRemoteServer`).
444
+ */
445
+ interface McpServerRef {
446
+ name: string;
447
+ }
448
+ /**
449
+ * 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.
453
+ *
454
+ * `env` values may embed `${NAME}` references, resolved at run time from the
455
+ * account's secrets store (see `mcp_secret_refs`); everything else is passed
456
+ * literally.
457
+ */
458
+ interface McpStdioServer {
459
+ args: string[];
460
+ command: string;
461
+ env: {
462
+ [k: string]: string;
463
+ };
464
+ name: string;
465
+ }
466
+ /**
467
+ * 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.
469
+ * `Authorization: Bearer ${TOKEN}`); values may embed `${NAME}` secret
470
+ * references, resolved at run time from the account's secrets store.
471
+ */
472
+ interface McpRemoteServer {
473
+ headers: {
474
+ [k: string]: string;
475
+ };
476
+ name: string;
477
+ url: string;
478
+ }
479
+ interface RepositoryRef {
480
+ name: string;
481
+ owner: string | null;
482
+ ref: string | null;
483
+ }
484
+ /**
485
+ * One environment variable injected into the agent's sandbox.
486
+ *
487
+ * `value`, when set, is a literal injected as-is — use it for non-secret
488
+ * 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
490
+ * / `PUT /v1/secrets`) by `name`, so a secret can be injected without
491
+ * ever putting it in the config file. Either way the variable only reaches
492
+ * agents that name it.
493
+ */
494
+ interface EnvironmentVariable {
495
+ name: string;
496
+ value: string | null;
497
+ }
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
+ /**
540
+ * JSON Schema for the harness's structured result, when certified.
541
+ */
542
+ interface OutputConfig {
543
+ json_schema: {
544
+ [k: string]: unknown;
545
+ };
546
+ }
547
+ /**
548
+ * 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.
551
+ *
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
556
+ * resource (see `EllipsisPermissions`); the minted token carries
557
+ * the intersection, so a config can only ever reduce access. `false` fails
558
+ * validation — an agent with no API token cannot report its own progress.
559
+ *
560
+ * `github` scopes the sandbox's GitHub installation token (`GH_TOKEN`) —
561
+ * see `GithubPermissions`. GitHub enforces it at mint time.
562
+ */
563
+ interface PermissionsConfig {
564
+ ellipsis: (true | 'all') | EllipsisPermissions;
565
+ github: GithubPermissions;
566
+ }
567
+ /**
568
+ * `permissions.ellipsis` as a map: resource → level | grant | list of
569
+ * grants. Levels are hierarchical (read < write < delete), so `write`
570
+ * 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.
573
+ */
574
+ interface EllipsisPermissions {
575
+ [k: string]: Level | EllipsisGrant | (Level | EllipsisGrant)[];
576
+ }
577
+ /**
578
+ * One grant entry: a level, optionally narrowed to instances whose
579
+ * natural key (a file's name, a memory's path, a secret's name, a config's
580
+ * name, a session's id) matches any of the `match` globs.
581
+ */
582
+ interface EllipsisGrant {
583
+ level: Level;
584
+ match: string[] | null;
585
+ }
586
+ /**
587
+ * 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.
590
+ *
591
+ * By default the token carries the installation's full permissions on all of
592
+ * the installation's repositories. `permissions` narrows what it may do:
593
+ * the string `read_only` grants read access to contents, issues, metadata and
594
+ * pull requests; a map requests explicit levels per GitHub App permission
595
+ * scope (e.g. `{contents: read, pull_requests: write}`) and may never exceed
596
+ * what the installation granted. `repositories` scopes the token to exactly
597
+ * the listed repos, by name (they must belong to the installation).
598
+ *
599
+ * 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
601
+ * exceed it.
602
+ */
603
+ interface GithubPermissions {
604
+ permissions: 'read_only' | {
605
+ [k: string]: string;
606
+ } | null;
607
+ repositories: string[] | null;
608
+ }
609
+ /**
610
+ * A repository directory containing SKILL.md and supporting UTF-8 files.
611
+ * Resolved at run start and installed in the selected harness's skill directory.
612
+ * Explicit skill references require a model with the skills capability.
613
+ */
614
+ interface SkillRef {
615
+ path: string;
616
+ repository: RepositoryRef | null;
617
+ }
618
+ interface CronTrigger {
619
+ schedule: string;
620
+ type: 'cron';
621
+ }
622
+ interface ReactTrigger {
623
+ issue: ReactIssue | null;
624
+ linear_issue: ReactLinearIssue | null;
625
+ pull_request: ReactPullRequest | null;
626
+ push: ReactPush | null;
627
+ sentry: ReactSentry | null;
628
+ slack_channel: ReactSlackChannel | null;
629
+ type: 'react';
630
+ }
631
+ interface ReactIssue {
632
+ for: GithubAccountSelector;
633
+ labels: string[];
634
+ on: IssueAction[];
635
+ repositories: RepositoryFilter;
636
+ }
637
+ /**
638
+ * A selector of GitHub accounts — the `for:` audience gate on react
639
+ * surfaces and code review pipelines, classified on the stable entity author
640
+ * (the pusher for `push`, the PR author for a review). `users` selects human
641
+ * accounts, `bots` selects bot accounts; each is a `GithubAccountFilter`
642
+ * (include minus exclude, with bare bool/list shorthand).
643
+ */
644
+ interface GithubAccountSelector {
645
+ bots: GithubAccountFilter;
646
+ users: GithubAccountFilter;
647
+ }
648
+ interface ReactLinearIssue {
649
+ for: GithubAccountSelector;
650
+ on: LinearIssueAction[];
651
+ }
652
+ interface ReactPullRequest {
653
+ base: string[];
654
+ draft: boolean | null;
655
+ for: GithubAccountSelector;
656
+ head: string[];
657
+ labels: string[];
658
+ on: PullRequestAction[];
659
+ paths: string[];
660
+ repositories: RepositoryFilter;
661
+ }
662
+ interface ReactPush {
663
+ branch: string[];
664
+ for: GithubAccountSelector;
665
+ paths: string[];
666
+ repositories: RepositoryFilter;
667
+ }
668
+ interface ReactSentry {
669
+ on: SentryAction[];
670
+ projects: string[];
671
+ }
672
+ interface ReactSlackChannel {
673
+ }
674
+ /**
675
+ * The spend budget enforced for this session.
676
+ */
677
+ interface SessionBudget {
678
+ /**
679
+ * The spend budget resolved for this session, in cents.
680
+ */
681
+ cents: number;
682
+ source: BudgetSource;
683
+ }
684
+ /**
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`.
692
+ *
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.
696
+ */
697
+ interface SessionConfig1 {
698
+ budget: BudgetConfig;
699
+ environment: string | EnvironmentConfig;
700
+ /**
701
+ * The explicitly selected harness and its native options.
702
+ */
703
+ harness: ClaudeConfig | CodexConfig;
704
+ /**
705
+ * Instructions appended to the harness's own prompt. Text and repository file references are resolved in order.
706
+ */
707
+ instructions: string | SystemFileRef | (string | SystemFileRef)[];
708
+ output: OutputConfig | null;
709
+ permissions: PermissionsConfig;
710
+ skills: SkillRef[];
711
+ }
712
+ /**
713
+ * What the session cost, in millicents, broken down by leg and carrying its own total.
714
+ */
715
+ interface SessionCost {
716
+ /**
717
+ * Platform fee in millicents.
718
+ */
719
+ fee: number;
720
+ /**
721
+ * LLM spend in millicents.
722
+ */
723
+ llm: number;
724
+ /**
725
+ * Sandbox CPU spend in millicents.
726
+ */
727
+ sandbox_cpu: number;
728
+ /**
729
+ * Sandbox memory spend in millicents.
730
+ */
731
+ sandbox_memory: number;
732
+ /**
733
+ * The grand total in millicents: llm + sandbox_cpu + sandbox_memory + fee.
734
+ */
735
+ total: number;
736
+ }
737
+ /**
738
+ * The environment the session resolved: the saved environment's id and how it was chosen. The environment's frozen body is `config.environment`.
739
+ */
740
+ interface SessionEnvironment {
741
+ /**
742
+ * Identifier of the saved environment the session's config resolved. Null for an inline environment block or the built-in basic sandbox.
743
+ */
744
+ environment_id: string | null;
745
+ /**
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.
747
+ */
748
+ source: EnvironmentSource | null;
749
+ }
750
+ /**
751
+ * Every repo the session touched. Small enough to ride on `agent_sessions`
752
+ * and be returned by every session read.
753
+ */
754
+ interface SessionGit {
755
+ repos: SessionGitRepo[];
756
+ }
757
+ /**
758
+ * One checkout in the session's sandbox and everything the session did to
759
+ * it, split by whether it survived the sandbox.
760
+ */
761
+ interface SessionGitRepo {
762
+ commits: SessionGitCommit[];
763
+ commits_total: number;
764
+ full_name: string;
765
+ local_commit: string | null;
766
+ local_uncommitted_files: SessionGitFile[];
767
+ prs: SessionGitPr[];
768
+ remote_branch: string | null;
769
+ remote_commit: string | null;
770
+ }
771
+ /**
772
+ * One commit the session created in this repo (everything past the
773
+ * provisioning checkout's sha), captured from the sandbox rather than the
774
+ * transcript so it stays correct through amends, rebases, and commits made by
775
+ * scripts. The repo is the parent object, so it is not repeated here.
776
+ */
777
+ interface SessionGitCommit {
778
+ committed_at: string;
779
+ pushed: boolean;
780
+ sha: string;
781
+ subject: string;
782
+ }
783
+ /**
784
+ * One file's uncommitted change, as `git diff HEAD --numstat` reports it
785
+ * (with intent-to-add, so a brand-new file still counts).
786
+ */
787
+ interface SessionGitFile {
788
+ additions: number;
789
+ deletions: number;
790
+ path: string;
791
+ status: string;
792
+ }
793
+ /**
794
+ * A pull request the session opened in this repo, written the moment the
795
+ * creating tool call's result lands (see extract_session_prs.PrCreateWatcher).
796
+ * Live PR state (open/merged/closed) is not stored — it lives on gh_prs,
797
+ * joined via `gh_pr_id` (GET /frontend/agents/sessions/{id}/git). The repo is
798
+ * the parent object, so it is not repeated here.
799
+ */
800
+ interface SessionGitPr {
801
+ gh_pr_id: number | null;
802
+ number: number;
803
+ title: string | null;
804
+ url: string;
805
+ }
806
+ /**
807
+ * What preceded this session, if anything.
808
+ */
809
+ interface SessionParent {
810
+ /**
811
+ * How this session relates to its parent session, if any.
812
+ */
813
+ kind: ParentKind | null;
814
+ /**
815
+ * Identifier of the original session this one was replayed from, if it was started via replay.
816
+ */
817
+ replayed_from_session_id: string | null;
818
+ /**
819
+ * Identifier of the parent session that spawned this one, if any.
820
+ */
821
+ session_id: string | null;
822
+ }
823
+ /**
824
+ * Whether a client may send this session a message and, when it may not, the reason to show instead of a composer.
825
+ */
826
+ interface SessionPrompting {
827
+ blocked_reason: PromptBlockedReason | null;
828
+ detail: string | null;
829
+ enabled: boolean;
830
+ surface_name: string | null;
831
+ }
832
+ /**
833
+ * The stop request, if the session was stopped.
834
+ */
835
+ interface SessionStopped {
836
+ /**
837
+ * When a stop was requested, if one was.
838
+ */
839
+ at: string | null;
840
+ /**
841
+ * GitHub account id of the user who stopped the session, if known.
842
+ */
843
+ by: number | null;
844
+ /**
845
+ * The GitHub user who stopped the session, resolved at read time.
846
+ */
847
+ by_user: GithubAccountSnippet | null;
848
+ }
849
+ /**
850
+ * A live one-line summary of what the session is working on, refreshed
851
+ * every few steps while it runs.
852
+ */
853
+ interface SessionSummary {
854
+ /**
855
+ * When this summary line was generated. Null on summaries written before generation time was tracked.
856
+ */
857
+ created_at: string | null;
858
+ /**
859
+ * One-line description of what the session is working on.
860
+ */
861
+ description: string;
862
+ }
863
+ /**
864
+ * The public status projection: the durable conversation (`session`), the current execution (`run`), and the one derived `status` word.
865
+ */
866
+ interface SessionSurface {
867
+ run: RunStatus | null;
868
+ session: SessionLiveness | null;
869
+ status: string | null;
870
+ }
871
+ /**
872
+ * The tokens the session spent and the model they went to. `total` includes the prompt-cache lanes.
873
+ */
874
+ interface SessionTokens {
875
+ /**
876
+ * Tokens written to the prompt cache.
877
+ */
878
+ cache_creation: number;
879
+ /**
880
+ * Tokens read from the prompt cache.
881
+ */
882
+ cache_read: number;
883
+ /**
884
+ * Input tokens used.
885
+ */
886
+ input: number;
887
+ /**
888
+ * The model the token counts are attributed to.
889
+ */
890
+ model: string;
891
+ /**
892
+ * Output tokens used.
893
+ */
894
+ output: number;
895
+ /**
896
+ * Total tokens consumed, INCLUDING the prompt-cache reads and writes — the same basis the token cost is priced on.
897
+ */
898
+ total: number;
899
+ }
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';
921
+ }
922
+ /**
923
+ * An automation: a saved agent definition that runs on its trigger or
924
+ * when invoked, plus where it syncs from and the state of that sync.
925
+ */
926
+ interface Automation {
927
+ config: AutomationConfig1;
928
+ /**
929
+ * When the automation was created.
930
+ */
931
+ created_at: string;
932
+ /**
933
+ * The raw ellipsis.name display text from the config file.
934
+ */
935
+ display_name: string | null;
936
+ /**
937
+ * The GitHub account that last edited the automation, when the edit came from a known user.
938
+ */
939
+ edited_by: GithubAccountSnippet | null;
940
+ /**
941
+ * Unique identifier of the automation.
942
+ */
943
+ id: string;
944
+ /**
945
+ * When that most recent session was created.
946
+ */
947
+ last_session_created_at: string | null;
948
+ /**
949
+ * The most recent session this automation started, or null if it has never run.
950
+ */
951
+ last_session_id: string | null;
952
+ /**
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.
954
+ */
955
+ last_sync_error: string | null;
956
+ /**
957
+ * The last commit the automation was synced from.
958
+ */
959
+ last_synced_commit_sha: string | null;
960
+ managed_by: ConfigManagedBy;
961
+ /**
962
+ * The automation's account-unique addressable name (a slug of its display name); usable anywhere an automation is referenced, interchangeably with the id.
963
+ */
964
+ name: string | null;
965
+ /**
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.
967
+ */
968
+ pending_pull_request_url: string | null;
969
+ /**
970
+ * The definition's content identity: the version fingerprint frozen onto each session that runs it.
971
+ */
972
+ sha: string;
973
+ /**
974
+ * The repository, path, and branch the automation syncs from. Null only transiently, before the creating pull request's file lands on the branch.
975
+ */
976
+ source_details: GithubSourceDetails | null;
977
+ /**
978
+ * When the automation was last updated.
979
+ */
980
+ updated_at: string;
981
+ }
982
+ /**
983
+ * The automation definition itself, in the same schema as its YAML file: identity, trigger, input contract, and the session block.
984
+ */
985
+ interface AutomationConfig1 {
986
+ ellipsis: AutomationIdentity;
987
+ input: InputContract | null;
988
+ session: SessionConfig;
989
+ trigger: (CronTrigger | ReactTrigger) | null;
990
+ }
991
+ /**
992
+ * Identifies the file a GitHub-sourced automation is synced from.
993
+ *
994
+ * Keyed on the repository ID (not owner/name) so repository and org renames
995
+ * don't orphan the config; resolve display names from gh_repositories at
996
+ * read time.
997
+ */
998
+ interface GithubSourceDetails {
999
+ branch: string;
1000
+ path: string;
1001
+ repo_id: number;
1002
+ }
1003
+ interface CollectionStreamHeartbeat {
1004
+ type: 'heartbeat';
1005
+ }
1006
+ interface SandboxSnapshotFrame {
1007
+ sandbox: SandboxResponse;
1008
+ type: 'snapshot';
1009
+ }
1010
+ interface SandboxResponse {
1011
+ cache_tier: SandboxCacheTier | null;
1012
+ cost_sandbox_cpu: number;
1013
+ cost_sandbox_memory: number;
1014
+ cpu: number;
1015
+ dockerfile: string | null;
1016
+ encrypted_ports: number[];
1017
+ environment_variable_keys: string[];
1018
+ failed_at: string | null;
1019
+ id: string;
1020
+ image_setup: string | null;
1021
+ memory_mib: number;
1022
+ phase_timings: {
1023
+ [k: string]: number;
1024
+ };
1025
+ post_clone: string | null;
1026
+ post_start: string | null;
1027
+ repositories: SandboxRepository[];
1028
+ running_at: string | null;
1029
+ scheduled_at: string;
1030
+ source: SandboxSource;
1031
+ source_session_id: string | null;
1032
+ status: SandboxStatus;
1033
+ terminated_at: string | null;
1034
+ terminating_at: string | null;
1035
+ timeout_seconds: number;
1036
+ tunnels: SandboxPort[];
1037
+ type: SandboxType;
1038
+ unencrypted_ports: number[];
1039
+ }
1040
+ interface SandboxRepository {
1041
+ id: number;
1042
+ name: string;
1043
+ owner_id: number;
1044
+ owner_name: string;
1045
+ sha: string;
1046
+ }
1047
+ interface SandboxPort {
1048
+ port: number;
1049
+ tcp_host: string | null;
1050
+ tcp_port: number | null;
1051
+ tls_host: string;
1052
+ tls_port: number;
1053
+ tunnel_url: string;
1054
+ unencrypted_host: string | null;
1055
+ unencrypted_port: number | null;
1056
+ }
1057
+ interface SandboxUpdateFrame {
1058
+ sandbox: SandboxResponse;
1059
+ type: 'sandbox';
1060
+ }
3
1061
 
4
1062
  interface CursorResponse {
5
1063
  has_more: boolean;
@@ -23,6 +1081,7 @@ interface SessionsApi {
23
1081
  stop(sessionId: string): Promise<S$1['SessionResponse']>;
24
1082
  sendMessage(sessionId: string, options: {
25
1083
  message: string;
1084
+ images?: S$1['ImageAttachment'][];
26
1085
  idempotency_key?: string | null;
27
1086
  }): Promise<S$1['SessionMessageResponse']>;
28
1087
  records(sessionId: string, options?: {
@@ -42,6 +1101,7 @@ declare class SessionHandle {
42
1101
  pollIntervalMs?: number;
43
1102
  }): Promise<S$1['Session']>;
44
1103
  send(message: string, options?: {
1104
+ images?: S$1['ImageAttachment'][];
45
1105
  idempotencyKey?: string;
46
1106
  }): Promise<S$1['SessionMessage']>;
47
1107
  stop(): Promise<S$1['Session']>;
@@ -69,6 +1129,344 @@ declare class Transport {
69
1129
  }
70
1130
 
71
1131
  type S = components['schemas'];
1132
+ declare class EllipsisAccountApiKeys {
1133
+ private readonly transport;
1134
+ constructor(transport: Transport);
1135
+ /**
1136
+ * Create Api Key
1137
+ *
1138
+ * Create an organization key. Requires a verified GitHub administrator.
1139
+ *
1140
+ * Authenticate as a dashboard user or with a user token. An organization
1141
+ * API key cannot create other keys. The secret is returned only once.
1142
+ */
1143
+ create(options: {
1144
+ name: string;
1145
+ }): Promise<S['CreateApiKeyResponse']>;
1146
+ /**
1147
+ * List Api Keys
1148
+ */
1149
+ list(): Promise<S['ListApiKeysResponse']>;
1150
+ /**
1151
+ * Revoke Api Key
1152
+ *
1153
+ * Revoke an organization key as a verified GitHub administrator.
1154
+ */
1155
+ revoke(api_key_id: string): Promise<S['TokenRevokedResponse']>;
1156
+ }
1157
+ declare class EllipsisAccountBillingAutoRecharge {
1158
+ private readonly transport;
1159
+ constructor(transport: Transport);
1160
+ /**
1161
+ * Get Auto Recharge
1162
+ *
1163
+ * Get your automatic credit recharge settings.
1164
+ *
1165
+ * An account without saved settings returns disabled defaults and no
1166
+ * card. No payment-method identifier or card details are exposed.
1167
+ */
1168
+ get(): Promise<S['AutoRechargeSettings']>;
1169
+ /**
1170
+ * Update Auto Recharge
1171
+ *
1172
+ * Set your automatic credit recharge policy.
1173
+ *
1174
+ * Requires a human account administrator; API keys and sandbox tokens
1175
+ * cannot change this policy. Supply enabled explicitly. Saving amounts
1176
+ * with enabled=false keeps recharge off; enabling requires a saved card.
1177
+ * A recharge buys amount_cents of credit and charges the platform fee
1178
+ * in addition. Amounts and thresholds preserve exact cents.
1179
+ */
1180
+ set(options: {
1181
+ amount_cents: number;
1182
+ enabled: boolean;
1183
+ threshold_cents: number;
1184
+ }): Promise<S['AutoRechargeSettings']>;
1185
+ }
1186
+ declare class EllipsisAccountBilling {
1187
+ private readonly transport;
1188
+ readonly autoRecharge: EllipsisAccountBillingAutoRecharge;
1189
+ constructor(transport: Transport);
1190
+ /**
1191
+ * Create Card Setup Session
1192
+ *
1193
+ * Save a card through Stripe's hosted setup flow.
1194
+ *
1195
+ * Requires a human account administrator. Open the returned URL to
1196
+ * finish setup and return to Billing. Saving a card does not enable
1197
+ * auto-recharge or buy credit.
1198
+ */
1199
+ cardSetup(): Promise<S['BillingCheckout']>;
1200
+ /**
1201
+ * Create Credit Checkout Session
1202
+ *
1203
+ * Buy prepaid credit through Stripe's hosted checkout.
1204
+ *
1205
+ * Requires a human account administrator. Open the returned URL to
1206
+ * complete payment. Credit is granted only after payment succeeds;
1207
+ * the platform fee is charged in addition to amount_cents. Returning
1208
+ * to Billing carries the checkout session ID for receipt lookup.
1209
+ */
1210
+ checkout(options: {
1211
+ amount_cents: number;
1212
+ }): Promise<S['BillingCheckout']>;
1213
+ /**
1214
+ * Claim Signup Credit
1215
+ *
1216
+ * The "Claim $100" button. Runs the same idempotent billing
1217
+ * bootstrap that otherwise fires lazily at the first session (Stripe
1218
+ * customer + usage subscription + the signup grant). A repeat call is
1219
+ * a no-op that returns the current state.
1220
+ */
1221
+ claimSignupCredit(): Promise<S['BillingStatus']>;
1222
+ /**
1223
+ * Get Fee Schedule
1224
+ *
1225
+ * Get the account's rate card, in US dollars.
1226
+ */
1227
+ feeSchedule(): Promise<S['FeeScheduleResponse']>;
1228
+ /**
1229
+ * List Credit Grants
1230
+ *
1231
+ * List your confirmed credit grants and reversals.
1232
+ *
1233
+ * Returns only your account's grants. The total is before usage;
1234
+ * /v1/account/budget reports the available balance.
1235
+ */
1236
+ grants(): Promise<S['CreditGrantsResponse']>;
1237
+ /**
1238
+ * Get Credit Purchase
1239
+ *
1240
+ * Read the amount collected for a credit purchase.
1241
+ *
1242
+ * The amount includes the platform fee and comes from Stripe. An
1243
+ * incomplete, missing, or other-account purchase returns 404.
1244
+ */
1245
+ purchase(checkout_id: string): Promise<S['CreditPurchaseReceipt']>;
1246
+ /**
1247
+ * Get Credit Purchase Options
1248
+ *
1249
+ * Get credit purchase bounds and the platform fee.
1250
+ *
1251
+ * All amounts are integer US cents. The fee is added to the credit
1252
+ * amount; it does not reduce the credit granted.
1253
+ */
1254
+ purchaseOptions(): Promise<S['CreditPurchaseOptions']>;
1255
+ /**
1256
+ * Get Account Billing
1257
+ *
1258
+ * Explain whether your account can start sessions.
1259
+ *
1260
+ * Uses the same account gate as session admission, including credit,
1261
+ * contact email, and personal Claude subscription eligibility. Scoped
1262
+ * spend limits are reported separately by /v1/account/budget.
1263
+ */
1264
+ status(): Promise<S['BillingStatus']>;
1265
+ }
1266
+ declare class EllipsisAccountModels {
1267
+ private readonly transport;
1268
+ constructor(transport: Transport);
1269
+ /**
1270
+ * List Account Models
1271
+ *
1272
+ * List selectable agent models.
1273
+ *
1274
+ * Grouped by manufacturer and model family, newest versions first
1275
+ * within each family, with the organization's default model
1276
+ * flagged (`is_default_agent_model`: the `default_model` of
1277
+ * `GET /v1/account/settings`).
1278
+ *
1279
+ * Reads the same registry as the dashboard's rate table, so a
1280
+ * client's model picker can never drift from what's offered. The
1281
+ * selectable set is global; only the flag is account-scoped.
1282
+ */
1283
+ list(): Promise<S['ModelsListResponse']>;
1284
+ }
1285
+ declare class EllipsisAccountNotifications {
1286
+ private readonly transport;
1287
+ constructor(transport: Transport);
1288
+ /**
1289
+ * Send Test Notification Email
1290
+ *
1291
+ * Send the alert email template to one address with sample data,
1292
+ * so a typo'd finance alias is caught by a human instead of failing
1293
+ * silently when a real alert fires.
1294
+ */
1295
+ testEmail(options: {
1296
+ email: string;
1297
+ }): Promise<S['AccountActionResponse']>;
1298
+ }
1299
+ declare class EllipsisAccountProvidersAnthropic {
1300
+ private readonly transport;
1301
+ constructor(transport: Transport);
1302
+ /**
1303
+ * Delete Anthropic Config
1304
+ */
1305
+ delete(): Promise<void>;
1306
+ /**
1307
+ * Get Anthropic Config
1308
+ */
1309
+ get(): Promise<S['AnthropicConfigResponse']>;
1310
+ /**
1311
+ * Put Anthropic Config
1312
+ */
1313
+ set(options: {
1314
+ api_key: string;
1315
+ }): Promise<S['AnthropicConfigResponse']>;
1316
+ /**
1317
+ * Validate Anthropic Config
1318
+ */
1319
+ validate(): Promise<S['ValidateAnthropicConfigResponse']>;
1320
+ }
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
+ declare class EllipsisAccountProviders {
1346
+ private readonly transport;
1347
+ readonly anthropic: EllipsisAccountProvidersAnthropic;
1348
+ readonly bedrock: EllipsisAccountProvidersBedrock;
1349
+ constructor(transport: Transport);
1350
+ }
1351
+ declare class EllipsisAccountSettings {
1352
+ private readonly transport;
1353
+ constructor(transport: Transport);
1354
+ /**
1355
+ * Get Account Settings
1356
+ *
1357
+ * Get the organization settings.
1358
+ *
1359
+ * Session model and budget defaults, code review and mention behavior,
1360
+ * analytics, retention, and notification contacts. PATCH replaces
1361
+ * supplied sections; PUT preserves its model-and-budget-only behavior.
1362
+ */
1363
+ get(): Promise<S['AccountSettings']>;
1364
+ /**
1365
+ * Set Organization Settings
1366
+ *
1367
+ * Set the organization settings.
1368
+ *
1369
+ * Replaces both: `default_model` accepts an alias or canonical id
1370
+ * and is stored canonical, and cannot be cleared (it is the only
1371
+ * default a session's model resolves against);
1372
+ * `budget_ceiling.session` is in US dollars, at most the platform
1373
+ * ceiling, and null clears it.
1374
+ * Refused for sandbox tokens (potentially prompt-injected code must
1375
+ * not repoint the organization's defaults).
1376
+ */
1377
+ set(options: {
1378
+ budget_ceiling?: S['BudgetCeiling'];
1379
+ default_model: string;
1380
+ }): Promise<S['OrganizationSettings']>;
1381
+ /**
1382
+ * Patch Account Settings
1383
+ *
1384
+ * Replace supplied settings sections without changing omitted sections.
1385
+ *
1386
+ * Changes to model or budget defaults require a GitHub administrator.
1387
+ */
1388
+ update(options?: {
1389
+ analytics?: S['AnalyticsSettings'] | null;
1390
+ budget_ceiling?: S['BudgetCeiling'] | null;
1391
+ code_review?: S['CodeReviewSettings'] | null;
1392
+ data_retention?: S['DataRetentionSettings'] | null;
1393
+ default_model?: string | null;
1394
+ mention?: S['MentionSettings'] | null;
1395
+ notifications?: S['NotificationSettings'] | null;
1396
+ }): Promise<S['AccountSettings']>;
1397
+ }
1398
+ declare class EllipsisAccount {
1399
+ private readonly transport;
1400
+ readonly apiKeys: EllipsisAccountApiKeys;
1401
+ readonly billing: EllipsisAccountBilling;
1402
+ readonly models: EllipsisAccountModels;
1403
+ readonly notifications: EllipsisAccountNotifications;
1404
+ readonly providers: EllipsisAccountProviders;
1405
+ readonly settings: EllipsisAccountSettings;
1406
+ constructor(transport: Transport);
1407
+ /**
1408
+ * Get Customer Activity
1409
+ *
1410
+ * All-time per-surface activity flags: the dashboards' demo-data
1411
+ * fallback reads these instead of inferring "no history" from a
1412
+ * windowed, filtered response.
1413
+ */
1414
+ activity(): Promise<S['AccountActivity']>;
1415
+ /**
1416
+ * Get Customer Audit Log
1417
+ */
1418
+ auditLog(): Promise<S['AccountAuditLogResponse']>;
1419
+ /**
1420
+ * Get Account Budget
1421
+ *
1422
+ * Get prepaid credit, actual trailing budgets, and developer/API-key limits.
1423
+ *
1424
+ * Budgets cover the trailing 1, 7 and 28 days; they do not replenish
1425
+ * prepaid credit. Amounts include measured usage from active sessions.
1426
+ * 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.
1429
+ */
1430
+ budget(): Promise<S['BudgetSummary']>;
1431
+ /**
1432
+ * Update Customer
1433
+ */
1434
+ update(options?: {
1435
+ can_start_job_runs?: boolean | null;
1436
+ contact_email?: string | null;
1437
+ }): Promise<S['AccountResponse']>;
1438
+ /**
1439
+ * Update Budget
1440
+ *
1441
+ * Update spending policy or budget alerts as an account administrator.
1442
+ *
1443
+ * Each supplied section replaces that section; omitted sections are
1444
+ * preserved. Set policy.developer_defaults to null to disable developer
1445
+ * limits. Null override windows inherit their default. API keys use
1446
+ * 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
1449
+ * /account/settings; purchasing credits is separate from budget policy.
1450
+ */
1451
+ updateBudget(options?: {
1452
+ alerts?: S['BudgetAlerts'] | null;
1453
+ policy?: S['BudgetPolicy'] | null;
1454
+ }): Promise<S['BudgetSummary']>;
1455
+ /**
1456
+ * Get Usage
1457
+ *
1458
+ * Get usage for a calendar month, including its funding sources.
1459
+ *
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.
1465
+ */
1466
+ usage(options?: {
1467
+ period_start?: string | null;
1468
+ }): Promise<S['GetUsageOverTimeResponse']>;
1469
+ }
72
1470
  declare class EllipsisAlerts {
73
1471
  private readonly transport;
74
1472
  constructor(transport: Transport);
@@ -264,18 +1662,26 @@ declare class EllipsisAutomations {
264
1662
  *
265
1663
  * Invoke an automation.
266
1664
  *
267
- * Runs the automation exactly as defined — its persona, model,
268
- * environment, permissions, skills, and budget bind — and returns
269
- * the session it started. The body carries only what a caller may
270
- * supply: the typed `input` its schema demands, an optional tighter
271
- * `budget`, and `metadata`. For a different persona or environment,
272
- * start a raw session with POST /v1/sessions instead.
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.
273
1674
  */
274
1675
  run(automation_id: string, options?: {
275
1676
  budget?: number | null;
276
1677
  input?: Record<string, unknown> | null;
277
1678
  metadata?: Record<string, string>;
1679
+ prompt?: string | null;
278
1680
  }): Promise<S['SessionResponse']>;
1681
+ /**
1682
+ * Get Automations Stream Ticket
1683
+ */
1684
+ streamTicket(): Promise<S['StreamTicketResponse']>;
279
1685
  /**
280
1686
  * Unlink Automation
281
1687
  *
@@ -391,7 +1797,12 @@ declare class EllipsisFiles {
391
1797
  * Return one file's metadata and download link.
392
1798
  *
393
1799
  * Includes the gated dashboard URL and a short-lived presigned
394
- * `download_url`.
1800
+ * `download_url`, plus the owning account's GitHub login.
1801
+ *
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.
395
1806
  *
396
1807
  * To fetch the bytes locally, call this and then GET download_url
397
1808
  * immediately — the JSON API never carries the file. The CLI's
@@ -403,13 +1814,16 @@ declare class EllipsisFiles {
403
1814
  *
404
1815
  * List uploaded files, newest first.
405
1816
  *
406
- * Metadata only — download URLs are minted per explicit GET, not
407
- * per row. session_id scopes the list to one run's uploads.
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.
408
1821
  */
409
1822
  list(options?: {
410
1823
  session_id?: string | null;
411
1824
  limit?: number;
412
1825
  cursor?: string | null;
1826
+ include_download_urls?: boolean;
413
1827
  }): Promise<Page<S['File'], S['FilesListResponse']>>;
414
1828
  }
415
1829
  declare class EllipsisIntegrationsGithub {
@@ -433,20 +1847,41 @@ declare class EllipsisIntegrationsGithub {
433
1847
  * List GitHub repositories connected to the installation.
434
1848
  */
435
1849
  repos(): Promise<S['GithubRepositoriesListResponse']>;
1850
+ /**
1851
+ * Uninstall Github App
1852
+ */
1853
+ uninstall(options: {
1854
+ confirm_account_login: string;
1855
+ }): Promise<S['AccountActionResponse']>;
436
1856
  }
437
1857
  declare class EllipsisIntegrationsLinear {
438
1858
  private readonly transport;
439
1859
  constructor(transport: Transport);
1860
+ /**
1861
+ * Delete Linear Integration
1862
+ */
1863
+ delete(): Promise<S['AccountActionResponse']>;
440
1864
  /**
441
1865
  * List Linear Teams
442
1866
  *
443
1867
  * List the teams of the connected Linear workspace.
444
1868
  */
445
1869
  teams(): Promise<S['LinearTeamsListResponse']>;
1870
+ /**
1871
+ * Update Linear Teams
1872
+ */
1873
+ updateSettings(options: {
1874
+ mcp_inclusion?: S['McpInclusionMode'] | null;
1875
+ teams: (S['LinearTeamUpdate'])[];
1876
+ }): Promise<S['AccountActionResponse']>;
446
1877
  }
447
1878
  declare class EllipsisIntegrationsSentry {
448
1879
  private readonly transport;
449
1880
  constructor(transport: Transport);
1881
+ /**
1882
+ * Delete Sentry Integration
1883
+ */
1884
+ delete(integration_id: string): Promise<S['AccountActionResponse']>;
450
1885
  /**
451
1886
  * List Sentry Organizations
452
1887
  *
@@ -464,6 +1899,14 @@ declare class EllipsisIntegrationsSlack {
464
1899
  * live from the Slack API.
465
1900
  */
466
1901
  channels(): Promise<S['SlackChannelsListResponse']>;
1902
+ /**
1903
+ * Create Operations Channel
1904
+ */
1905
+ createOperationsChannel(): Promise<S['SlackChannel']>;
1906
+ /**
1907
+ * Delete Slack Integration
1908
+ */
1909
+ delete(): Promise<S['AccountActionResponse']>;
467
1910
  /**
468
1911
  * List Slack Members
469
1912
  *
@@ -471,6 +1914,12 @@ declare class EllipsisIntegrationsSlack {
471
1914
  * live from the Slack API.
472
1915
  */
473
1916
  members(): Promise<S['SlackMembersListResponse']>;
1917
+ /**
1918
+ * Update Slack Settings
1919
+ */
1920
+ updateSettings(options: {
1921
+ mcp_inclusion: S['McpInclusionMode'];
1922
+ }): Promise<S['AccountActionResponse']>;
474
1923
  }
475
1924
  declare class EllipsisIntegrations {
476
1925
  private readonly transport;
@@ -565,26 +2014,13 @@ declare class EllipsisMemories {
565
2014
  prefix?: string | null;
566
2015
  }): Promise<S['MemoriesListResponse']>;
567
2016
  }
568
- declare class EllipsisModels {
2017
+ declare class EllipsisReviews {
569
2018
  private readonly transport;
570
2019
  constructor(transport: Transport);
571
2020
  /**
572
- * List Supported Models
573
- *
574
- * List selectable agent models.
575
- *
576
- * Most expensive first, with the platform default flagged.
577
- *
578
- * Reads the same registry as the dashboard's rate table, so a
579
- * client's model picker can never drift from what's offered.
580
- * Behind auth but not account-scoped — the selectable set is
581
- * global.
2021
+ * List Review Configs
582
2022
  */
583
- list(): Promise<S['ModelsListResponse']>;
584
- }
585
- declare class EllipsisReviews {
586
- private readonly transport;
587
- constructor(transport: Transport);
2023
+ configs(): Promise<S['GetCodeReviewConfigsResponse']>;
588
2024
  /**
589
2025
  * Create Review
590
2026
  *
@@ -628,7 +2064,8 @@ declare class EllipsisReviews {
628
2064
  *
629
2065
  * `findings` and `configuration` are omitted (counters only). Each
630
2066
  * filter is a set: repeat `repository`, `pull_request_number`, or
631
- * `status` to match any of several values.
2067
+ * `status` to match any of several values. `start` and `end` bound
2068
+ * the review's creation time.
632
2069
  *
633
2070
  * Webhook-created reviews appear here too, so this answers "show
634
2071
  * me every review on this PR".
@@ -637,10 +2074,28 @@ declare class EllipsisReviews {
637
2074
  repository?: (string)[];
638
2075
  pull_request_number?: (number)[];
639
2076
  status?: (S['CodeReviewRunStatus'])[];
2077
+ start?: string | null;
2078
+ end?: string | null;
640
2079
  limit?: number;
641
2080
  cursor?: string | null;
642
2081
  }): Promise<Page<S['Review'], S['ReviewsListResponse']>>;
643
2082
  }
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
+ }
644
2099
  declare class EllipsisSecrets {
645
2100
  private readonly transport;
646
2101
  constructor(transport: Transport);
@@ -679,6 +2134,20 @@ declare class EllipsisSecrets {
679
2134
  declare class EllipsisSessions {
680
2135
  private readonly transport;
681
2136
  constructor(transport: Transport);
2137
+ /**
2138
+ * Get Agent Session Analytics
2139
+ *
2140
+ * Measured tokens and spend over time, plus estimated content cost.
2141
+ *
2142
+ * Token lanes use the request's saved rates. Content attribution
2143
+ * apportions input/cache spend by text size, counting carried context
2144
+ * on every request. It is an estimate, not a tool execution fee.
2145
+ * Only the latest 200 retained request bodies are inspected; missing
2146
+ * or unsupported context remains explicitly unattributed. No raw
2147
+ * prompts or tool results are returned. Sandbox tokens may read only
2148
+ * their own session's analytics.
2149
+ */
2150
+ analytics(session_id: string): Promise<S['SessionAnalytics']>;
682
2151
  /**
683
2152
  * Get Agent Session Diff
684
2153
  *
@@ -691,6 +2160,17 @@ declare class EllipsisSessions {
691
2160
  * sandbox token may read only its own session's diff.
692
2161
  */
693
2162
  diff(session_id: string): Promise<S['SessionDiffResponse']>;
2163
+ /**
2164
+ * List Session Executions
2165
+ *
2166
+ * Return the session's execution attempts, oldest first.
2167
+ *
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.
2172
+ */
2173
+ executions(session_id: string): Promise<S['SessionExecutionsListResponse']>;
694
2174
  /**
695
2175
  * Export Agent Session
696
2176
  *
@@ -719,6 +2199,15 @@ declare class EllipsisSessions {
719
2199
  * live on the detail endpoints, not here.
720
2200
  */
721
2201
  get(session_id: string): Promise<S['SessionResponse']>;
2202
+ /**
2203
+ * Get Agent Session Git
2204
+ *
2205
+ * The session's GitHub-side git view: its commits, and each PR it
2206
+ * opened joined to the live gh_prs row and reviews. The identity list
2207
+ * (output_git) rides the session itself over the WebSocket; this is
2208
+ * the join a "run" notify tells an open pane to refetch.
2209
+ */
2210
+ git(session_id: string): Promise<S['SessionGitResponse']>;
722
2211
  /**
723
2212
  * Ingest Agent Session Transcript
724
2213
  *
@@ -753,6 +2242,7 @@ declare class EllipsisSessions {
753
2242
  author_id?: number | null;
754
2243
  repo?: string | null;
755
2244
  unfinished?: boolean;
2245
+ exclude_code_review?: boolean;
756
2246
  }): Promise<Page<S['Session'], S['SessionsListResponse']>>;
757
2247
  /**
758
2248
  * Get Agent Session Output
@@ -765,7 +2255,7 @@ declare class EllipsisSessions {
765
2255
  * when the agent declares no output block, or when no execution
766
2256
  * produced output.
767
2257
  */
768
- output(session_id: string): Promise<void>;
2258
+ output(session_id: string): Promise<Record<string, unknown>>;
769
2259
  /**
770
2260
  * Get Agent Session Records
771
2261
  *
@@ -780,7 +2270,23 @@ declare class EllipsisSessions {
780
2270
  records(session_id: string, options?: {
781
2271
  cursor?: string | null;
782
2272
  limit?: number | null;
783
- }): Promise<Page<S['ClaudeSessionRecord'] | S['CodexSessionRecord'] | S['LifecycleSessionRecord'], S['SessionRecordsListResponse']>>;
2273
+ }): Promise<Page<S['SessionRecord'], S['SessionRecordsListResponse']>>;
2274
+ /**
2275
+ * Search Agent Sessions
2276
+ */
2277
+ search(options?: {
2278
+ q?: string;
2279
+ scope?: S['SessionSearchScope'];
2280
+ source?: (S['SessionSource'])[] | null;
2281
+ author_id?: (number)[] | null;
2282
+ automation_id?: (string)[] | null;
2283
+ session_ids?: (string)[] | null;
2284
+ repo?: (string)[] | null;
2285
+ status?: (S['SessionStatus'])[] | null;
2286
+ start?: string | null;
2287
+ end?: string | null;
2288
+ limit?: number;
2289
+ }): Promise<S['SessionSearchResponse']>;
784
2290
  /**
785
2291
  * Send Agent Session Message
786
2292
  *
@@ -793,8 +2299,13 @@ declare class EllipsisSessions {
793
2299
  */
794
2300
  sendMessage(session_id: string, options: {
795
2301
  idempotency_key?: string | null;
2302
+ images?: (S['ImageAttachment'])[];
796
2303
  message: string;
797
2304
  }): Promise<S['SessionMessageResponse']>;
2305
+ /**
2306
+ * Get Session Stream Ticket
2307
+ */
2308
+ sessionStreamTicket(session_id: string): Promise<S['StreamTicketResponse']>;
798
2309
  /**
799
2310
  * Start Agent Session
800
2311
  *
@@ -802,20 +2313,22 @@ declare class EllipsisSessions {
802
2313
  *
803
2314
  * The daily driver: a prompt, optionally where to run it
804
2315
  * (`environment`) and the run's own settings, in the AutomationConfig
805
- * vocabulary. Anything omitted comes from the organization's
806
- * settings — default model, default environment, budget — so
2316
+ * vocabulary. What you send is what runs: omit `environment` and the
2317
+ * session runs in the built-in basic sandbox. A missing model or
2318
+ * budget comes from the organization's settings, so
807
2319
  * `{"prompt": "..."}` alone is a complete request. `prompt` is the
808
2320
  * first message; omit it and the session starts idle, waiting for
809
2321
  * one. 400 when `interactive` is false and there is no prompt, or
810
2322
  * when `budget` exceeds the organization's per-session ceiling. To
811
2323
  * run a saved automation, use POST /v1/automations/{automation_id}/sessions.
812
2324
  */
813
- start(options?: {
2325
+ start(options: {
814
2326
  budget?: number | null;
815
- claude?: S['ClaudeConfig'] | null;
816
- codex?: S['CodexConfig'] | null;
817
2327
  environment?: string | S['EnvironmentConfig'] | null;
818
2328
  force_rebuild?: boolean;
2329
+ harness: S['HarnessOptions'];
2330
+ images?: (S['ImageAttachment'])[];
2331
+ instructions?: S['Instructions'];
819
2332
  interactive?: boolean;
820
2333
  metadata?: Record<string, string>;
821
2334
  output?: S['OutputConfig'] | null;
@@ -833,45 +2346,40 @@ declare class EllipsisSessions {
833
2346
  * to a GitHub account.
834
2347
  */
835
2348
  stop(session_id: string): Promise<S['SessionResponse']>;
2349
+ /**
2350
+ * Get Sessions Stream Ticket
2351
+ */
2352
+ streamTicket(): Promise<S['StreamTicketResponse']>;
836
2353
  /** Start a session and return a handle over it. */
837
2354
  run(options: Parameters<EllipsisSessions['start']>[0]): Promise<SessionHandle>;
838
2355
  /** A handle over an existing session. */
839
2356
  handle(sessionId: string): Promise<SessionHandle>;
840
2357
  }
841
- declare class EllipsisSettingsOrganization {
2358
+ declare class EllipsisSupportSlack {
842
2359
  private readonly transport;
843
2360
  constructor(transport: Transport);
844
2361
  /**
845
- * Get Organization Settings
846
- *
847
- * Get the organization settings.
848
- *
849
- * The default model and default environment every session falls
850
- * back to when neither its request nor its automation names one,
851
- * and the per-session budget ceiling no session may exceed.
2362
+ * Request Slack Help
852
2363
  */
853
- get(): Promise<S['OrganizationSettings']>;
2364
+ create(options: {
2365
+ emails: (string)[];
2366
+ resend?: boolean;
2367
+ }): Promise<S['SlackHelpResponse']>;
854
2368
  /**
855
- * Set Organization Settings
856
- *
857
- * Set the organization settings.
858
- *
859
- * Replaces all three: `default_model` accepts an alias or canonical
860
- * id and is stored canonical; `default_environment` accepts a name
861
- * or `env_` id and is stored as the id; `budget_ceiling.session` is
862
- * in US dollars, at most the platform ceiling. Null clears each.
863
- * Refused for sandbox tokens (potentially prompt-injected code must
864
- * not repoint the organization's defaults).
2369
+ * Get Slack Help
865
2370
  */
866
- set(options?: {
867
- budget_ceiling?: S['BudgetCeiling'];
868
- default_environment?: string | null;
869
- default_model?: string | null;
870
- }): Promise<S['OrganizationSettings']>;
2371
+ get(): Promise<void>;
2372
+ /**
2373
+ * Invite To Slack Help
2374
+ */
2375
+ invite(options: {
2376
+ emails: (string)[];
2377
+ resend?: boolean;
2378
+ }): Promise<S['SlackHelpResponse']>;
871
2379
  }
872
- declare class EllipsisSettings {
2380
+ declare class EllipsisSupport {
873
2381
  private readonly transport;
874
- readonly organization: EllipsisSettingsOrganization;
2382
+ readonly slack: EllipsisSupportSlack;
875
2383
  constructor(transport: Transport);
876
2384
  }
877
2385
  declare class EllipsisTemplates {
@@ -893,8 +2401,193 @@ declare class EllipsisTemplates {
893
2401
  */
894
2402
  list(): Promise<S['AgentTemplatesListResponse']>;
895
2403
  }
2404
+ declare class EllipsisUserSubscriptionTokens {
2405
+ private readonly transport;
2406
+ constructor(transport: Transport);
2407
+ /**
2408
+ * Delete Subscription Token
2409
+ *
2410
+ * Delete your subscription token for a provider.
2411
+ *
2412
+ * Your sessions stop billing your subscription immediately, and the
2413
+ * usage reading goes with it — it described that token's plan.
2414
+ */
2415
+ delete(provider: S['SubscriptionProvider']): Promise<void>;
2416
+ /**
2417
+ * Get Subscription Token
2418
+ *
2419
+ * Get one provider's subscription token.
2420
+ *
2421
+ * `configured` is false when nothing is saved. The token itself is
2422
+ * never returned, only `token_last4`.
2423
+ */
2424
+ get(provider: S['SubscriptionProvider']): Promise<S['SubscriptionToken']>;
2425
+ /**
2426
+ * List Subscription Tokens
2427
+ *
2428
+ * List your subscription tokens.
2429
+ *
2430
+ * One entry per supported provider, whether or not you have saved a
2431
+ * token for it. Tokens are write-only: the response carries only
2432
+ * `token_last4`, never the token.
2433
+ */
2434
+ list(): Promise<S['SubscriptionTokensListResponse']>;
2435
+ /**
2436
+ * Set Subscription Token
2437
+ *
2438
+ * Save your subscription token for a provider.
2439
+ *
2440
+ * Replaces whatever was stored. The token is saved DISABLED and
2441
+ * routes nothing until `POST /v1/user/subscription_tokens/{provider}/verify`
2442
+ * succeeds. For Claude, use `claude setup-token`. For Codex, paste
2443
+ * the auth.json credentials from a ChatGPT login. Each subscription
2444
+ * pays only for models from its corresponding provider.
2445
+ */
2446
+ set(provider: S['SubscriptionProvider'], options: {
2447
+ token: string;
2448
+ }): Promise<S['SubscriptionToken']>;
2449
+ /**
2450
+ * Get Subscription Usage
2451
+ *
2452
+ * Get your plan's last-observed rate-limit windows.
2453
+ *
2454
+ * Display-only, and only as fresh as your last call through Ellipsis
2455
+ * (`observed_at`) — the same plan used outside Ellipsis moves the
2456
+ * real windows without us seeing them. Null unless a token is
2457
+ * enabled for the provider: a disabled token routes nothing, so any
2458
+ * reading behind it is stale by construction.
2459
+ */
2460
+ usage(provider: S['SubscriptionProvider']): Promise<S['SubscriptionUsageResponse']>;
2461
+ /**
2462
+ * Verify Subscription Token
2463
+ *
2464
+ * Verify the stored token by using it.
2465
+ *
2466
+ * Makes one minimal call on the exact runtime path, so a pass proves
2467
+ * the token is what will pay. This is the gate on routing: success
2468
+ * enables the token, failure disables it, so verifying a revoked
2469
+ * token is how you stop it routing. A 200 with `ok: false` is the
2470
+ * normal way a bad token is reported — it is an answer, not a
2471
+ * transport failure.
2472
+ */
2473
+ verify(provider: S['SubscriptionProvider']): Promise<S['VerifySubscriptionTokenResponse']>;
2474
+ }
2475
+ declare class EllipsisUserTokens {
2476
+ private readonly transport;
2477
+ constructor(transport: Transport);
2478
+ /**
2479
+ * List User Tokens
2480
+ */
2481
+ list(): Promise<S['ListUserTokensResponse']>;
2482
+ /**
2483
+ * Revoke User Token
2484
+ */
2485
+ revoke(token_id: string): Promise<S['TokenRevokedResponse']>;
2486
+ }
2487
+ declare class EllipsisUser {
2488
+ private readonly transport;
2489
+ readonly subscriptionTokens: EllipsisUserSubscriptionTokens;
2490
+ readonly tokens: EllipsisUserTokens;
2491
+ constructor(transport: Transport);
2492
+ }
2493
+ declare class EllipsisWebhooksDeliveries {
2494
+ private readonly transport;
2495
+ constructor(transport: Transport);
2496
+ /**
2497
+ * Get Webhook Delivery
2498
+ *
2499
+ * Inspect a delivery's payload and attempts.
2500
+ *
2501
+ * Payloads are immutable across retries. Attempt details include HTTP
2502
+ * status, timing, and errors. Response bodies are not retained.
2503
+ */
2504
+ get(delivery_id: string): Promise<S['WebhookDeliveryResponse']>;
2505
+ /**
2506
+ * List Webhook Deliveries
2507
+ *
2508
+ * List webhook deliveries, newest first.
2509
+ *
2510
+ * Includes verification pings and deliveries for deleted webhooks.
2511
+ * History is retained for 30 days. Retries belong to the same delivery.
2512
+ */
2513
+ list(options?: {
2514
+ webhook_id?: string | null;
2515
+ event_type?: S['WebhookEventType'] | null;
2516
+ status?: S['WebhookDeliveryStatus'] | null;
2517
+ start?: string | null;
2518
+ end?: string | null;
2519
+ limit?: number;
2520
+ cursor?: string | null;
2521
+ }): Promise<Page<S['WebhookDelivery'], S['WebhookDeliveriesListResponse']>>;
2522
+ }
2523
+ declare class EllipsisWebhooks {
2524
+ private readonly transport;
2525
+ readonly deliveries: EllipsisWebhooksDeliveries;
2526
+ constructor(transport: Transport);
2527
+ /**
2528
+ * Create Webhook
2529
+ *
2530
+ * Create a webhook and send a verification ping.
2531
+ *
2532
+ * 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
2535
+ * Ellipsis to activate it and receive session.create events.
2536
+ */
2537
+ create(options: {
2538
+ description?: string | null;
2539
+ events: ("session.create")[];
2540
+ url: string;
2541
+ }): Promise<S['CreateWebhookResponse']>;
2542
+ /**
2543
+ * Delete Webhook
2544
+ *
2545
+ * Delete a webhook and cancel outstanding deliveries.
2546
+ *
2547
+ * 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.
2549
+ */
2550
+ delete(webhook_id: string): Promise<void>;
2551
+ /**
2552
+ * Get Webhook
2553
+ *
2554
+ * Get a webhook's configuration and approval state.
2555
+ */
2556
+ get(webhook_id: string): Promise<S['WebhookResponse']>;
2557
+ /**
2558
+ * List Webhooks
2559
+ *
2560
+ * List your webhooks and their delivery summaries.
2561
+ */
2562
+ list(): Promise<S['WebhooksListResponse']>;
2563
+ /**
2564
+ * Ping Webhook
2565
+ *
2566
+ * Send a signed verification or test ping.
2567
+ *
2568
+ * 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.
2571
+ */
2572
+ ping(webhook_id: string): Promise<void>;
2573
+ /**
2574
+ * Update Webhook
2575
+ *
2576
+ * Replace a webhook's configuration.
2577
+ *
2578
+ * Changing the URL cancels outstanding deliveries, clears verification
2579
+ * and approval, and sends another ping. State and signing secret cannot
2580
+ * be set here. Updating description or subscriptions preserves approval.
2581
+ */
2582
+ update(webhook_id: string, options: {
2583
+ description?: string | null;
2584
+ events: ("session.create")[];
2585
+ url: string;
2586
+ }): Promise<S['WebhookResponse']>;
2587
+ }
896
2588
  declare class Ellipsis {
897
2589
  private readonly transport;
2590
+ readonly account: EllipsisAccount;
898
2591
  readonly alerts: EllipsisAlerts;
899
2592
  readonly analytics: EllipsisAnalytics;
900
2593
  readonly auth: EllipsisAuth;
@@ -903,31 +2596,21 @@ declare class Ellipsis {
903
2596
  readonly files: EllipsisFiles;
904
2597
  readonly integrations: EllipsisIntegrations;
905
2598
  readonly memories: EllipsisMemories;
906
- readonly models: EllipsisModels;
907
2599
  readonly reviews: EllipsisReviews;
2600
+ readonly sandboxes: EllipsisSandboxes;
908
2601
  readonly secrets: EllipsisSecrets;
909
2602
  readonly sessions: EllipsisSessions;
910
- readonly settings: EllipsisSettings;
2603
+ readonly support: EllipsisSupport;
911
2604
  readonly templates: EllipsisTemplates;
2605
+ readonly user: EllipsisUser;
2606
+ readonly webhooks: EllipsisWebhooks;
912
2607
  constructor(options: TransportOptions);
913
- /**
914
- * Get Budget
915
- *
916
- * Return the caller's current budget summary.
917
- */
918
- budget(): Promise<S['BudgetSummary']>;
919
2608
  /**
920
2609
  * Current Identity
921
2610
  *
922
2611
  * Return the identity behind the caller's credential.
923
2612
  */
924
- me(): Promise<S['WhoAmIResponse']>;
925
- /**
926
- * Get Usage
927
- *
928
- * Return the caller's usage dashboard data.
929
- */
930
- usage(): Promise<S['GetUsageDashboardResponse']>;
2613
+ identity(): Promise<S['Identity']>;
931
2614
  }
932
2615
 
933
2616
  declare class EllipsisError extends Error {
@@ -962,4 +2645,4 @@ declare class RateLimitError extends APIError {
962
2645
  declare class ServerError extends APIError {
963
2646
  }
964
2647
 
965
- export { APIError, AuthenticationError, ConflictError, DEFAULT_BASE_URL, Ellipsis, EllipsisError, ForbiddenError, NotFoundError, Page, RateLimitError, ServerError, SessionHandle, TERMINAL_STATUSES, Transport, TransportError, type TransportOptions, UnprocessableError, components, isSettled };
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 };