@ellipsis-dev/sdk 0.10.0 → 0.11.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-BME-7Lbt.js';
2
- export { A as AttributionType, B as BudgetSource, C as CreateReviewRequest, D as DefaultResolution, a as DeltaFrame, b as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, d as GithubAccountType, H as Harness, e as HeartbeatFrame, P as ParentKind, f as PromptBlockedReason, R as RecordsAppendFrame, g as ResolvedReviewScope, h as Review, i as ReviewConfiguration, j as ReviewCounters, k as ReviewFinding, l as ReviewRequester, m as ReviewScope, n as ReviewScopeKind, o as ReviewStage, p as ReviewedCommit, q as ReviewsListResponse, S as SendSessionMessageRequest, r as Session, s as SessionExecution, t as SessionExecutionsListResponse, u as SessionExitStatus, v as SessionFrame, w as SessionLiveness, x as SessionMessage, y as SessionMessageResponse, z as SessionMessageStatus, I as SessionPr, J as SessionPrompting, K as SessionRecord, L as SessionRecordsListResponse, M as SessionResponse, N as SessionSource, O as SessionState, Q as SessionStatus, T as SessionStreamFrame, U as SessionSurface, V as SessionsListResponse, W as SnapshotFrame, X as StreamFrame, Y as TokensInfo, Z as paths } from './types-BME-7Lbt.js';
1
+ import { c as components } from './types-DDQQ1Yfh.js';
2
+ export { A as AttributionType, B as BudgetSource, C as CreateReviewRequest, D as DefaultResolution, a as DeltaFrame, b as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, d as GithubAccountType, H as Harness, e as HeartbeatFrame, P as ParentKind, f as PromptBlockedReason, R as RecordsAppendFrame, g as ResolvedReviewScope, h as Review, i as ReviewConfiguration, j as ReviewCounters, k as ReviewFinding, l as ReviewRequester, m as ReviewScope, n as ReviewScopeKind, o as ReviewStage, p as ReviewedCommit, q as ReviewsListResponse, S as SendSessionMessageRequest, r as Session, s as SessionExecution, t as SessionExecutionsListResponse, u as SessionExitStatus, v as SessionFrame, w as SessionLiveness, x as SessionMessage, y as SessionMessageResponse, z as SessionMessageStatus, I as SessionPr, J as SessionPrompting, K as SessionRecord, L as SessionRecordsListResponse, M as SessionResponse, N as SessionSource, O as SessionState, Q as SessionStatus, T as SessionStreamFrame, U as SessionSurface, V as SessionsListResponse, W as SnapshotFrame, X as StreamFrame, Y as TokensInfo, Z as paths } from './types-DDQQ1Yfh.js';
3
3
 
