@ellipsis-dev/sdk 0.34.1 → 0.35.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/README.md CHANGED
@@ -6,7 +6,7 @@ Three subpath exports, all dependency-free at runtime:
6
6
  - **`@ellipsis-dev/sdk`** — generated `/v1` REST types + `EllipsisClient`, a thin
7
7
  typed client over an injected `fetchJson`.
8
8
  - **`@ellipsis-dev/sdk/stream`** — the session stream WebSocket client
9
- (`streamSession`): protocol negotiation, heartbeat liveness,
9
+ (`streamSession`): heartbeat liveness,
10
10
  reconnect-with-backoff, and lossless resume via the `after_seq` record
11
11
  cursor. Transport is an injected `openSocket`, so the same machinery runs in
12
12
  a browser, a terminal, or a server.
@@ -31,13 +31,11 @@ server stream loop (ids and timestamps normalized); the store's tests replay
31
31
  it, so client behavior is validated against real emissions, not hand-written
32
32
  examples.
33
33
 
34
- ## Protocol
34
+ ## Stream
35
35
 
36
- The stream protocol (frame taxonomy, delivery classes, resume/close-code
37
- contract) is documented at https://www.ellipsis.dev/docs. The compatibility
38
- rule clients must follow: **ignore unknown frame types and unknown
39
- `source`/`record_type`/`kind` values** — additive server changes are not a
40
- protocol break.
36
+ The stream (frame taxonomy, delivery classes, resume/close-code contract) is
37
+ documented at https://www.ellipsis.dev/docs. Clients **ignore unknown frame
38
+ types and unknown `source`/`record_type`/`kind` values**.
41
39
 
42
40
  ## Shared chat work sections
