@ellipsis-dev/sdk 0.35.0 → 0.37.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 +56 -175
- package/dist/index.js +38 -82
- package/dist/store/index.d.ts +14 -25
- package/dist/store/index.js +228 -284
- package/dist/stream/index.d.ts +2 -3
- package/dist/stream/index.js +11 -22
- package/dist/{types-BrLpRRde.d.ts → types-BXbnHOQe.d.ts} +844 -1555
- package/package.json +1 -1
- package/schema/collection_frames.schema.json +87 -211
- package/schema/frames.schema.json +842 -1496
- package/schema/lifecycle.schema.json +389 -150
- package/schema/openapi.v1.json +761 -1619
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as components } from './types-
|
|
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
|
|
1
|
+
import { c as components } from './types-BXbnHOQe.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 LinearIssueEvent, bq as LlmCost, br as LlmCostSplit, bs as McpRemoteServer, bt as McpServerRef, bu as McpStdioServer, bv as MemorySize, bw as MessageEndedPayload, bx as MessageEndedRecord, by as MessageQueuedPayload, bz as MessageQueuedRecord, bA as MessageRecord, bB as MessageRequeuedPayload, bC as MessageRequeuedRecord, bD as MessageStartedPayload, bE as MessageStartedRecord, bF as ModelLlmCostSplit, bG as ModelTokenCounts, bH as OutputConfig, bI as PermissionsConfig, bJ as PermissionsConfig1, bK as PlatformSessionRecord, bL as PromptBlockedReason, bM as PullRequestAction, bN as ReactCheckRun, bO as ReactCheckSuite, bP as ReactIssue, bQ as ReactLinearIssue, bR as ReactPullRequest, bS as ReactPush, bT as ReactRelease, bU as ReactSentry, bV as ReactSlackChannel, bW as ReactStatus, bX as ReactTrigger, bY as ReactWorkflowRun, bZ as RecordsFrame, b_ as ReleaseAction, b$ as RepositoryFilter, c0 as RepositoryRef, c1 as Review, c2 as ReviewComment, c3 as ReviewConfig, c4 as ReviewConfigsListResponse, c5 as ReviewPullRequest, c6 as ReviewPullRequestAuthor, c7 as ReviewReviewer, c8 as ReviewSummary, c9 as ReviewsListResponse, ca as SdkAssistantRecord, cb as SdkCacheCreation, cc as SdkContentBlock, cd as SdkRateLimitRecord, ce as SdkRecord, cf as SdkResultRecord, cg as SdkServerToolResultBlock, ch as SdkServerToolUseBlock, ci as SdkSystemRecord, cj as SdkTextBlock, ck as SdkThinkingBlock, cl as SdkToolResultBlock, cm as SdkToolUseBlock, cn as SdkUserRecord, co as SendSessionMessageRequest, cp as SentryAction, cq as SentryAlertEvent, cr as Session, cs as SessionAgent, ct as SessionArchived, cu as SessionAttribution, cv as SessionClosedPayload, cw as SessionClosedRecord, cx as SessionConfig, cy as SessionConversation, cz as SessionConversationConfig, cA as SessionEnvironment, cB as SessionError, cC as SessionEventActor, cD as SessionFrame, cE as SessionGit, cF as SessionGitCommit, cG as SessionGitFile, cH as SessionGitPr, cI as SessionGitRepo, cJ as SessionHandler, cK as SessionMessage, cL as SessionMessageImage, cM as SessionMessageResponse, cN as SessionOutput, cO as SessionParent, cP as SessionPrompting, cQ as SessionRecord, cR as SessionRecordsListResponse, cS as SessionResponse, cT as SessionSource, cU as SessionStatus, cV as SessionStreamFrame, cW as SessionSummary, cX as SessionsListResponse, cY as SettingsRef, cZ as SkillRef, c_ as SlackChannelCreatedEvent, c$ as SlackMessageEvent, d0 as StatusAction, d1 as StreamFrame, d2 as TokenCounts, d3 as Tokens, d4 as Tokens1, d5 as TokensInfo, d6 as UnknownSessionRecord, d7 as UpdateSessionRequest, d8 as WorkflowRunAction, d9 as paths } from './types-BXbnHOQe.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
|
|
11
|
+
* `session` frames; REST and stream never disagree about what a
|
|
12
12
|
* session looks like.
|
|
13
13
|
*/
|
|
14
14
|
type Session = {
|
|
@@ -40,6 +40,10 @@ type Session = {
|
|
|
40
40
|
*/
|
|
41
41
|
created_at: string;
|
|
42
42
|
environment: SessionEnvironment;
|
|
43
|
+
/**
|
|
44
|
+
* Why the last message failed, was stopped, or was cancelled; null otherwise.
|
|
45
|
+
*/
|
|
46
|
+
error: SessionError | null;
|
|
43
47
|
/**
|
|
44
48
|
* The typed external event that started the session; null for direct and scheduled starts.
|
|
45
49
|
*/
|
|
@@ -67,7 +71,7 @@ type Session = {
|
|
|
67
71
|
[k: string]: string;
|
|
68
72
|
};
|
|
69
73
|
/**
|
|
70
|
-
* The session's structured output: the `json_schema` the agent must satisfy and, once
|
|
74
|
+
* The session's structured output: the `json_schema` the agent must satisfy and, once the agent has submitted it, the `result`.
|
|
71
75
|
*/
|
|
72
76
|
output: SessionOutput | null;
|
|
73
77
|
/**
|
|
@@ -80,15 +84,12 @@ type Session = {
|
|
|
80
84
|
*/
|
|
81
85
|
skills: SkillRef[];
|
|
82
86
|
source: SessionSource;
|
|
87
|
+
status: SessionStatus;
|
|
83
88
|
/**
|
|
84
89
|
* The latest live summary of the session's progress while it runs, and when it was generated.
|
|
85
90
|
*/
|
|
86
91
|
summary: SessionSummary | null;
|
|
87
92
|
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
93
|
/**
|
|
93
94
|
* When the session was last updated.
|
|
94
95
|
*/
|
|
@@ -217,10 +218,6 @@ type AttributionType = 'github_user' | 'linear_user' | 'slack_user' | 'api_key';
|
|
|
217
218
|
* Why direct prompting is refused. Absent when prompting is allowed.
|
|
218
219
|
*/
|
|
219
220
|
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';
|
|
224
221
|
/**
|
|
225
222
|
* How a session's environment was chosen. None (the field is nullable)
|
|
226
223
|
* when the config carried an inline environment block and no resolution ran —
|
|
@@ -230,6 +227,10 @@ type SessionState = 'open' | 'closed';
|
|
|
230
227
|
* how it was chosen, and is null for the built-in basic environment.
|
|
231
228
|
*/
|
|
232
229
|
type EnvironmentSource = 'request' | 'agent' | 'repo_default' | 'account_default' | 'platform_default';
|
|
230
|
+
/**
|
|
231
|
+
* What went wrong.
|
|
232
|
+
*/
|
|
233
|
+
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
234
|
/**
|
|
234
235
|
* The service the handler responds to.
|
|
235
236
|
*/
|
|
@@ -239,13 +240,9 @@ type HandlerService = 'slack' | 'github' | 'linear' | 'sentry';
|
|
|
239
240
|
*/
|
|
240
241
|
type SessionSource = 'react' | 'code_review' | 'web' | 'api' | 'cli' | 'mention' | 'cron';
|
|
241
242
|
/**
|
|
242
|
-
*
|
|
243
|
-
*/
|
|
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';
|
|
245
|
-
/**
|
|
246
|
-
* Where the turn is.
|
|
243
|
+
* 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.
|
|
247
244
|
*/
|
|
248
|
-
type
|
|
245
|
+
type SessionStatus = 'queued' | 'preparing' | 'running' | 'idle' | 'closed';
|
|
249
246
|
/**
|
|
250
247
|
* 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
248
|
*/
|
|
@@ -374,7 +371,7 @@ interface ClaudeConfig {
|
|
|
374
371
|
*/
|
|
375
372
|
model: string;
|
|
376
373
|
/**
|
|
377
|
-
* The initial user message, passed verbatim. Omit to start an interactive session with no
|
|
374
|
+
* The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.
|
|
378
375
|
*/
|
|
379
376
|
prompt: string | null;
|
|
380
377
|
settings: SettingsRef | null;
|
|
@@ -399,7 +396,7 @@ interface RepositoryRef {
|
|
|
399
396
|
*/
|
|
400
397
|
interface CodexConfig {
|
|
401
398
|
/**
|
|
402
|
-
* Reasoning effort for every
|
|
399
|
+
* Reasoning effort for every message. Omit to use the model default.
|
|
403
400
|
*/
|
|
404
401
|
effort: CodexEffortLevel | null;
|
|
405
402
|
/**
|
|
@@ -407,7 +404,7 @@ interface CodexConfig {
|
|
|
407
404
|
*/
|
|
408
405
|
model: string;
|
|
409
406
|
/**
|
|
410
|
-
* The initial user message, passed verbatim. Omit to start an interactive session with no
|
|
407
|
+
* The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.
|
|
411
408
|
*/
|
|
412
409
|
prompt: string | null;
|
|
413
410
|
}
|
|
@@ -416,7 +413,7 @@ interface CodexConfig {
|
|
|
416
413
|
*/
|
|
417
414
|
interface SessionConversationConfig {
|
|
418
415
|
/**
|
|
419
|
-
* Whether the session stays open after its first
|
|
416
|
+
* 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
417
|
*/
|
|
421
418
|
interactive: boolean;
|
|
422
419
|
}
|
|
@@ -610,7 +607,7 @@ interface GeminiConfig {
|
|
|
610
607
|
*/
|
|
611
608
|
model: string;
|
|
612
609
|
/**
|
|
613
|
-
* The initial user message, passed verbatim. Omit to start an interactive session with no
|
|
610
|
+
* The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.
|
|
614
611
|
*/
|
|
615
612
|
prompt: string | null;
|
|
616
613
|
}
|
|
@@ -887,11 +884,10 @@ interface SessionAttribution {
|
|
|
887
884
|
*/
|
|
888
885
|
interface SessionConversation {
|
|
889
886
|
/**
|
|
890
|
-
* Whether the session stays open after its first
|
|
887
|
+
* Whether the session stays open after its first message is answered.
|
|
891
888
|
*/
|
|
892
889
|
interactive: boolean;
|
|
893
890
|
prompting: SessionPrompting;
|
|
894
|
-
state: SessionState;
|
|
895
891
|
/**
|
|
896
892
|
* 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
893
|
*/
|
|
@@ -1069,6 +1065,17 @@ interface EnvironmentHooks1 {
|
|
|
1069
1065
|
*/
|
|
1070
1066
|
validate: EnvironmentScript | string | null;
|
|
1071
1067
|
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Why the last message failed, was stopped, or was cancelled. Cleared
|
|
1070
|
+
* when the next message starts.
|
|
1071
|
+
*/
|
|
1072
|
+
interface SessionError {
|
|
1073
|
+
/**
|
|
1074
|
+
* A human-readable explanation.
|
|
1075
|
+
*/
|
|
1076
|
+
detail: string | null;
|
|
1077
|
+
reason: ErrorReason;
|
|
1078
|
+
}
|
|
1072
1079
|
interface GithubPullRequestEvent {
|
|
1073
1080
|
action: PullRequestAction | 'review_commented';
|
|
1074
1081
|
actor: SessionEventActor | null;
|
|
@@ -1274,9 +1281,9 @@ interface SessionHandler {
|
|
|
1274
1281
|
sha: string;
|
|
1275
1282
|
}
|
|
1276
1283
|
/**
|
|
1277
|
-
* Structured output on the wire: the contract and, when
|
|
1284
|
+
* Structured output on the wire: the contract and, when the agent has
|
|
1278
1285
|
* submitted one, the payload. `result` is None while the session runs and
|
|
1279
|
-
* when
|
|
1286
|
+
* when the agent submitted nothing; it is the agent's own JSON, in the
|
|
1280
1287
|
* shape of `json_schema`.
|
|
1281
1288
|
*/
|
|
1282
1289
|
interface SessionOutput {
|
|
@@ -1287,7 +1294,7 @@ interface SessionOutput {
|
|
|
1287
1294
|
[k: string]: unknown;
|
|
1288
1295
|
};
|
|
1289
1296
|
/**
|
|
1290
|
-
* The payload the agent submitted, or null until
|
|
1297
|
+
* The payload the agent submitted, or null until it submits one.
|
|
1291
1298
|
*/
|
|
1292
1299
|
result: {
|
|
1293
1300
|
[k: string]: unknown;
|
|
@@ -1387,98 +1394,6 @@ interface ModelTokenCounts {
|
|
|
1387
1394
|
*/
|
|
1388
1395
|
total: number;
|
|
1389
1396
|
}
|
|
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
1397
|
interface AgentListStreamMessage {
|
|
1483
1398
|
agents: Agent[];
|
|
1484
1399
|
type: 'agents';
|
|
@@ -1684,7 +1599,8 @@ declare class Page<ItemT, ResponseT extends CursorResponse> implements AsyncIter
|
|
|
1684
1599
|
}
|
|
1685
1600
|
|
|
1686
1601
|
type S$1 = components['schemas'];
|
|
1687
|
-
declare function
|
|
1602
|
+
declare function isSessionSettled(status: string): boolean;
|
|
1603
|
+
type MessageEnded = S$1['MessageEndedPayload'];
|
|
1688
1604
|
interface SessionsApi {
|
|
1689
1605
|
get(sessionId: string): Promise<S$1['SessionResponse']>;
|
|
1690
1606
|
stop(sessionId: string): Promise<S$1['SessionResponse']>;
|
|
@@ -1693,21 +1609,23 @@ interface SessionsApi {
|
|
|
1693
1609
|
images?: S$1['ImageAttachment'][];
|
|
1694
1610
|
idempotency_key?: string | null;
|
|
1695
1611
|
}): Promise<S$1['SessionMessageResponse']>;
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1612
|
+
records(sessionId: string, options?: {
|
|
1613
|
+
cursor?: string | null;
|
|
1614
|
+
limit?: number | null;
|
|
1615
|
+
message_id?: string | null;
|
|
1616
|
+
}): Promise<Page<S$1['SessionRecord'], S$1['SessionRecordsListResponse']>>;
|
|
1699
1617
|
}
|
|
1700
1618
|
declare class SessionHandle {
|
|
1701
1619
|
private readonly sessions;
|
|
1702
1620
|
readonly id: string;
|
|
1703
1621
|
session: S$1['Session'];
|
|
1704
|
-
|
|
1622
|
+
messageId: string | null;
|
|
1705
1623
|
constructor(sessions: SessionsApi, session: S$1['Session']);
|
|
1706
1624
|
refresh(): Promise<S$1['Session']>;
|
|
1707
1625
|
wait(options?: {
|
|
1708
1626
|
timeoutMs?: number;
|
|
1709
1627
|
pollIntervalMs?: number;
|
|
1710
|
-
}): Promise<
|
|
1628
|
+
}): Promise<MessageEnded | null>;
|
|
1711
1629
|
send(message: string, options?: {
|
|
1712
1630
|
images?: S$1['ImageAttachment'][];
|
|
1713
1631
|
idempotencyKey?: string;
|
|
@@ -2997,46 +2915,8 @@ declare class EllipsisSecrets {
|
|
|
2997
2915
|
secrets: (S['SecretInput'])[];
|
|
2998
2916
|
}): Promise<S['SecretsListResponse']>;
|
|
2999
2917
|
}
|
|
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
2918
|
declare class EllipsisSessions {
|
|
3038
2919
|
private readonly transport;
|
|
3039
|
-
readonly turns: EllipsisSessionsTurns;
|
|
3040
2920
|
constructor(transport: Transport);
|
|
3041
2921
|
/**
|
|
3042
2922
|
* Get Session Analytics
|
|
@@ -3164,8 +3044,7 @@ declare class EllipsisSessions {
|
|
|
3164
3044
|
* List cloud agent sessions, newest first.
|
|
3165
3045
|
*
|
|
3166
3046
|
* Optionally filtered by agent (id or name), source, service, handler, time
|
|
3167
|
-
* window, attributed author, repository, and
|
|
3168
|
-
* still going.
|
|
3047
|
+
* window, attributed author, repository, and status.
|
|
3169
3048
|
*
|
|
3170
3049
|
* Required permissions: read:sessions.
|
|
3171
3050
|
* API key: Supported.
|
|
@@ -3186,7 +3065,7 @@ declare class EllipsisSessions {
|
|
|
3186
3065
|
cursor?: string | null;
|
|
3187
3066
|
author_id?: number | null;
|
|
3188
3067
|
repo?: string | null;
|
|
3189
|
-
|
|
3068
|
+
status?: (S['SessionStatus'])[] | null;
|
|
3190
3069
|
}): Promise<Page<S['Session'], S['SessionsListResponse']>>;
|
|
3191
3070
|
/**
|
|
3192
3071
|
* Get Session Metrics
|
|
@@ -3225,6 +3104,7 @@ declare class EllipsisSessions {
|
|
|
3225
3104
|
records(id: string, options?: {
|
|
3226
3105
|
cursor?: string | null;
|
|
3227
3106
|
limit?: number | null;
|
|
3107
|
+
message_id?: string | null;
|
|
3228
3108
|
}): Promise<Page<S['SessionRecord'], S['SessionRecordsListResponse']>>;
|
|
3229
3109
|
/**
|
|
3230
3110
|
* Search Sessions
|
|
@@ -3246,7 +3126,7 @@ declare class EllipsisSessions {
|
|
|
3246
3126
|
agent_id?: (string)[] | null;
|
|
3247
3127
|
session_ids?: (string)[] | null;
|
|
3248
3128
|
repo?: (string)[] | null;
|
|
3249
|
-
status?: (S['
|
|
3129
|
+
status?: (S['SessionStatus'])[] | null;
|
|
3250
3130
|
start?: string | null;
|
|
3251
3131
|
end?: string | null;
|
|
3252
3132
|
limit?: number;
|
|
@@ -3257,8 +3137,9 @@ declare class EllipsisSessions {
|
|
|
3257
3137
|
* Send a message to a session.
|
|
3258
3138
|
*
|
|
3259
3139
|
* 409 for mention, non-interactive, closed, and out-of-budget
|
|
3260
|
-
* sessions. Returns the created message
|
|
3261
|
-
*
|
|
3140
|
+
* sessions. Returns the created message; a retried send with the
|
|
3141
|
+
* same idempotency_key returns the original one. The message is
|
|
3142
|
+
* answered once the session's status is `idle` or `closed`.
|
|
3262
3143
|
*
|
|
3263
3144
|
* Required permissions: write:sessions.
|
|
3264
3145
|
* API key: Supported.
|
|
@@ -3325,11 +3206,11 @@ declare class EllipsisSessions {
|
|
|
3325
3206
|
/**
|
|
3326
3207
|
* Stop Session
|
|
3327
3208
|
*
|
|
3328
|
-
* Stop the
|
|
3209
|
+
* Stop the session's work and return it.
|
|
3329
3210
|
*
|
|
3330
|
-
* The
|
|
3331
|
-
*
|
|
3332
|
-
* when the
|
|
3211
|
+
* The running message ends `stopped` and every queued message is
|
|
3212
|
+
* cancelled, so the session goes `idle` (or `closed` when it was
|
|
3213
|
+
* not interactive). 409 when the session is idle or closed already.
|
|
3333
3214
|
*
|
|
3334
3215
|
* Required permissions: write:sessions.
|
|
3335
3216
|
* API key: Supported.
|
|
@@ -3781,4 +3662,4 @@ declare class RateLimitError extends APIError {
|
|
|
3781
3662
|
declare class ServerError extends APIError {
|
|
3782
3663
|
}
|
|
3783
3664
|
|
|
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,
|
|
3665
|
+
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 };
|