@ellipsis-dev/sdk 0.18.0 → 0.20.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-BLSh1Px1.js';
2
- export { A as AgentConfigSource, a as AttributionType, B as BudgetSource, C as ClaudeSessionRecord, b as CodexEvent, d as CodexItem, e as CodexSessionRecord, f as CreateReviewRequest, D as DeltaFrame, g as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, h as GithubAccountType, H as Harness, i as HeartbeatFrame, L as LifecycleSessionRecord, P as ParentKind, j as PromptBlockedReason, R as RecordsAppendFrame, k as ResolvedReviewScope, l as Review, m as ReviewConfiguration, n as ReviewCounters, o as ReviewFinding, p as ReviewRequester, q as ReviewScope, r as ReviewScopeKind, s as ReviewStage, t as ReviewedCommit, u as ReviewsListResponse, S as SdkAssistantRecord, v as SdkContentBlock, w as SdkRateLimitRecord, x as SdkRecord, y as SdkResultRecord, z as SdkSystemRecord, I as SdkUserRecord, J as SendSessionMessageRequest, K as Session, M as SessionExecution, N as SessionExecutionsListResponse, O as SessionExitStatus, Q as SessionFrame, T as SessionGit, U as SessionLiveness, V as SessionMessage, W as SessionMessageResponse, X as SessionMessageStatus, Y as SessionPrompting, Z as SessionRecord, _ as SessionRecordsListResponse, $ as SessionResponse, a0 as SessionSource, a1 as SessionState, a2 as SessionStatus, a3 as SessionStreamFrame, a4 as SessionSurface, a5 as SessionsListResponse, a6 as SnapshotFrame, a7 as StreamFrame, a8 as TokensInfo, a9 as paths } from './types-BLSh1Px1.js';
1
+ import { c as components } from './types-D2YZTvgg.js';
2
+ export { A as AgentConfigSource, a as AttributionType, B as BudgetSource, C as ClaudeSessionRecord, b as CodexEvent, d as CodexItem, e as CodexSessionRecord, f as CreateReviewRequest, D as DeltaFrame, g as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, h as GithubAccountType, H as Harness, i as HeartbeatFrame, L as LifecycleSessionRecord, P as ParentKind, j as PromptBlockedReason, R as RecordsAppendFrame, k as ResolvedReviewScope, l as Review, m as ReviewConfiguration, n as ReviewCounters, o as ReviewFinding, p as ReviewRequester, q as ReviewScope, r as ReviewScopeKind, s as ReviewStage, t as ReviewedCommit, u as ReviewsListResponse, S as SdkAssistantRecord, v as SdkContentBlock, w as SdkRateLimitRecord, x as SdkRecord, y as SdkResultRecord, z as SdkSystemRecord, I as SdkUserRecord, J as SendSessionMessageRequest, K as Session, M as SessionExecution, N as SessionExecutionsListResponse, O as SessionExitStatus, Q as SessionFrame, T as SessionGit, U as SessionLiveness, V as SessionMessage, W as SessionMessageResponse, X as SessionMessageStatus, Y as SessionPrompting, Z as SessionRecord, _ as SessionRecordsListResponse, $ as SessionResponse, a0 as SessionSource, a1 as SessionState, a2 as SessionStatus, a3 as SessionStreamFrame, a4 as SessionSurface, a5 as SessionsListResponse, a6 as SnapshotFrame, a7 as StreamFrame, a8 as TokensInfo, a9 as paths } from './types-D2YZTvgg.js';
3
3
 