43
41
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { c as components } from './types-DV2H5ZsR.js';
2
- export { A as AgentConfig, a as AgentIdentity, b as AttributionType, B as BudgetConfig, C as CheckRunAction, d as CheckSuiteAction, e as ClaudeAssistantEvent, f as ClaudeAssistantMessage, g as ClaudeConfig, h as ClaudeConversationResetEvent, i as ClaudeNativeEvent, j as ClaudeNativeSessionRecord, k as ClaudeNativeUsage, l as ClaudeRateLimitEvent, m as ClaudeRateLimitInfo, n as ClaudeResultEvent, o as ClaudeSessionRecord, p as ClaudeSystemEvent, q as ClaudeUserEvent, r as ClaudeUserMessage, s as CodexAgentMessage, t as CodexAgentMessageItem, u as CodexAppServerError, v as CodexAppServerEvent, w as CodexAppServerItem, x as CodexAppServerNotification, y as CodexAppServerSessionRecord, z as CodexCommandExecution, D as CodexCommandExecutionItem, E as CodexConfig, F as CodexContextCompaction, G as CodexEffortLevel, H as CodexErrorEvent, I as CodexErrorItem, J as CodexErrorParams, K as CodexEvent, L as CodexFileChange, M as CodexFileChangeItem, N as CodexFileUpdate, O as CodexItem, P as CodexItemCompleted, Q as CodexItemCompletedEvent, R as CodexItemParams, S as CodexItemStarted, T as CodexItemStartedEvent, U as CodexItemUpdatedEvent, V as CodexLocalImageInput, W as CodexMcpToolCall, X as CodexMcpToolCallAppContext, Y as CodexMcpToolCallError, Z as CodexMcpToolCallItem, _ as CodexMcpToolCallResult, $ as CodexPlan, a0 as CodexReasoning, a1 as CodexReasoningItem, a2 as CodexSessionRecord, a3 as CodexTextInput, a4 as CodexThread, a5 as CodexThreadStarted, a6 as CodexThreadStartedEvent, a7 as CodexThreadStartedParams, a8 as CodexThreadTokenUsage, a9 as CodexTodoListItem, aa as CodexTokenUsageBreakdown, ab as CodexTokenUsageParams, ac as CodexTokenUsageUpdated, ad as CodexTurn, ae as CodexTurnCompleted, af as CodexTurnCompletedEvent, ag as CodexTurnError, ah as CodexTurnFailedEvent, ai as CodexTurnParams, aj as CodexTurnStarted, ak as CodexTurnStartedEvent, al as CodexUsage, am as CodexUserInput, an as CodexUserMessage, ao as CodexWebSearch, ap as CodexWebSearchItem, aq as ComputeConfig, ar as ComputeConfig1, as as ConfigMetadata, at as Cost, au as Cost1, av as CronTrigger, aw as DeltaFrame, ax as DoneFrame, ay as Duration, az as EffortLevel, aA as EllipsisGrant, aB as EllipsisPermissions, aC as EnvironmentBaseBuild, aD as EnvironmentConfig, aE as EnvironmentHooks, aF as EnvironmentHooks1, aG as EnvironmentOutputPayload, aH as EnvironmentOutputRecord, aI as EnvironmentPhasePayload, aJ as EnvironmentPhaseRecord, aK as EnvironmentReadyPayload, aL as EnvironmentReadyRecord, aM as EnvironmentScript, aN as EnvironmentSource, aO as EnvironmentVariable, aP as ErrorFrame, aQ as GithubAccountFilter, aR as GithubAccountSelector, aS as GithubAccountSnippet, aT as GithubAccountType, aU as GithubCheckRunEvent, aV as GithubCheckSuiteEvent, aW as GithubIssueEvent, aX as GithubPermissions, aY as GithubPullRequestEvent, aZ as GithubPushEvent, a_ as GithubReleaseEvent, a$ as GithubStatusEvent, b0 as GithubWorkflowRunEvent, b1 as HandlerService, b2 as HeartbeatFrame, b3 as InputContract, b4 as IssueAction, b5 as LegacyAssistantPayload, b6 as LegacyNativeUsage, b7 as LegacyResultPayload, b8 as Level, b9 as LifecycleSessionRecord, ba as LinearIssueAction, bb as LinearIssueEvent, bc as LlmCost, bd as LlmCostSplit, be as McpRemoteServer, bf as McpServerRef, bg as McpStdioServer, bh as MemorySize, bi as MessageDeliveredPayload, bj as MessageDeliveredRecord, bk as MessageReceivedPayload, bl as MessageReceivedRecord, bm as MessageRequeuedPayload, bn as MessageRequeuedRecord, bo as ModelLlmCostSplit, bp as ModelTokenCounts, bq as OutputConfig, br as PermissionsConfig, bs as PermissionsConfig1, bt as PlatformSessionRecord, bu as PromptBlockedReason, bv as PullRequestAction, bw as ReactCheckRun, bx as ReactCheckSuite, by as ReactIssue, bz as ReactLinearIssue, bA as ReactPullRequest, bB as ReactPush, bC as ReactRelease, bD as ReactSentry, bE as ReactSlackChannel, bF as ReactStatus, bG as ReactTrigger, bH as ReactWorkflowRun, bI as RecordsAppendFrame, bJ as ReleaseAction, bK as RepositoryFilter, bL as RepositoryRef, bM as Review, bN as ReviewComment, bO as ReviewConfig, bP as ReviewConfigsListResponse, bQ as ReviewPullRequest, bR as ReviewPullRequestAuthor, bS as ReviewReviewer, bT as ReviewSummary, bU as ReviewsListResponse, bV as SdkAssistantRecord, bW as SdkCacheCreation, bX as SdkContentBlock, bY as SdkRateLimitRecord, bZ as SdkRecord, b_ as SdkResultRecord, b$ as SdkServerToolResultBlock, c0 as SdkServerToolUseBlock, c1 as SdkSystemRecord, c2 as SdkTextBlock, c3 as SdkThinkingBlock, c4 as SdkToolResultBlock, c5 as SdkToolUseBlock, c6 as SdkUserRecord, c7 as SendSessionMessageRequest, c8 as SentryAction, c9 as SentryAlertEvent, ca as Session, cb as Session1, cc as SessionAgent, cd as SessionArchived, ce as SessionAttribution, cf as SessionClosedPayload, cg as SessionClosedRecord, ch as SessionConfig, ci as SessionConversation, cj as SessionConversationConfig, ck as SessionEnvironment, cl as SessionEventActor, cm as SessionFrame, cn as SessionGit, co as SessionGitCommit, cp as SessionGitFile, cq as SessionGitPr, cr as SessionGitRepo, cs as SessionHandler, ct as SessionMessage, cu as SessionMessageImage, cv as SessionMessageResponse, cw as SessionMessageStatus, cx as SessionOutput, cy as SessionParent, cz as SessionPrompting, cA as SessionRecord, cB as SessionRecordsListResponse, cC as SessionResponse, cD as SessionSource, cE as SessionState, cF as SessionStopped, cG as SessionStreamFrame, cH as SessionSummary, cI as SessionTurn, cJ as SessionTurnResponse, cK as SessionTurnsListResponse, cL as SessionsListResponse, cM as SettingsRef, cN as SkillRef, cO as SlackChannelCreatedEvent, cP as SlackMessageEvent, cQ as SnapshotFrame, cR as StatusAction, cS as StreamFrame, cT as TokenCounts, cU as Tokens, cV as Tokens1, cW as TokensInfo, cX as TurnEndedPayload, cY as TurnEndedRecord, cZ as TurnQueuedPayload, c_ as TurnQueuedRecord, c$ as TurnReason, d0 as TurnStartedPayload, d1 as TurnStartedRecord, d2 as TurnStatus, d3 as UnknownSessionRecord, d4 as UpdateSessionRequest, d5 as WorkflowRunAction, d6 as paths } from './types-DV2H5ZsR.js';
1
+ import { c as components } from './types-BrLpRRde.js';
2
+ export { A as AgentConfig, a as AgentIdentity, b as AttributionType, B as BudgetConfig, C as CheckRunAction, d as CheckSuiteAction, e as ClaudeAssistantEvent, f as ClaudeAssistantMessage, g as ClaudeConfig, h as ClaudeConversationResetEvent, i as ClaudeNativeEvent, j as ClaudeNativeSessionRecord, k as ClaudeNativeUsage, l as ClaudeRateLimitEvent, m as ClaudeRateLimitInfo, n as ClaudeResultEvent, o as ClaudeSessionRecord, p as ClaudeSystemEvent, q as ClaudeUserEvent, r as ClaudeUserMessage, s as CodexAgentMessage, t as CodexAgentMessageItem, u as CodexAppServerError, v as CodexAppServerEvent, w as CodexAppServerItem, x as CodexAppServerNotification, y as CodexAppServerSessionRecord, z as CodexCommandExecution, D as CodexCommandExecutionItem, E as CodexConfig, F as CodexContextCompaction, G as CodexEffortLevel, H as CodexErrorEvent, I as CodexErrorItem, J as CodexErrorParams, K as CodexEvent, L as CodexFileChange, M as CodexFileChangeItem, N as CodexFileUpdate, O as CodexItem, P as CodexItemCompleted, Q as CodexItemCompletedEvent, R as CodexItemParams, S as CodexItemStarted, T as CodexItemStartedEvent, U as CodexItemUpdatedEvent, V as CodexLocalImageInput, W as CodexMcpToolCall, X as CodexMcpToolCallAppContext, Y as CodexMcpToolCallError, Z as CodexMcpToolCallItem, _ as CodexMcpToolCallResult, $ as CodexPlan, a0 as CodexReasoning, a1 as CodexReasoningItem, a2 as CodexSessionRecord, a3 as CodexTextInput, a4 as CodexThread, a5 as CodexThreadStarted, a6 as CodexThreadStartedEvent, a7 as CodexThreadStartedParams, a8 as CodexThreadTokenUsage, a9 as CodexTodoListItem, aa as CodexTokenUsageBreakdown, ab as CodexTokenUsageParams, ac as CodexTokenUsageUpdated, ad as CodexTurn, ae as CodexTurnCompleted, af as CodexTurnCompletedEvent, ag as CodexTurnError, ah as CodexTurnFailedEvent, ai as CodexTurnParams, aj as CodexTurnStarted, ak as CodexTurnStartedEvent, al as CodexUsage, am as CodexUserInput, an as CodexUserMessage, ao as CodexWebSearch, ap as CodexWebSearchItem, aq as ComputeConfig, ar as ComputeConfig1, as as ConfigMetadata, at as Cost, au as Cost1, av as CronTrigger, aw as DeltaFrame, ax as DoneFrame, ay as Duration, az as EffortLevel, aA as EllipsisGrant, aB as EllipsisPermissions, aC as EnvironmentBaseBuild, aD as EnvironmentConfig, aE as EnvironmentHooks, aF as EnvironmentHooks1, aG as EnvironmentOutputPayload, aH as EnvironmentOutputRecord, aI as EnvironmentPhasePayload, aJ as EnvironmentPhaseRecord, aK as EnvironmentReadyPayload, aL as EnvironmentReadyRecord, aM as EnvironmentScript, aN as EnvironmentSource, aO as EnvironmentVariable, aP as ErrorFrame, aQ as GeminiConfig, aR as GeminiErrorEvent, aS as GeminiInitEvent, aT as GeminiMessageEvent, aU as GeminiModelStats, aV as GeminiResultEvent, aW as GeminiSessionRecord, aX as GeminiStreamEvent, aY as GeminiStreamStats, aZ as GeminiToolError, a_ as GeminiToolResultEvent, a$ as GeminiToolUseEvent, b0 as GithubAccountFilter, b1 as GithubAccountSelector, b2 as GithubAccountSnippet, b3 as GithubAccountType, b4 as GithubCheckRunEvent, b5 as GithubCheckSuiteEvent, b6 as GithubIssueEvent, b7 as GithubPermissions, b8 as GithubPullRequestEvent, b9 as GithubPushEvent, ba as GithubReleaseEvent, bb as GithubStatusEvent, bc as GithubWorkflowRunEvent, bd as HandlerService, be as HeartbeatFrame, bf as InputContract, bg as IssueAction, bh as LegacyAssistantPayload, bi as LegacyNativeUsage, bj as LegacyResultPayload, bk as Level, bl as LifecycleSessionRecord, bm as LinearIssueAction, bn as LinearIssueEvent, bo as LlmCost, bp as LlmCostSplit, bq as McpRemoteServer, br as McpServerRef, bs as McpStdioServer, bt as MemorySize, bu as MessageDeliveredPayload, bv as MessageDeliveredRecord, bw as MessageReceivedPayload, bx as MessageReceivedRecord, by as MessageRequeuedPayload, bz as MessageRequeuedRecord, bA as ModelLlmCostSplit, bB as ModelTokenCounts, bC as OutputConfig, bD as PermissionsConfig, bE as PermissionsConfig1, bF as PlatformSessionRecord, bG as PromptBlockedReason, bH as PullRequestAction, bI as ReactCheckRun, bJ as ReactCheckSuite, bK as ReactIssue, bL as ReactLinearIssue, bM as ReactPullRequest, bN as ReactPush, bO as ReactRelease, bP as ReactSentry, bQ as ReactSlackChannel, bR as ReactStatus, bS as ReactTrigger, bT as ReactWorkflowRun, bU as RecordsAppendFrame, bV as ReleaseAction, bW as RepositoryFilter, bX as RepositoryRef, bY as Review, bZ as ReviewComment, b_ as ReviewConfig, b$ as ReviewConfigsListResponse, c0 as ReviewPullRequest, c1 as ReviewPullRequestAuthor, c2 as ReviewReviewer, c3 as ReviewSummary, c4 as ReviewsListResponse, c5 as SdkAssistantRecord, c6 as SdkCacheCreation, c7 as SdkContentBlock, c8 as SdkRateLimitRecord, c9 as SdkRecord, ca as SdkResultRecord, cb as SdkServerToolResultBlock, cc as SdkServerToolUseBlock, cd as SdkSystemRecord, ce as SdkTextBlock, cf as SdkThinkingBlock, cg as SdkToolResultBlock, ch as SdkToolUseBlock, ci as SdkUserRecord, cj as SendSessionMessageRequest, ck as SentryAction, cl as SentryAlertEvent, cm as Session, cn as Session1, co as SessionAgent, cp as SessionArchived, cq as SessionAttribution, cr as SessionClosedPayload, cs as SessionClosedRecord, ct as SessionConfig, cu as SessionConversation, cv as SessionConversationConfig, cw as SessionEnvironment, cx as SessionEventActor, cy as SessionFrame, cz as SessionGit, cA as SessionGitCommit, cB as SessionGitFile, cC as SessionGitPr, cD as SessionGitRepo, cE as SessionHandler, cF as SessionMessage, cG as SessionMessageImage, cH as SessionMessageResponse, cI as SessionMessageStatus, cJ as SessionOutput, cK as SessionParent, cL as SessionPrompting, cM as SessionRecord, cN as SessionRecordsListResponse, cO as SessionResponse, cP as SessionSource, cQ as SessionState, cR as SessionStopped, cS as SessionStreamFrame, cT as SessionSummary, cU as SessionTurn, cV as SessionTurnResponse, cW as SessionTurnsListResponse, cX as SessionsListResponse, cY as SettingsRef, cZ as SkillRef, c_ as SlackChannelCreatedEvent, c$ as SlackMessageEvent, d0 as SnapshotFrame, d1 as StatusAction, d2 as StreamFrame, d3 as TokenCounts, d4 as Tokens, d5 as Tokens1, d6 as TokensInfo, d7 as TurnEndedPayload, d8 as TurnEndedRecord, d9 as TurnQueuedPayload, da as TurnQueuedRecord, db as TurnReason, dc as TurnStartedPayload, dd as TurnStartedRecord, de as TurnStatus, df as UnknownSessionRecord, dg as UpdateSessionRequest, dh as WorkflowRunAction, di as paths } from './types-BrLpRRde.js';
3
3
 
