@ellipsis-dev/sdk 0.36.0 → 0.38.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,5 @@
1
- import { c as components } from './types-CbePyY-S.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 CodexCollabAgentToolCall, D as CodexCommandExecution, E as CodexCommandExecutionItem, F as CodexConfig, G as CodexContextCompaction, H as CodexEffortLevel, I as CodexErrorEvent, J as CodexErrorItem, K as CodexErrorParams, L as CodexEvent, M as CodexFileChange, N as CodexFileChangeItem, O as CodexFileUpdate, P as CodexItem, Q as CodexItemCompleted, R as CodexItemCompletedEvent, S as CodexItemParams, T as CodexItemStarted, U as CodexItemStartedEvent, V as CodexItemUpdatedEvent, W as CodexLocalImageInput, X as CodexMcpToolCall, Y as CodexMcpToolCallAppContext, Z as CodexMcpToolCallError, _ as CodexMcpToolCallItem, $ as CodexMcpToolCallResult, a0 as CodexPlan, a1 as CodexReasoning, a2 as CodexReasoningItem, a3 as CodexSessionRecord, a4 as CodexSubAgentActivity, a5 as CodexTextInput, a6 as CodexThread, a7 as CodexThreadStarted, a8 as CodexThreadStartedEvent, a9 as CodexThreadStartedParams, aa as CodexThreadTokenUsage, ab as CodexTodoListItem, ac as CodexTokenUsageBreakdown, ad as CodexTokenUsageParams, ae as CodexTokenUsageUpdated, af as CodexTurn, ag as CodexTurnCompleted, ah as CodexTurnCompletedEvent, ai as CodexTurnError, aj as CodexTurnFailedEvent, ak as CodexTurnParams, al as CodexTurnStarted, am as CodexTurnStartedEvent, an as CodexUsage, ao as CodexUserInput, ap as CodexUserMessage, aq as CodexWebSearch, ar as CodexWebSearchItem, as as ComputeConfig, at as ComputeConfig1, au as ConfigMetadata, av as Cost, aw as Cost1, ax as CronTrigger, ay as DeltaFrame, az as DoneFrame, aA as Duration, aB as EffortLevel, aC as EllipsisGrant, aD as EllipsisPermissions, aE as EnvironmentBaseBuild, aF as EnvironmentConfig, aG as EnvironmentHooks, aH as EnvironmentHooks1, aI as EnvironmentOutputPayload, aJ as EnvironmentOutputRecord, aK as EnvironmentPhasePayload, aL as EnvironmentPhaseRecord, aM as EnvironmentReadyPayload, aN as EnvironmentReadyRecord, aO as EnvironmentScript, aP as EnvironmentSource, aQ as EnvironmentVariable, aR as ErrorFrame, aS as GeminiConfig, aT as GeminiErrorEvent, aU as GeminiInitEvent, aV as GeminiMessageEvent, aW as GeminiModelStats, aX as GeminiResultEvent, aY as GeminiSessionRecord, aZ as GeminiStreamEvent, a_ as GeminiStreamStats, a$ as GeminiToolError, b0 as GeminiToolResultEvent, b1 as GeminiToolUseEvent, b2 as GithubAccountFilter, b3 as GithubAccountSelector, b4 as GithubAccountSnippet, b5 as GithubAccountType, b6 as GithubCheckRunEvent, b7 as GithubCheckSuiteEvent, b8 as GithubIssueEvent, b9 as GithubPermissions, ba as GithubPullRequestEvent, bb as GithubPushEvent, bc as GithubReleaseEvent, bd as GithubStatusEvent, be as GithubWorkflowRunEvent, bf as HandlerService, bg as HeartbeatFrame, bh as InputContract, bi as IssueAction, bj as LegacyAssistantPayload, bk as LegacyNativeUsage, bl as LegacyResultPayload, bm as Level, bn as LifecycleSessionRecord, bo as LinearIssueAction, bp as LinearIssueEvent, bq as LlmCost, br as LlmCostSplit, bs as McpRemoteServer, bt as McpServerRef, bu as McpStdioServer, bv as MemorySize, bw as MessageDeliveredPayload, bx as MessageDeliveredRecord, by as MessageReceivedPayload, bz as MessageReceivedRecord, bA as MessageRequeuedPayload, bB as MessageRequeuedRecord, bC as ModelLlmCostSplit, bD as ModelTokenCounts, bE as OutputConfig, bF as PermissionsConfig, bG as PermissionsConfig1, bH as PlatformSessionRecord, bI as PromptBlockedReason, bJ as PullRequestAction, bK as ReactCheckRun, bL as ReactCheckSuite, bM as ReactIssue, bN as ReactLinearIssue, bO as ReactPullRequest, bP as ReactPush, bQ as ReactRelease, bR as ReactSentry, bS as ReactSlackChannel, bT as ReactStatus, bU as ReactTrigger, bV as ReactWorkflowRun, bW as RecordsAppendFrame, bX as ReleaseAction, bY as RepositoryFilter, bZ as RepositoryRef, b_ as Review, b$ as ReviewComment, c0 as ReviewConfig, c1 as ReviewConfigsListResponse, c2 as ReviewPullRequest, c3 as ReviewPullRequestAuthor, c4 as ReviewReviewer, c5 as ReviewSummary, c6 as ReviewsListResponse, c7 as SdkAssistantRecord, c8 as SdkCacheCreation, c9 as SdkContentBlock, ca as SdkRateLimitRecord, cb as SdkRecord, cc as SdkResultRecord, cd as SdkServerToolResultBlock, ce as SdkServerToolUseBlock, cf as SdkSystemRecord, cg as SdkTextBlock, ch as SdkThinkingBlock, ci as SdkToolResultBlock, cj as SdkToolUseBlock, ck as SdkUserRecord, cl as SendSessionMessageRequest, cm as SentryAction, cn as SentryAlertEvent, co as Session, cp as Session1, cq as SessionAgent, cr as SessionArchived, cs as SessionAttribution, ct as SessionClosedPayload, cu as SessionClosedRecord, cv as SessionConfig, cw as SessionConversation, cx as SessionConversationConfig, cy as SessionEnvironment, cz as SessionEventActor, cA as SessionFrame, cB as SessionGit, cC as SessionGitCommit, cD as SessionGitFile, cE as SessionGitPr, cF as SessionGitRepo, cG as SessionHandler, cH as SessionMessage, cI as SessionMessageImage, cJ as SessionMessageResponse, cK as SessionMessageStatus, cL as SessionOutput, cM as SessionParent, cN as SessionPrompting, cO as SessionRecord, cP as SessionRecordsListResponse, cQ as SessionResponse, cR as SessionSource, cS as SessionState, cT as SessionStopped, cU as SessionStreamFrame, cV as SessionSummary, cW as SessionTurn, cX as SessionTurnResponse, cY as SessionTurnsListResponse, cZ as SessionsListResponse, c_ as SettingsRef, c$ as SkillRef, d0 as SlackChannelCreatedEvent, d1 as SlackMessageEvent, d2 as SnapshotFrame, d3 as StatusAction, d4 as StreamFrame, d5 as TokenCounts, d6 as Tokens, d7 as Tokens1, d8 as TokensInfo, d9 as TurnEndedPayload, da as TurnEndedRecord, db as TurnQueuedPayload, dc as TurnQueuedRecord, dd as TurnReason, de as TurnStartedPayload, df as TurnStartedRecord, dg as TurnStatus, dh as UnknownSessionRecord, di as UpdateSessionRequest, dj as WorkflowRunAction, dk as paths } from './types-CbePyY-S.js';
1
+ import { c as components } from './types-D4cLMGUn.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 CodexCollabAgentToolCall, D as CodexCommandExecution, E as CodexCommandExecutionItem, F as CodexConfig, G as CodexContextCompaction, H as CodexEffortLevel, I as CodexErrorEvent, J as CodexErrorItem, K as CodexErrorParams, L as CodexEvent, M as CodexFileChange, N as CodexFileChangeItem, O as CodexFileUpdate, P as CodexItem, Q as CodexItemCompleted, R as CodexItemCompletedEvent, S as CodexItemParams, T as CodexItemStarted, U as CodexItemStartedEvent, V as CodexItemUpdatedEvent, W as CodexLocalImageInput, X as CodexMcpToolCall, Y as CodexMcpToolCallAppContext, Z as CodexMcpToolCallError, _ as CodexMcpToolCallItem, $ as CodexMcpToolCallResult, a0 as CodexPlan, a1 as CodexReasoning, a2 as CodexReasoningItem, a3 as CodexSessionRecord, a4 as CodexSubAgentActivity, a5 as CodexTextInput, a6 as CodexThread, a7 as CodexThreadStarted, a8 as CodexThreadStartedEvent, a9 as CodexThreadStartedParams, aa as CodexThreadTokenUsage, ab as CodexTodoListItem, ac as CodexTokenUsageBreakdown, ad as CodexTokenUsageParams, ae as CodexTokenUsageUpdated, af as CodexTurn, ag as CodexTurnCompleted, ah as CodexTurnCompletedEvent, ai as CodexTurnError, aj as CodexTurnFailedEvent, ak as CodexTurnParams, al as CodexTurnStarted, am as CodexTurnStartedEvent, an as CodexUsage, ao as CodexUserInput, ap as CodexUserMessage, aq as CodexWebSearch, ar as CodexWebSearchItem, as as ComputeConfig, at as ComputeConfig1, au as ConfigMetadata, av as Cost, aw as Cost1, ax as CronTrigger, ay as DeltaFrame, az as Duration, aA as EffortLevel, aB as EllipsisGrant, aC as EllipsisPermissions, aD as EnvironmentBaseBuild, aE as EnvironmentConfig, aF as EnvironmentHooks, aG as EnvironmentHooks1, aH as EnvironmentOutputPayload, aI as EnvironmentOutputRecord, aJ as EnvironmentPhasePayload, aK as EnvironmentPhaseRecord, aL as EnvironmentReadyPayload, aM as EnvironmentReadyRecord, aN as EnvironmentScript, aO as EnvironmentSource, aP as EnvironmentVariable, aQ as ErrorFrame, aR as ErrorReason, aS as GeminiConfig, aT as GeminiErrorEvent, aU as GeminiInitEvent, aV as GeminiMessageEvent, aW as GeminiModelStats, aX as GeminiResultEvent, aY as GeminiSessionRecord, aZ as GeminiStreamEvent, a_ as GeminiStreamStats, a$ as GeminiToolError, b0 as GeminiToolResultEvent, b1 as GeminiToolUseEvent, b2 as GithubAccountFilter, b3 as GithubAccountSelector, b4 as GithubAccountSnippet, b5 as GithubAccountType, b6 as GithubCheckRunEvent, b7 as GithubCheckSuiteEvent, b8 as GithubIssueEvent, b9 as GithubPermissions, ba as GithubPullRequestEvent, bb as GithubPushEvent, bc as GithubReleaseEvent, bd as GithubStatusEvent, be as GithubWorkflowRunEvent, bf as HandlerService, bg as HeartbeatFrame, bh as InputContract, bi as IssueAction, bj as LegacyAssistantPayload, bk as LegacyNativeUsage, bl as LegacyResultPayload, bm as Level, bn as LifecycleSessionRecord, bo as LinearIssueAction, bp as LinearIssueChanged, bq as LinearIssueEvent, br as LinearLabelsChange, bs as LinearValueChange, bt as LinearValueFilter, bu as LlmCost, bv as LlmCostSplit, bw as McpRemoteServer, bx as McpServerRef, by as McpStdioServer, bz as MemorySize, bA as MessageEndedPayload, bB as MessageEndedRecord, bC as MessageQueuedPayload, bD as MessageQueuedRecord, bE as MessageRecord, bF as MessageRequeuedPayload, bG as MessageRequeuedRecord, bH as MessageStartedPayload, bI as MessageStartedRecord, bJ as ModelLlmCostSplit, bK as ModelTokenCounts, bL as OutputConfig, bM as PermissionsConfig, bN as PermissionsConfig1, bO as PlatformSessionRecord, bP as PromptBlockedReason, bQ as PullRequest, bR as PullRequestAction, bS as ReactCheckRun, bT as ReactCheckSuite, bU as ReactIssue, bV as ReactLinearIssue, bW as ReactPullRequest, bX as ReactPush, bY as ReactRelease, bZ as ReactSentry, b_ as ReactSlackChannel, b$ as ReactStatus, c0 as ReactTrigger, c1 as ReactWorkflowRun, c2 as RecordsFrame, c3 as ReleaseAction, c4 as RepositoryFilter, c5 as RepositoryRef, c6 as Review, c7 as ReviewComment, c8 as ReviewConfig, c9 as ReviewConfigsListResponse, ca as ReviewReviewer, cb as ReviewSummary, cc as ReviewsListResponse, cd as SdkAssistantRecord, ce as SdkCacheCreation, cf as SdkContentBlock, cg as SdkRateLimitRecord, ch as SdkRecord, ci as SdkResultRecord, cj as SdkServerToolResultBlock, ck as SdkServerToolUseBlock, cl as SdkSystemRecord, cm as SdkTextBlock, cn as SdkThinkingBlock, co as SdkToolResultBlock, cp as SdkToolUseBlock, cq as SdkUserRecord, cr as SendSessionMessageRequest, cs as SentryAction, ct as SentryAlertEvent, cu as Session, cv as SessionAgent, cw as SessionArchived, cx as SessionAttribution, cy as SessionClosedPayload, cz as SessionClosedRecord, cA as SessionConfig, cB as SessionConversation, cC as SessionConversationConfig, cD as SessionEnvironment, cE as SessionError, cF as SessionEventActor, cG as SessionFrame, cH as SessionGit, cI as SessionGitCommit, cJ as SessionGitFile, cK as SessionGitPr, cL as SessionGitRepo, cM as SessionHandler, cN as SessionMessage, cO as SessionMessageImage, cP as SessionMessageResponse, cQ as SessionOutput, cR as SessionParent, cS as SessionPrompting, cT as SessionRecord, cU as SessionRecordsListResponse, cV as SessionResponse, cW as SessionReview, cX as SessionSource, cY as SessionStatus, cZ as SessionStreamFrame, c_ as SessionSummary, c$ as SessionSummarySource, d0 as SessionsListResponse, d1 as SettingsRef, d2 as SkillRef, d3 as SlackChannelCreatedEvent, d4 as SlackMessageEvent, d5 as StatusAction, d6 as StreamFrame, d7 as TokenCounts, d8 as Tokens, d9 as Tokens1, da as TokensInfo, db as UnknownSessionRecord, dc as UpdateSessionRequest, dd as WorkflowRunAction, de as paths } from './types-D4cLMGUn.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.
@@ -8,7 +8,7 @@ type CollectionStreamFrame = SessionListStreamMessage | AgentListStreamMessage |
8
8
  /**
9
9
  * An agent session: one conversation with an agent. Returned by
10
10
  * `GET /v1/sessions/{id}` and carried by the session stream's
11
- * `session`/`snapshot` frames; REST and stream never disagree about what a
11
+ * `session` frames; REST and stream never disagree about what a
12
12
  * session looks like.
13
13
  */