4
4
  interface CursorResponse {
5
5
  has_more: boolean;
@@ -75,32 +75,83 @@ declare class EllipsisAgentsConfigs {
75
75
  /**
76
76
  * Create Agent Config
77
77
  *
78
- * Create an agent config via pull request.
78
+ * Create an agent config.
79
79
  *
80
- * The PR adds the config file to agents/ on the target
81
- * repository; the agent goes live when it merges.
80
+ * Name a repository and Ellipsis opens a pull request adding the
81
+ * config file to agents/ there; the agent goes live when it
82
+ * merges. Omit it and the agent is created here, with no file,
83
+ * live immediately — and every file reference in it must name the
84
+ * repository it lives in.
82
85
  *
83
86
  * Accepts an inline config or a gallery template slug. 409 when
84
87
  * another live agent already holds the name.
85
88
  */
86
- create(options: {
89
+ create(options?: {
87
90
  config?: S['AgentConfig'] | null;
88
91
  path?: string | null;
89
- repository: string;
92
+ repository?: string | null;
90
93
  template_id?: string | null;
91
94
  }): Promise<S['CreateAgentConfigResponse']>;
95
+ /**
96
+ * Delete Agent Config
97
+ *
98
+ * Delete an agent, by id or by the agent's name.
99
+ *
100
+ * The agent stops running and its name is freed immediately; its
101
+ * past sessions remain readable. Only for agents managed through
102
+ * this API — delete the file to remove one defined by a
103
+ * repository.
104
+ */
105
+ delete(config_id: string): Promise<void>;
92
106
  /**
93
107
  * Get Agent Config
94
108
  *
95
109
  * Return one saved agent config, by id or by the agent's name.
96
110
  */
97
111
  get(config_id: string): Promise<S['AgentConfigResponse']>;
112
+ /**
113
+ * Link Agent Config
114
+ *
115
+ * Move an agent into a repository, by id or by the agent's name.
116
+ *
117
+ * Opens a pull request adding the agent's config file. The agent
118
+ * keeps running unchanged meanwhile; merging hands it over to the
119
+ * file, after which the file is what changes it. Nothing happens
120
+ * if the pull request is never merged.
121
+ */
122
+ link(config_id: string, options: {
123
+ path?: string | null;
124
+ repository: string;
125
+ }): Promise<S['LinkAgentConfigResponse']>;
98
126
  /**
99
127
  * List Agent Configs
100
128
  *
101
129
  * List saved agent configs.
102
130
  */
103
131
  list(): Promise<S['AgentConfigsListResponse']>;
132
+ /**
133
+ * Unlink Agent Config
134
+ *
135
+ * Take over an agent from its file, by id or by the agent's name.
136
+ *
137
+ * The file stops governing the agent immediately and further
138
+ * changes go through this API. The file is left in place, inert —
139
+ * delete it whenever you like.
140
+ */
141
+ unlink(config_id: string): Promise<S['AgentConfigResponse']>;
142
+ /**
143
+ * Update Agent Config
144
+ *
145
+ * Replace an agent's definition, by id or by the agent's name.
146
+ *
147
+ * The whole definition is replaced, and the change is live at
148
+ * once. Only for agents managed through this API: one defined by a
149
+ * repository file is a 409, since the next push to that file would
150
+ * revert the change — unlink it first to take ownership.
151
+ */
152
+ update(config_id: string, options: {
153
+ config: S['AgentConfig'];
154
+ }): Promise<S['AgentConfigResponse']>;
104
155
  }
105
156
  declare class EllipsisAgentsDefaults {
106
157
  private readonly transport;
package/dist/index.js CHANGED
@@ -249,19 +249,36 @@ var EllipsisAgentsConfigs = class {
249
249
  /**
250
250
  * Create Agent Config
251
251
  *
252
- * Create an agent config via pull request.
252
+ * Create an agent config.
253
253
  *
254
- * The PR adds the config file to agents/ on the target
255
- * repository; the agent goes live when it merges.
254
+ * Name a repository and Ellipsis opens a pull request adding the
255
+ * config file to agents/ there; the agent goes live when it
256
+ * merges. Omit it and the agent is created here, with no file,
257
+ * live immediately — and every file reference in it must name the
258
+ * repository it lives in.
256
259
  *
257
260
  * Accepts an inline config or a gallery template slug. 409 when
258
261
  * another live agent already holds the name.
259
262
  */
260
- async create(options) {
263
+ async create(options = {}) {
261
264
  const path = "/agents/configs";
262
265
  const body = buildBody({ config: options.config, path: options.path, repository: options.repository, template_id: options.template_id });
263
266
  return await this.transport.request("POST", path, { body });
264
267
  }
268
+ /**
269
+ * Delete Agent Config
270
+ *
271
+ * Delete an agent, by id or by the agent's name.
272
+ *
273
+ * The agent stops running and its name is freed immediately; its
274
+ * past sessions remain readable. Only for agents managed through
275
+ * this API — delete the file to remove one defined by a
276
+ * repository.
277
+ */
278
+ async delete(config_id) {
279
+ const path = `/agents/configs/${enc(config_id)}`;
280
+ await this.transport.request("DELETE", path);
281
+ }
265
282
  /**
266
283
  * Get Agent Config
267
284
  *
@@ -271,6 +288,21 @@ var EllipsisAgentsConfigs = class {
271
288
  const path = `/agents/configs/${enc(config_id)}`;
272
289
  return await this.transport.request("GET", path);
273
290
  }
291
+ /**
292
+ * Link Agent Config
293
+ *
294
+ * Move an agent into a repository, by id or by the agent's name.
295
+ *
296
+ * Opens a pull request adding the agent's config file. The agent
297
+ * keeps running unchanged meanwhile; merging hands it over to the
298
+ * file, after which the file is what changes it. Nothing happens
299
+ * if the pull request is never merged.
300
+ */
301
+ async link(config_id, options) {
302
+ const path = `/agents/configs/${enc(config_id)}/link`;
303
+ const body = buildBody({ path: options.path, repository: options.repository });
304
+ return await this.transport.request("POST", path, { body });
305
+ }
274
306
  /**
275
307
  * List Agent Configs
276
308
  *
@@ -280,6 +312,34 @@ var EllipsisAgentsConfigs = class {
280
312
  const path = "/agents/configs";
281
313
  return await this.transport.request("GET", path);
282
314
  }
315
+ /**
316
+ * Unlink Agent Config
317
+ *
318
+ * Take over an agent from its file, by id or by the agent's name.
319
+ *
320
+ * The file stops governing the agent immediately and further
321
+ * changes go through this API. The file is left in place, inert —
322
+ * delete it whenever you like.
323
+ */
324
+ async unlink(config_id) {
325
+ const path = `/agents/configs/${enc(config_id)}/unlink`;
326
+ return await this.transport.request("POST", path);
327
+ }
328
+ /**
329
+ * Update Agent Config
330
+ *
331
+ * Replace an agent's definition, by id or by the agent's name.
332
+ *
333
+ * The whole definition is replaced, and the change is live at
334
+ * once. Only for agents managed through this API: one defined by a
335
+ * repository file is a 409, since the next push to that file would
336
+ * revert the change — unlink it first to take ownership.
337
+ */
338
+ async update(config_id, options) {
339
+ const path = `/agents/configs/${enc(config_id)}`;
340
+ const body = buildBody({ config: options.config });
341
+ return await this.transport.request("PUT", path, { body });
342
+ }
283
343
  };
284
344
  var EllipsisAgentsDefaults = class {
285
345
  constructor(transport) {
@@ -1,4 +1,4 @@
1
- import { K as SessionRecord, r as Session, x as SessionMessage, X as StreamFrame } from '../types-BME-7Lbt.js';
1
+ import { K as SessionRecord, r as Session, x as SessionMessage, X as StreamFrame } from '../types-DDQQ1Yfh.js';
2
2
 
3
3
  interface ChatToolNode {
4
4
  key: string;
@@ -1,4 +1,4 @@
1
- import { X as StreamFrame, r as Session } from '../types-BME-7Lbt.js';
1
+ import { X as StreamFrame, r as Session } from '../types-DDQQ1Yfh.js';
2
2
 
3
3
  declare const SESSION_STREAM_PROTOCOL_VERSION = 3;
4
4
  declare const WS_CLOSE_NORMAL = 1000;