4
4
  /**
5
5
  * Frames on /v1/sessions/stream, /v1/agents/stream and /v1/vm-executions/{id}/stream. Ignore unknown frame types.
@@ -26,11 +26,11 @@ type Session = {
26
26
  */
27
27
  budget: number;
28
28
  /**
29
- * Claude Code input and native options. Set exactly one of claude_code or codex.
29
+ * Claude Code input and native options. Set exactly one of claude_code, codex, or gemini.
30
30
  */
31
31
  claude_code: ClaudeConfig | null;
32
32
  /**
33
- * Codex input and native options. Set exactly one of claude_code or codex.
33
+ * Codex input and native options. Set exactly one of claude_code, codex, or gemini.
34
34
  */
35
35
  codex: CodexConfig | null;
36
36
  conversation: SessionConversation;
@@ -44,6 +44,10 @@ type Session = {
44
44
  * The typed external event that started the session; null for direct and scheduled starts.
45
45
  */
46
46
  event: (GithubPullRequestEvent | GithubIssueEvent | GithubPushEvent | GithubCheckRunEvent | GithubCheckSuiteEvent | GithubWorkflowRunEvent | GithubStatusEvent | GithubReleaseEvent | LinearIssueEvent | SlackMessageEvent | SlackChannelCreatedEvent | SentryAlertEvent) | null;
47
+ /**
48
+ * Gemini CLI input and native options. Set exactly one of claude_code, codex, or gemini.
49
+ */
50
+ gemini: GeminiConfig | null;
47
51
  /**
48
52
  * 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.
49
53
  */
@@ -94,11 +98,19 @@ type Session = {
94
98
  [k: string]: unknown;
95
99
  };
96
100
  codex: null;
101
+ gemini: null;
97
102
  } | {
98
103
  claude_code: null;
99
104
  codex: {
100
105
  [k: string]: unknown;
101
106
  };
107
+ gemini: null;
108
+ } | {
109
+ claude_code: null;
110
+ codex: null;
111
+ gemini: {
112
+ [k: string]: unknown;
113
+ };
102
114
  });