14
14
  type Session = {
@@ -17,7 +17,7 @@ type Session = {
17
17
  */
18
18
  agent: SessionAgent | null;
19
19
  /**
20
- * When and by whom the session was archived; null when unarchived. Archiving does not stop or close a session.
20
+ * When and by whom the session was archived, or null when it isn't. A session is archived when it closes, after the account's archive_inactive_sessions_days without a message, or by PUT /v1/sessions/{id}. An archived session takes no messages, and a reply on the Slack thread, pull request, issue, or Linear issue it answers starts a new session.
21
21
  */
22
22
  archived: SessionArchived | null;
23
23
  attribution: SessionAttribution;
@@ -33,6 +33,10 @@ type Session = {
33
33
  * Codex input and native options. Set exactly one of claude_code, codex, or gemini.
34
34
  */
35
35
  codex: CodexConfig | null;
36
+ /**
37
+ * When session log retention deleted the session's records, messages, and prompt, or null. The session's status, cost, tokens, and summary stay.
38
+ */
39
+ content_deleted_at: string | null;
36
40
  conversation: SessionConversation;
37
41
  cost: Cost;
38
42
  /**
@@ -40,6 +44,10 @@ type Session = {
40
44
  */
41
45
  created_at: string;
42
46
  environment: SessionEnvironment;
47
+ /**
48
+ * Why the last message failed, was stopped, or was cancelled; null otherwise.
49
+ */
50
+ error: SessionError | null;
43
51
  /**
44
52
  * The typed external event that started the session; null for direct and scheduled starts.
45
53
  */
@@ -67,7 +75,7 @@ type Session = {
67
75
  [k: string]: string;
68
76
  };
69
77
  /**
70
- * The session's structured output: the `json_schema` the agent must satisfy and, once a turn has submitted it, the `result`.
78
+ * The session's structured output: the `json_schema` the agent must satisfy and, once the agent has submitted it, the `result`.
71
79
  */
72
80
  output: SessionOutput | null;
73
81
  /**
@@ -75,24 +83,29 @@ type Session = {
75
83
  */
76
84
  parent: SessionParent | null;
77
85
  permissions: PermissionsConfig1;
86
+ /**
87
+ * The code review this session ran for; null unless the source is `code_review`.
88
+ */
89
+ review: SessionReview | null;
78
90
  /**
79
91
  * Skills installed for this session.
80
92
  */
81
93
  skills: SkillRef[];
82
94
  source: SessionSource;
95
+ status: SessionStatus;
83
96
  /**
84
97
  * The latest live summary of the session's progress while it runs, and when it was generated.
85
98
  */
86
99
  summary: SessionSummary | null;
87
100
  tokens: Tokens;
88
- /**
89
- * The turn in progress, or the latest one when none is running. Null until the session has a message. Wait on it: the message you sent is answered when the turn with your message's `turn_id` reaches a final status.
90
- */
91
- turn: SessionTurn | null;
92
101
  /**
93
102
  * When the session was last updated.
94
103
  */
95
104
  updated_at: string;
105
+ /**
106
+ * Milliseconds from when the session was created to when it started, including any time it waited because your account already had its limit of sessions alive. Null until the session starts, and for sessions created before this field was added.
107
+ */
108
+ wait_ms: number | null;
96
109
  } & ({
97
110
  claude_code: {
98
111
  [k: string]: unknown;
@@ -194,7 +207,11 @@ type RepositoryFilter = {
194
207
  */
195
208
  type CheckSuiteAction = 'passed' | 'failed' | 'timed_out' | 'cancelled' | 'skipped' | 'neutral' | 'action_required' | 'stale' | 'startup_failure';
196
209
  type IssueAction = 'opened' | 'closed' | 'commented';
197
- type LinearIssueAction = 'opened';
210
+ type LinearValueFilter = {
211
+ exclude: string[];
212
+ include: string[];
213
+ } | string[] | string;
214
+ type LinearIssueAction = 'opened' | 'updated';
198
215
  type PullRequestAction = 'opened' | 'pushed' | 'merged' | 'closed' | 'review_submitted' | 'commented';
199
216
  /**
200
217
  * What happened to a GitHub release. `published` is the one moment a
@@ -216,11 +233,7 @@ type AttributionType = 'github_user' | 'linear_user' | 'slack_user' | 'api_key';
216
233
  /**
217
234
  * Why direct prompting is refused. Absent when prompting is allowed.
218
235
  */
219
- type PromptBlockedReason = 'mention_surface' | 'non_interactive' | 'harness_single_turn' | 'budget_exhausted' | 'closed';
220
- /**
221
- * `open` while the session can take messages; `closed` is permanent.
222
- */
223
- type SessionState = 'open' | 'closed';
236
+ type PromptBlockedReason = 'mention_surface' | 'non_interactive' | 'harness_single_turn' | 'budget_exhausted' | 'closed' | 'archived';
224
237
  /**
225
238
  * How a session's environment was chosen. None (the field is nullable)
226
239
  * when the config carried an inline environment block and no resolution ran —
@@ -230,6 +243,10 @@ type SessionState = 'open' | 'closed';
230
243
  * how it was chosen, and is null for the built-in basic environment.
231
244
  */
232
245
  type EnvironmentSource = 'request' | 'agent' | 'repo_default' | 'account_default' | 'platform_default';
246
+ /**
247
+ * What went wrong.
248
+ */
249
+ type ErrorReason = 'error' | 'tool_call_failed' | 'budget_hit' | 'payment_required' | 'blocked' | 'contact_email_required' | 'lifecycle_hook_failed' | 'missing_repo_access' | 'missing_token_permissions' | 'missing_environment_variables' | 'missing_github_integration' | 'agent_unavailable' | 'upstream_unavailable' | 'unsupported_configuration' | 'execution_disabled' | 'interrupted' | 'stopped';
233
250
  /**
234
251
  * The service the handler responds to.
235
252
  */
@@ -239,13 +256,13 @@ type HandlerService = 'slack' | 'github' | 'linear' | 'sentry';
239
256
  */
240
257
  type SessionSource = 'react' | 'code_review' | 'web' | 'api' | 'cli' | 'mention' | 'cron';
241
258
  /**
242
- * Why a turn failed or was cancelled. Null on every other outcome.
259
+ * Where the session is. A message you sent is answered once the status is `idle` or `closed`; its `message_ended` record in GET /v1/sessions/{id}/records says how.
243
260
  */
244
- type TurnReason = 'error' | 'tool_call_failed' | 'budget_hit' | 'payment_required' | 'blocked' | 'contact_email_required' | 'lifecycle_hook_failed' | 'missing_repo_access' | 'missing_token_permissions' | 'missing_environment_variables' | 'missing_github_integration' | 'agent_unavailable' | 'upstream_unavailable' | 'unsupported_configuration' | 'execution_disabled' | 'interrupted';
261
+ type SessionStatus = 'queued' | 'preparing' | 'running' | 'idle' | 'closed';
245
262
  /**
246
- * Where the turn is.
263
+ * Where this summary came from. `prompt` is the first line of the prompt the session started with, `generated` is written by Ellipsis as the session runs, and `user` was set by a person and is never replaced by a generated one.
247
264
  */
248
- type TurnStatus = 'queued' | 'preparing' | 'running' | 'completed' | 'failed' | 'stopped' | 'cancelled';
265
+ type SessionSummarySource = 'prompt' | 'generated' | 'user';
249
266
  /**
250
267
  * Which writer owns this agent. "github" agents are defined by a file in a repository and are changed by editing that file; "api" agents have no file and are changed through this API.
251
268
  */
@@ -374,7 +391,7 @@ interface ClaudeConfig {
374
391
  */
375
392
  model: string;
376
393
  /**
377
- * The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.
394
+ * The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.
378
395
  */
379
396
  prompt: string | null;
380
397
  settings: SettingsRef | null;
@@ -399,7 +416,7 @@ interface RepositoryRef {
399
416
  */
400
417
  interface CodexConfig {
401
418
  /**
402
- * Reasoning effort for every turn. Omit to use the model default.
419
+ * Reasoning effort for every message. Omit to use the model default.
403
420
  */
404
421
  effort: CodexEffortLevel | null;
405
422
  /**
@@ -407,7 +424,7 @@ interface CodexConfig {
407
424
  */
408
425
  model: string;
409
426
  /**
410
- * The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.
427
+ * The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.
411
428
  */
412
429
  prompt: string | null;
413
430
  }
@@ -416,7 +433,7 @@ interface CodexConfig {
416
433
  */
417
434
  interface SessionConversationConfig {
418
435
  /**
419
- * Whether the session stays open after its first turn. Defaults to true; false runs once and requires a prompt. Requires the model's interactive capability when true. Direct message acceptance is reported separately in conversation.prompting.
436
+ * Whether the session stays open after its first message is answered. Defaults to true; false runs once and requires a prompt. Requires the model's interactive capability when true. Direct message acceptance is reported separately in conversation.prompting.
420
437
  */
421
438
  interactive: boolean;
422
439
  }
@@ -610,7 +627,7 @@ interface GeminiConfig {
610
627
  */
611
628
  model: string;
612
629
  /**
613
- * The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.
630
+ * The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.
614
631
  */
615
632
  prompt: string | null;
616
633
  }
@@ -777,9 +794,53 @@ interface ReactIssue {
777
794
  on: IssueAction[];
778
795
  repositories: RepositoryFilter;
779
796
  }
797
+ /**
798
+ * A Linear issue being created (`opened`) or changed (`updated`). An
799
+ * `updated` event fires only when every field under `changed` changed in
800
+ * one edit. `team`, `state`, `labels`, `project`, `assignee`, and
801
+ * `priority` filter on the issue as it is after the event. `state` matches
802
+ * a status name or a status type. `for` is the person who created or
803
+ * changed the issue.
804
+ */
780
805
  interface ReactLinearIssue {
806
+ assignee: LinearValueFilter | null;
807
+ changed: LinearIssueChanged | null;
781
808
  for: GithubAccountSelector;
809
+ labels: LinearValueFilter | null;
782
810
  on: LinearIssueAction[];
811
+ priority: LinearValueFilter | null;
812
+ project: LinearValueFilter | null;
813
+ state: LinearValueFilter | null;
814
+ team: LinearValueFilter | null;
815
+ }
816
+ /**
817
+ * The fields an `updated` event watches. Every listed field must change in
818
+ * the same edit.
819
+ */
820
+ interface LinearIssueChanged {
821
+ assignee: LinearValueChange | null;
822
+ labels: LinearLabelsChange | null;
823
+ priority: LinearValueChange | null;
824
+ project: LinearValueChange | null;
825
+ state: LinearValueChange | null;
826
+ }
827
+ /**
828
+ * A change to one issue field. `from` matches the value before the change
829
+ * and `to` the value after it. Leaving either out matches any value, so `{}`
830
+ * is any change to the field.
831
+ */
832
+ interface LinearValueChange {
833
+ from: LinearValueFilter | null;
834
+ to: LinearValueFilter | null;
835
+ }
836
+ /**
837
+ * A change to the issue's labels. `added` matches when a listed label was
838
+ * added and `removed` when a listed label was removed. `{}` is any label
839
+ * change.
840
+ */
841
+ interface LinearLabelsChange {
842
+ added: LinearValueFilter | null;
843
+ removed: LinearValueFilter | null;
783
844
  }
784
845
  interface ReactPullRequest {
785
846
  base: string[];
@@ -850,6 +911,10 @@ interface SessionArchived {
850
911
  * The GitHub user who archived the session; null if unknown or unavailable.
851
912
  */
852
913
  by: GithubAccountSnippet | null;
914
+ /**
915
+ * When the session's records and messages are deleted, from the account's current session log retention. It moves when the retention changes. Null when the account keeps them or they're already deleted.
916
+ */
917
+ deletes_at: string | null;
853
918
  }
854
919
  /**
855
920
  * Sometimes the GitHub API returns a user of github (can include bots)
@@ -887,11 +952,10 @@ interface SessionAttribution {
887
952
  */
888
953
  interface SessionConversation {
889
954
  /**
890
- * Whether the session stays open after its first turn.
955
+ * Whether the session stays open after its first message is answered.
891
956
  */
892
957
  interactive: boolean;
893
958
  prompting: SessionPrompting;
894
- state: SessionState;
895
959
  /**
896
960
  * Whether an agent is ready to answer the next message right away. When false, the next message first prepares an environment, which takes longer. A hint only; clients need no logic on it.
897
961
  */
@@ -1069,6 +1133,17 @@ interface EnvironmentHooks1 {
1069
1133
  */
1070
1134
  validate: EnvironmentScript | string | null;
1071
1135
  }
1136
+ /**
1137
+ * Why the last message failed, was stopped, or was cancelled. Cleared
1138
+ * when the next message starts.
1139
+ */
1140
+ interface SessionError {
1141
+ /**
1142
+ * A human-readable explanation.
1143
+ */
1144
+ detail: string | null;
1145
+ reason: ErrorReason;
1146
+ }
1072
1147
  interface GithubPullRequestEvent {
1073
1148
  action: PullRequestAction | 'review_commented';
1074
1149
  actor: SessionEventActor | null;
@@ -1274,9 +1349,9 @@ interface SessionHandler {
1274
1349
  sha: string;
1275
1350
  }
1276
1351
  /**
1277
- * Structured output on the wire: the contract and, when a turn has
1352
+ * Structured output on the wire: the contract and, when the agent has
1278
1353
  * submitted one, the payload. `result` is None while the session runs and
1279
- * when no turn submitted anything; it is the agent's own JSON, in the
1354
+ * when the agent submitted nothing; it is the agent's own JSON, in the
1280
1355
  * shape of `json_schema`.
1281
1356
  */
1282
1357
  interface SessionOutput {
@@ -1287,7 +1362,7 @@ interface SessionOutput {
1287
1362
  [k: string]: unknown;
1288
1363
  };
1289
1364
  /**
1290
- * The payload the agent submitted, or null until a turn submits one.
1365
+ * The payload the agent submitted, or null until it submits one.
1291
1366
  */
1292
1367
  result: {
1293
1368
  [k: string]: unknown;
@@ -1309,6 +1384,15 @@ interface PermissionsConfig1 {
1309
1384
  ellipsis: (true | 'all') | EllipsisPermissions;
1310
1385
  github: GithubPermissions;
1311
1386
  }
1387
+ /**
1388
+ * The code review a reviewer session ran for.
1389
+ */
1390
+ interface SessionReview {
1391
+ /**
1392
+ * Identifier of the code review.
1393
+ */
1394
+ id: string;
1395
+ }
1312
1396
  /**
1313
1397
  * A live one-line summary of what the session is doing, refreshed
1314
1398
  * every few steps while it runs.
@@ -1322,6 +1406,7 @@ interface SessionSummary {
1322
1406
  * One-line description of what the session is doing.
1323
1407
  */
1324
1408
  description: string;
1409
+ source: SessionSummarySource;
1325
1410
  }
1326
1411
  /**
1327
1412
  * The tokens the session has used so far.
@@ -1387,98 +1472,6 @@ interface ModelTokenCounts {
1387
1472
  */
1388
1473
  total: number;
1389
1474
  }
1390
- /**
1391
- * One message and the agent's answer to it. A turn is `queued` from the
1392
- * moment its message is received, `preparing` while its environment is set
1393
- * up, `running` while the agent works, then `completed`, `failed`,
1394
- * `stopped`, or `cancelled`.
1395
- */
1396
- interface SessionTurn {
1397
- cost: Cost1;
1398
- /**
1399
- * When the turn's message was received.
1400
- */
1401
- created_at: string;
1402
- /**
1403
- * A human-readable explanation of a failed, stopped, or cancelled turn, or of why a queued turn waits.
1404
- */
1405
- detail: string | null;
1406
- /**
1407
- * When the turn reached its final status.
1408
- */
1409
- ended_at: string | null;
1410
- /**
1411
- * Unique identifier of the turn.
1412
- */
1413
- id: string;
1414
- /**
1415
- * Position in the session, starting at 0.
1416
- */
1417
- index: number;
1418
- /**
1419
- * Why the turn failed or was cancelled; null on every other status.
1420
- */
1421
- reason: TurnReason | null;
1422
- /**
1423
- * When the agent started on the message.
1424
- */
1425
- started_at: string | null;
1426
- status: TurnStatus;
1427
- /**
1428
- * When and by whom a stop was requested; null when none was.
1429
- */
1430
- stopped: SessionStopped | null;
1431
- tokens: Tokens1;
1432
- }
1433
- /**
1434
- * What the turn cost so far, in millicents, broken down by leg.
1435
- */
1436
- interface Cost1 {
1437
- /**
1438
- * What Ellipsis charged to credit, in millicents. It is everything except subscription tokens.
1439
- */
1440
- charged: number;
1441
- /**
1442
- * CPU spend in millicents.
1443
- */
1444
- cpu: number;
1445
- /**
1446
- * Platform fee in millicents.
1447
- */
1448
- fee: number;
1449
- llm: LlmCost;
1450
- /**
1451
- * Memory spend in millicents.
1452
- */
1453
- memory: number;
1454
- /**
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.
1456
- */
1457
- total: number;
1458
- }
1459
- /**
1460
- * When a stop was requested and the GitHub user who requested it.
1461
- */
1462
- interface SessionStopped {
1463
- /**
1464
- * When a stop was requested.
1465
- */
1466
- at: string;
1467
- /**
1468
- * The GitHub user who stopped the session, resolved at read time. Null if the user is unknown or unavailable.
1469
- */
1470
- by: GithubAccountSnippet | null;
1471
- }
1472
- /**
1473
- * The tokens the turn spent and the model they went to.
1474
- */
1475
- interface Tokens1 {
1476
- all: TokenCounts;
1477
- /**
1478
- * Token counts for each model that used tokens.
1479
- */
1480
- by_model: ModelTokenCounts[];
1481
- }
1482
1475
  interface AgentListStreamMessage {
1483
1476
  agents: Agent[];
1484
1477
  type: 'agents';
@@ -1684,7 +1677,8 @@ declare class Page<ItemT, ResponseT extends CursorResponse> implements AsyncIter
1684
1677
  }
1685
1678
 
1686
1679
  type S$1 = components['schemas'];
1687
- declare function isTurnFinal(status: string): boolean;
1680
+ declare function isSessionSettled(status: string): boolean;
1681
+ type MessageEnded = S$1['MessageEndedPayload'];
1688
1682
  interface SessionsApi {
1689
1683
  get(sessionId: string): Promise<S$1['SessionResponse']>;
1690
1684
  stop(sessionId: string): Promise<S$1['SessionResponse']>;
@@ -1693,21 +1687,23 @@ interface SessionsApi {
1693
1687
  images?: S$1['ImageAttachment'][];
1694
1688
  idempotency_key?: string | null;
1695
1689
  }): Promise<S$1['SessionMessageResponse']>;
1696
- turns: {
1697
- get(sessionId: string, turnId: string): Promise<S$1['SessionTurnResponse']>;
1698
- };
1690
+ records(sessionId: string, options?: {
1691
+ cursor?: string | null;
1692
+ limit?: number | null;
1693
+ message_id?: string | null;
1694
+ }): Promise<Page<S$1['SessionRecord'], S$1['SessionRecordsListResponse']>>;
1699
1695
  }
1700
1696
  declare class SessionHandle {
1701
1697
  private readonly sessions;
1702
1698
  readonly id: string;
1703
1699
  session: S$1['Session'];
1704
- turnId: string | null;
1700
+ messageId: string | null;
1705
1701
  constructor(sessions: SessionsApi, session: S$1['Session']);
1706
1702
  refresh(): Promise<S$1['Session']>;
1707
1703
  wait(options?: {
1708
1704
  timeoutMs?: number;
1709
1705
  pollIntervalMs?: number;
1710
- }): Promise<S$1['SessionTurn'] | null>;
1706
+ }): Promise<MessageEnded | null>;
1711
1707
  send(message: string, options?: {
1712
1708
  images?: S$1['ImageAttachment'][];
1713
1709
  idempotencyKey?: string;
@@ -1780,6 +1776,31 @@ declare class EllipsisAccountApiKeys {
1780
1776
  */
1781
1777
  revoke(id: string): Promise<S['TokenRevokedResponse']>;
1782
1778
  }
1779
+ declare class EllipsisAccountApiRequests {
1780
+ private readonly transport;
1781
+ constructor(transport: Transport);
1782
+ /**
1783
+ * List Api Requests
1784
+ *
1785
+ * List requests made to the API with API keys, user tokens, and session tokens, newest first.
1786
+ *
1787
+ * Required permissions: read:account.
1788
+ * API key: Supported.
1789
+ * CLI user token: Supported.
1790
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1791
+ * Higher permission levels include lower levels: read < write < delete.
1792
+ */
1793
+ list(options?: {
1794
+ start?: string | null;
1795
+ end?: string | null;
1796
+ operation?: (string)[] | null;
1797
+ status_code?: (number)[] | null;
1798
+ credential_type?: (S['ApiRequestCredentialType'])[] | null;
1799
+ credential_id?: (string)[] | null;
1800
+ limit?: number;
1801
+ cursor?: string | null;
1802
+ }): Promise<Page<S['ApiRequest'], S['ApiRequestsListResponse']>>;
1803
+ }
1783
1804
  declare class EllipsisAccountBillingAutoRecharge {
1784
1805
  private readonly transport;
1785
1806
  constructor(transport: Transport);
@@ -1798,83 +1819,11 @@ declare class EllipsisAccountBillingAutoRecharge {
1798
1819
  * Higher permission levels include lower levels: read < write < delete.
1799
1820
  */
1800
1821
  get(): Promise<S['AutoRechargeSettings']>;
1801
- /**
1802
- * Update Auto Recharge
1803
- *
1804
- * Set your automatic credit recharge policy.
1805
- *
1806
- * Requires a human account administrator; API keys and session tokens
1807
- * cannot change this policy. Supply enabled explicitly. Saving amounts
1808
- * with enabled=false keeps recharge off; enabling requires a saved card.
1809
- * A recharge buys `amount` of credit and charges the platform fee in
1810
- * addition. Amounts and thresholds are millicents in whole cents.
1811
- *
1812
- * Required permissions: write:account.
1813
- * API key: Requires a CLI user token belonging to an account administrator.
1814
- * CLI user token: Requires an account administrator.
1815
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1816
- * Higher permission levels include lower levels: read < write < delete.
1817
- */
1818
- set(options: {
1819
- amount: number;
1820
- enabled: boolean;
1821
- threshold: number;
1822
- }): Promise<S['AutoRechargeSettings']>;
1823
1822
  }
1824
1823
  declare class EllipsisAccountBilling {
1825
1824
  private readonly transport;
1826
1825
  readonly autoRecharge: EllipsisAccountBillingAutoRecharge;
1827
1826
  constructor(transport: Transport);
1828
- /**
1829
- * Create Card Setup Session
1830
- *
1831
- * Save a card through Stripe's hosted setup flow.
1832
- *
1833
- * Requires a human account administrator. Open the returned URL to
1834
- * finish setup and return to Billing. Saving a card does not enable
1835
- * auto-recharge or buy credit.
1836
- *
1837
- * Required permissions: write:account.
1838
- * API key: Requires a CLI user token belonging to an account administrator.
1839
- * CLI user token: Requires an account administrator.
1840
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1841
- * Higher permission levels include lower levels: read < write < delete.
1842
- */
1843
- cardSetup(): Promise<S['BillingCheckout']>;
1844
- /**
1845
- * Create Credit Checkout Session
1846
- *
1847
- * Buy prepaid credit through Stripe's hosted checkout.
1848
- *
1849
- * Requires a human account administrator. Open the returned URL to
1850
- * complete payment. Credit is granted only after payment succeeds;
1851
- * the platform fee is charged in addition to `amount`. Returning
1852
- * to Billing carries the checkout session ID for receipt lookup.
1853
- *
1854
- * Required permissions: write:account.
1855
- * API key: Requires a CLI user token belonging to an account administrator.
1856
- * CLI user token: Requires an account administrator.
1857
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1858
- * Higher permission levels include lower levels: read < write < delete.
1859
- */
1860
- checkout(options: {
1861
- amount: number;
1862
- }): Promise<S['BillingCheckout']>;
1863
- /**
1864
- * Claim Signup Credit
1865
- *
1866
- * The "Claim $100" button. Runs the same idempotent billing
1867
- * bootstrap that otherwise fires lazily at the first session (Stripe
1868
- * customer + usage subscription + the signup grant). A repeat call is
1869
- * a no-op that returns the current state.
1870
- *
1871
- * Required permissions: write:account.
1872
- * API key: Supported.
1873
- * CLI user token: Supported.
1874
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1875
- * Higher permission levels include lower levels: read < write < delete.
1876
- */
1877
- claimSignupCredit(): Promise<S['BillingStatus']>;
1878
1827
  /**
1879
1828
  * Get Fee Schedule
1880
1829
  *
@@ -1972,67 +1921,6 @@ declare class EllipsisAccountModels {
1972
1921
  */
1973
1922
  list(): Promise<S['ModelsListResponse']>;
1974
1923
  }
1975
- declare class EllipsisAccountNotifications {
1976
- private readonly transport;
1977
- constructor(transport: Transport);
1978
- /**
1979
- * Send Test Notification Email
1980
- *
1981
- * Send the alert email template to one address with sample data,
1982
- * so a typo'd finance alias is caught by a human instead of failing
1983
- * silently when a real alert fires.
1984
- *
1985
- * Required permissions: write:account.
1986
- * API key: Supported.
1987
- * CLI user token: Supported.
1988
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1989
- * Higher permission levels include lower levels: read < write < delete.
1990
- */
1991
- testEmail(options: {
1992
- email: string;
1993
- }): Promise<S['AccountActionResponse']>;
1994
- }
1995
- declare class EllipsisAccountOnboarding {
1996
- private readonly transport;
1997
- constructor(transport: Transport);
1998
- /**
1999
- * Get Account Onboarding
2000
- *
2001
- * Read the account's saved onboarding answers, or null before setup.
2002
- *
2003
- * Required permissions: read:account.
2004
- * API key: Supported.
2005
- * CLI user token: Supported.
2006
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2007
- * Higher permission levels include lower levels: read < write < delete.
2008
- */
2009
- get(): Promise<S['AccountOnboardingResponse']>;
2010
- /**
2011
- * Update Account Onboarding
2012
- *
2013
- * Save supplied onboarding answers, preserving omitted answers.
2014
- *
2015
- * Organizations can save their work email before selecting use cases.
2016
- * Saving use cases requires a valid organization work email and at
2017
- * least one choice. When Other is the only choice, describe it.
2018
- * Personal accounts save a null work email. This does not change the
2019
- * billing contact email. Session tokens cannot update answers.
2020
- * Supplying an organization work email requires a human user and sends
2021
- * a Slack Connect invitation. Slack failures do not undo saved answers.
2022
- *
2023
- * Required permissions: write:account.
2024
- * API key: Supported.
2025
- * CLI user token: Supported.
2026
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2027
- * Higher permission levels include lower levels: read < write < delete.
2028
- */
2029
- update(options?: {
2030
- finished?: boolean;
2031
- other_use_case?: string | null;
2032
- use_cases?: (S['AccountOnboardingUseCase'])[];
2033
- work_email?: string | null;
2034
- }): Promise<S['AccountOnboardingResponse']>;
2035
- }
2036
1924
  declare class EllipsisAccountSettings {
2037
1925
  private readonly transport;
2038
1926
  constructor(transport: Transport);
@@ -2094,10 +1982,9 @@ declare class EllipsisAccountSettings {
2094
1982
  declare class EllipsisAccount {
2095
1983
  private readonly transport;
2096
1984
  readonly apiKeys: EllipsisAccountApiKeys;
1985
+ readonly apiRequests: EllipsisAccountApiRequests;
2097
1986
  readonly billing: EllipsisAccountBilling;
2098
1987
  readonly models: EllipsisAccountModels;
2099
- readonly notifications: EllipsisAccountNotifications;
2100
- readonly onboarding: EllipsisAccountOnboarding;
2101
1988
  readonly settings: EllipsisAccountSettings;
2102
1989
  constructor(transport: Transport);
2103
1990
  /**
@@ -2287,13 +2174,14 @@ declare class EllipsisAgents {
2287
2174
  /**
2288
2175
  * Get Agent Metrics
2289
2176
  *
2290
- * Return an agent's session distribution and trailing spend,
2291
- * by id or by name.
2177
+ * Return an agent's session distribution, trailing spend, and
2178
+ * usage over a window, by id or by name.
2292
2179
  *
2293
2180
  * `samples` carries one entry per finished session (duration, cost,
2294
2181
  * tokens) for distributions; `spend_windows` carries what the
2295
2182
  * agent's sessions cost over the last 1, 7, and 28 days against
2296
- * its budget for each window.
2183
+ * its budget for each window; `buckets` splits start to end by
2184
+ * `interval`, chosen from the window's length.
2297
2185
  *
2298
2186
  * Required permissions: read:configs.
2299
2187
  * API key: Supported.
@@ -2302,7 +2190,10 @@ declare class EllipsisAgents {
2302
2190
  * Higher permission levels include lower levels: read < write < delete.
2303
2191
  * Grant match patterns can further restrict access to individual resources.
2304
2192
  */
2305
- metrics(id: string): Promise<S['AgentMetricsResponse']>;
2193
+ metrics(id: string, options: {
2194
+ start: string;
2195
+ end: string;
2196
+ }): Promise<S['AgentMetricsResponse']>;
2306
2197
  /**
2307
2198
  * Start Agent Session
2308
2199
  *
@@ -2445,90 +2336,6 @@ declare class EllipsisAlerts {
2445
2336
  cursor?: string | null;
2446
2337
  }): Promise<Page<S['Alert'], S['AlertsListResponse']>>;
2447
2338
  }
2448
- declare class EllipsisAnalytics {
2449
- private readonly transport;
2450
- constructor(transport: Transport);
2451
- /**
2452
- * Get Analytics Metrics
2453
- *
2454
- * Return PR and review analytics metrics.
2455
- *
2456
- * The same data as the analytics dashboard.
2457
- *
2458
- * Windowing: pass explicit start/end, or days (default: the last
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.
2464
- *
2465
- * Required permissions: read:account.
2466
- * API key: Supported.
2467
- * CLI user token: Supported.
2468
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2469
- * Higher permission levels include lower levels: read < write < delete.
2470
- */
2471
- metrics(options?: {
2472
- days?: number | null;
2473
- start?: string | null;
2474
- end?: string | null;
2475
- repo?: (string)[] | null;
2476
- author?: (string)[] | null;
2477
- account_type?: string;
2478
- status?: (string)[] | null;
2479
- }): Promise<S['GetAnalyticsMetricsResponse']>;
2480
- /**
2481
- * Get Analytics Pull Requests
2482
- *
2483
- * Return pull-request analytics.
2484
- *
2485
- * Windowing: pass explicit start/end, or days (default: the last
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.
2489
- *
2490
- * Required permissions: read:account.
2491
- * API key: Supported.
2492
- * CLI user token: Supported.
2493
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2494
- * Higher permission levels include lower levels: read < write < delete.
2495
- */
2496
- pullRequests(options?: {
2497
- days?: number | null;
2498
- start?: string | null;
2499
- end?: string | null;
2500
- repo?: (string)[] | null;
2501
- author?: (string)[] | null;
2502
- account_type?: string;
2503
- status?: (string)[] | null;
2504
- }): Promise<S['GetAnalyticsPullRequestsResponse']>;
2505
- /**
2506
- * Get Analytics Reviews
2507
- *
2508
- * Return pull request review analytics.
2509
- *
2510
- * account_type scopes reviewers (bot|user|all) — e.g. "what apps
2511
- * review the most PRs?" is the reviewer facets here with
2512
- * account_type=bot. Windowing: pass explicit start/end, or days
2513
- * (default: the last 30 days). `interval` names the width of each
2514
- * entry in `series`, chosen from the window's length.
2515
- *
2516
- * Required permissions: read:account.
2517
- * API key: Supported.
2518
- * CLI user token: Supported.
2519
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2520
- * Higher permission levels include lower levels: read < write < delete.
2521
- */
2522
- reviews(options?: {
2523
- days?: number | null;
2524
- start?: string | null;
2525
- end?: string | null;
2526
- repo?: (string)[] | null;
2527
- author?: (string)[] | null;
2528
- account_type?: string;
2529
- review_state?: (string)[] | null;
2530
- }): Promise<S['GetAnalyticsReviewsResponse']>;
2531
- }
2532
2339
  declare class EllipsisAuthCli {
2533
2340
  private readonly transport;
2534
2341
  constructor(transport: Transport);
@@ -2674,8 +2481,8 @@ declare class EllipsisHandlers {
2674
2481
  *
2675
2482
  * Return session counts and accumulated spend for a saved handler.
2676
2483
  *
2677
- * Filters only by session creation time. Omitted bounds include all
2678
- * history. Counts use the current turn and conversation state, so an open
2484
+ * Filters only by session creation time. `buckets` splits the window
2485
+ * by `interval`, chosen from the window's length. Counts use the current turn and conversation state, so an open
2679
2486
  * conversation awaiting another message remains active. Spend includes the selected sessions' full
2680
2487
  * accumulated cost, including activity after the creation-time window.
2681
2488
  * Only sessions carrying this exact saved handler id are counted;
@@ -2696,9 +2503,9 @@ declare class EllipsisHandlers {
2696
2503
  * Higher permission levels include lower levels: read < write < delete.
2697
2504
  * Grant match patterns can further restrict access to individual resources.
2698
2505
  */
2699
- metrics(id: string, options?: {
2700
- start?: string | null;
2701
- end?: string | null;
2506
+ metrics(id: string, options: {
2507
+ start: string;
2508
+ end: string;
2702
2509
  }): Promise<S['HandlerMetricsResponse']>;
2703
2510
  }
2704
2511
  declare class EllipsisIntegrationsGithub {
@@ -2827,16 +2634,6 @@ declare class EllipsisIntegrationsSlack {
2827
2634
  * Higher permission levels include lower levels: read < write < delete.
2828
2635
  */
2829
2636
  channels(): Promise<S['SlackChannelsListResponse']>;
2830
- /**
2831
- * Create Operations Channel
2832
- *
2833
- * Required permissions: write:integrations.
2834
- * API key: Supported.
2835
- * CLI user token: Supported.
2836
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2837
- * Higher permission levels include lower levels: read < write < delete.
2838
- */
2839
- createOperationsChannel(): Promise<S['SlackChannel']>;
2840
2637
  /**
2841
2638
  * Delete Slack Integration
2842
2639
  *
@@ -2997,46 +2794,8 @@ declare class EllipsisSecrets {
2997
2794
  secrets: (S['SecretInput'])[];
2998
2795
  }): Promise<S['SecretsListResponse']>;
2999
2796
  }
3000
- declare class EllipsisSessionsTurns {
3001
- private readonly transport;
3002
- constructor(transport: Transport);
3003
- /**
3004
- * Get Session Turn
3005
- *
3006
- * Return one turn.
3007
- *
3008
- * Poll this after sending a message: the message is answered when
3009
- * the turn's status is completed, failed, stopped, or cancelled.
3010
- *
3011
- * Required permissions: read:sessions.
3012
- * API key: Supported.
3013
- * CLI user token: Supported.
3014
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3015
- * Higher permission levels include lower levels: read < write < delete.
3016
- * Grant match patterns can further restrict access to individual resources.
3017
- */
3018
- get(session_id: string, id: string): Promise<S['SessionTurnResponse']>;
3019
- /**
3020
- * Get Session Turns
3021
- *
3022
- * Return the session's turns and messages, oldest first.
3023
- *
3024
- * One turn per message: pending until the agent starts on it,
3025
- * running while it works, then completed, failed, stopped, or
3026
- * cancelled.
3027
- *
3028
- * Required permissions: read:sessions.
3029
- * API key: Supported.
3030
- * CLI user token: Supported.
3031
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3032
- * Higher permission levels include lower levels: read < write < delete.
3033
- * Grant match patterns can further restrict access to individual resources.
3034
- */
3035
- list(id: string): Promise<S['SessionTurnsListResponse']>;
3036
- }
3037
2797
  declare class EllipsisSessions {
3038
2798
  private readonly transport;
3039
- readonly turns: EllipsisSessionsTurns;
3040
2799
  constructor(transport: Transport);
3041
2800
  /**
3042
2801
  * Get Session Analytics
@@ -3136,36 +2895,13 @@ declare class EllipsisSessions {
3136
2895
  * Grant match patterns can further restrict access to individual resources.
3137
2896
  */
3138
2897
  git(id: string): Promise<S['SessionGitResponse']>;
3139
- /**
3140
- * Ingest Session Transcript
3141
- *
3142
- * Append transcript lines to a session's record.
3143
- *
3144
- * The transcript tailer running inside the session's environment, for
3145
- * interactive sessions.
3146
- *
3147
- * A session token may only push its own session's transcript.
3148
- * Idempotent by transcript line uuid; tolerant of malformed lines.
3149
- *
3150
- * Required permissions: write:sessions.
3151
- * API key: Supported.
3152
- * CLI user token: Supported.
3153
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
3154
- * Higher permission levels include lower levels: read < write < delete.
3155
- * Grant match patterns can further restrict access to individual resources.
3156
- */
3157
- ingestTranscript(id: string, options: {
3158
- lines: (string)[];
3159
- offset?: number;
3160
- }): Promise<S['TranscriptIngestResult']>;
3161
2898
  /**
3162
2899
  * List Sessions
3163
2900
  *
3164
2901
  * List cloud agent sessions, newest first.
3165
2902
  *
3166
2903
  * Optionally filtered by agent (id or name), source, service, handler, time
3167
- * window, attributed author, repository, and whether the session is
3168
- * still going.
2904
+ * window, attributed author, repository, and status.
3169
2905
  *
3170
2906
  * Required permissions: read:sessions.
3171
2907
  * API key: Supported.
@@ -3186,7 +2922,7 @@ declare class EllipsisSessions {
3186
2922
  cursor?: string | null;
3187
2923
  author_id?: number | null;
3188
2924
  repo?: string | null;
3189
- unfinished?: boolean;
2925
+ status?: (S['SessionStatus'])[] | null;
3190
2926
  }): Promise<Page<S['Session'], S['SessionsListResponse']>>;
3191
2927
  /**
3192
2928
  * Get Session Metrics
@@ -3225,40 +2961,17 @@ declare class EllipsisSessions {
3225
2961
  records(id: string, options?: {
3226
2962
  cursor?: string | null;
3227
2963
  limit?: number | null;
2964
+ message_id?: string | null;
3228
2965
  }): Promise<Page<S['SessionRecord'], S['SessionRecordsListResponse']>>;
3229
- /**
3230
- * Search Sessions
3231
- *
3232
- * Required permissions: read:sessions.
3233
- * API key: Supported.
3234
- * CLI user token: Supported.
3235
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3236
- * Higher permission levels include lower levels: read < write < delete.
3237
- * Grant match patterns can further restrict access to individual resources.
3238
- */
3239
- search(options?: {
3240
- q?: string;
3241
- scope?: S['SessionSearchScope'];
3242
- source?: (S['SessionSource'])[] | null;
3243
- service?: S['HandlerService'] | null;
3244
- handler?: string | null;
3245
- author_id?: (number)[] | null;
3246
- agent_id?: (string)[] | null;
3247
- session_ids?: (string)[] | null;
3248
- repo?: (string)[] | null;
3249
- status?: (S['TurnStatus'])[] | null;
3250
- start?: string | null;
3251
- end?: string | null;
3252
- limit?: number;
3253
- }): Promise<S['SessionSearchResponse']>;
3254
2966
  /**
3255
2967
  * Send Session Message
3256
2968
  *
3257
2969
  * Send a message to a session.
3258
2970
  *
3259
- * 409 for mention, non-interactive, closed, and out-of-budget
3260
- * sessions. Returns the created message and its turn; a retried send
3261
- * with the same idempotency_key returns the original ones.
2971
+ * 409 for mention, non-interactive, closed, archived, and
2972
+ * out-of-budget sessions. Returns the created message; a retried send with the
2973
+ * same idempotency_key returns the original one. The message is
2974
+ * answered once the session's status is `idle` or `closed`.
3262
2975
  *
3263
2976
  * Required permissions: write:sessions.
3264
2977
  * API key: Supported.
@@ -3325,11 +3038,11 @@ declare class EllipsisSessions {
3325
3038
  /**
3326
3039
  * Stop Session
3327
3040
  *
3328
- * Stop the turn in progress and return the session.
3041
+ * Stop the session's work and return it.
3329
3042
  *
3330
- * The turn ends `stopped`; the conversation stays open. 409 when no
3331
- * turn is queued, preparing, or running. The stopping user is recorded only
3332
- * when the caller's credential maps to a GitHub account.
3043
+ * The running message ends `stopped` and every queued message is
3044
+ * cancelled, so the session goes `idle` (or `closed` when it was
3045
+ * not interactive). 409 when the session is idle or closed already.
3333
3046
  *
3334
3047
  * Required permissions: write:sessions.
3335
3048
  * API key: Supported.
@@ -3358,8 +3071,18 @@ declare class EllipsisSessions {
3358
3071
  * Set archived to true to record the current server time and the
3359
3072
  * authenticated GitHub user. API-key requests record no user.
3360
3073
  * Repeated archive requests preserve the original time and user.
3361
- * Set archived to false to clear both fields. Archiving is available
3362
- * in any session state and does not stop a running session.
3074
+ * Archiving stops the message in progress. An archived session takes
3075
+ * no messages (409 `session_archived`), and a reply on the Slack
3076
+ * thread, pull request, issue, or Linear issue it answers starts a
3077
+ * new session. A session is also archived when it closes and after
3078
+ * the account's `archive_inactive_sessions_days` without a message.
3079
+ * When the account sets session log retention, the session's
3080
+ * records, messages, and prompt are deleted that many days after it
3081
+ * was archived (`archived.deletes_at`). The session itself stays.
3082
+ *
3083
+ * Set archived to false to clear both fields and let the session
3084
+ * take messages again. 409 `session_superseded` when a newer session
3085
+ * now answers the same thread.
3363
3086
  *
3364
3087
  * Changes are delivered to session and session-list streams.
3365
3088
  *
@@ -3378,51 +3101,6 @@ declare class EllipsisSessions {
3378
3101
  /** A handle over an existing session. */
3379
3102
  handle(sessionId: string): Promise<SessionHandle>;
3380
3103
  }
3381
- declare class EllipsisSupportSlack {
3382
- private readonly transport;
3383
- constructor(transport: Transport);
3384
- /**
3385
- * Request Slack Help
3386
- *
3387
- * Required permissions: write:account.
3388
- * API key: Requires a CLI user token.
3389
- * CLI user token: Supported.
3390
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3391
- * Higher permission levels include lower levels: read < write < delete.
3392
- */
3393
- create(options: {
3394
- emails: (string)[];
3395
- resend?: boolean;
3396
- }): Promise<S['SlackHelpResponse']>;
3397
- /**
3398
- * Get Slack Help
3399
- *
3400
- * Required permissions: read:account.
3401
- * API key: Supported.
3402
- * CLI user token: Supported.
3403
- * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
3404
- * Higher permission levels include lower levels: read < write < delete.
3405
- */
3406
- get(): Promise<void>;
3407
- /**
3408
- * Invite To Slack Help
3409
- *
3410
- * Required permissions: write:account.
3411
- * API key: Requires a CLI user token.
3412
- * CLI user token: Supported.
3413
- * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3414
- * Higher permission levels include lower levels: read < write < delete.
3415
- */
3416
- invite(options: {
3417
- emails: (string)[];
3418
- resend?: boolean;
3419
- }): Promise<S['SlackHelpResponse']>;
3420
- }
3421
- declare class EllipsisSupport {
3422
- private readonly transport;
3423
- readonly slack: EllipsisSupportSlack;
3424
- constructor(transport: Transport);
3425
- }
3426
3104
  declare class EllipsisUserTokens {
3427
3105
  private readonly transport;
3428
3106
  constructor(transport: Transport);
@@ -3718,7 +3396,6 @@ declare class Ellipsis {
3718
3396
  readonly account: EllipsisAccount;
3719
3397
  readonly agents: EllipsisAgents;
3720
3398
  readonly alerts: EllipsisAlerts;
3721
- readonly analytics: EllipsisAnalytics;
3722
3399
  readonly auth: EllipsisAuth;
3723
3400
  readonly environments: EllipsisEnvironments;
3724
3401
  readonly handlers: EllipsisHandlers;
@@ -3726,7 +3403,6 @@ declare class Ellipsis {
3726
3403
  readonly reviews: EllipsisReviews;
3727
3404
  readonly secrets: EllipsisSecrets;
3728
3405
  readonly sessions: EllipsisSessions;
3729
- readonly support: EllipsisSupport;
3730
3406
  readonly user: EllipsisUser;
3731
3407
  readonly vmExecutions: EllipsisVmExecutions;
3732
3408
  readonly vmImages: EllipsisVmImages;
@@ -3781,4 +3457,4 @@ declare class RateLimitError extends APIError {
3781
3457
  declare class ServerError extends APIError {
3782
3458
  }
3783
3459
 
3784
- export { APIError, type AgentListStreamMessage, AuthenticationError, type CollectionStreamFrame, type CollectionStreamHeartbeat, ConflictError, DEFAULT_BASE_URL, Ellipsis, EllipsisError, ForbiddenError, NotFoundError, Page, RateLimitError, type SandboxSnapshotFrame, type SandboxUpdateFrame, ServerError, SessionHandle, type SessionListStreamMessage, Transport, TransportError, type TransportOptions, UnprocessableError, components, isTurnFinal };
3460
+ export { APIError, type AgentListStreamMessage, AuthenticationError, type CollectionStreamFrame, type CollectionStreamHeartbeat, ConflictError, DEFAULT_BASE_URL, Ellipsis, EllipsisError, ForbiddenError, NotFoundError, Page, RateLimitError, type SandboxSnapshotFrame, type SandboxUpdateFrame, ServerError, SessionHandle, type SessionListStreamMessage, Transport, TransportError, type TransportOptions, UnprocessableError, components, isSessionSettled };