4
4
  interface CursorResponse {
5
5
  has_more: boolean;
@@ -69,107 +69,6 @@ declare class Transport {
69
69
  }
70
70
 
71
71
  type S = components['schemas'];
72
- declare class EllipsisAgentsConfigs {
73
- private readonly transport;
74
- constructor(transport: Transport);
75
- /**
76
- * Create Agent Config
77
- *
78
- * Create an agent config, managed through the API: no file, live
79
- * immediately. To put its definition in a repository instead, create
80
- * it here and then POST /v1/agents/configs/{config_id}/link.
81
- *
82
- * 409 when another live agent already holds the name.
83
- */
84
- create(options: {
85
- config: S['AgentConfig'];
86
- }): Promise<S['AgentConfigResponse']>;
87
- /**
88
- * Delete Agent Config
89
- *
90
- * Delete an agent, by id or by the agent's name.
91
- *
92
- * The agent stops running and its name is freed immediately; its
93
- * past sessions remain readable. Only for agents managed through
94
- * this API — delete the file to remove one defined by a
95
- * repository.
96
- */
97
- delete(config_id: string): Promise<void>;
98
- /**
99
- * Get Agent Config
100
- *
101
- * Return one saved agent config, by id or by the agent's name.
102
- */
103
- get(config_id: string): Promise<S['AgentConfigResponse']>;
104
- /**
105
- * Link Agent Config
106
- *
107
- * Move an agent into a repository, by id or by the agent's name.
108
- *
109
- * Opens a pull request adding the agent's config file. The agent
110
- * keeps running unchanged meanwhile; merging hands it over to the
111
- * file, after which the file is what changes it. Nothing happens
112
- * if the pull request is never merged.
113
- */
114
- link(config_id: string, options: {
115
- path?: string | null;
116
- repository: string;
117
- }): Promise<S['LinkAgentConfigResponse']>;
118
- /**
119
- * List Agent Configs
120
- *
121
- * List saved agent configs.
122
- */
123
- list(): Promise<S['AgentConfigsListResponse']>;
124
- /**
125
- * Unlink Agent Config
126
- *
127
- * Take over an agent from its file, by id or by the agent's name.
128
- *
129
- * The file stops governing the agent immediately and further
130
- * changes go through this API. The file is left in place, inert —
131
- * delete it whenever you like.
132
- */
133
- unlink(config_id: string): Promise<S['AgentConfigResponse']>;
134
- /**
135
- * Update Agent Config
136
- *
137
- * Replace an agent's definition, by id or by the agent's name.
138
- *
139
- * The whole definition is replaced, and the change is live at
140
- * once. Only for agents managed through this API: one defined by a
141
- * repository file is a 409, since the next push to that file would
142
- * revert the change — unlink it first to take ownership.
143
- */
144
- update(config_id: string, options: {
145
- config: S['AgentConfig'];
146
- }): Promise<S['AgentConfigResponse']>;
147
- }
148
- declare class EllipsisAgentsTemplates {
149
- private readonly transport;
150
- constructor(transport: Transport);
151
- /**
152
- * Get Agent Template
153
- *
154
- * Return one built-in agent template by slug.
155
- */
156
- get(template_id: string): Promise<S['AgentTemplate']>;
157
- /**
158
- * List Agent Templates
159
- *
160
- * List the built-in starter agent templates.
161
- *
162
- * Behind auth but not account-scoped — the data is static
163
- * product content shared by the dashboard, landing site, and CLI.
164
- */
165
- list(): Promise<S['AgentTemplatesListResponse']>;
166
- }
167
- declare class EllipsisAgents {
168
- private readonly transport;
169
- readonly configs: EllipsisAgentsConfigs;
170
- readonly templates: EllipsisAgentsTemplates;
171
- constructor(transport: Transport);
172
- }
173
72
  declare class EllipsisAlerts {
174
73
  private readonly transport;
175
74
  constructor(transport: Transport);
@@ -237,15 +136,15 @@ declare class EllipsisAnalytics {
237
136
  * Return pull-request analytics.
238
137
  *
239
138
  * Windowing: pass explicit start/end, or days (default: the last
240
- * 30 days).
139
+ * 30 days). account_type in all|user|bot scopes the authors.
241
140
  */
242
141
  pullRequests(options?: {
243
142
  days?: number | null;
244
143
  start?: string | null;
245
144
  end?: string | null;
246
- account_type?: (string)[] | null;
247
- repository_id?: (number)[] | null;
248
- author_id?: (number)[] | null;
145
+ repo?: (string)[] | null;
146
+ author?: (string)[] | null;
147
+ account_type?: string;
249
148
  status?: (string)[] | null;
250
149
  }): Promise<S['GetAnalyticsPullRequestsResponse']>;
251
150
  /**
@@ -297,6 +196,98 @@ declare class EllipsisAuth {
297
196
  readonly cli: EllipsisAuthCli;
298
197
  constructor(transport: Transport);
299
198
  }
199
+ declare class EllipsisAutomations {
200
+ private readonly transport;
201
+ constructor(transport: Transport);
202
+ /**
203
+ * Create Automation
204
+ *
205
+ * Create an automation, managed through the API: no file, live
206
+ * immediately. To put its definition in a repository instead, create
207
+ * it here and then POST /v1/automations/{automation_id}/link.
208
+ *
209
+ * 409 when another live automation already holds the name.
210
+ */
211
+ create(options: {
212
+ automation: S['AgentConfig'];
213
+ }): Promise<S['AutomationResponse']>;
214
+ /**
215
+ * Delete Automation
216
+ *
217
+ * Delete an automation, by id or by name.
218
+ *
219
+ * It stops running and its name is freed immediately; its past
220
+ * sessions remain readable. Only for automations managed through
221
+ * this API — delete the file to remove one defined by a repository.
222
+ */
223
+ delete(automation_id: string): Promise<void>;
224
+ /**
225
+ * Get Automation
226
+ *
227
+ * Return one automation, by id or by name.
228
+ */
229
+ get(automation_id: string): Promise<S['AutomationResponse']>;
230
+ /**
231
+ * Link Automation
232
+ *
233
+ * Move an automation into a repository, by id or by name.
234
+ *
235
+ * Opens a pull request adding its definition file. The automation
236
+ * keeps running unchanged meanwhile; merging hands it over to the
237
+ * file, after which the file is what changes it. Nothing happens
238
+ * if the pull request is never merged.
239
+ */
240
+ link(automation_id: string, options: {
241
+ path?: string | null;
242
+ repository: string;
243
+ }): Promise<S['LinkAutomationResponse']>;
244
+ /**
245
+ * List Automations
246
+ *
247
+ * List automations.
248
+ */
249
+ list(): Promise<S['AutomationsListResponse']>;
250
+ /**
251
+ * Start Automation Session
252
+ *
253
+ * Invoke an automation.
254
+ *
255
+ * Runs the automation exactly as defined — its persona, model,
256
+ * environment, permissions, skills, and budget bind — and returns
257
+ * the session it started. The body carries only what a caller may
258
+ * supply: the typed `input` its schema demands, an optional tighter
259
+ * `budget`, and `metadata`. For a different persona or environment,
260
+ * start a raw session with POST /v1/sessions instead.
261
+ */
262
+ run(automation_id: string, options?: {
263
+ budget?: number | null;
264
+ input?: Record<string, unknown> | null;
265
+ metadata?: Record<string, string>;
266
+ }): Promise<S['SessionResponse']>;
267
+ /**
268
+ * Unlink Automation
269
+ *
270
+ * Take over an automation from its file, by id or by name.
271
+ *
272
+ * The file stops governing it immediately and further changes go
273
+ * through this API. The file is left in place, inert — delete it
274
+ * whenever you like.
275
+ */
276
+ unlink(automation_id: string): Promise<S['AutomationResponse']>;
277
+ /**
278
+ * Update Automation
279
+ *
280
+ * Replace an automation's definition, by id or by name.
281
+ *
282
+ * The whole definition is replaced, and the change is live at
283
+ * once. Only for automations managed through this API: one defined
284
+ * by a repository file is a 409, since the next push to that file
285
+ * would revert the change — unlink it first to take ownership.
286
+ */
287
+ update(automation_id: string, options: {
288
+ automation: S['AgentConfig'];
289
+ }): Promise<S['AutomationResponse']>;
290
+ }
300
291
  declare class EllipsisEnvironments {
301
292
  private readonly transport;
302
293
  constructor(transport: Transport);
@@ -483,7 +474,7 @@ declare class EllipsisIntegrations {
483
474
  *
484
475
  * A read-only view, so an agent authoring another agent's
485
476
  * config can learn which repositories, channels, teams, and
486
- * organizations it may name before POST /agents/configs.
477
+ * organizations it may name before POST /automations.
487
478
  *
488
479
  * Available to all credential types including sandbox tokens: the
489
480
  * responses never include OAuth tokens or any other secret.
@@ -734,12 +725,12 @@ declare class EllipsisSessions {
734
725
  *
735
726
  * List cloud agent sessions, newest first.
736
727
  *
737
- * Optionally filtered by config (id or `ellipsis.name`), source, time
728
+ * Optionally filtered by automation (id or name), source, time
738
729
  * window, attributed author, repository, and whether the session is
739
730
  * still going.
740
731
  */
741
732
  list(options?: {
742
- config_id?: string | null;
733
+ automation?: string | null;
743
734
  source?: (S['SessionSource'])[] | null;
744
735
  days?: number | null;
745
736
  start?: string | null;
@@ -822,23 +813,24 @@ declare class EllipsisSessions {
822
813
  *
823
814
  * Start a cloud agent session.
824
815
  *
825
- * The base is `from_config_id` (an id or an agent name) or, omitted,
826
- * the bare ad-hoc config; every AgentConfig key on the request
827
- * deep-merges on top, so the body is both the pointer and the
828
- * per-session override. `prompt` is the first message; omit it and
829
- * the session starts idle, waiting for one. 400 when
830
- * ellipsis.interactive=false and there is no prompt or input. 422
831
- * when the agent declares an input schema and the request's input
832
- * is absent or invalid.
816
+ * The daily driver: a prompt, optionally where to run it
817
+ * (`environment`) and the run's own settings, in the AgentConfig
818
+ * vocabulary. Anything omitted comes from the organization's
819
+ * settings — default model, default environment, budget — so
820
+ * `{"prompt": "..."}` alone is a complete request. `prompt` is the
821
+ * first message; omit it and the session starts idle, waiting for
822
+ * one. 400 when `interactive` is false and there is no prompt, or
823
+ * when `budget` exceeds the organization's per-session ceiling. To
824
+ * run a saved automation, use POST /v1/automations/{automation_id}/sessions.
833
825
  */
834
826
  start(options?: {
835
- budget?: S['AgentConfigBudget'] | null;
827
+ budget?: number | null;
836
828
  claude?: S['AgentConfigClaude'] | null;
837
829
  codex?: S['AgentConfigCodex'] | null;
838
- ellipsis?: S['StartSessionEllipsis'];
839
830
  environment?: string | S['AgentConfigEnvironment'] | null;
840
- from_config_id?: string | null;
841
- input?: Record<string, unknown> | null;
831
+ force_rebuild?: boolean;
832
+ interactive?: boolean;
833
+ metadata?: Record<string, string>;
842
834
  output?: S['AgentConfigOutput'] | null;
843
835
  permissions?: S['AgentConfigPermissions'] | null;
844
836
  prompt?: string | null;
@@ -858,43 +850,67 @@ declare class EllipsisSessions {
858
850
  /** A handle over an existing session. */
859
851
  handle(sessionId: string): Promise<SessionHandle>;
860
852
  }
861
- declare class EllipsisSettingsSessions {
853
+ declare class EllipsisSettingsOrganization {
862
854
  private readonly transport;
863
855
  constructor(transport: Transport);
864
856
  /**
865
- * Get Session Defaults
857
+ * Get Organization Settings
866
858
  *
867
- * Get the account-wide session defaults.
859
+ * Get the organization settings.
868
860
  *
869
- * Today one setting: the default model every session falls back to
870
- * when neither its request nor its agent config names one.
861
+ * The default model and default environment every session falls
862
+ * back to when neither its request nor its automation names one,
863
+ * and the per-session budget ceiling no session may exceed.
871
864
  */
872
- getDefaults(): Promise<S['SessionDefaults']>;
865
+ get(): Promise<S['OrganizationSettings']>;
873
866
  /**
874
- * Set Session Defaults
867
+ * Set Organization Settings
875
868
  *
876
- * Set the account-wide session defaults.
869
+ * Set the organization settings.
877
870
  *
878
- * `model` accepts an alias or canonical id and is stored canonical;
879
- * null clears it (sessions then fall back to the platform default).
871
+ * Replaces all three: `default_model` accepts an alias or canonical
872
+ * id and is stored canonical; `default_environment` accepts a name
873
+ * or `env_` id and is stored as the id; `budget_ceiling.session` is
874
+ * in US dollars, at most the platform ceiling. Null clears each.
880
875
  * Refused for sandbox tokens (potentially prompt-injected code must
881
- * not repoint the account's default model).
876
+ * not repoint the organization's defaults).
882
877
  */
883
- setDefaults(options?: {
884
- model?: string | null;
885
- }): Promise<S['SessionDefaults']>;
878
+ set(options?: {
879
+ budget_ceiling?: S['BudgetCeiling'];
880
+ default_environment?: string | null;
881
+ default_model?: string | null;
882
+ }): Promise<S['OrganizationSettings']>;
886
883
  }
887
884
  declare class EllipsisSettings {
888
885
  private readonly transport;
889
- readonly sessions: EllipsisSettingsSessions;
886
+ readonly organization: EllipsisSettingsOrganization;
887
+ constructor(transport: Transport);
888
+ }
889
+ declare class EllipsisTemplates {
890
+ private readonly transport;
890
891
  constructor(transport: Transport);
892
+ /**
893
+ * Get Agent Template
894
+ *
895
+ * Return one built-in agent template by slug.
896
+ */
897
+ get(template_id: string): Promise<S['AgentTemplate']>;
898
+ /**
899
+ * List Agent Templates
900
+ *
901
+ * List the built-in starter agent templates.
902
+ *
903
+ * Behind auth but not account-scoped — the data is static
904
+ * product content shared by the dashboard, landing site, and CLI.
905
+ */
906
+ list(): Promise<S['AgentTemplatesListResponse']>;
891
907
  }
892
908
  declare class Ellipsis {
893
909
  private readonly transport;
894
- readonly agents: EllipsisAgents;
895
910
  readonly alerts: EllipsisAlerts;
896
911
  readonly analytics: EllipsisAnalytics;
897
912
  readonly auth: EllipsisAuth;
913
+ readonly automations: EllipsisAutomations;
898
914
  readonly environments: EllipsisEnvironments;
899
915
  readonly files: EllipsisFiles;
900
916
  readonly integrations: EllipsisIntegrations;
@@ -904,6 +920,7 @@ declare class Ellipsis {
904
920
  readonly secrets: EllipsisSecrets;
905
921
  readonly sessions: EllipsisSessions;
906
922
  readonly settings: EllipsisSettings;
923
+ readonly templates: EllipsisTemplates;
907
924
  constructor(options: TransportOptions);
908
925
  /**
909
926
  * Get Budget