103
115
  /**
104
116
  * What one session runs on: its selected harness, where it runs, what it
@@ -116,15 +128,19 @@ type Session = {
116
128
  type SessionConfig = {
117
129
  budget: BudgetConfig;
118
130
  /**
119
- * Claude Code input and native options. Set exactly one of claude_code or codex.
131
+ * Claude Code input and native options. Set exactly one of claude_code, codex, or gemini.
120
132
  */
121
133
  claude_code: ClaudeConfig | null;
122
134
  /**
123
- * Codex input and native options. Set exactly one of claude_code or codex.
135
+ * Codex input and native options. Set exactly one of claude_code, codex, or gemini.
124
136
  */
125
137
  codex: CodexConfig | null;
126
138
  conversation: SessionConversationConfig;
127
139
  environment: string | EnvironmentConfig;
140
+ /**
141
+ * Gemini CLI input and native options. Set exactly one of claude_code, codex, or gemini.
142
+ */
143
+ gemini: GeminiConfig | null;
128
144
  /**
129
145
  * Arbitrary string key/value metadata stored on every session.
130
146
  */
@@ -139,11 +155,19 @@ type SessionConfig = {
139
155
  [k: string]: unknown;
140
156
  };
141
157
  codex: null;
158
+ gemini: null;
142
159
  } | {
143
160
  claude_code: null;
144
161
  codex: {
145
162
  [k: string]: unknown;
146
163
  };
164
+ gemini: null;
165
+ } | {
166
+ claude_code: null;
167
+ codex: null;
168
+ gemini: {
169
+ [k: string]: unknown;
170
+ };
147
171
  });
148
172
  type EffortLevel = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
149
173
  type CodexEffortLevel = 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
@@ -462,9 +486,11 @@ interface Duration {
462
486
  }
463
487
  /**
464
488
  * Environment lifecycle scripts, in order: build_base, after_checkout,
465
- * before_start. The first two produce reusable snapshots; before_start runs
466
- * before an agent starts or resumes its session. Scripts run as the environment's
467
- * user in the workspace directory `/sandbox`. A nonzero exit fails the session.
489
+ * before_start, validate. The first two produce reusable snapshots;
490
+ * before_start runs before an agent starts or resumes its session, and
491
+ * validate runs last to check that the environment has what the agent needs.
492
+ * Scripts run as the environment's user in the workspace directory
493
+ * `/sandbox`. A nonzero exit fails the session.
468
494
  *
469
495
  * Legacy post_start/post_clone scripts remain supported for existing configs;
470
496
  * both run after workspace preparation, before the agent starts or resumes.
@@ -491,6 +517,10 @@ interface EnvironmentHooks {
491
517
  * Legacy session startup script. Use before_start in new configurations.
492
518
  */
493
519
  post_start: string | null;
520
+ /**
521
+ * Check that the environment works, for example that required tools are on PATH. Runs last, after before_start, each time a session starts or resumes and each time the environment is built after a change. A nonzero exit fails the session or the build. Not cached.
522
+ */
523
+ validate: EnvironmentScript | string | null;
494
524
  }
495
525
  /**
496
526
  * An inline shell script run as the environment's user, with the workspace
@@ -571,6 +601,19 @@ interface EnvironmentVariable {
571
601
  name: string;
572
602
  value: string | null;
573
603
  }
604
+ /**
605
+ * Native options supported by the current Gemini CLI adapter.
606
+ */
607
+ interface GeminiConfig {
608
+ /**
609
+ * The model the session runs on: a Gemini id from the models table. Required.
610
+ */
611
+ model: string;
612
+ /**
613
+ * The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.
614
+ */
615
+ prompt: string | null;
616
+ }
574
617
  /**
575
618
  * JSON Schema for the harness's structured result, when certified.
576
619
  */
@@ -868,7 +911,7 @@ interface SessionPrompting {
868
911
  */
869
912
  interface Cost {
870
913
  /**
871
- * What Ellipsis charged to credit, in millicents. It is everything except subscription tokens, and it is what the budget caps.
914
+ * What Ellipsis charged to credit, in millicents. It is everything except subscription tokens.
872
915
  */
873
916
  charged: number;
874
917
  /**
@@ -885,7 +928,7 @@ interface Cost {
885
928
  */
886
929
  memory: number;
887
930
  /**
888
- * Everything it cost, whoever paid, in millicents. It is the sum of llm.all.total, cpu, memory, and fee.
931
+ * Everything it cost, whoever paid, in millicents. It is the sum of llm.all.total, cpu, memory, and fee, and it is what the budget caps.
889
932
  */
890
933
  total: number;
891
934
  }
@@ -990,9 +1033,11 @@ interface ComputeConfig1 {
990
1033
  }
991
1034
  /**
992
1035
  * Environment lifecycle scripts, in order: build_base, after_checkout,
993
- * before_start. The first two produce reusable snapshots; before_start runs
994
- * before an agent starts or resumes its session. Scripts run as the environment's
995
- * user in the workspace directory `/sandbox`. A nonzero exit fails the session.
1036
+ * before_start, validate. The first two produce reusable snapshots;
1037
+ * before_start runs before an agent starts or resumes its session, and
1038
+ * validate runs last to check that the environment has what the agent needs.
1039
+ * Scripts run as the environment's user in the workspace directory
1040
+ * `/sandbox`. A nonzero exit fails the session.
996
1041
  *
997
1042
  * Legacy post_start/post_clone scripts remain supported for existing configs;
998
1043
  * both run after workspace preparation, before the agent starts or resumes.
@@ -1019,6 +1064,10 @@ interface EnvironmentHooks1 {
1019
1064
  * Legacy session startup script. Use before_start in new configurations.
1020
1065
  */
1021
1066
  post_start: string | null;
1067
+ /**
1068
+ * Check that the environment works, for example that required tools are on PATH. Runs last, after before_start, each time a session starts or resumes and each time the environment is built after a change. A nonzero exit fails the session or the build. Not cached.
1069
+ */
1070
+ validate: EnvironmentScript | string | null;
1022
1071
  }
1023
1072
  interface GithubPullRequestEvent {
1024
1073
  action: PullRequestAction | 'review_commented';
@@ -1386,7 +1435,7 @@ interface SessionTurn {
1386
1435
  */
1387
1436
  interface Cost1 {
1388
1437
  /**
1389
- * What Ellipsis charged to credit, in millicents. It is everything except subscription tokens, and it is what the budget caps.
1438
+ * What Ellipsis charged to credit, in millicents. It is everything except subscription tokens.
1390
1439
  */
1391
1440
  charged: number;
1392
1441
  /**
@@ -1403,7 +1452,7 @@ interface Cost1 {
1403
1452
  */
1404
1453
  memory: number;
1405
1454
  /**
1406
- * Everything it cost, whoever paid, in millicents. It is the sum of llm.all.total, cpu, memory, and fee.
1455
+ * Everything it cost, whoever paid, in millicents. It is the sum of llm.all.total, cpu, memory, and fee, and it is what the budget caps.
1407
1456
  */
1408
1457
  total: number;
1409
1458
  }
@@ -1477,6 +1526,10 @@ interface Agent {
1477
1526
  * The agent's account-unique addressable name (a slug of its display name); usable anywhere an agent is referenced, interchangeably with the id.
1478
1527
  */
1479
1528
  name: string | null;
1529
+ /**
1530
+ * When the agent's cron trigger next starts a session. Null when the agent has no cron trigger, its trigger is paused, or the agent is disabled.
1531
+ */
1532
+ next_run_at: string | null;
1480
1533
  /**
1481
1534
  * 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.
1482
1535
  */
@@ -1557,9 +1610,11 @@ interface VMExecutionResponse {
1557
1610
  }
1558
1611
  /**
1559
1612
  * Environment lifecycle scripts, in order: build_base, after_checkout,
1560
- * before_start. The first two produce reusable snapshots; before_start runs
1561
- * before an agent starts or resumes its session. Scripts run as the environment's
1562
- * user in the workspace directory `/sandbox`. A nonzero exit fails the session.
1613
+ * before_start, validate. The first two produce reusable snapshots;
1614
+ * before_start runs before an agent starts or resumes its session, and
1615
+ * validate runs last to check that the environment has what the agent needs.
1616
+ * Scripts run as the environment's user in the workspace directory
1617
+ * `/sandbox`. A nonzero exit fails the session.
1563
1618
  *
1564
1619
  * Legacy post_start/post_clone scripts remain supported for existing configs;
1565
1620
  * both run after workspace preparation, before the agent starts or resumes.
@@ -1586,6 +1641,10 @@ interface EnvironmentHooks2 {
1586
1641
  * Legacy session startup script. Use before_start in new configurations.
1587
1642
  */
1588
1643
  post_start: string | null;
1644
+ /**
1645
+ * Check that the environment works, for example that required tools are on PATH. Runs last, after before_start, each time a session starts or resumes and each time the environment is built after a change. A nonzero exit fails the session or the build. Not cached.
1646
+ */
1647
+ validate: EnvironmentScript | string | null;
1589
1648
  }
1590
1649
  interface SandboxRepository {
1591
1650
  id: number;
@@ -1878,9 +1937,9 @@ declare class EllipsisAccountBilling {
1878
1937
  *
1879
1938
  * Explain whether your account can start sessions.
1880
1939
  *
1881
- * Uses the same account gate as session admission, including credit,
1882
- * contact email, and personal subscription eligibility. Scoped
1883
- * spend limits are reported separately by /v1/account/budget.
1940
+ * Uses the same account gate as session admission, including credit
1941
+ * and contact email. Scoped spend limits are reported separately by
1942
+ * /v1/account/budget.
1884
1943
  *
1885
1944
  * Required permissions: read:account.
1886
1945
  * API key: Supported.
@@ -1905,7 +1964,7 @@ declare class EllipsisAccountModels {
1905
1964
  * client's model picker can never drift from what's offered. The
1906
1965
  * selectable set is global.
1907
1966
  *
1908
- * Required permissions: read:templates.
1967
+ * Required permissions: read:account.
1909
1968
  * API key: Supported.
1910
1969
  * CLI user token: Supported.
1911
1970
  * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
@@ -2275,6 +2334,7 @@ declare class EllipsisAgents {
2275
2334
  conversation?: S['SessionConversationConfig-Input'];
2276
2335
  environment?: string | S['EnvironmentConfig-Input'] | null;
2277
2336
  force_rebuild?: boolean;
2337
+ gemini?: S['GeminiOverrides'] | null;
2278
2338
  images?: (S['ImageAttachment'])[];
2279
2339
  input?: Record<string, unknown> | null;
2280
2340
  metadata?: Record<string, string | null>;
@@ -2396,10 +2456,11 @@ declare class EllipsisAnalytics {
2396
2456
  * The same data as the analytics dashboard.
2397
2457
  *
2398
2458
  * Windowing: pass explicit start/end, or days (default: the last
2399
- * 30 days). account_type in all|user|bot scopes the authors (bot =
2400
- * the apps/agents). Available to all credential types: the
2401
- * responses expose the organization's own GitHub PR/review activity,
2402
- * no secrets.
2459
+ * 30 days). `interval` names the width of each entry in `series`,
2460
+ * chosen from the window's length. account_type in all|user|bot
2461
+ * scopes the authors (bot = the apps/agents). Available to all
2462
+ * credential types: the responses expose the organization's own
2463
+ * GitHub PR/review activity, no secrets.
2403
2464
  *
2404
2465
  * Required permissions: read:account.
2405
2466
  * API key: Supported.
@@ -2422,7 +2483,9 @@ declare class EllipsisAnalytics {
2422
2483
  * Return pull-request analytics.
2423
2484
  *
2424
2485
  * Windowing: pass explicit start/end, or days (default: the last
2425
- * 30 days). account_type in all|user|bot scopes the authors.
2486
+ * 30 days). `interval` names the width of each entry in `series`,
2487
+ * chosen from the window's length. account_type in all|user|bot
2488
+ * scopes the authors.
2426
2489
  *
2427
2490
  * Required permissions: read:account.
2428
2491
  * API key: Supported.
@@ -2447,7 +2510,8 @@ declare class EllipsisAnalytics {
2447
2510
  * account_type scopes reviewers (bot|user|all) — e.g. "what apps
2448
2511
  * review the most PRs?" is the reviewer facets here with
2449
2512
  * account_type=bot. Windowing: pass explicit start/end, or days
2450
- * (default: the last 30 days).
2513
+ * (default: the last 30 days). `interval` names the width of each
2514
+ * entry in `series`, chosen from the window's length.
2451
2515
  *
2452
2516
  * Required permissions: read:account.
2453
2517
  * API key: Supported.
@@ -2617,8 +2681,9 @@ declare class EllipsisHandlers {
2617
2681
  * Only sessions carrying this exact saved handler id are counted;
2618
2682
  * legacy sessions without handler provenance are excluded.
2619
2683
  *
2620
- * spend_windows reports current trailing 1-, 7-, and 28-day credit
2621
- * debits and effective handler budgets across all attributed sessions.
2684
+ * spend_windows reports current trailing 1-, 7-, and 28-day spend,
2685
+ * including subscription tokens, and effective handler budgets across
2686
+ * all attributed sessions.
2622
2687
  * Those windows use usage timestamps and are independent of start/end.
2623
2688
  *
2624
2689
  * Requires configs:read matching handlers/{service} and unrestricted
@@ -3250,6 +3315,7 @@ declare class EllipsisSessions {
3250
3315
  conversation?: S['SessionConversationConfig-Input'];
3251
3316
  environment?: string | S['EnvironmentConfig-Input'] | null;
3252
3317
  force_rebuild?: boolean;
3318
+ gemini?: S['GeminiConfig-Input'] | null;
3253
3319
  images?: (S['ImageAttachment'])[];
3254
3320
  metadata?: Record<string, string>;
3255
3321
  output?: S['OutputConfig'] | null;
@@ -3357,144 +3423,6 @@ declare class EllipsisSupport {
3357
3423
  readonly slack: EllipsisSupportSlack;
3358
3424
  constructor(transport: Transport);
3359
3425
  }
3360
- declare class EllipsisTemplates {
3361
- private readonly transport;
3362
- constructor(transport: Transport);
3363
- /**
3364
- * Get Agent Template
3365
- *
3366
- * Return one built-in agent template by slug.
3367
- *
3368
- * Required permissions: read:templates.
3369
- * API key: Supported.
3370
- * CLI user token: Supported.
3371
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3372
- * Higher permission levels include lower levels: read < write < delete.
3373
- */
3374
- get(id: string): Promise<S['AgentTemplate']>;
3375
- /**
3376
- * List Agent Templates
3377
- *
3378
- * List the built-in starter agent templates.
3379
- *
3380
- * Behind auth but not account-scoped — the data is static
3381
- * product content shared by the dashboard, landing site, and CLI.
3382
- *
3383
- * Required permissions: read:templates.
3384
- * API key: Supported.
3385
- * CLI user token: Supported.
3386
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3387
- * Higher permission levels include lower levels: read < write < delete.
3388
- */
3389
- list(): Promise<S['AgentTemplatesListResponse']>;
3390
- }
3391
- declare class EllipsisUserSubscriptionTokens {
3392
- private readonly transport;
3393
- constructor(transport: Transport);
3394
- /**
3395
- * Delete Subscription Token
3396
- *
3397
- * Delete your subscription token for a provider.
3398
- *
3399
- * Your sessions stop billing your subscription immediately, and the
3400
- * usage reading goes with it — it described that token's plan.
3401
- *
3402
- * Required permissions: delete:user.
3403
- * API key: Requires a CLI user token.
3404
- * CLI user token: Supported.
3405
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3406
- * Higher permission levels include lower levels: read < write < delete.
3407
- */
3408
- delete(provider: S['SubscriptionProvider']): Promise<void>;
3409
- /**
3410
- * Get Subscription Token
3411
- *
3412
- * Get one provider's subscription token.
3413
- *
3414
- * `configured` is false when nothing is saved. The token itself is
3415
- * never returned, only `token_last4`.
3416
- *
3417
- * Required permissions: read:user.
3418
- * API key: Requires a CLI user token.
3419
- * CLI user token: Supported.
3420
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3421
- * Higher permission levels include lower levels: read < write < delete.
3422
- */
3423
- get(provider: S['SubscriptionProvider']): Promise<S['SubscriptionToken']>;
3424
- /**
3425
- * List Subscription Tokens
3426
- *
3427
- * List your subscription tokens.
3428
- *
3429
- * One entry per supported provider, whether or not you have saved a
3430
- * token for it. Tokens are write-only: the response carries only
3431
- * `token_last4`, never the token.
3432
- *
3433
- * Required permissions: read:user.
3434
- * API key: Requires a CLI user token.
3435
- * CLI user token: Supported.
3436
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3437
- * Higher permission levels include lower levels: read < write < delete.
3438
- */
3439
- list(): Promise<S['SubscriptionTokensListResponse']>;
3440
- /**
3441
- * Set Subscription Token
3442
- *
3443
- * Save your subscription token for a provider.
3444
- *
3445
- * Replaces whatever was stored. The token is saved DISABLED and
3446
- * routes nothing until `POST /v1/user/subscription_tokens/{provider}/verify`
3447
- * succeeds. For Claude, use `claude setup-token`. For Codex, paste
3448
- * the auth.json credentials from a ChatGPT login. Each subscription
3449
- * pays only for models from its corresponding provider.
3450
- *
3451
- * Required permissions: write:user.
3452
- * API key: Requires a CLI user token.
3453
- * CLI user token: Supported.
3454
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3455
- * Higher permission levels include lower levels: read < write < delete.
3456
- */
3457
- set(provider: S['SubscriptionProvider'], options: {
3458
- token: string;
3459
- }): Promise<S['SubscriptionToken']>;
3460
- /**
3461
- * Get Subscription Usage
3462
- *
3463
- * Get your plan's last-observed rate-limit windows.
3464
- *
3465
- * Display-only, and only as fresh as your last call through Ellipsis
3466
- * (`observed_at`) — the same plan used outside Ellipsis moves the
3467
- * real windows without us seeing them. Null unless a token is
3468
- * enabled for the provider: a disabled token routes nothing, so any
3469
- * reading behind it is stale by construction.
3470
- *
3471
- * Required permissions: read:user.
3472
- * API key: Requires a CLI user token.
3473
- * CLI user token: Supported.
3474
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3475
- * Higher permission levels include lower levels: read < write < delete.
3476
- */
3477
- usage(provider: S['SubscriptionProvider']): Promise<S['SubscriptionUsageResponse']>;
3478
- /**
3479
- * Verify Subscription Token
3480
- *
3481
- * Verify the stored token by using it.
3482
- *
3483
- * Makes one minimal call on the exact runtime path, so a pass proves
3484
- * the token is what will pay. This is the gate on routing: success
3485
- * enables the token, failure disables it, so verifying a revoked
3486
- * token is how you stop it routing. A 200 with `ok: false` is the
3487
- * normal way a bad token is reported — it is an answer, not a
3488
- * transport failure.
3489
- *
3490
- * Required permissions: write:user.
3491
- * API key: Requires a CLI user token.
3492
- * CLI user token: Supported.
3493
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3494
- * Higher permission levels include lower levels: read < write < delete.
3495
- */
3496
- verify(provider: S['SubscriptionProvider']): Promise<S['VerifySubscriptionTokenResponse']>;
3497
- }
3498
3426
  declare class EllipsisUserTokens {
3499
3427
  private readonly transport;
3500
3428
  constructor(transport: Transport);
@@ -3521,7 +3449,6 @@ declare class EllipsisUserTokens {
3521
3449
  }
3522
3450
  declare class EllipsisUser {
3523
3451
  private readonly transport;
3524
- readonly subscriptionTokens: EllipsisUserSubscriptionTokens;
3525
3452
  readonly tokens: EllipsisUserTokens;
3526
3453
  constructor(transport: Transport);
3527
3454
  }
@@ -3800,7 +3727,6 @@ declare class Ellipsis {
3800
3727
  readonly secrets: EllipsisSecrets;
3801
3728
  readonly sessions: EllipsisSessions;
3802
3729
  readonly support: EllipsisSupport;
3803
- readonly templates: EllipsisTemplates;
3804
3730
  readonly user: EllipsisUser;
3805
3731
  readonly vmExecutions: EllipsisVmExecutions;
3806
3732
  readonly vmImages: EllipsisVmImages;