@ellipsis-dev/sdk 0.27.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/{chunk-RMPAMUAE.js → chunk-K252XHLI.js} +13 -3
- package/dist/index.d.ts +3069 -236
- package/dist/index.js +2032 -224
- package/dist/store/index.d.ts +54 -4
- package/dist/store/index.js +716 -127
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.js +1 -1
- package/dist/types-DrPhhfOb.d.ts +25673 -0
- package/package.json +1 -1
- package/schema/collection_frames.schema.json +4158 -0
- package/schema/frames.schema.json +10183 -3056
- package/schema/lifecycle.schema.json +18 -0
- package/schema/openapi.v1.json +36154 -9289
- package/schema/trigger_fields.schema.json +1 -1
- package/dist/types-ClEF_IA9.d.ts +0 -12789
package/dist/index.js
CHANGED
|
@@ -30,15 +30,15 @@ var Page = class {
|
|
|
30
30
|
|
|
31
31
|
// src/core/sessionHandle.ts
|
|
32
32
|
var TERMINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
33
|
-
"
|
|
34
|
-
"
|
|
33
|
+
"closed",
|
|
34
|
+
"idle",
|
|
35
|
+
"failed",
|
|
35
36
|
"cancelled",
|
|
36
37
|
"stopped"
|
|
37
38
|
]);
|
|
38
39
|
var DEFAULT_POLL_INTERVAL_MS = 3e3;
|
|
39
40
|
function isSettled(session) {
|
|
40
|
-
|
|
41
|
-
return session.session_state === "idle" || session.session_state === "closed";
|
|
41
|
+
return session.lifecycle.conversation === "closed" || TERMINAL_STATUSES.has(session.lifecycle.status);
|
|
42
42
|
}
|
|
43
43
|
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
44
44
|
var SessionHandle = class {
|
|
@@ -243,6 +243,890 @@ var Transport = class {
|
|
|
243
243
|
|
|
244
244
|
// src/core/client.ts
|
|
245
245
|
var enc = encodeURIComponent;
|
|
246
|
+
var EllipsisAccountApiKeys = class {
|
|
247
|
+
constructor(transport) {
|
|
248
|
+
this.transport = transport;
|
|
249
|
+
}
|
|
250
|
+
transport;
|
|
251
|
+
/**
|
|
252
|
+
* Create Api Key
|
|
253
|
+
*
|
|
254
|
+
* Create an organization key. Requires a verified GitHub administrator.
|
|
255
|
+
*
|
|
256
|
+
* Authenticate as a dashboard user or with a user token. An organization
|
|
257
|
+
* API key cannot create other keys. The secret is returned only once.
|
|
258
|
+
*
|
|
259
|
+
* Required permissions: write:tokens.
|
|
260
|
+
* API key: Requires a CLI user token belonging to an account administrator.
|
|
261
|
+
* CLI user token: Requires an account administrator.
|
|
262
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
263
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
264
|
+
*/
|
|
265
|
+
async create(options) {
|
|
266
|
+
const path = "/v1/account/api-keys";
|
|
267
|
+
const body = buildBody({ name: options.name });
|
|
268
|
+
return await this.transport.request("POST", path, { body });
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* List Api Keys
|
|
272
|
+
*
|
|
273
|
+
* Required permissions: read:tokens.
|
|
274
|
+
* API key: Supported.
|
|
275
|
+
* CLI user token: Supported.
|
|
276
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
277
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
278
|
+
*/
|
|
279
|
+
async list() {
|
|
280
|
+
const path = "/v1/account/api-keys";
|
|
281
|
+
return await this.transport.request("GET", path);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Revoke Api Key
|
|
285
|
+
*
|
|
286
|
+
* Revoke an organization key as a verified GitHub administrator.
|
|
287
|
+
*
|
|
288
|
+
* Required permissions: delete:tokens.
|
|
289
|
+
* API key: Requires a CLI user token belonging to an account administrator.
|
|
290
|
+
* CLI user token: Requires an account administrator.
|
|
291
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
292
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
293
|
+
*/
|
|
294
|
+
async revoke(api_key_id) {
|
|
295
|
+
const path = `/v1/account/api-keys/${enc(api_key_id)}`;
|
|
296
|
+
return await this.transport.request("DELETE", path);
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
var EllipsisAccountBillingAutoRecharge = class {
|
|
300
|
+
constructor(transport) {
|
|
301
|
+
this.transport = transport;
|
|
302
|
+
}
|
|
303
|
+
transport;
|
|
304
|
+
/**
|
|
305
|
+
* Get Auto Recharge
|
|
306
|
+
*
|
|
307
|
+
* Get your automatic credit recharge settings.
|
|
308
|
+
*
|
|
309
|
+
* An account without saved settings returns disabled defaults and no
|
|
310
|
+
* card. No payment-method identifier or card details are exposed.
|
|
311
|
+
*
|
|
312
|
+
* Required permissions: read:account.
|
|
313
|
+
* API key: Supported.
|
|
314
|
+
* CLI user token: Supported.
|
|
315
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
316
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
317
|
+
*/
|
|
318
|
+
async get() {
|
|
319
|
+
const path = "/v1/account/billing/auto-recharge";
|
|
320
|
+
return await this.transport.request("GET", path);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Update Auto Recharge
|
|
324
|
+
*
|
|
325
|
+
* Set your automatic credit recharge policy.
|
|
326
|
+
*
|
|
327
|
+
* Requires a human account administrator; API keys and sandbox tokens
|
|
328
|
+
* cannot change this policy. Supply enabled explicitly. Saving amounts
|
|
329
|
+
* with enabled=false keeps recharge off; enabling requires a saved card.
|
|
330
|
+
* A recharge buys amount_cents of credit and charges the platform fee
|
|
331
|
+
* in addition. Amounts and thresholds preserve exact cents.
|
|
332
|
+
*
|
|
333
|
+
* Required permissions: write:account.
|
|
334
|
+
* API key: Requires a CLI user token belonging to an account administrator.
|
|
335
|
+
* CLI user token: Requires an account administrator.
|
|
336
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
337
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
338
|
+
*/
|
|
339
|
+
async set(options) {
|
|
340
|
+
const path = "/v1/account/billing/auto-recharge";
|
|
341
|
+
const body = buildBody({ amount_cents: options.amount_cents, enabled: options.enabled, threshold_cents: options.threshold_cents });
|
|
342
|
+
return await this.transport.request("PUT", path, { body });
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
var EllipsisAccountBilling = class {
|
|
346
|
+
constructor(transport) {
|
|
347
|
+
this.transport = transport;
|
|
348
|
+
this.autoRecharge = new EllipsisAccountBillingAutoRecharge(transport);
|
|
349
|
+
}
|
|
350
|
+
transport;
|
|
351
|
+
autoRecharge;
|
|
352
|
+
/**
|
|
353
|
+
* Create Card Setup Session
|
|
354
|
+
*
|
|
355
|
+
* Save a card through Stripe's hosted setup flow.
|
|
356
|
+
*
|
|
357
|
+
* Requires a human account administrator. Open the returned URL to
|
|
358
|
+
* finish setup and return to Billing. Saving a card does not enable
|
|
359
|
+
* auto-recharge or buy credit.
|
|
360
|
+
*
|
|
361
|
+
* Required permissions: write:account.
|
|
362
|
+
* API key: Requires a CLI user token belonging to an account administrator.
|
|
363
|
+
* CLI user token: Requires an account administrator.
|
|
364
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
365
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
366
|
+
*/
|
|
367
|
+
async cardSetup() {
|
|
368
|
+
const path = "/v1/account/billing/card-setup";
|
|
369
|
+
return await this.transport.request("POST", path);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Create Credit Checkout Session
|
|
373
|
+
*
|
|
374
|
+
* Buy prepaid credit through Stripe's hosted checkout.
|
|
375
|
+
*
|
|
376
|
+
* Requires a human account administrator. Open the returned URL to
|
|
377
|
+
* complete payment. Credit is granted only after payment succeeds;
|
|
378
|
+
* the platform fee is charged in addition to amount_cents. Returning
|
|
379
|
+
* to Billing carries the checkout session ID for receipt lookup.
|
|
380
|
+
*
|
|
381
|
+
* Required permissions: write:account.
|
|
382
|
+
* API key: Requires a CLI user token belonging to an account administrator.
|
|
383
|
+
* CLI user token: Requires an account administrator.
|
|
384
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
385
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
386
|
+
*/
|
|
387
|
+
async checkout(options) {
|
|
388
|
+
const path = "/v1/account/billing/checkout";
|
|
389
|
+
const body = buildBody({ amount_cents: options.amount_cents });
|
|
390
|
+
return await this.transport.request("POST", path, { body });
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Claim Signup Credit
|
|
394
|
+
*
|
|
395
|
+
* The "Claim $100" button. Runs the same idempotent billing
|
|
396
|
+
* bootstrap that otherwise fires lazily at the first session (Stripe
|
|
397
|
+
* customer + usage subscription + the signup grant). A repeat call is
|
|
398
|
+
* a no-op that returns the current state.
|
|
399
|
+
*
|
|
400
|
+
* Required permissions: write:account.
|
|
401
|
+
* API key: Supported.
|
|
402
|
+
* CLI user token: Supported.
|
|
403
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
404
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
405
|
+
*/
|
|
406
|
+
async claimSignupCredit() {
|
|
407
|
+
const path = "/v1/account/billing/claim-signup-credit";
|
|
408
|
+
return await this.transport.request("POST", path);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Get Fee Schedule
|
|
412
|
+
*
|
|
413
|
+
* Get the account's rate card, in US dollars.
|
|
414
|
+
*
|
|
415
|
+
* Required permissions: read:account.
|
|
416
|
+
* API key: Supported.
|
|
417
|
+
* CLI user token: Supported.
|
|
418
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
419
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
420
|
+
*/
|
|
421
|
+
async feeSchedule() {
|
|
422
|
+
const path = "/v1/account/billing/fee-schedule";
|
|
423
|
+
return await this.transport.request("GET", path);
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* List Credit Grants
|
|
427
|
+
*
|
|
428
|
+
* List your confirmed credit grants and reversals.
|
|
429
|
+
*
|
|
430
|
+
* Returns only your account's grants. The total is before usage;
|
|
431
|
+
* /v1/account/budget reports the available balance.
|
|
432
|
+
*
|
|
433
|
+
* Required permissions: read:account.
|
|
434
|
+
* API key: Supported.
|
|
435
|
+
* CLI user token: Supported.
|
|
436
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
437
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
438
|
+
*/
|
|
439
|
+
async grants() {
|
|
440
|
+
const path = "/v1/account/billing/credit-grants";
|
|
441
|
+
return await this.transport.request("GET", path);
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Get Credit Purchase
|
|
445
|
+
*
|
|
446
|
+
* Read the amount collected for a credit purchase.
|
|
447
|
+
*
|
|
448
|
+
* The amount includes the platform fee and comes from Stripe. An
|
|
449
|
+
* incomplete, missing, or other-account purchase returns 404.
|
|
450
|
+
*
|
|
451
|
+
* Required permissions: read:account.
|
|
452
|
+
* API key: Supported.
|
|
453
|
+
* CLI user token: Supported.
|
|
454
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
455
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
456
|
+
*/
|
|
457
|
+
async purchase(checkout_id) {
|
|
458
|
+
const path = `/v1/account/billing/purchases/${enc(checkout_id)}`;
|
|
459
|
+
return await this.transport.request("GET", path);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Get Credit Purchase Options
|
|
463
|
+
*
|
|
464
|
+
* Get credit purchase bounds and the platform fee.
|
|
465
|
+
*
|
|
466
|
+
* All amounts are integer US cents. The fee is added to the credit
|
|
467
|
+
* amount; it does not reduce the credit granted.
|
|
468
|
+
*
|
|
469
|
+
* Required permissions: read:account.
|
|
470
|
+
* API key: Supported.
|
|
471
|
+
* CLI user token: Supported.
|
|
472
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
473
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
474
|
+
*/
|
|
475
|
+
async purchaseOptions() {
|
|
476
|
+
const path = "/v1/account/billing/purchase-options";
|
|
477
|
+
return await this.transport.request("GET", path);
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Get Account Billing
|
|
481
|
+
*
|
|
482
|
+
* Explain whether your account can start sessions.
|
|
483
|
+
*
|
|
484
|
+
* Uses the same account gate as session admission, including credit,
|
|
485
|
+
* contact email, and personal Claude subscription eligibility. Scoped
|
|
486
|
+
* spend limits are reported separately by /v1/account/budget.
|
|
487
|
+
*
|
|
488
|
+
* Required permissions: read:account.
|
|
489
|
+
* API key: Supported.
|
|
490
|
+
* CLI user token: Supported.
|
|
491
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
492
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
493
|
+
*/
|
|
494
|
+
async status() {
|
|
495
|
+
const path = "/v1/account/billing";
|
|
496
|
+
return await this.transport.request("GET", path);
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
var EllipsisAccountModels = class {
|
|
500
|
+
constructor(transport) {
|
|
501
|
+
this.transport = transport;
|
|
502
|
+
}
|
|
503
|
+
transport;
|
|
504
|
+
/**
|
|
505
|
+
* List Account Models
|
|
506
|
+
*
|
|
507
|
+
* List selectable agent models.
|
|
508
|
+
*
|
|
509
|
+
* Grouped by manufacturer and model family, newest versions first
|
|
510
|
+
* within each family, with the organization's default model
|
|
511
|
+
* flagged (`is_default_agent_model`: the `default_model` of
|
|
512
|
+
* `GET /v1/account/settings`).
|
|
513
|
+
*
|
|
514
|
+
* Reads the same registry as the dashboard's rate table, so a
|
|
515
|
+
* client's model picker can never drift from what's offered. The
|
|
516
|
+
* selectable set is global; only the flag is account-scoped.
|
|
517
|
+
*
|
|
518
|
+
* Required permissions: read:templates.
|
|
519
|
+
* API key: Supported.
|
|
520
|
+
* CLI user token: Supported.
|
|
521
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
522
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
523
|
+
*/
|
|
524
|
+
async list() {
|
|
525
|
+
const path = "/v1/account/models";
|
|
526
|
+
return await this.transport.request("GET", path);
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
var EllipsisAccountNotifications = class {
|
|
530
|
+
constructor(transport) {
|
|
531
|
+
this.transport = transport;
|
|
532
|
+
}
|
|
533
|
+
transport;
|
|
534
|
+
/**
|
|
535
|
+
* Send Test Notification Email
|
|
536
|
+
*
|
|
537
|
+
* Send the alert email template to one address with sample data,
|
|
538
|
+
* so a typo'd finance alias is caught by a human instead of failing
|
|
539
|
+
* silently when a real alert fires.
|
|
540
|
+
*
|
|
541
|
+
* Required permissions: write:account.
|
|
542
|
+
* API key: Supported.
|
|
543
|
+
* CLI user token: Supported.
|
|
544
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
545
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
546
|
+
*/
|
|
547
|
+
async testEmail(options) {
|
|
548
|
+
const path = "/v1/account/notifications/test-email";
|
|
549
|
+
const body = buildBody({ email: options.email });
|
|
550
|
+
return await this.transport.request("POST", path, { body });
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
var EllipsisAccountOnboarding = class {
|
|
554
|
+
constructor(transport) {
|
|
555
|
+
this.transport = transport;
|
|
556
|
+
}
|
|
557
|
+
transport;
|
|
558
|
+
/**
|
|
559
|
+
* Get Account Onboarding
|
|
560
|
+
*
|
|
561
|
+
* Read the account's saved onboarding answers, or null before setup.
|
|
562
|
+
*
|
|
563
|
+
* Required permissions: read:account.
|
|
564
|
+
* API key: Supported.
|
|
565
|
+
* CLI user token: Supported.
|
|
566
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
567
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
568
|
+
*/
|
|
569
|
+
async get() {
|
|
570
|
+
const path = "/v1/account/onboarding";
|
|
571
|
+
return await this.transport.request("GET", path);
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Update Account Onboarding
|
|
575
|
+
*
|
|
576
|
+
* Save supplied onboarding answers, preserving omitted answers.
|
|
577
|
+
*
|
|
578
|
+
* Organizations can save their work email before selecting use cases.
|
|
579
|
+
* Saving use cases requires a valid organization work email and at
|
|
580
|
+
* least one choice. When Other is the only choice, describe it.
|
|
581
|
+
* Personal accounts save a null work email. This does not change the
|
|
582
|
+
* billing contact email. Sandbox credentials cannot update answers.
|
|
583
|
+
* Supplying an organization work email requires a human user and sends
|
|
584
|
+
* a Slack Connect invitation. Slack failures do not undo saved answers.
|
|
585
|
+
*
|
|
586
|
+
* Required permissions: write:account.
|
|
587
|
+
* API key: Supported.
|
|
588
|
+
* CLI user token: Supported.
|
|
589
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
590
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
591
|
+
*/
|
|
592
|
+
async update(options = {}) {
|
|
593
|
+
const path = "/v1/account/onboarding";
|
|
594
|
+
const body = buildBody({ other_use_case: options.other_use_case, use_cases: options.use_cases, work_email: options.work_email });
|
|
595
|
+
return await this.transport.request("PATCH", path, { body });
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
var EllipsisAccountProvidersAnthropic = class {
|
|
599
|
+
constructor(transport) {
|
|
600
|
+
this.transport = transport;
|
|
601
|
+
}
|
|
602
|
+
transport;
|
|
603
|
+
/**
|
|
604
|
+
* Delete Anthropic Config
|
|
605
|
+
*
|
|
606
|
+
* Required permissions: delete:account.
|
|
607
|
+
* API key: Supported.
|
|
608
|
+
* CLI user token: Supported.
|
|
609
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
610
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
611
|
+
*/
|
|
612
|
+
async delete() {
|
|
613
|
+
const path = "/v1/account/providers/anthropic";
|
|
614
|
+
await this.transport.request("DELETE", path);
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Get Anthropic Config
|
|
618
|
+
*
|
|
619
|
+
* Required permissions: read:account.
|
|
620
|
+
* API key: Supported.
|
|
621
|
+
* CLI user token: Supported.
|
|
622
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
623
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
624
|
+
*/
|
|
625
|
+
async get() {
|
|
626
|
+
const path = "/v1/account/providers/anthropic";
|
|
627
|
+
return await this.transport.request("GET", path);
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Put Anthropic Config
|
|
631
|
+
*
|
|
632
|
+
* Required permissions: write:account.
|
|
633
|
+
* API key: Supported.
|
|
634
|
+
* CLI user token: Supported.
|
|
635
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
636
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
637
|
+
*/
|
|
638
|
+
async set(options) {
|
|
639
|
+
const path = "/v1/account/providers/anthropic";
|
|
640
|
+
const body = buildBody({ api_key: options.api_key });
|
|
641
|
+
return await this.transport.request("PUT", path, { body });
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Validate Anthropic Config
|
|
645
|
+
*
|
|
646
|
+
* Required permissions: write:account.
|
|
647
|
+
* API key: Supported.
|
|
648
|
+
* CLI user token: Supported.
|
|
649
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
650
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
651
|
+
*/
|
|
652
|
+
async validate() {
|
|
653
|
+
const path = "/v1/account/providers/anthropic/validate";
|
|
654
|
+
return await this.transport.request("POST", path);
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
var EllipsisAccountProvidersBedrock = class {
|
|
658
|
+
constructor(transport) {
|
|
659
|
+
this.transport = transport;
|
|
660
|
+
}
|
|
661
|
+
transport;
|
|
662
|
+
/**
|
|
663
|
+
* Delete Bedrock Config
|
|
664
|
+
*
|
|
665
|
+
* Required permissions: delete:account.
|
|
666
|
+
* API key: Supported.
|
|
667
|
+
* CLI user token: Supported.
|
|
668
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
669
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
670
|
+
*/
|
|
671
|
+
async delete() {
|
|
672
|
+
const path = "/v1/account/providers/bedrock";
|
|
673
|
+
await this.transport.request("DELETE", path);
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Get Bedrock Config
|
|
677
|
+
*
|
|
678
|
+
* Required permissions: read:account.
|
|
679
|
+
* API key: Supported.
|
|
680
|
+
* CLI user token: Supported.
|
|
681
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
682
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
683
|
+
*/
|
|
684
|
+
async get() {
|
|
685
|
+
const path = "/v1/account/providers/bedrock";
|
|
686
|
+
return await this.transport.request("GET", path);
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Put Bedrock Config
|
|
690
|
+
*
|
|
691
|
+
* Required permissions: write:account.
|
|
692
|
+
* API key: Supported.
|
|
693
|
+
* CLI user token: Supported.
|
|
694
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
695
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
696
|
+
*/
|
|
697
|
+
async set(options) {
|
|
698
|
+
const path = "/v1/account/providers/bedrock";
|
|
699
|
+
const body = buildBody({ model_map: options.model_map, region: options.region, role_arn: options.role_arn });
|
|
700
|
+
return await this.transport.request("PUT", path, { body });
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Validate Bedrock Config
|
|
704
|
+
*
|
|
705
|
+
* Required permissions: write:account.
|
|
706
|
+
* API key: Supported.
|
|
707
|
+
* CLI user token: Supported.
|
|
708
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
709
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
710
|
+
*/
|
|
711
|
+
async validate() {
|
|
712
|
+
const path = "/v1/account/providers/bedrock/validate";
|
|
713
|
+
return await this.transport.request("POST", path);
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
var EllipsisAccountProviders = class {
|
|
717
|
+
constructor(transport) {
|
|
718
|
+
this.transport = transport;
|
|
719
|
+
this.anthropic = new EllipsisAccountProvidersAnthropic(transport);
|
|
720
|
+
this.bedrock = new EllipsisAccountProvidersBedrock(transport);
|
|
721
|
+
}
|
|
722
|
+
transport;
|
|
723
|
+
anthropic;
|
|
724
|
+
bedrock;
|
|
725
|
+
};
|
|
726
|
+
var EllipsisAccountSettings = class {
|
|
727
|
+
constructor(transport) {
|
|
728
|
+
this.transport = transport;
|
|
729
|
+
}
|
|
730
|
+
transport;
|
|
731
|
+
/**
|
|
732
|
+
* Get Account Settings
|
|
733
|
+
*
|
|
734
|
+
* Get the organization settings.
|
|
735
|
+
*
|
|
736
|
+
* Session model and budget defaults, code review and mention behavior,
|
|
737
|
+
* analytics, retention, and notification contacts. PATCH replaces
|
|
738
|
+
* supplied sections; PUT preserves its model-and-budget-only behavior.
|
|
739
|
+
*
|
|
740
|
+
* Required permissions: read:defaults.
|
|
741
|
+
* API key: Supported.
|
|
742
|
+
* CLI user token: Supported.
|
|
743
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
744
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
745
|
+
*/
|
|
746
|
+
async get() {
|
|
747
|
+
const path = "/v1/account/settings";
|
|
748
|
+
return await this.transport.request("GET", path);
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Set Organization Settings
|
|
752
|
+
*
|
|
753
|
+
* Set the organization settings.
|
|
754
|
+
*
|
|
755
|
+
* Replaces both: `default_model` accepts an alias or canonical id
|
|
756
|
+
* and is stored canonical, and cannot be cleared (it is the only
|
|
757
|
+
* default a session's model resolves against);
|
|
758
|
+
* `budget_ceiling.session` is in US dollars, at most the platform
|
|
759
|
+
* ceiling, and null clears it.
|
|
760
|
+
* Refused for sandbox tokens (potentially prompt-injected code must
|
|
761
|
+
* not repoint the organization's defaults).
|
|
762
|
+
*
|
|
763
|
+
* Required permissions: write:defaults.
|
|
764
|
+
* API key: Requires a CLI user token belonging to an account administrator.
|
|
765
|
+
* CLI user token: Requires an account administrator.
|
|
766
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
767
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
768
|
+
*/
|
|
769
|
+
async set(options) {
|
|
770
|
+
const path = "/v1/account/settings";
|
|
771
|
+
const body = buildBody({ budget_ceiling: options.budget_ceiling, default_model: options.default_model });
|
|
772
|
+
return await this.transport.request("PUT", path, { body });
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Patch Account Settings
|
|
776
|
+
*
|
|
777
|
+
* Replace supplied settings sections without changing omitted sections.
|
|
778
|
+
*
|
|
779
|
+
* Changes to model or budget defaults require a GitHub administrator.
|
|
780
|
+
*
|
|
781
|
+
* Required permissions: write:defaults.
|
|
782
|
+
* API key: Cannot set budget_ceiling, default_model to a non-null value; those changes require a CLI user token belonging to an account administrator.
|
|
783
|
+
* CLI user token: Requires an account administrator when setting budget_ceiling, default_model to a non-null value.
|
|
784
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
785
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
786
|
+
*/
|
|
787
|
+
async update(options = {}) {
|
|
788
|
+
const path = "/v1/account/settings";
|
|
789
|
+
const body = buildBody({ analytics: options.analytics, budget_ceiling: options.budget_ceiling, code_review: options.code_review, data_retention: options.data_retention, default_model: options.default_model, notifications: options.notifications });
|
|
790
|
+
return await this.transport.request("PATCH", path, { body });
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
var EllipsisAccount = class {
|
|
794
|
+
constructor(transport) {
|
|
795
|
+
this.transport = transport;
|
|
796
|
+
this.apiKeys = new EllipsisAccountApiKeys(transport);
|
|
797
|
+
this.billing = new EllipsisAccountBilling(transport);
|
|
798
|
+
this.models = new EllipsisAccountModels(transport);
|
|
799
|
+
this.notifications = new EllipsisAccountNotifications(transport);
|
|
800
|
+
this.onboarding = new EllipsisAccountOnboarding(transport);
|
|
801
|
+
this.providers = new EllipsisAccountProviders(transport);
|
|
802
|
+
this.settings = new EllipsisAccountSettings(transport);
|
|
803
|
+
}
|
|
804
|
+
transport;
|
|
805
|
+
apiKeys;
|
|
806
|
+
billing;
|
|
807
|
+
models;
|
|
808
|
+
notifications;
|
|
809
|
+
onboarding;
|
|
810
|
+
providers;
|
|
811
|
+
settings;
|
|
812
|
+
/**
|
|
813
|
+
* Get Customer Activity
|
|
814
|
+
*
|
|
815
|
+
* All-time per-surface activity flags: the dashboards' demo-data
|
|
816
|
+
* fallback reads these instead of inferring "no history" from a
|
|
817
|
+
* windowed, filtered response.
|
|
818
|
+
*
|
|
819
|
+
* Required permissions: read:account.
|
|
820
|
+
* API key: Supported.
|
|
821
|
+
* CLI user token: Supported.
|
|
822
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
823
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
824
|
+
*/
|
|
825
|
+
async activity() {
|
|
826
|
+
const path = "/v1/account/activity";
|
|
827
|
+
return await this.transport.request("GET", path);
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Get Customer Audit Log
|
|
831
|
+
*
|
|
832
|
+
* Required permissions: read:account.
|
|
833
|
+
* API key: Supported.
|
|
834
|
+
* CLI user token: Supported.
|
|
835
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
836
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
837
|
+
*/
|
|
838
|
+
async auditLog() {
|
|
839
|
+
const path = "/v1/account/audit-log";
|
|
840
|
+
return await this.transport.request("GET", path);
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Get Account Budget
|
|
844
|
+
*
|
|
845
|
+
* Get prepaid credit, actual trailing budgets, and developer/API-key limits.
|
|
846
|
+
*
|
|
847
|
+
* Budgets cover the trailing 1, 7 and 28 days; they do not replenish
|
|
848
|
+
* prepaid credit. Amounts include measured usage from active sessions.
|
|
849
|
+
* Each paid LLM request requires positive credit and budget headroom.
|
|
850
|
+
* An admitted request can overshoot; concurrent paid requests are limited
|
|
851
|
+
* by your account and per-session allowances.
|
|
852
|
+
*
|
|
853
|
+
* Required permissions: read:account.
|
|
854
|
+
* API key: Supported.
|
|
855
|
+
* CLI user token: Supported.
|
|
856
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
857
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
858
|
+
*/
|
|
859
|
+
async budget() {
|
|
860
|
+
const path = "/v1/account/budget";
|
|
861
|
+
return await this.transport.request("GET", path);
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Update Customer
|
|
865
|
+
*
|
|
866
|
+
* Required permissions: write:account.
|
|
867
|
+
* API key: Supported.
|
|
868
|
+
* CLI user token: Supported.
|
|
869
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
870
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
871
|
+
*/
|
|
872
|
+
async update(options = {}) {
|
|
873
|
+
const path = "/v1/account";
|
|
874
|
+
const body = buildBody({ can_start_job_runs: options.can_start_job_runs, contact_email: options.contact_email });
|
|
875
|
+
return await this.transport.request("PATCH", path, { body });
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Update Budget
|
|
879
|
+
*
|
|
880
|
+
* Update spending policy or budget alerts as an account administrator.
|
|
881
|
+
*
|
|
882
|
+
* Each supplied section replaces that section; omitted sections are
|
|
883
|
+
* preserved. Set policy.developer_defaults to null to disable developer
|
|
884
|
+
* limits. Null override windows inherit their default. API keys use
|
|
885
|
+
* their stable ID, not their secret. Changes apply to the next paid
|
|
886
|
+
* request, including sessions already running. API keys and sandbox
|
|
887
|
+
* credentials cannot edit budgets. The session ceiling remains at
|
|
888
|
+
* /account/settings; purchasing credits is separate from budget policy.
|
|
889
|
+
*
|
|
890
|
+
* Required permissions: write:defaults.
|
|
891
|
+
* API key: Requires a CLI user token belonging to an account administrator.
|
|
892
|
+
* CLI user token: Requires an account administrator.
|
|
893
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
894
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
895
|
+
*/
|
|
896
|
+
async updateBudget(options = {}) {
|
|
897
|
+
const path = "/v1/account/budget";
|
|
898
|
+
const body = buildBody({ alerts: options.alerts, policy: options.policy });
|
|
899
|
+
return await this.transport.request("PATCH", path, { body });
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Get Usage
|
|
903
|
+
*
|
|
904
|
+
* Get usage for a calendar month, including its funding sources.
|
|
905
|
+
*
|
|
906
|
+
* Omit period_start for the current UTC month; select a period returned
|
|
907
|
+
* in billing_periods to view history. Credit debits are distinct from
|
|
908
|
+
* rated token usage through BYOK, customer Bedrock, or a developer's
|
|
909
|
+
* Claude subscription. Rated usage estimates are not provider invoices.
|
|
910
|
+
* Pending and unresolved requests identify missing measurements.
|
|
911
|
+
*
|
|
912
|
+
* Required permissions: read:account.
|
|
913
|
+
* API key: Supported.
|
|
914
|
+
* CLI user token: Supported.
|
|
915
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
916
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
917
|
+
*/
|
|
918
|
+
async usage(options = {}) {
|
|
919
|
+
const path = "/v1/account/usage";
|
|
920
|
+
const query = buildQuery({ period_start: options.period_start });
|
|
921
|
+
return await this.transport.request("GET", path, { query });
|
|
922
|
+
}
|
|
923
|
+
};
|
|
924
|
+
var EllipsisAgents = class {
|
|
925
|
+
constructor(transport) {
|
|
926
|
+
this.transport = transport;
|
|
927
|
+
}
|
|
928
|
+
transport;
|
|
929
|
+
/**
|
|
930
|
+
* Create Agent
|
|
931
|
+
*
|
|
932
|
+
* Create an agent, managed through the API: no file, live
|
|
933
|
+
* immediately. To put its definition in a repository instead, create
|
|
934
|
+
* it here and then POST /v1/agents/{agent_id}/link.
|
|
935
|
+
*
|
|
936
|
+
* 409 when another live agent already holds the name.
|
|
937
|
+
*
|
|
938
|
+
* Required permissions: write:configs.
|
|
939
|
+
* API key: Supported.
|
|
940
|
+
* CLI user token: Supported.
|
|
941
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
942
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
943
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
944
|
+
*/
|
|
945
|
+
async create(options) {
|
|
946
|
+
const path = "/v1/agents";
|
|
947
|
+
const body = buildBody({ agent: options.agent });
|
|
948
|
+
return await this.transport.request("POST", path, { body });
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* Delete Agent
|
|
952
|
+
*
|
|
953
|
+
* Delete an agent, by id or by name.
|
|
954
|
+
*
|
|
955
|
+
* It stops running and its name is freed immediately; its past
|
|
956
|
+
* sessions remain readable. Only for agents managed through
|
|
957
|
+
* this API — delete the file to remove one defined by a repository.
|
|
958
|
+
*
|
|
959
|
+
* Required permissions: write:configs.
|
|
960
|
+
* API key: Supported.
|
|
961
|
+
* CLI user token: Supported.
|
|
962
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
963
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
964
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
965
|
+
*/
|
|
966
|
+
async delete(agent_id) {
|
|
967
|
+
const path = `/v1/agents/${enc(agent_id)}`;
|
|
968
|
+
await this.transport.request("DELETE", path);
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Get Agent
|
|
972
|
+
*
|
|
973
|
+
* Return one agent, by id or by name.
|
|
974
|
+
*
|
|
975
|
+
* Required permissions: read:configs.
|
|
976
|
+
* API key: Supported.
|
|
977
|
+
* CLI user token: Supported.
|
|
978
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
979
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
980
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
981
|
+
*/
|
|
982
|
+
async get(agent_id) {
|
|
983
|
+
const path = `/v1/agents/${enc(agent_id)}`;
|
|
984
|
+
return await this.transport.request("GET", path);
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Link Agent
|
|
988
|
+
*
|
|
989
|
+
* Move an agent into a repository, by id or by name.
|
|
990
|
+
*
|
|
991
|
+
* Opens a pull request adding its definition file. The agent
|
|
992
|
+
* keeps running unchanged meanwhile; merging hands it over to the
|
|
993
|
+
* file, after which the file is what changes it. Nothing happens
|
|
994
|
+
* if the pull request is never merged.
|
|
995
|
+
*
|
|
996
|
+
* Required permissions: write:configs.
|
|
997
|
+
* API key: Supported.
|
|
998
|
+
* CLI user token: Supported.
|
|
999
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1000
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1001
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1002
|
+
*/
|
|
1003
|
+
async link(agent_id, options) {
|
|
1004
|
+
const path = `/v1/agents/${enc(agent_id)}/link`;
|
|
1005
|
+
const body = buildBody({ path: options.path, repository: options.repository });
|
|
1006
|
+
return await this.transport.request("POST", path, { body });
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* List Agents
|
|
1010
|
+
*
|
|
1011
|
+
* List agents.
|
|
1012
|
+
*
|
|
1013
|
+
* Required permissions: read:configs.
|
|
1014
|
+
* API key: Supported.
|
|
1015
|
+
* CLI user token: Supported.
|
|
1016
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1017
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1018
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1019
|
+
*/
|
|
1020
|
+
async list() {
|
|
1021
|
+
const path = "/v1/agents";
|
|
1022
|
+
return await this.transport.request("GET", path);
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Get Agent Metrics
|
|
1026
|
+
*
|
|
1027
|
+
* Return an agent's session distribution and trailing spend,
|
|
1028
|
+
* by id or by name.
|
|
1029
|
+
*
|
|
1030
|
+
* `samples` carries one entry per finished session (duration, cost,
|
|
1031
|
+
* tokens) for distributions; `spend_windows` carries what the
|
|
1032
|
+
* agent's sessions cost over the last 1, 7, and 28 days against
|
|
1033
|
+
* its budget for each window.
|
|
1034
|
+
*
|
|
1035
|
+
* Required permissions: read:configs.
|
|
1036
|
+
* API key: Supported.
|
|
1037
|
+
* CLI user token: Supported.
|
|
1038
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1039
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1040
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1041
|
+
*/
|
|
1042
|
+
async metrics(agent_id) {
|
|
1043
|
+
const path = `/v1/agents/${enc(agent_id)}/metrics`;
|
|
1044
|
+
return await this.transport.request("GET", path);
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Start Agent Session
|
|
1048
|
+
*
|
|
1049
|
+
* Invoke an agent.
|
|
1050
|
+
*
|
|
1051
|
+
* Runs a certified agent with its configured instructions, model,
|
|
1052
|
+
* environment, permissions, skills, and budget, and returns
|
|
1053
|
+
* the session it started. The session runs once and does not accept
|
|
1054
|
+
* follow-up messages. If the agent declares input.json_schema,
|
|
1055
|
+
* send only `input` for its initial message. Otherwise send a non-empty
|
|
1056
|
+
* `prompt`, which becomes the initial message verbatim. Both fields
|
|
1057
|
+
* together, neither field, and input that renders an empty message are
|
|
1058
|
+
* rejected with 422. An optional `budget` lowers the session cap;
|
|
1059
|
+
* `metadata` tags the session. Codex invocations are not supported.
|
|
1060
|
+
*
|
|
1061
|
+
* Required permissions: write:sessions.
|
|
1062
|
+
* API key: Supported.
|
|
1063
|
+
* CLI user token: Supported.
|
|
1064
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1065
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1066
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1067
|
+
*/
|
|
1068
|
+
async run(agent_id, options = {}) {
|
|
1069
|
+
const path = `/v1/agents/${enc(agent_id)}/sessions`;
|
|
1070
|
+
const body = buildBody({ budget: options.budget, input: options.input, metadata: options.metadata, prompt: options.prompt });
|
|
1071
|
+
return await this.transport.request("POST", path, { body });
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* Get Agents Stream Ticket
|
|
1075
|
+
*
|
|
1076
|
+
* Required permissions: read:configs.
|
|
1077
|
+
* API key: Supported.
|
|
1078
|
+
* CLI user token: Supported.
|
|
1079
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1080
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1081
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1082
|
+
*/
|
|
1083
|
+
async streamTicket() {
|
|
1084
|
+
const path = "/v1/agents/stream-ticket";
|
|
1085
|
+
return await this.transport.request("GET", path);
|
|
1086
|
+
}
|
|
1087
|
+
/**
|
|
1088
|
+
* Unlink Agent
|
|
1089
|
+
*
|
|
1090
|
+
* Take over an agent from its file, by id or by name.
|
|
1091
|
+
*
|
|
1092
|
+
* The file stops governing it immediately and further changes go
|
|
1093
|
+
* through this API. The file is left in place, inert — delete it
|
|
1094
|
+
* whenever you like.
|
|
1095
|
+
*
|
|
1096
|
+
* Required permissions: write:configs.
|
|
1097
|
+
* API key: Supported.
|
|
1098
|
+
* CLI user token: Supported.
|
|
1099
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1100
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1101
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1102
|
+
*/
|
|
1103
|
+
async unlink(agent_id) {
|
|
1104
|
+
const path = `/v1/agents/${enc(agent_id)}/unlink`;
|
|
1105
|
+
return await this.transport.request("POST", path);
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Update Agent
|
|
1109
|
+
*
|
|
1110
|
+
* Replace an agent's definition, by id or by name.
|
|
1111
|
+
*
|
|
1112
|
+
* The whole definition is replaced, and the change is live at
|
|
1113
|
+
* once. Only for agents managed through this API: one defined
|
|
1114
|
+
* by a repository file is a 409, since the next push to that file
|
|
1115
|
+
* would revert the change — unlink it first to take ownership.
|
|
1116
|
+
*
|
|
1117
|
+
* Required permissions: write:configs.
|
|
1118
|
+
* API key: Supported.
|
|
1119
|
+
* CLI user token: Supported.
|
|
1120
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1121
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1122
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1123
|
+
*/
|
|
1124
|
+
async update(agent_id, options) {
|
|
1125
|
+
const path = `/v1/agents/${enc(agent_id)}`;
|
|
1126
|
+
const body = buildBody({ agent: options.agent });
|
|
1127
|
+
return await this.transport.request("PUT", path, { body });
|
|
1128
|
+
}
|
|
1129
|
+
};
|
|
246
1130
|
var EllipsisAlerts = class {
|
|
247
1131
|
constructor(transport) {
|
|
248
1132
|
this.transport = transport;
|
|
@@ -254,6 +1138,12 @@ var EllipsisAlerts = class {
|
|
|
254
1138
|
* Dismiss an open alert and return it.
|
|
255
1139
|
*
|
|
256
1140
|
* 409 when the alert is not open; 404 when it doesn't exist.
|
|
1141
|
+
*
|
|
1142
|
+
* Required permissions: write:alerts.
|
|
1143
|
+
* API key: Supported.
|
|
1144
|
+
* CLI user token: Supported.
|
|
1145
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1146
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
257
1147
|
*/
|
|
258
1148
|
async dismiss(alert_id) {
|
|
259
1149
|
const path = `/v1/alerts/${enc(alert_id)}/dismiss`;
|
|
@@ -265,6 +1155,12 @@ var EllipsisAlerts = class {
|
|
|
265
1155
|
* Return one alert by id.
|
|
266
1156
|
*
|
|
267
1157
|
* 404 if it doesn't exist or belongs to another organization.
|
|
1158
|
+
*
|
|
1159
|
+
* Required permissions: read:alerts.
|
|
1160
|
+
* API key: Supported.
|
|
1161
|
+
* CLI user token: Supported.
|
|
1162
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1163
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
268
1164
|
*/
|
|
269
1165
|
async get(alert_id) {
|
|
270
1166
|
const path = `/v1/alerts/${enc(alert_id)}`;
|
|
@@ -279,6 +1175,12 @@ var EllipsisAlerts = class {
|
|
|
279
1175
|
*
|
|
280
1176
|
* Available to all credential types, so an agent can check "is
|
|
281
1177
|
* this org near budget?" mid-task.
|
|
1178
|
+
*
|
|
1179
|
+
* Required permissions: read:alerts.
|
|
1180
|
+
* API key: Supported.
|
|
1181
|
+
* CLI user token: Supported.
|
|
1182
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1183
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
282
1184
|
*/
|
|
283
1185
|
async list(options = {}) {
|
|
284
1186
|
const path = "/v1/alerts";
|
|
@@ -308,6 +1210,12 @@ var EllipsisAnalytics = class {
|
|
|
308
1210
|
* the apps/agents). Available to all credential types: the
|
|
309
1211
|
* responses expose the organization's own GitHub PR/review activity,
|
|
310
1212
|
* no secrets.
|
|
1213
|
+
*
|
|
1214
|
+
* Required permissions: read:account.
|
|
1215
|
+
* API key: Supported.
|
|
1216
|
+
* CLI user token: Supported.
|
|
1217
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1218
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
311
1219
|
*/
|
|
312
1220
|
async metrics(options = {}) {
|
|
313
1221
|
const path = "/v1/analytics/metrics";
|
|
@@ -321,6 +1229,12 @@ var EllipsisAnalytics = class {
|
|
|
321
1229
|
*
|
|
322
1230
|
* Windowing: pass explicit start/end, or days (default: the last
|
|
323
1231
|
* 30 days). account_type in all|user|bot scopes the authors.
|
|
1232
|
+
*
|
|
1233
|
+
* Required permissions: read:account.
|
|
1234
|
+
* API key: Supported.
|
|
1235
|
+
* CLI user token: Supported.
|
|
1236
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1237
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
324
1238
|
*/
|
|
325
1239
|
async pullRequests(options = {}) {
|
|
326
1240
|
const path = "/v1/analytics/pull-requests";
|
|
@@ -336,6 +1250,12 @@ var EllipsisAnalytics = class {
|
|
|
336
1250
|
* review the most PRs?" is the reviewer facets here with
|
|
337
1251
|
* account_type=bot. Windowing: pass explicit start/end, or days
|
|
338
1252
|
* (default: the last 30 days).
|
|
1253
|
+
*
|
|
1254
|
+
* Required permissions: read:account.
|
|
1255
|
+
* API key: Supported.
|
|
1256
|
+
* CLI user token: Supported.
|
|
1257
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1258
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
339
1259
|
*/
|
|
340
1260
|
async reviews(options = {}) {
|
|
341
1261
|
const path = "/v1/analytics/reviews";
|
|
@@ -354,6 +1274,8 @@ var EllipsisAuthCli = class {
|
|
|
354
1274
|
* Poll a device-code auth flow for its token.
|
|
355
1275
|
*
|
|
356
1276
|
* Unauthenticated; the device code identifies the flow.
|
|
1277
|
+
*
|
|
1278
|
+
* Authentication: No token required.
|
|
357
1279
|
*/
|
|
358
1280
|
async poll(options) {
|
|
359
1281
|
const path = "/v1/auth/cli/poll";
|
|
@@ -368,6 +1290,8 @@ var EllipsisAuthCli = class {
|
|
|
368
1290
|
* Unauthenticated: the CLI has no credential yet — that's what
|
|
369
1291
|
* it's obtaining. The human authorizes out-of-band in the
|
|
370
1292
|
* dashboard.
|
|
1293
|
+
*
|
|
1294
|
+
* Authentication: No token required.
|
|
371
1295
|
*/
|
|
372
1296
|
async start() {
|
|
373
1297
|
const path = "/v1/auth/cli/start";
|
|
@@ -382,132 +1306,6 @@ var EllipsisAuth = class {
|
|
|
382
1306
|
transport;
|
|
383
1307
|
cli;
|
|
384
1308
|
};
|
|
385
|
-
var EllipsisAutomations = class {
|
|
386
|
-
constructor(transport) {
|
|
387
|
-
this.transport = transport;
|
|
388
|
-
}
|
|
389
|
-
transport;
|
|
390
|
-
/**
|
|
391
|
-
* Create Automation
|
|
392
|
-
*
|
|
393
|
-
* Create an automation, managed through the API: no file, live
|
|
394
|
-
* immediately. To put its definition in a repository instead, create
|
|
395
|
-
* it here and then POST /v1/automations/{automation_id}/link.
|
|
396
|
-
*
|
|
397
|
-
* 409 when another live automation already holds the name.
|
|
398
|
-
*/
|
|
399
|
-
async create(options) {
|
|
400
|
-
const path = "/v1/automations";
|
|
401
|
-
const body = buildBody({ automation: options.automation });
|
|
402
|
-
return await this.transport.request("POST", path, { body });
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Delete Automation
|
|
406
|
-
*
|
|
407
|
-
* Delete an automation, by id or by name.
|
|
408
|
-
*
|
|
409
|
-
* It stops running and its name is freed immediately; its past
|
|
410
|
-
* sessions remain readable. Only for automations managed through
|
|
411
|
-
* this API — delete the file to remove one defined by a repository.
|
|
412
|
-
*/
|
|
413
|
-
async delete(automation_id) {
|
|
414
|
-
const path = `/v1/automations/${enc(automation_id)}`;
|
|
415
|
-
await this.transport.request("DELETE", path);
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* Get Automation
|
|
419
|
-
*
|
|
420
|
-
* Return one automation, by id or by name.
|
|
421
|
-
*/
|
|
422
|
-
async get(automation_id) {
|
|
423
|
-
const path = `/v1/automations/${enc(automation_id)}`;
|
|
424
|
-
return await this.transport.request("GET", path);
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Link Automation
|
|
428
|
-
*
|
|
429
|
-
* Move an automation into a repository, by id or by name.
|
|
430
|
-
*
|
|
431
|
-
* Opens a pull request adding its definition file. The automation
|
|
432
|
-
* keeps running unchanged meanwhile; merging hands it over to the
|
|
433
|
-
* file, after which the file is what changes it. Nothing happens
|
|
434
|
-
* if the pull request is never merged.
|
|
435
|
-
*/
|
|
436
|
-
async link(automation_id, options) {
|
|
437
|
-
const path = `/v1/automations/${enc(automation_id)}/link`;
|
|
438
|
-
const body = buildBody({ path: options.path, repository: options.repository });
|
|
439
|
-
return await this.transport.request("POST", path, { body });
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* List Automations
|
|
443
|
-
*
|
|
444
|
-
* List automations.
|
|
445
|
-
*/
|
|
446
|
-
async list() {
|
|
447
|
-
const path = "/v1/automations";
|
|
448
|
-
return await this.transport.request("GET", path);
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* Get Automation Metrics
|
|
452
|
-
*
|
|
453
|
-
* Return an automation's session distribution and trailing spend,
|
|
454
|
-
* by id or by name.
|
|
455
|
-
*
|
|
456
|
-
* `samples` carries one entry per finished session (duration, cost,
|
|
457
|
-
* tokens) for distributions; `spend_windows` carries what the
|
|
458
|
-
* automation's sessions cost over the last 1, 7, and 28 days against
|
|
459
|
-
* its budget for each window.
|
|
460
|
-
*/
|
|
461
|
-
async metrics(automation_id) {
|
|
462
|
-
const path = `/v1/automations/${enc(automation_id)}/metrics`;
|
|
463
|
-
return await this.transport.request("GET", path);
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* Start Automation Session
|
|
467
|
-
*
|
|
468
|
-
* Invoke an automation.
|
|
469
|
-
*
|
|
470
|
-
* Runs the automation exactly as defined — its persona, model,
|
|
471
|
-
* environment, permissions, skills, and budget bind — and returns
|
|
472
|
-
* the session it started. The body carries only what a caller may
|
|
473
|
-
* supply: the typed `input` its schema demands, an optional tighter
|
|
474
|
-
* `budget`, and `metadata`. For a different persona or environment,
|
|
475
|
-
* start a raw session with POST /v1/sessions instead.
|
|
476
|
-
*/
|
|
477
|
-
async run(automation_id, options = {}) {
|
|
478
|
-
const path = `/v1/automations/${enc(automation_id)}/sessions`;
|
|
479
|
-
const body = buildBody({ budget: options.budget, input: options.input, metadata: options.metadata });
|
|
480
|
-
return await this.transport.request("POST", path, { body });
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* Unlink Automation
|
|
484
|
-
*
|
|
485
|
-
* Take over an automation from its file, by id or by name.
|
|
486
|
-
*
|
|
487
|
-
* The file stops governing it immediately and further changes go
|
|
488
|
-
* through this API. The file is left in place, inert — delete it
|
|
489
|
-
* whenever you like.
|
|
490
|
-
*/
|
|
491
|
-
async unlink(automation_id) {
|
|
492
|
-
const path = `/v1/automations/${enc(automation_id)}/unlink`;
|
|
493
|
-
return await this.transport.request("POST", path);
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Update Automation
|
|
497
|
-
*
|
|
498
|
-
* Replace an automation's definition, by id or by name.
|
|
499
|
-
*
|
|
500
|
-
* The whole definition is replaced, and the change is live at
|
|
501
|
-
* once. Only for automations managed through this API: one defined
|
|
502
|
-
* by a repository file is a 409, since the next push to that file
|
|
503
|
-
* would revert the change — unlink it first to take ownership.
|
|
504
|
-
*/
|
|
505
|
-
async update(automation_id, options) {
|
|
506
|
-
const path = `/v1/automations/${enc(automation_id)}`;
|
|
507
|
-
const body = buildBody({ automation: options.automation });
|
|
508
|
-
return await this.transport.request("PUT", path, { body });
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
1309
|
var EllipsisEnvironments = class {
|
|
512
1310
|
constructor(transport) {
|
|
513
1311
|
this.transport = transport;
|
|
@@ -521,6 +1319,12 @@ var EllipsisEnvironments = class {
|
|
|
521
1319
|
* `kind: environment` YAML under an agents directory.
|
|
522
1320
|
*
|
|
523
1321
|
* 409 when another live environment already holds the name.
|
|
1322
|
+
*
|
|
1323
|
+
* Required permissions: write:environments.
|
|
1324
|
+
* API key: Supported.
|
|
1325
|
+
* CLI user token: Supported.
|
|
1326
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1327
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
524
1328
|
*/
|
|
525
1329
|
async create(options) {
|
|
526
1330
|
const path = "/v1/environments";
|
|
@@ -537,6 +1341,12 @@ var EllipsisEnvironments = class {
|
|
|
537
1341
|
* environment. Past sessions remain readable. Only for environments
|
|
538
1342
|
* managed through this API — delete the file to remove one defined
|
|
539
1343
|
* by a repository.
|
|
1344
|
+
*
|
|
1345
|
+
* Required permissions: delete:environments.
|
|
1346
|
+
* API key: Supported.
|
|
1347
|
+
* CLI user token: Supported.
|
|
1348
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1349
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
540
1350
|
*/
|
|
541
1351
|
async delete(environment_id) {
|
|
542
1352
|
const path = `/v1/environments/${enc(environment_id)}`;
|
|
@@ -546,6 +1356,12 @@ var EllipsisEnvironments = class {
|
|
|
546
1356
|
* Get Environment
|
|
547
1357
|
*
|
|
548
1358
|
* Return one saved environment, by id or by name.
|
|
1359
|
+
*
|
|
1360
|
+
* Required permissions: read:environments.
|
|
1361
|
+
* API key: Supported.
|
|
1362
|
+
* CLI user token: Supported.
|
|
1363
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1364
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
549
1365
|
*/
|
|
550
1366
|
async get(environment_id) {
|
|
551
1367
|
const path = `/v1/environments/${enc(environment_id)}`;
|
|
@@ -555,6 +1371,12 @@ var EllipsisEnvironments = class {
|
|
|
555
1371
|
* List Environments
|
|
556
1372
|
*
|
|
557
1373
|
* List saved environments.
|
|
1374
|
+
*
|
|
1375
|
+
* Required permissions: read:environments.
|
|
1376
|
+
* API key: Supported.
|
|
1377
|
+
* CLI user token: Supported.
|
|
1378
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1379
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
558
1380
|
*/
|
|
559
1381
|
async list() {
|
|
560
1382
|
const path = "/v1/environments";
|
|
@@ -569,6 +1391,12 @@ var EllipsisEnvironments = class {
|
|
|
569
1391
|
* resolve the new body; running sessions keep the one frozen at
|
|
570
1392
|
* their start. Only for environments managed through this API: one
|
|
571
1393
|
* defined by a repository file is a 409.
|
|
1394
|
+
*
|
|
1395
|
+
* Required permissions: write:environments.
|
|
1396
|
+
* API key: Supported.
|
|
1397
|
+
* CLI user token: Supported.
|
|
1398
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1399
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
572
1400
|
*/
|
|
573
1401
|
async update(environment_id, options) {
|
|
574
1402
|
const path = `/v1/environments/${enc(environment_id)}`;
|
|
@@ -591,6 +1419,13 @@ var EllipsisFiles = class {
|
|
|
591
1419
|
* agent persisting a screenshot to link on a PR), but all
|
|
592
1420
|
* credential types work. Returns the org-membership-gated
|
|
593
1421
|
* dashboard URL so callers never hard-code URL shapes.
|
|
1422
|
+
*
|
|
1423
|
+
* Required permissions: write:files.
|
|
1424
|
+
* API key: Supported.
|
|
1425
|
+
* CLI user token: Supported.
|
|
1426
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1427
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1428
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
594
1429
|
*/
|
|
595
1430
|
async create(options) {
|
|
596
1431
|
const path = "/v1/files";
|
|
@@ -608,6 +1443,13 @@ var EllipsisFiles = class {
|
|
|
608
1443
|
* potentially-untrusted code and must not be able to destroy the
|
|
609
1444
|
* account's files — uploading is fine, destruction is not); API
|
|
610
1445
|
* keys and user tokens may delete.
|
|
1446
|
+
*
|
|
1447
|
+
* Required permissions: delete:files.
|
|
1448
|
+
* API key: Supported.
|
|
1449
|
+
* CLI user token: Supported.
|
|
1450
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1451
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1452
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
611
1453
|
*/
|
|
612
1454
|
async delete(file_id) {
|
|
613
1455
|
const path = `/v1/files/${enc(file_id)}`;
|
|
@@ -619,11 +1461,23 @@ var EllipsisFiles = class {
|
|
|
619
1461
|
* Return one file's metadata and download link.
|
|
620
1462
|
*
|
|
621
1463
|
* Includes the gated dashboard URL and a short-lived presigned
|
|
622
|
-
* `download_url
|
|
1464
|
+
* `download_url`, plus the owning account's GitHub login.
|
|
1465
|
+
*
|
|
1466
|
+
* Signed-in dashboard users are checked against the file's owning
|
|
1467
|
+
* account, regardless of their selected organization. API keys,
|
|
1468
|
+
* CLI user tokens, and sandbox tokens remain restricted to their
|
|
1469
|
+
* own account. Missing, deleted, and inaccessible files return 404.
|
|
623
1470
|
*
|
|
624
1471
|
* To fetch the bytes locally, call this and then GET download_url
|
|
625
1472
|
* immediately — the JSON API never carries the file. The CLI's
|
|
626
1473
|
* `agent file get` wraps exactly that two-step.
|
|
1474
|
+
*
|
|
1475
|
+
* Required permissions: read:files.
|
|
1476
|
+
* API key: Supported.
|
|
1477
|
+
* CLI user token: Supported.
|
|
1478
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1479
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1480
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
627
1481
|
*/
|
|
628
1482
|
async get(file_id) {
|
|
629
1483
|
const path = `/v1/files/${enc(file_id)}`;
|
|
@@ -634,12 +1488,21 @@ var EllipsisFiles = class {
|
|
|
634
1488
|
*
|
|
635
1489
|
* List uploaded files, newest first.
|
|
636
1490
|
*
|
|
637
|
-
* Metadata only
|
|
638
|
-
*
|
|
1491
|
+
* Metadata only by default. Set include_download_urls=true to get
|
|
1492
|
+
* a download_urls map keyed by file id for thumbnails or batch
|
|
1493
|
+
* downloads. URLs expire within about a minute. session_id scopes
|
|
1494
|
+
* the list to one session's uploads.
|
|
1495
|
+
*
|
|
1496
|
+
* Required permissions: read:files.
|
|
1497
|
+
* API key: Supported.
|
|
1498
|
+
* CLI user token: Supported.
|
|
1499
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1500
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1501
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
639
1502
|
*/
|
|
640
1503
|
async list(options = {}) {
|
|
641
1504
|
const path = "/v1/files";
|
|
642
|
-
const query = buildQuery({ session_id: options.session_id, limit: options.limit, cursor: options.cursor });
|
|
1505
|
+
const query = buildQuery({ session_id: options.session_id, limit: options.limit, cursor: options.cursor, include_download_urls: options.include_download_urls });
|
|
643
1506
|
const response = await this.transport.request("GET", path, { query });
|
|
644
1507
|
return new Page(
|
|
645
1508
|
response,
|
|
@@ -648,6 +1511,67 @@ var EllipsisFiles = class {
|
|
|
648
1511
|
);
|
|
649
1512
|
}
|
|
650
1513
|
};
|
|
1514
|
+
var EllipsisHandlers = class {
|
|
1515
|
+
constructor(transport) {
|
|
1516
|
+
this.transport = transport;
|
|
1517
|
+
}
|
|
1518
|
+
transport;
|
|
1519
|
+
/**
|
|
1520
|
+
* List Handlers
|
|
1521
|
+
*
|
|
1522
|
+
* List the account's Slack, GitHub, Linear, and Sentry handlers.
|
|
1523
|
+
*
|
|
1524
|
+
* Returns at most one handler per service, from the current .ellipsis
|
|
1525
|
+
* repository. Disabled handlers and last valid definitions with sync
|
|
1526
|
+
* errors are included. Missing handlers are omitted. This reads saved
|
|
1527
|
+
* state without fetching GitHub or triggering synchronization.
|
|
1528
|
+
*
|
|
1529
|
+
* Requires configs:read; scoped grants match handlers/{service}.
|
|
1530
|
+
* Sandbox credentials with that grant may read handlers.
|
|
1531
|
+
*
|
|
1532
|
+
* Required permissions: read:configs.
|
|
1533
|
+
* API key: Supported.
|
|
1534
|
+
* CLI user token: Supported.
|
|
1535
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1536
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1537
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1538
|
+
*/
|
|
1539
|
+
async list() {
|
|
1540
|
+
const path = "/v1/handlers";
|
|
1541
|
+
return await this.transport.request("GET", path);
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Get Handler Metrics
|
|
1545
|
+
*
|
|
1546
|
+
* Return session counts and accumulated spend for a saved handler.
|
|
1547
|
+
*
|
|
1548
|
+
* Filters only by session creation time. Omitted bounds include all
|
|
1549
|
+
* history. Counts use the current conversation outcome, so an idle
|
|
1550
|
+
* session remains active. Spend includes the selected sessions' full
|
|
1551
|
+
* accumulated cost, including activity after the creation-time window.
|
|
1552
|
+
* Only sessions carrying this exact saved handler id are counted;
|
|
1553
|
+
* legacy sessions without handler provenance are excluded.
|
|
1554
|
+
*
|
|
1555
|
+
* spend_windows reports current trailing 1-, 7-, and 28-day credit
|
|
1556
|
+
* debits and effective handler budgets across all attributed sessions.
|
|
1557
|
+
* Those windows use usage timestamps and are independent of start/end.
|
|
1558
|
+
*
|
|
1559
|
+
* Requires configs:read matching handlers/{service} and unrestricted
|
|
1560
|
+
* sessions:read. Sandbox tokens with both grants may read metrics.
|
|
1561
|
+
*
|
|
1562
|
+
* Required permissions: read:sessions, read:configs.
|
|
1563
|
+
* API key: Supported.
|
|
1564
|
+
* CLI user token: Supported.
|
|
1565
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1566
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1567
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1568
|
+
*/
|
|
1569
|
+
async metrics(handler_id, options = {}) {
|
|
1570
|
+
const path = `/v1/handlers/${enc(handler_id)}/metrics`;
|
|
1571
|
+
const query = buildQuery({ start: options.start, end: options.end });
|
|
1572
|
+
return await this.transport.request("GET", path, { query });
|
|
1573
|
+
}
|
|
1574
|
+
};
|
|
651
1575
|
var EllipsisIntegrationsGithub = class {
|
|
652
1576
|
constructor(transport) {
|
|
653
1577
|
this.transport = transport;
|
|
@@ -663,6 +1587,12 @@ var EllipsisIntegrationsGithub = class {
|
|
|
663
1587
|
*
|
|
664
1588
|
* Members carry their linked Slack identity when a Slack-GitHub
|
|
665
1589
|
* link exists, and /slack/members carries the reverse link.
|
|
1590
|
+
*
|
|
1591
|
+
* Required permissions: read:integrations.
|
|
1592
|
+
* API key: Supported.
|
|
1593
|
+
* CLI user token: Supported.
|
|
1594
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1595
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
666
1596
|
*/
|
|
667
1597
|
async members() {
|
|
668
1598
|
const path = "/v1/integrations/github/members";
|
|
@@ -672,36 +1602,108 @@ var EllipsisIntegrationsGithub = class {
|
|
|
672
1602
|
* List Github Repositories
|
|
673
1603
|
*
|
|
674
1604
|
* List GitHub repositories connected to the installation.
|
|
1605
|
+
*
|
|
1606
|
+
* Required permissions: read:integrations.
|
|
1607
|
+
* API key: Supported.
|
|
1608
|
+
* CLI user token: Supported.
|
|
1609
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1610
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
675
1611
|
*/
|
|
676
1612
|
async repos() {
|
|
677
1613
|
const path = "/v1/integrations/github/repos";
|
|
678
1614
|
return await this.transport.request("GET", path);
|
|
679
1615
|
}
|
|
1616
|
+
/**
|
|
1617
|
+
* Uninstall Github App
|
|
1618
|
+
*
|
|
1619
|
+
* Required permissions: write:integrations.
|
|
1620
|
+
* API key: Supported.
|
|
1621
|
+
* CLI user token: Supported.
|
|
1622
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1623
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1624
|
+
*/
|
|
1625
|
+
async uninstall(options) {
|
|
1626
|
+
const path = "/v1/integrations/github/uninstall";
|
|
1627
|
+
const body = buildBody({ confirm_account_login: options.confirm_account_login });
|
|
1628
|
+
return await this.transport.request("POST", path, { body });
|
|
1629
|
+
}
|
|
680
1630
|
};
|
|
681
1631
|
var EllipsisIntegrationsLinear = class {
|
|
682
1632
|
constructor(transport) {
|
|
683
1633
|
this.transport = transport;
|
|
684
1634
|
}
|
|
685
1635
|
transport;
|
|
1636
|
+
/**
|
|
1637
|
+
* Delete Linear Integration
|
|
1638
|
+
*
|
|
1639
|
+
* Required permissions: delete:integrations.
|
|
1640
|
+
* API key: Supported.
|
|
1641
|
+
* CLI user token: Supported.
|
|
1642
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1643
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1644
|
+
*/
|
|
1645
|
+
async delete() {
|
|
1646
|
+
const path = "/v1/integrations/linear";
|
|
1647
|
+
return await this.transport.request("DELETE", path);
|
|
1648
|
+
}
|
|
686
1649
|
/**
|
|
687
1650
|
* List Linear Teams
|
|
688
1651
|
*
|
|
689
1652
|
* List the teams of the connected Linear workspace.
|
|
1653
|
+
*
|
|
1654
|
+
* Required permissions: read:integrations.
|
|
1655
|
+
* API key: Supported.
|
|
1656
|
+
* CLI user token: Supported.
|
|
1657
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1658
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
690
1659
|
*/
|
|
691
1660
|
async teams() {
|
|
692
1661
|
const path = "/v1/integrations/linear/teams";
|
|
693
1662
|
return await this.transport.request("GET", path);
|
|
694
1663
|
}
|
|
1664
|
+
/**
|
|
1665
|
+
* Update Linear Teams
|
|
1666
|
+
*
|
|
1667
|
+
* Required permissions: write:integrations.
|
|
1668
|
+
* API key: Supported.
|
|
1669
|
+
* CLI user token: Supported.
|
|
1670
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1671
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1672
|
+
*/
|
|
1673
|
+
async updateSettings(options) {
|
|
1674
|
+
const path = "/v1/integrations/linear/settings";
|
|
1675
|
+
const body = buildBody({ mcp_inclusion: options.mcp_inclusion, teams: options.teams });
|
|
1676
|
+
return await this.transport.request("PUT", path, { body });
|
|
1677
|
+
}
|
|
695
1678
|
};
|
|
696
1679
|
var EllipsisIntegrationsSentry = class {
|
|
697
1680
|
constructor(transport) {
|
|
698
1681
|
this.transport = transport;
|
|
699
1682
|
}
|
|
700
1683
|
transport;
|
|
1684
|
+
/**
|
|
1685
|
+
* Delete Sentry Integration
|
|
1686
|
+
*
|
|
1687
|
+
* Required permissions: delete:integrations.
|
|
1688
|
+
* API key: Supported.
|
|
1689
|
+
* CLI user token: Supported.
|
|
1690
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1691
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1692
|
+
*/
|
|
1693
|
+
async delete(integration_id) {
|
|
1694
|
+
const path = `/v1/integrations/sentry/${enc(integration_id)}`;
|
|
1695
|
+
return await this.transport.request("DELETE", path);
|
|
1696
|
+
}
|
|
701
1697
|
/**
|
|
702
1698
|
* List Sentry Organizations
|
|
703
1699
|
*
|
|
704
1700
|
* List the connected Sentry organizations.
|
|
1701
|
+
*
|
|
1702
|
+
* Required permissions: read:integrations.
|
|
1703
|
+
* API key: Supported.
|
|
1704
|
+
* CLI user token: Supported.
|
|
1705
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1706
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
705
1707
|
*/
|
|
706
1708
|
async organizations() {
|
|
707
1709
|
const path = "/v1/integrations/sentry/organizations";
|
|
@@ -718,21 +1720,73 @@ var EllipsisIntegrationsSlack = class {
|
|
|
718
1720
|
*
|
|
719
1721
|
* List the channels of the connected Slack workspace, fetched
|
|
720
1722
|
* live from the Slack API.
|
|
1723
|
+
*
|
|
1724
|
+
* Required permissions: read:integrations.
|
|
1725
|
+
* API key: Supported.
|
|
1726
|
+
* CLI user token: Supported.
|
|
1727
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1728
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
721
1729
|
*/
|
|
722
1730
|
async channels() {
|
|
723
1731
|
const path = "/v1/integrations/slack/channels";
|
|
724
1732
|
return await this.transport.request("GET", path);
|
|
725
1733
|
}
|
|
1734
|
+
/**
|
|
1735
|
+
* Create Operations Channel
|
|
1736
|
+
*
|
|
1737
|
+
* Required permissions: write:integrations.
|
|
1738
|
+
* API key: Supported.
|
|
1739
|
+
* CLI user token: Supported.
|
|
1740
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1741
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1742
|
+
*/
|
|
1743
|
+
async createOperationsChannel() {
|
|
1744
|
+
const path = "/v1/integrations/slack/operations-channel";
|
|
1745
|
+
return await this.transport.request("POST", path);
|
|
1746
|
+
}
|
|
1747
|
+
/**
|
|
1748
|
+
* Delete Slack Integration
|
|
1749
|
+
*
|
|
1750
|
+
* Required permissions: delete:integrations.
|
|
1751
|
+
* API key: Supported.
|
|
1752
|
+
* CLI user token: Supported.
|
|
1753
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1754
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1755
|
+
*/
|
|
1756
|
+
async delete() {
|
|
1757
|
+
const path = "/v1/integrations/slack";
|
|
1758
|
+
return await this.transport.request("DELETE", path);
|
|
1759
|
+
}
|
|
726
1760
|
/**
|
|
727
1761
|
* List Slack Members
|
|
728
1762
|
*
|
|
729
1763
|
* List the members of the connected Slack workspace, fetched
|
|
730
1764
|
* live from the Slack API.
|
|
1765
|
+
*
|
|
1766
|
+
* Required permissions: read:integrations.
|
|
1767
|
+
* API key: Supported.
|
|
1768
|
+
* CLI user token: Supported.
|
|
1769
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1770
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
731
1771
|
*/
|
|
732
1772
|
async members() {
|
|
733
1773
|
const path = "/v1/integrations/slack/members";
|
|
734
1774
|
return await this.transport.request("GET", path);
|
|
735
1775
|
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Update Slack Settings
|
|
1778
|
+
*
|
|
1779
|
+
* Required permissions: write:integrations.
|
|
1780
|
+
* API key: Supported.
|
|
1781
|
+
* CLI user token: Supported.
|
|
1782
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
1783
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1784
|
+
*/
|
|
1785
|
+
async updateSettings(options) {
|
|
1786
|
+
const path = "/v1/integrations/slack/settings";
|
|
1787
|
+
const body = buildBody({ mcp_inclusion: options.mcp_inclusion });
|
|
1788
|
+
return await this.transport.request("PUT", path, { body });
|
|
1789
|
+
}
|
|
736
1790
|
};
|
|
737
1791
|
var EllipsisIntegrations = class {
|
|
738
1792
|
constructor(transport) {
|
|
@@ -754,10 +1808,16 @@ var EllipsisIntegrations = class {
|
|
|
754
1808
|
*
|
|
755
1809
|
* A read-only view, so an agent authoring another agent's
|
|
756
1810
|
* config can learn which repositories, channels, teams, and
|
|
757
|
-
* organizations it may name before POST /
|
|
1811
|
+
* organizations it may name before POST /agents.
|
|
758
1812
|
*
|
|
759
1813
|
* Available to all credential types including sandbox tokens: the
|
|
760
1814
|
* responses never include OAuth tokens or any other secret.
|
|
1815
|
+
*
|
|
1816
|
+
* Required permissions: read:integrations.
|
|
1817
|
+
* API key: Supported.
|
|
1818
|
+
* CLI user token: Supported.
|
|
1819
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1820
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
761
1821
|
*/
|
|
762
1822
|
async list() {
|
|
763
1823
|
const path = "/v1/integrations";
|
|
@@ -781,6 +1841,13 @@ var EllipsisMemories = class {
|
|
|
781
1841
|
*
|
|
782
1842
|
* Creating never overwrites: a path that already exists is a 409, so
|
|
783
1843
|
* correcting an existing memory is an explicit edit.
|
|
1844
|
+
*
|
|
1845
|
+
* Required permissions: write:memories.
|
|
1846
|
+
* API key: Supported.
|
|
1847
|
+
* CLI user token: Supported.
|
|
1848
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1849
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1850
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
784
1851
|
*/
|
|
785
1852
|
async create(options) {
|
|
786
1853
|
const path = "/v1/memories";
|
|
@@ -795,6 +1862,13 @@ var EllipsisMemories = class {
|
|
|
795
1862
|
* Available to every credential type, agents included — a wrong
|
|
796
1863
|
* memory is worse than a missing one. The deleted content is kept in
|
|
797
1864
|
* the memory's history for forensics, not for an undo API.
|
|
1865
|
+
*
|
|
1866
|
+
* Required permissions: delete:memories.
|
|
1867
|
+
* API key: Supported.
|
|
1868
|
+
* CLI user token: Supported.
|
|
1869
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1870
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1871
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
798
1872
|
*/
|
|
799
1873
|
async delete(memory_id, options = {}) {
|
|
800
1874
|
const path = `/v1/memories/${enc(memory_id)}`;
|
|
@@ -812,6 +1886,13 @@ var EllipsisMemories = class {
|
|
|
812
1886
|
*
|
|
813
1887
|
* Pass `if_sha256` (from a previous read) to make a concurrent write
|
|
814
1888
|
* a 409 instead of silently overwriting it.
|
|
1889
|
+
*
|
|
1890
|
+
* Required permissions: write:memories.
|
|
1891
|
+
* API key: Supported.
|
|
1892
|
+
* CLI user token: Supported.
|
|
1893
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1894
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1895
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
815
1896
|
*/
|
|
816
1897
|
async edit(memory_id, options = {}) {
|
|
817
1898
|
const path = `/v1/memories/${enc(memory_id)}`;
|
|
@@ -824,6 +1905,13 @@ var EllipsisMemories = class {
|
|
|
824
1905
|
* Read one memory's full content.
|
|
825
1906
|
*
|
|
826
1907
|
* The id comes from the index returned by listing memories.
|
|
1908
|
+
*
|
|
1909
|
+
* Required permissions: read:memories.
|
|
1910
|
+
* API key: Supported.
|
|
1911
|
+
* CLI user token: Supported.
|
|
1912
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1913
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1914
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
827
1915
|
*/
|
|
828
1916
|
async get(memory_id) {
|
|
829
1917
|
const path = `/v1/memories/${enc(memory_id)}`;
|
|
@@ -838,6 +1926,13 @@ var EllipsisMemories = class {
|
|
|
838
1926
|
* memory, carrying its id, path, and description) plus the same
|
|
839
1927
|
* entries structured, each with every field except `content`. Read
|
|
840
1928
|
* the index, then fetch the ids whose content you want.
|
|
1929
|
+
*
|
|
1930
|
+
* Required permissions: read:memories.
|
|
1931
|
+
* API key: Supported.
|
|
1932
|
+
* CLI user token: Supported.
|
|
1933
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1934
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1935
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
841
1936
|
*/
|
|
842
1937
|
async list(options = {}) {
|
|
843
1938
|
const path = "/v1/memories";
|
|
@@ -845,33 +1940,24 @@ var EllipsisMemories = class {
|
|
|
845
1940
|
return await this.transport.request("GET", path, { query });
|
|
846
1941
|
}
|
|
847
1942
|
};
|
|
848
|
-
var
|
|
1943
|
+
var EllipsisReviews = class {
|
|
849
1944
|
constructor(transport) {
|
|
850
1945
|
this.transport = transport;
|
|
851
1946
|
}
|
|
852
1947
|
transport;
|
|
853
1948
|
/**
|
|
854
|
-
* List
|
|
1949
|
+
* List Review Configs
|
|
855
1950
|
*
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
*
|
|
859
|
-
*
|
|
860
|
-
*
|
|
861
|
-
* client's model picker can never drift from what's offered.
|
|
862
|
-
* Behind auth but not account-scoped — the selectable set is
|
|
863
|
-
* global.
|
|
1951
|
+
* Required permissions: read:reviews.
|
|
1952
|
+
* API key: Supported.
|
|
1953
|
+
* CLI user token: Supported.
|
|
1954
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1955
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
864
1956
|
*/
|
|
865
|
-
async
|
|
866
|
-
const path = "/v1/
|
|
1957
|
+
async configs() {
|
|
1958
|
+
const path = "/v1/reviews/configs";
|
|
867
1959
|
return await this.transport.request("GET", path);
|
|
868
1960
|
}
|
|
869
|
-
};
|
|
870
|
-
var EllipsisReviews = class {
|
|
871
|
-
constructor(transport) {
|
|
872
|
-
this.transport = transport;
|
|
873
|
-
}
|
|
874
|
-
transport;
|
|
875
1961
|
/**
|
|
876
1962
|
* Create Review
|
|
877
1963
|
*
|
|
@@ -887,6 +1973,12 @@ var EllipsisReviews = class {
|
|
|
887
1973
|
* `stages[].session_id` is where a client streams
|
|
888
1974
|
* (/sessions/{id}/stream on a stage session), since the review
|
|
889
1975
|
* itself is a pipeline rather than one process.
|
|
1976
|
+
*
|
|
1977
|
+
* Required permissions: write:reviews.
|
|
1978
|
+
* API key: Supported.
|
|
1979
|
+
* CLI user token: Supported.
|
|
1980
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1981
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
890
1982
|
*/
|
|
891
1983
|
async create(options) {
|
|
892
1984
|
const path = "/v1/reviews";
|
|
@@ -904,6 +1996,12 @@ var EllipsisReviews = class {
|
|
|
904
1996
|
* Findings only exist after a stage session finalizes — a running
|
|
905
1997
|
* review honestly reports [] / null, which is why a client
|
|
906
1998
|
* streams a stage session and then re-fetches the review.
|
|
1999
|
+
*
|
|
2000
|
+
* Required permissions: read:reviews.
|
|
2001
|
+
* API key: Supported.
|
|
2002
|
+
* CLI user token: Supported.
|
|
2003
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2004
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
907
2005
|
*/
|
|
908
2006
|
async get(review_id) {
|
|
909
2007
|
const path = `/v1/reviews/${enc(review_id)}`;
|
|
@@ -921,6 +2019,12 @@ var EllipsisReviews = class {
|
|
|
921
2019
|
*
|
|
922
2020
|
* Webhook-created reviews appear here too, so this answers "show
|
|
923
2021
|
* me every review on this PR".
|
|
2022
|
+
*
|
|
2023
|
+
* Required permissions: read:reviews.
|
|
2024
|
+
* API key: Supported.
|
|
2025
|
+
* CLI user token: Supported.
|
|
2026
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2027
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
924
2028
|
*/
|
|
925
2029
|
async list(options = {}) {
|
|
926
2030
|
const path = "/v1/reviews";
|
|
@@ -945,6 +2049,13 @@ var EllipsisSecrets = class {
|
|
|
945
2049
|
*
|
|
946
2050
|
* Refused for sandbox tokens; mutations require an API key or
|
|
947
2051
|
* user token.
|
|
2052
|
+
*
|
|
2053
|
+
* Required permissions: delete:secrets.
|
|
2054
|
+
* API key: Supported.
|
|
2055
|
+
* CLI user token: Supported.
|
|
2056
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2057
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2058
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
948
2059
|
*/
|
|
949
2060
|
async delete(name) {
|
|
950
2061
|
const path = `/v1/secrets/${enc(name)}`;
|
|
@@ -957,6 +2068,13 @@ var EllipsisSecrets = class {
|
|
|
957
2068
|
*
|
|
958
2069
|
* Values are write-only: the response carries only names and
|
|
959
2070
|
* timestamps, never the stored value.
|
|
2071
|
+
*
|
|
2072
|
+
* Required permissions: read:secrets.
|
|
2073
|
+
* API key: Supported.
|
|
2074
|
+
* CLI user token: Supported.
|
|
2075
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2076
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2077
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
960
2078
|
*/
|
|
961
2079
|
async list() {
|
|
962
2080
|
const path = "/v1/secrets";
|
|
@@ -971,6 +2089,13 @@ var EllipsisSecrets = class {
|
|
|
971
2089
|
* only — values are write-only. Refused for sandbox tokens (held by
|
|
972
2090
|
* potentially-untrusted in-sandbox code); mutations require an
|
|
973
2091
|
* API key or user token.
|
|
2092
|
+
*
|
|
2093
|
+
* Required permissions: write:secrets.
|
|
2094
|
+
* API key: Supported.
|
|
2095
|
+
* CLI user token: Supported.
|
|
2096
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2097
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2098
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
974
2099
|
*/
|
|
975
2100
|
async set(options) {
|
|
976
2101
|
const path = "/v1/secrets";
|
|
@@ -984,7 +2109,31 @@ var EllipsisSessions = class {
|
|
|
984
2109
|
}
|
|
985
2110
|
transport;
|
|
986
2111
|
/**
|
|
987
|
-
* Get
|
|
2112
|
+
* Get Session Analytics
|
|
2113
|
+
*
|
|
2114
|
+
* Measured tokens and spend over time, plus estimated content cost.
|
|
2115
|
+
*
|
|
2116
|
+
* Token lanes use the request's saved rates. Content attribution
|
|
2117
|
+
* apportions input/cache spend by text size, counting carried context
|
|
2118
|
+
* on every request. It is an estimate, not a tool execution fee.
|
|
2119
|
+
* Only the latest 200 retained request bodies are inspected; missing
|
|
2120
|
+
* or unsupported context remains explicitly unattributed. No raw
|
|
2121
|
+
* prompts or tool results are returned. Sandbox tokens may read only
|
|
2122
|
+
* their own session's analytics.
|
|
2123
|
+
*
|
|
2124
|
+
* Required permissions: read:sessions.
|
|
2125
|
+
* API key: Supported.
|
|
2126
|
+
* CLI user token: Supported.
|
|
2127
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
|
|
2128
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2129
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
2130
|
+
*/
|
|
2131
|
+
async analytics(session_id) {
|
|
2132
|
+
const path = `/v1/sessions/${enc(session_id)}/analytics`;
|
|
2133
|
+
return await this.transport.request("GET", path);
|
|
2134
|
+
}
|
|
2135
|
+
/**
|
|
2136
|
+
* Get Session Diff
|
|
988
2137
|
*
|
|
989
2138
|
* Return the session's uncommitted changes as a patch.
|
|
990
2139
|
*
|
|
@@ -993,15 +2142,22 @@ var EllipsisSessions = class {
|
|
|
993
2142
|
* counts ride on the session itself (`git.repos[].files`); this
|
|
994
2143
|
* is the text behind them. Empty when the tree was clean. A
|
|
995
2144
|
* sandbox token may read only its own session's diff.
|
|
2145
|
+
*
|
|
2146
|
+
* Required permissions: read:sessions.
|
|
2147
|
+
* API key: Supported.
|
|
2148
|
+
* CLI user token: Supported.
|
|
2149
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
|
|
2150
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2151
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
996
2152
|
*/
|
|
997
2153
|
async diff(session_id) {
|
|
998
2154
|
const path = `/v1/sessions/${enc(session_id)}/diff`;
|
|
999
2155
|
return await this.transport.request("GET", path);
|
|
1000
2156
|
}
|
|
1001
2157
|
/**
|
|
1002
|
-
*
|
|
2158
|
+
* Download Session
|
|
1003
2159
|
*
|
|
1004
|
-
*
|
|
2160
|
+
* Download the complete session history.
|
|
1005
2161
|
*
|
|
1006
2162
|
* The complete, ordered history of the session (agent output, tool calls, thinking,
|
|
1007
2163
|
* lifecycle events, sandbox output, message events) as an ordered
|
|
@@ -1011,29 +2167,83 @@ var EllipsisSessions = class {
|
|
|
1011
2167
|
* for one file. The JSON API never carries the bytes (same
|
|
1012
2168
|
* two-step as files). /records is the paged live view of the
|
|
1013
2169
|
* same data.
|
|
2170
|
+
*
|
|
2171
|
+
* Required permissions: read:sessions.
|
|
2172
|
+
* API key: Supported.
|
|
2173
|
+
* CLI user token: Supported.
|
|
2174
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2175
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2176
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
2177
|
+
*/
|
|
2178
|
+
async download(session_id) {
|
|
2179
|
+
const path = `/v1/sessions/${enc(session_id)}/download`;
|
|
2180
|
+
return await this.transport.request("GET", path);
|
|
2181
|
+
}
|
|
2182
|
+
/**
|
|
2183
|
+
* List Session Executions
|
|
2184
|
+
*
|
|
2185
|
+
* Return the session's execution attempts, oldest first.
|
|
2186
|
+
*
|
|
2187
|
+
* Includes the selected harness, model, resolved instructions, initial
|
|
2188
|
+
* query, and common result summary. Complete native outputs remain in
|
|
2189
|
+
* the session's records. Internal launch options and checkpoint storage
|
|
2190
|
+
* references are excluded.
|
|
2191
|
+
*
|
|
2192
|
+
* Required permissions: read:sessions.
|
|
2193
|
+
* API key: Supported.
|
|
2194
|
+
* CLI user token: Supported.
|
|
2195
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2196
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2197
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1014
2198
|
*/
|
|
1015
|
-
async
|
|
1016
|
-
const path = `/v1/sessions/${enc(session_id)}/
|
|
2199
|
+
async executions(session_id) {
|
|
2200
|
+
const path = `/v1/sessions/${enc(session_id)}/executions`;
|
|
1017
2201
|
return await this.transport.request("GET", path);
|
|
1018
2202
|
}
|
|
1019
2203
|
/**
|
|
1020
|
-
* Get
|
|
2204
|
+
* Get Session
|
|
1021
2205
|
*
|
|
1022
2206
|
* Return one session.
|
|
1023
2207
|
*
|
|
1024
2208
|
* The public wire shape — the same shape the stream's session
|
|
1025
|
-
* frames carry, with
|
|
2209
|
+
* frames carry, with attribution, stop, and archive actors resolved
|
|
1026
2210
|
* at read time.
|
|
1027
2211
|
*
|
|
1028
2212
|
* The heavy near-static blobs (config snapshot, input/output)
|
|
1029
2213
|
* live on the detail endpoints, not here.
|
|
2214
|
+
*
|
|
2215
|
+
* Required permissions: read:sessions.
|
|
2216
|
+
* API key: Supported.
|
|
2217
|
+
* CLI user token: Supported.
|
|
2218
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2219
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2220
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1030
2221
|
*/
|
|
1031
2222
|
async get(session_id) {
|
|
1032
2223
|
const path = `/v1/sessions/${enc(session_id)}`;
|
|
1033
2224
|
return await this.transport.request("GET", path);
|
|
1034
2225
|
}
|
|
1035
2226
|
/**
|
|
1036
|
-
*
|
|
2227
|
+
* Get Session Git
|
|
2228
|
+
*
|
|
2229
|
+
* The session's GitHub-side git view: its commits, and each PR it
|
|
2230
|
+
* opened joined to the live gh_prs row and reviews. The identity list
|
|
2231
|
+
* (output_git) rides the session itself over the WebSocket; this is
|
|
2232
|
+
* the join a "run" notify tells an open pane to refetch.
|
|
2233
|
+
*
|
|
2234
|
+
* Required permissions: read:sessions.
|
|
2235
|
+
* API key: Supported.
|
|
2236
|
+
* CLI user token: Supported.
|
|
2237
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2238
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2239
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
2240
|
+
*/
|
|
2241
|
+
async git(session_id) {
|
|
2242
|
+
const path = `/v1/sessions/${enc(session_id)}/git`;
|
|
2243
|
+
return await this.transport.request("GET", path);
|
|
2244
|
+
}
|
|
2245
|
+
/**
|
|
2246
|
+
* Ingest Session Transcript
|
|
1037
2247
|
*
|
|
1038
2248
|
* Append transcript lines to a session's record.
|
|
1039
2249
|
*
|
|
@@ -1041,6 +2251,13 @@ var EllipsisSessions = class {
|
|
|
1041
2251
|
*
|
|
1042
2252
|
* A sandbox token may only push its own session's transcript.
|
|
1043
2253
|
* Idempotent by transcript line uuid; tolerant of malformed lines.
|
|
2254
|
+
*
|
|
2255
|
+
* Required permissions: write:sessions.
|
|
2256
|
+
* API key: Supported.
|
|
2257
|
+
* CLI user token: Supported.
|
|
2258
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
|
|
2259
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2260
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1044
2261
|
*/
|
|
1045
2262
|
async ingestTranscript(session_id, options) {
|
|
1046
2263
|
const path = `/v1/sessions/${enc(session_id)}/transcript`;
|
|
@@ -1048,17 +2265,24 @@ var EllipsisSessions = class {
|
|
|
1048
2265
|
return await this.transport.request("POST", path, { body });
|
|
1049
2266
|
}
|
|
1050
2267
|
/**
|
|
1051
|
-
* List
|
|
2268
|
+
* List Sessions
|
|
1052
2269
|
*
|
|
1053
2270
|
* List cloud agent sessions, newest first.
|
|
1054
2271
|
*
|
|
1055
|
-
* Optionally filtered by
|
|
2272
|
+
* Optionally filtered by agent (id or name), source, service, handler, time
|
|
1056
2273
|
* window, attributed author, repository, and whether the session is
|
|
1057
2274
|
* still going.
|
|
2275
|
+
*
|
|
2276
|
+
* Required permissions: read:sessions.
|
|
2277
|
+
* API key: Supported.
|
|
2278
|
+
* CLI user token: Supported.
|
|
2279
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2280
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2281
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1058
2282
|
*/
|
|
1059
2283
|
async list(options = {}) {
|
|
1060
2284
|
const path = "/v1/sessions";
|
|
1061
|
-
const query = buildQuery({
|
|
2285
|
+
const query = buildQuery({ agent: options.agent, source: options.source, service: options.service, handler: options.handler, days: options.days, start: options.start, end: options.end, limit: options.limit, cursor: options.cursor, author_id: options.author_id, repo: options.repo, unfinished: options.unfinished, exclude_code_review: options.exclude_code_review });
|
|
1062
2286
|
const response = await this.transport.request("GET", path, { query });
|
|
1063
2287
|
return new Page(
|
|
1064
2288
|
response,
|
|
@@ -1067,7 +2291,7 @@ var EllipsisSessions = class {
|
|
|
1067
2291
|
);
|
|
1068
2292
|
}
|
|
1069
2293
|
/**
|
|
1070
|
-
* Get
|
|
2294
|
+
* Get Session Output
|
|
1071
2295
|
*
|
|
1072
2296
|
* Return the session's typed output.
|
|
1073
2297
|
*
|
|
@@ -1076,13 +2300,20 @@ var EllipsisSessions = class {
|
|
|
1076
2300
|
* while the session is still running (poll GET /v1/sessions/{id}),
|
|
1077
2301
|
* when the agent declares no output block, or when no execution
|
|
1078
2302
|
* produced output.
|
|
2303
|
+
*
|
|
2304
|
+
* Required permissions: read:sessions.
|
|
2305
|
+
* API key: Supported.
|
|
2306
|
+
* CLI user token: Supported.
|
|
2307
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2308
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2309
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1079
2310
|
*/
|
|
1080
2311
|
async output(session_id) {
|
|
1081
2312
|
const path = `/v1/sessions/${enc(session_id)}/output`;
|
|
1082
|
-
await this.transport.request("GET", path);
|
|
2313
|
+
return await this.transport.request("GET", path);
|
|
1083
2314
|
}
|
|
1084
2315
|
/**
|
|
1085
|
-
* Get
|
|
2316
|
+
* Get Session Records
|
|
1086
2317
|
*
|
|
1087
2318
|
* Return the session's stored transcript records, oldest first.
|
|
1088
2319
|
*
|
|
@@ -1091,6 +2322,13 @@ var EllipsisSessions = class {
|
|
|
1091
2322
|
* agent answering "did X look into Y?" needs to read the sessions
|
|
1092
2323
|
* it finds, and any org member sees the same transcript in the
|
|
1093
2324
|
* dashboard.
|
|
2325
|
+
*
|
|
2326
|
+
* Required permissions: read:sessions.
|
|
2327
|
+
* API key: Supported.
|
|
2328
|
+
* CLI user token: Supported.
|
|
2329
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2330
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2331
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1094
2332
|
*/
|
|
1095
2333
|
async records(session_id, options = {}) {
|
|
1096
2334
|
const path = `/v1/sessions/${enc(session_id)}/records`;
|
|
@@ -1103,7 +2341,22 @@ var EllipsisSessions = class {
|
|
|
1103
2341
|
);
|
|
1104
2342
|
}
|
|
1105
2343
|
/**
|
|
1106
|
-
*
|
|
2344
|
+
* Search Sessions
|
|
2345
|
+
*
|
|
2346
|
+
* Required permissions: read:sessions.
|
|
2347
|
+
* API key: Supported.
|
|
2348
|
+
* CLI user token: Supported.
|
|
2349
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2350
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2351
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
2352
|
+
*/
|
|
2353
|
+
async search(options = {}) {
|
|
2354
|
+
const path = "/v1/sessions/search";
|
|
2355
|
+
const query = buildQuery({ q: options.q, scope: options.scope, source: options.source, service: options.service, handler: options.handler, author_id: options.author_id, agent_id: options.agent_id, session_ids: options.session_ids, repo: options.repo, status: options.status, start: options.start, end: options.end, limit: options.limit });
|
|
2356
|
+
return await this.transport.request("GET", path, { query });
|
|
2357
|
+
}
|
|
2358
|
+
/**
|
|
2359
|
+
* Send Session Message
|
|
1107
2360
|
*
|
|
1108
2361
|
* Send a message to a session.
|
|
1109
2362
|
*
|
|
@@ -1111,6 +2364,13 @@ var EllipsisSessions = class {
|
|
|
1111
2364
|
* Returns the created message so the caller can track it by id; a
|
|
1112
2365
|
* retried send with the same idempotency_key returns the original
|
|
1113
2366
|
* message.
|
|
2367
|
+
*
|
|
2368
|
+
* Required permissions: write:sessions.
|
|
2369
|
+
* API key: Supported.
|
|
2370
|
+
* CLI user token: Supported.
|
|
2371
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2372
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2373
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1114
2374
|
*/
|
|
1115
2375
|
async sendMessage(session_id, options) {
|
|
1116
2376
|
const path = `/v1/sessions/${enc(session_id)}/messages`;
|
|
@@ -1118,38 +2378,106 @@ var EllipsisSessions = class {
|
|
|
1118
2378
|
return await this.transport.request("POST", path, { body });
|
|
1119
2379
|
}
|
|
1120
2380
|
/**
|
|
1121
|
-
*
|
|
2381
|
+
* Get Session Stream Ticket
|
|
2382
|
+
*
|
|
2383
|
+
* Required permissions: read:sessions.
|
|
2384
|
+
* API key: Supported.
|
|
2385
|
+
* CLI user token: Supported.
|
|
2386
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2387
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2388
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
2389
|
+
*/
|
|
2390
|
+
async sessionStreamTicket(session_id) {
|
|
2391
|
+
const path = `/v1/sessions/${enc(session_id)}/stream-ticket`;
|
|
2392
|
+
return await this.transport.request("GET", path);
|
|
2393
|
+
}
|
|
2394
|
+
/**
|
|
2395
|
+
* Start Session
|
|
1122
2396
|
*
|
|
1123
2397
|
* Start a cloud agent session.
|
|
1124
2398
|
*
|
|
1125
2399
|
* The daily driver: a prompt, optionally where to run it
|
|
1126
|
-
* (`environment`) and the run's own settings, in the
|
|
2400
|
+
* (`environment`) and the run's own settings, in the AgentConfig
|
|
1127
2401
|
* vocabulary. What you send is what runs: omit `environment` and the
|
|
1128
2402
|
* session runs in the built-in basic sandbox. A missing model or
|
|
1129
2403
|
* budget comes from the organization's settings, so
|
|
1130
|
-
* `{"prompt": "..."}`
|
|
1131
|
-
*
|
|
1132
|
-
*
|
|
2404
|
+
* `{"claude_code": {"prompt": "..."}}` is a complete request.
|
|
2405
|
+
* Set exactly one of `claude_code` or `codex`. Its `prompt` is the
|
|
2406
|
+
* first message; omit the prompt and the session starts idle, waiting for
|
|
2407
|
+
* one. 400 when `lifecycle.interactive` is false and there is no prompt, or
|
|
1133
2408
|
* when `budget` exceeds the organization's per-session ceiling. To
|
|
1134
|
-
* run a saved
|
|
2409
|
+
* run a saved agent, use POST /v1/agents/{agent_id}/sessions.
|
|
2410
|
+
*
|
|
2411
|
+
* Required permissions: write:sessions.
|
|
2412
|
+
* API key: Supported.
|
|
2413
|
+
* CLI user token: Supported.
|
|
2414
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2415
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2416
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1135
2417
|
*/
|
|
1136
2418
|
async start(options = {}) {
|
|
1137
2419
|
const path = "/v1/sessions";
|
|
1138
|
-
const body = buildBody({ budget: options.budget,
|
|
2420
|
+
const body = buildBody({ budget: options.budget, claude_code: options.claude_code, codex: options.codex, environment: options.environment, force_rebuild: options.force_rebuild, images: options.images, lifecycle: options.lifecycle, metadata: options.metadata, output: options.output, permissions: options.permissions, repositories: options.repositories, skills: options.skills });
|
|
1139
2421
|
return await this.transport.request("POST", path, { body });
|
|
1140
2422
|
}
|
|
1141
2423
|
/**
|
|
1142
|
-
* Stop
|
|
2424
|
+
* Stop Session
|
|
1143
2425
|
*
|
|
1144
2426
|
* Stop an in-flight session and return it.
|
|
1145
2427
|
*
|
|
1146
2428
|
* stopped_by is recorded only when the caller's credential maps
|
|
1147
2429
|
* to a GitHub account.
|
|
2430
|
+
*
|
|
2431
|
+
* Required permissions: write:sessions.
|
|
2432
|
+
* API key: Supported.
|
|
2433
|
+
* CLI user token: Supported.
|
|
2434
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2435
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2436
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
1148
2437
|
*/
|
|
1149
2438
|
async stop(session_id) {
|
|
1150
2439
|
const path = `/v1/sessions/${enc(session_id)}/stop`;
|
|
1151
2440
|
return await this.transport.request("POST", path);
|
|
1152
2441
|
}
|
|
2442
|
+
/**
|
|
2443
|
+
* Get Sessions Stream Ticket
|
|
2444
|
+
*
|
|
2445
|
+
* Required permissions: read:sessions.
|
|
2446
|
+
* API key: Supported.
|
|
2447
|
+
* CLI user token: Supported.
|
|
2448
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2449
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2450
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
2451
|
+
*/
|
|
2452
|
+
async streamTicket() {
|
|
2453
|
+
const path = "/v1/sessions/stream-ticket";
|
|
2454
|
+
return await this.transport.request("GET", path);
|
|
2455
|
+
}
|
|
2456
|
+
/**
|
|
2457
|
+
* Update Session
|
|
2458
|
+
*
|
|
2459
|
+
* Archive or unarchive a session and return it.
|
|
2460
|
+
*
|
|
2461
|
+
* Set archived to true to record the current server time and the
|
|
2462
|
+
* authenticated GitHub user. API-key requests record no user.
|
|
2463
|
+
* Repeated archive requests preserve the original time and user.
|
|
2464
|
+
* Set archived to false to clear both fields. Archiving is available
|
|
2465
|
+
* in any session state and does not stop a running session.
|
|
2466
|
+
*
|
|
2467
|
+
* Changes are delivered to session and session-list streams.
|
|
2468
|
+
*
|
|
2469
|
+
* Required permissions: write:sessions.
|
|
2470
|
+
* API key: Supported.
|
|
2471
|
+
* CLI user token: Supported.
|
|
2472
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2473
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2474
|
+
* Grant match patterns can further restrict access to individual resources.
|
|
2475
|
+
*/
|
|
2476
|
+
async update(session_id, options) {
|
|
2477
|
+
const path = `/v1/sessions/${enc(session_id)}`;
|
|
2478
|
+
const body = buildBody({ archived: options.archived });
|
|
2479
|
+
return await this.transport.request("PUT", path, { body });
|
|
2480
|
+
}
|
|
1153
2481
|
// ---- lifecycle sugar (hand-written layer over the generated core) ----
|
|
1154
2482
|
/** Start a session and return a handle over it. */
|
|
1155
2483
|
async run(options) {
|
|
@@ -1162,48 +2490,60 @@ var EllipsisSessions = class {
|
|
|
1162
2490
|
return new SessionHandle(this, response.session);
|
|
1163
2491
|
}
|
|
1164
2492
|
};
|
|
1165
|
-
var
|
|
2493
|
+
var EllipsisSupportSlack = class {
|
|
1166
2494
|
constructor(transport) {
|
|
1167
2495
|
this.transport = transport;
|
|
1168
2496
|
}
|
|
1169
2497
|
transport;
|
|
1170
2498
|
/**
|
|
1171
|
-
*
|
|
2499
|
+
* Request Slack Help
|
|
1172
2500
|
*
|
|
1173
|
-
*
|
|
2501
|
+
* Required permissions: write:account.
|
|
2502
|
+
* API key: Requires a CLI user token.
|
|
2503
|
+
* CLI user token: Supported.
|
|
2504
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2505
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2506
|
+
*/
|
|
2507
|
+
async create(options) {
|
|
2508
|
+
const path = "/v1/support/slack";
|
|
2509
|
+
const body = buildBody({ emails: options.emails, resend: options.resend });
|
|
2510
|
+
return await this.transport.request("POST", path, { body });
|
|
2511
|
+
}
|
|
2512
|
+
/**
|
|
2513
|
+
* Get Slack Help
|
|
1174
2514
|
*
|
|
1175
|
-
*
|
|
1176
|
-
*
|
|
1177
|
-
*
|
|
2515
|
+
* Required permissions: read:account.
|
|
2516
|
+
* API key: Supported.
|
|
2517
|
+
* CLI user token: Supported.
|
|
2518
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2519
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1178
2520
|
*/
|
|
1179
2521
|
async get() {
|
|
1180
|
-
const path = "/v1/
|
|
1181
|
-
|
|
2522
|
+
const path = "/v1/support/slack";
|
|
2523
|
+
await this.transport.request("GET", path);
|
|
1182
2524
|
}
|
|
1183
2525
|
/**
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1186
|
-
* Set the organization settings.
|
|
2526
|
+
* Invite To Slack Help
|
|
1187
2527
|
*
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
1190
|
-
*
|
|
1191
|
-
*
|
|
1192
|
-
*
|
|
2528
|
+
* Required permissions: write:account.
|
|
2529
|
+
* API key: Requires a CLI user token.
|
|
2530
|
+
* CLI user token: Supported.
|
|
2531
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2532
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1193
2533
|
*/
|
|
1194
|
-
async
|
|
1195
|
-
const path = "/v1/
|
|
1196
|
-
const body = buildBody({
|
|
1197
|
-
return await this.transport.request("
|
|
2534
|
+
async invite(options) {
|
|
2535
|
+
const path = "/v1/support/slack/invites";
|
|
2536
|
+
const body = buildBody({ emails: options.emails, resend: options.resend });
|
|
2537
|
+
return await this.transport.request("POST", path, { body });
|
|
1198
2538
|
}
|
|
1199
2539
|
};
|
|
1200
|
-
var
|
|
2540
|
+
var EllipsisSupport = class {
|
|
1201
2541
|
constructor(transport) {
|
|
1202
2542
|
this.transport = transport;
|
|
1203
|
-
this.
|
|
2543
|
+
this.slack = new EllipsisSupportSlack(transport);
|
|
1204
2544
|
}
|
|
1205
2545
|
transport;
|
|
1206
|
-
|
|
2546
|
+
slack;
|
|
1207
2547
|
};
|
|
1208
2548
|
var EllipsisTemplates = class {
|
|
1209
2549
|
constructor(transport) {
|
|
@@ -1214,6 +2554,12 @@ var EllipsisTemplates = class {
|
|
|
1214
2554
|
* Get Agent Template
|
|
1215
2555
|
*
|
|
1216
2556
|
* Return one built-in agent template by slug.
|
|
2557
|
+
*
|
|
2558
|
+
* Required permissions: read:templates.
|
|
2559
|
+
* API key: Supported.
|
|
2560
|
+
* CLI user token: Supported.
|
|
2561
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2562
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1217
2563
|
*/
|
|
1218
2564
|
async get(template_id) {
|
|
1219
2565
|
const path = `/v1/templates/${enc(template_id)}`;
|
|
@@ -1226,70 +2572,532 @@ var EllipsisTemplates = class {
|
|
|
1226
2572
|
*
|
|
1227
2573
|
* Behind auth but not account-scoped — the data is static
|
|
1228
2574
|
* product content shared by the dashboard, landing site, and CLI.
|
|
2575
|
+
*
|
|
2576
|
+
* Required permissions: read:templates.
|
|
2577
|
+
* API key: Supported.
|
|
2578
|
+
* CLI user token: Supported.
|
|
2579
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2580
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1229
2581
|
*/
|
|
1230
2582
|
async list() {
|
|
1231
2583
|
const path = "/v1/templates";
|
|
1232
2584
|
return await this.transport.request("GET", path);
|
|
1233
2585
|
}
|
|
1234
2586
|
};
|
|
2587
|
+
var EllipsisUserSubscriptionTokens = class {
|
|
2588
|
+
constructor(transport) {
|
|
2589
|
+
this.transport = transport;
|
|
2590
|
+
}
|
|
2591
|
+
transport;
|
|
2592
|
+
/**
|
|
2593
|
+
* Delete Subscription Token
|
|
2594
|
+
*
|
|
2595
|
+
* Delete your subscription token for a provider.
|
|
2596
|
+
*
|
|
2597
|
+
* Your sessions stop billing your subscription immediately, and the
|
|
2598
|
+
* usage reading goes with it — it described that token's plan.
|
|
2599
|
+
*
|
|
2600
|
+
* Required permissions: delete:user.
|
|
2601
|
+
* API key: Requires a CLI user token.
|
|
2602
|
+
* CLI user token: Supported.
|
|
2603
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2604
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2605
|
+
*/
|
|
2606
|
+
async delete(provider) {
|
|
2607
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}`;
|
|
2608
|
+
await this.transport.request("DELETE", path);
|
|
2609
|
+
}
|
|
2610
|
+
/**
|
|
2611
|
+
* Get Subscription Token
|
|
2612
|
+
*
|
|
2613
|
+
* Get one provider's subscription token.
|
|
2614
|
+
*
|
|
2615
|
+
* `configured` is false when nothing is saved. The token itself is
|
|
2616
|
+
* never returned, only `token_last4`.
|
|
2617
|
+
*
|
|
2618
|
+
* Required permissions: read:user.
|
|
2619
|
+
* API key: Requires a CLI user token.
|
|
2620
|
+
* CLI user token: Supported.
|
|
2621
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2622
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2623
|
+
*/
|
|
2624
|
+
async get(provider) {
|
|
2625
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}`;
|
|
2626
|
+
return await this.transport.request("GET", path);
|
|
2627
|
+
}
|
|
2628
|
+
/**
|
|
2629
|
+
* List Subscription Tokens
|
|
2630
|
+
*
|
|
2631
|
+
* List your subscription tokens.
|
|
2632
|
+
*
|
|
2633
|
+
* One entry per supported provider, whether or not you have saved a
|
|
2634
|
+
* token for it. Tokens are write-only: the response carries only
|
|
2635
|
+
* `token_last4`, never the token.
|
|
2636
|
+
*
|
|
2637
|
+
* Required permissions: read:user.
|
|
2638
|
+
* API key: Requires a CLI user token.
|
|
2639
|
+
* CLI user token: Supported.
|
|
2640
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2641
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2642
|
+
*/
|
|
2643
|
+
async list() {
|
|
2644
|
+
const path = "/v1/user/subscription_tokens";
|
|
2645
|
+
return await this.transport.request("GET", path);
|
|
2646
|
+
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Set Subscription Token
|
|
2649
|
+
*
|
|
2650
|
+
* Save your subscription token for a provider.
|
|
2651
|
+
*
|
|
2652
|
+
* Replaces whatever was stored. The token is saved DISABLED and
|
|
2653
|
+
* routes nothing until `POST /v1/user/subscription_tokens/{provider}/verify`
|
|
2654
|
+
* succeeds. For Claude, use `claude setup-token`. For Codex, paste
|
|
2655
|
+
* the auth.json credentials from a ChatGPT login. Each subscription
|
|
2656
|
+
* pays only for models from its corresponding provider.
|
|
2657
|
+
*
|
|
2658
|
+
* Required permissions: write:user.
|
|
2659
|
+
* API key: Requires a CLI user token.
|
|
2660
|
+
* CLI user token: Supported.
|
|
2661
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2662
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2663
|
+
*/
|
|
2664
|
+
async set(provider, options) {
|
|
2665
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}`;
|
|
2666
|
+
const body = buildBody({ token: options.token });
|
|
2667
|
+
return await this.transport.request("POST", path, { body });
|
|
2668
|
+
}
|
|
2669
|
+
/**
|
|
2670
|
+
* Get Subscription Usage
|
|
2671
|
+
*
|
|
2672
|
+
* Get your plan's last-observed rate-limit windows.
|
|
2673
|
+
*
|
|
2674
|
+
* Display-only, and only as fresh as your last call through Ellipsis
|
|
2675
|
+
* (`observed_at`) — the same plan used outside Ellipsis moves the
|
|
2676
|
+
* real windows without us seeing them. Null unless a token is
|
|
2677
|
+
* enabled for the provider: a disabled token routes nothing, so any
|
|
2678
|
+
* reading behind it is stale by construction.
|
|
2679
|
+
*
|
|
2680
|
+
* Required permissions: read:user.
|
|
2681
|
+
* API key: Requires a CLI user token.
|
|
2682
|
+
* CLI user token: Supported.
|
|
2683
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2684
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2685
|
+
*/
|
|
2686
|
+
async usage(provider) {
|
|
2687
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}/usage`;
|
|
2688
|
+
return await this.transport.request("GET", path);
|
|
2689
|
+
}
|
|
2690
|
+
/**
|
|
2691
|
+
* Verify Subscription Token
|
|
2692
|
+
*
|
|
2693
|
+
* Verify the stored token by using it.
|
|
2694
|
+
*
|
|
2695
|
+
* Makes one minimal call on the exact runtime path, so a pass proves
|
|
2696
|
+
* the token is what will pay. This is the gate on routing: success
|
|
2697
|
+
* enables the token, failure disables it, so verifying a revoked
|
|
2698
|
+
* token is how you stop it routing. A 200 with `ok: false` is the
|
|
2699
|
+
* normal way a bad token is reported — it is an answer, not a
|
|
2700
|
+
* transport failure.
|
|
2701
|
+
*
|
|
2702
|
+
* Required permissions: write:user.
|
|
2703
|
+
* API key: Requires a CLI user token.
|
|
2704
|
+
* CLI user token: Supported.
|
|
2705
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2706
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2707
|
+
*/
|
|
2708
|
+
async verify(provider) {
|
|
2709
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}/verify`;
|
|
2710
|
+
return await this.transport.request("POST", path);
|
|
2711
|
+
}
|
|
2712
|
+
};
|
|
2713
|
+
var EllipsisUserTokens = class {
|
|
2714
|
+
constructor(transport) {
|
|
2715
|
+
this.transport = transport;
|
|
2716
|
+
}
|
|
2717
|
+
transport;
|
|
2718
|
+
/**
|
|
2719
|
+
* List User Tokens
|
|
2720
|
+
*
|
|
2721
|
+
* Required permissions: read:user.
|
|
2722
|
+
* API key: Requires a CLI user token.
|
|
2723
|
+
* CLI user token: Supported.
|
|
2724
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2725
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2726
|
+
*/
|
|
2727
|
+
async list() {
|
|
2728
|
+
const path = "/v1/user/tokens";
|
|
2729
|
+
return await this.transport.request("GET", path);
|
|
2730
|
+
}
|
|
2731
|
+
/**
|
|
2732
|
+
* Revoke User Token
|
|
2733
|
+
*
|
|
2734
|
+
* Required permissions: delete:user.
|
|
2735
|
+
* API key: Requires a CLI user token.
|
|
2736
|
+
* CLI user token: Supported.
|
|
2737
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2738
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2739
|
+
*/
|
|
2740
|
+
async revoke(token_id) {
|
|
2741
|
+
const path = `/v1/user/tokens/${enc(token_id)}`;
|
|
2742
|
+
return await this.transport.request("DELETE", path);
|
|
2743
|
+
}
|
|
2744
|
+
};
|
|
2745
|
+
var EllipsisUser = class {
|
|
2746
|
+
constructor(transport) {
|
|
2747
|
+
this.transport = transport;
|
|
2748
|
+
this.subscriptionTokens = new EllipsisUserSubscriptionTokens(transport);
|
|
2749
|
+
this.tokens = new EllipsisUserTokens(transport);
|
|
2750
|
+
}
|
|
2751
|
+
transport;
|
|
2752
|
+
subscriptionTokens;
|
|
2753
|
+
tokens;
|
|
2754
|
+
};
|
|
2755
|
+
var EllipsisVmExecutions = class {
|
|
2756
|
+
constructor(transport) {
|
|
2757
|
+
this.transport = transport;
|
|
2758
|
+
}
|
|
2759
|
+
transport;
|
|
2760
|
+
/**
|
|
2761
|
+
* Get Single Vm Execution
|
|
2762
|
+
*
|
|
2763
|
+
* Required permissions: read:environments.
|
|
2764
|
+
* API key: Supported.
|
|
2765
|
+
* CLI user token: Supported.
|
|
2766
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
|
|
2767
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2768
|
+
*/
|
|
2769
|
+
async get(vm_execution_id) {
|
|
2770
|
+
const path = `/v1/vm-executions/${enc(vm_execution_id)}`;
|
|
2771
|
+
return await this.transport.request("GET", path);
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* Get Vm Executions
|
|
2775
|
+
*
|
|
2776
|
+
* Required permissions: read:environments.
|
|
2777
|
+
* API key: Supported.
|
|
2778
|
+
* CLI user token: Supported.
|
|
2779
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
|
|
2780
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2781
|
+
*/
|
|
2782
|
+
async list() {
|
|
2783
|
+
const path = "/v1/vm-executions";
|
|
2784
|
+
await this.transport.request("GET", path);
|
|
2785
|
+
}
|
|
2786
|
+
/**
|
|
2787
|
+
* Get Vm Execution Stream Ticket
|
|
2788
|
+
*
|
|
2789
|
+
* Required permissions: read:environments.
|
|
2790
|
+
* API key: Supported.
|
|
2791
|
+
* CLI user token: Supported.
|
|
2792
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
|
|
2793
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2794
|
+
*/
|
|
2795
|
+
async streamTicket(vm_execution_id) {
|
|
2796
|
+
const path = `/v1/vm-executions/${enc(vm_execution_id)}/stream-ticket`;
|
|
2797
|
+
return await this.transport.request("GET", path);
|
|
2798
|
+
}
|
|
2799
|
+
};
|
|
2800
|
+
var EllipsisVmImages = class {
|
|
2801
|
+
constructor(transport) {
|
|
2802
|
+
this.transport = transport;
|
|
2803
|
+
}
|
|
2804
|
+
transport;
|
|
2805
|
+
/**
|
|
2806
|
+
* Get Vm Image
|
|
2807
|
+
*
|
|
2808
|
+
* Get metadata for a reusable VM image.
|
|
2809
|
+
*
|
|
2810
|
+
* Required permissions: read:environments.
|
|
2811
|
+
* API key: Supported.
|
|
2812
|
+
* CLI user token: Supported.
|
|
2813
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2814
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2815
|
+
*/
|
|
2816
|
+
async get(image_id) {
|
|
2817
|
+
const path = `/v1/vm-images/${enc(image_id)}`;
|
|
2818
|
+
return await this.transport.request("GET", path);
|
|
2819
|
+
}
|
|
2820
|
+
/**
|
|
2821
|
+
* List Vm Images
|
|
2822
|
+
*
|
|
2823
|
+
* List reusable VM images.
|
|
2824
|
+
*
|
|
2825
|
+
* Includes expiration, repository revisions, and build identity.
|
|
2826
|
+
*
|
|
2827
|
+
* Required permissions: read:environments.
|
|
2828
|
+
* API key: Supported.
|
|
2829
|
+
* CLI user token: Supported.
|
|
2830
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2831
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2832
|
+
*/
|
|
2833
|
+
async list(options = {}) {
|
|
2834
|
+
const path = "/v1/vm-images";
|
|
2835
|
+
const query = buildQuery({ limit: options.limit, offset: options.offset });
|
|
2836
|
+
return await this.transport.request("GET", path, { query });
|
|
2837
|
+
}
|
|
2838
|
+
};
|
|
2839
|
+
var EllipsisVms = class {
|
|
2840
|
+
constructor(transport) {
|
|
2841
|
+
this.transport = transport;
|
|
2842
|
+
}
|
|
2843
|
+
transport;
|
|
2844
|
+
/**
|
|
2845
|
+
* Get Vm
|
|
2846
|
+
*
|
|
2847
|
+
* Get a VM and its most recent execution.
|
|
2848
|
+
*
|
|
2849
|
+
* Required permissions: read:environments.
|
|
2850
|
+
* API key: Supported.
|
|
2851
|
+
* CLI user token: Supported.
|
|
2852
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.
|
|
2853
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2854
|
+
*/
|
|
2855
|
+
async get(vm_id) {
|
|
2856
|
+
const path = `/v1/vms/${enc(vm_id)}`;
|
|
2857
|
+
return await this.transport.request("GET", path);
|
|
2858
|
+
}
|
|
2859
|
+
/**
|
|
2860
|
+
* List Vms
|
|
2861
|
+
*
|
|
2862
|
+
* List VMs and their last recorded state.
|
|
2863
|
+
*
|
|
2864
|
+
* Each machine appears once, including paused and deleted VMs, newest execution first.
|
|
2865
|
+
*
|
|
2866
|
+
* Required permissions: read:environments.
|
|
2867
|
+
* API key: Supported.
|
|
2868
|
+
* CLI user token: Supported.
|
|
2869
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.
|
|
2870
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2871
|
+
*/
|
|
2872
|
+
async list(options = {}) {
|
|
2873
|
+
const path = "/v1/vms";
|
|
2874
|
+
const query = buildQuery({ limit: options.limit, offset: options.offset });
|
|
2875
|
+
return await this.transport.request("GET", path, { query });
|
|
2876
|
+
}
|
|
2877
|
+
};
|
|
2878
|
+
var EllipsisWebhooksDeliveries = class {
|
|
2879
|
+
constructor(transport) {
|
|
2880
|
+
this.transport = transport;
|
|
2881
|
+
}
|
|
2882
|
+
transport;
|
|
2883
|
+
/**
|
|
2884
|
+
* Get Webhook Delivery
|
|
2885
|
+
*
|
|
2886
|
+
* Inspect a delivery's payload and attempts.
|
|
2887
|
+
*
|
|
2888
|
+
* Payloads are immutable across retries. Attempt details include HTTP
|
|
2889
|
+
* status, timing, and errors. Response bodies are not retained.
|
|
2890
|
+
*
|
|
2891
|
+
* Required permissions: read:webhooks.
|
|
2892
|
+
* API key: Supported.
|
|
2893
|
+
* CLI user token: Supported.
|
|
2894
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2895
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2896
|
+
*/
|
|
2897
|
+
async get(delivery_id) {
|
|
2898
|
+
const path = `/v1/webhooks/deliveries/${enc(delivery_id)}`;
|
|
2899
|
+
return await this.transport.request("GET", path);
|
|
2900
|
+
}
|
|
2901
|
+
/**
|
|
2902
|
+
* List Webhook Deliveries
|
|
2903
|
+
*
|
|
2904
|
+
* List webhook deliveries, newest first.
|
|
2905
|
+
*
|
|
2906
|
+
* Includes verification pings and deliveries for deleted webhooks.
|
|
2907
|
+
* History is retained for 30 days. Retries belong to the same delivery.
|
|
2908
|
+
*
|
|
2909
|
+
* Required permissions: read:webhooks.
|
|
2910
|
+
* API key: Supported.
|
|
2911
|
+
* CLI user token: Supported.
|
|
2912
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2913
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2914
|
+
*/
|
|
2915
|
+
async list(options = {}) {
|
|
2916
|
+
const path = "/v1/webhooks/deliveries";
|
|
2917
|
+
const query = buildQuery({ webhook_id: options.webhook_id, event_type: options.event_type, status: options.status, start: options.start, end: options.end, limit: options.limit, cursor: options.cursor });
|
|
2918
|
+
const response = await this.transport.request("GET", path, { query });
|
|
2919
|
+
return new Page(
|
|
2920
|
+
response,
|
|
2921
|
+
"deliveries",
|
|
2922
|
+
(cursor) => this.list({ ...options, cursor })
|
|
2923
|
+
);
|
|
2924
|
+
}
|
|
2925
|
+
};
|
|
2926
|
+
var EllipsisWebhooks = class {
|
|
2927
|
+
constructor(transport) {
|
|
2928
|
+
this.transport = transport;
|
|
2929
|
+
this.deliveries = new EllipsisWebhooksDeliveries(transport);
|
|
2930
|
+
}
|
|
2931
|
+
transport;
|
|
2932
|
+
deliveries;
|
|
2933
|
+
/**
|
|
2934
|
+
* Create Webhook
|
|
2935
|
+
*
|
|
2936
|
+
* Create a webhook and send a verification ping.
|
|
2937
|
+
*
|
|
2938
|
+
* Save the signing secret from this response; it is returned once.
|
|
2939
|
+
* Accounts default to three webhook slots, including unverified and
|
|
2940
|
+
* pending ones; your account may have a custom allowance. A ping returning HTTP 200 moves unverified to pending. Contact
|
|
2941
|
+
* Ellipsis to activate it and receive session.create events.
|
|
2942
|
+
*
|
|
2943
|
+
* Required permissions: write:webhooks.
|
|
2944
|
+
* API key: Supported.
|
|
2945
|
+
* CLI user token: Supported.
|
|
2946
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2947
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2948
|
+
*/
|
|
2949
|
+
async create(options) {
|
|
2950
|
+
const path = "/v1/webhooks";
|
|
2951
|
+
const body = buildBody({ description: options.description, events: options.events, url: options.url });
|
|
2952
|
+
return await this.transport.request("POST", path, { body });
|
|
2953
|
+
}
|
|
2954
|
+
/**
|
|
2955
|
+
* Delete Webhook
|
|
2956
|
+
*
|
|
2957
|
+
* Delete a webhook and cancel outstanding deliveries.
|
|
2958
|
+
*
|
|
2959
|
+
* An HTTP request already in flight may finish. Delivery history remains
|
|
2960
|
+
* available for 30 days. Deletion frees a webhook slot.
|
|
2961
|
+
*
|
|
2962
|
+
* Required permissions: delete:webhooks.
|
|
2963
|
+
* API key: Supported.
|
|
2964
|
+
* CLI user token: Supported.
|
|
2965
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2966
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2967
|
+
*/
|
|
2968
|
+
async delete(webhook_id) {
|
|
2969
|
+
const path = `/v1/webhooks/${enc(webhook_id)}`;
|
|
2970
|
+
await this.transport.request("DELETE", path);
|
|
2971
|
+
}
|
|
2972
|
+
/**
|
|
2973
|
+
* Get Webhook
|
|
2974
|
+
*
|
|
2975
|
+
* Get a webhook's configuration and approval state.
|
|
2976
|
+
*
|
|
2977
|
+
* Required permissions: read:webhooks.
|
|
2978
|
+
* API key: Supported.
|
|
2979
|
+
* CLI user token: Supported.
|
|
2980
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2981
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2982
|
+
*/
|
|
2983
|
+
async get(webhook_id) {
|
|
2984
|
+
const path = `/v1/webhooks/${enc(webhook_id)}`;
|
|
2985
|
+
return await this.transport.request("GET", path);
|
|
2986
|
+
}
|
|
2987
|
+
/**
|
|
2988
|
+
* List Webhooks
|
|
2989
|
+
*
|
|
2990
|
+
* List your webhooks and their delivery summaries.
|
|
2991
|
+
*
|
|
2992
|
+
* Required permissions: read:webhooks.
|
|
2993
|
+
* API key: Supported.
|
|
2994
|
+
* CLI user token: Supported.
|
|
2995
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
2996
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
2997
|
+
*/
|
|
2998
|
+
async list() {
|
|
2999
|
+
const path = "/v1/webhooks";
|
|
3000
|
+
return await this.transport.request("GET", path);
|
|
3001
|
+
}
|
|
3002
|
+
/**
|
|
3003
|
+
* Ping Webhook
|
|
3004
|
+
*
|
|
3005
|
+
* Send a signed verification or test ping.
|
|
3006
|
+
*
|
|
3007
|
+
* Available in every state. Only HTTP 200 verifies a destination;
|
|
3008
|
+
* successful pings never activate it. The default limit is five pings per
|
|
3009
|
+
* account per minute, including creation and URL changes. Custom
|
|
3010
|
+
* account allowances apply.
|
|
3011
|
+
*
|
|
3012
|
+
* Required permissions: write:webhooks.
|
|
3013
|
+
* API key: Supported.
|
|
3014
|
+
* CLI user token: Supported.
|
|
3015
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
3016
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
3017
|
+
*/
|
|
3018
|
+
async ping(webhook_id) {
|
|
3019
|
+
const path = `/v1/webhooks/${enc(webhook_id)}/ping`;
|
|
3020
|
+
await this.transport.request("POST", path);
|
|
3021
|
+
}
|
|
3022
|
+
/**
|
|
3023
|
+
* Update Webhook
|
|
3024
|
+
*
|
|
3025
|
+
* Replace a webhook's configuration.
|
|
3026
|
+
*
|
|
3027
|
+
* Changing the URL cancels outstanding deliveries, clears verification
|
|
3028
|
+
* and approval, and sends another ping. State and signing secret cannot
|
|
3029
|
+
* be set here. Updating description or subscriptions preserves approval.
|
|
3030
|
+
*
|
|
3031
|
+
* Required permissions: write:webhooks.
|
|
3032
|
+
* API key: Supported.
|
|
3033
|
+
* CLI user token: Supported.
|
|
3034
|
+
* Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
|
|
3035
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
3036
|
+
*/
|
|
3037
|
+
async update(webhook_id, options) {
|
|
3038
|
+
const path = `/v1/webhooks/${enc(webhook_id)}`;
|
|
3039
|
+
const body = buildBody({ description: options.description, events: options.events, url: options.url });
|
|
3040
|
+
return await this.transport.request("PUT", path, { body });
|
|
3041
|
+
}
|
|
3042
|
+
};
|
|
1235
3043
|
var Ellipsis = class {
|
|
1236
3044
|
transport;
|
|
3045
|
+
account;
|
|
3046
|
+
agents;
|
|
1237
3047
|
alerts;
|
|
1238
3048
|
analytics;
|
|
1239
3049
|
auth;
|
|
1240
|
-
automations;
|
|
1241
3050
|
environments;
|
|
1242
3051
|
files;
|
|
3052
|
+
handlers;
|
|
1243
3053
|
integrations;
|
|
1244
3054
|
memories;
|
|
1245
|
-
models;
|
|
1246
3055
|
reviews;
|
|
1247
3056
|
secrets;
|
|
1248
3057
|
sessions;
|
|
1249
|
-
|
|
3058
|
+
support;
|
|
1250
3059
|
templates;
|
|
3060
|
+
user;
|
|
3061
|
+
vmExecutions;
|
|
3062
|
+
vmImages;
|
|
3063
|
+
vms;
|
|
3064
|
+
webhooks;
|
|
1251
3065
|
constructor(options) {
|
|
1252
3066
|
this.transport = new Transport(options);
|
|
3067
|
+
this.account = new EllipsisAccount(this.transport);
|
|
3068
|
+
this.agents = new EllipsisAgents(this.transport);
|
|
1253
3069
|
this.alerts = new EllipsisAlerts(this.transport);
|
|
1254
3070
|
this.analytics = new EllipsisAnalytics(this.transport);
|
|
1255
3071
|
this.auth = new EllipsisAuth(this.transport);
|
|
1256
|
-
this.automations = new EllipsisAutomations(this.transport);
|
|
1257
3072
|
this.environments = new EllipsisEnvironments(this.transport);
|
|
1258
3073
|
this.files = new EllipsisFiles(this.transport);
|
|
3074
|
+
this.handlers = new EllipsisHandlers(this.transport);
|
|
1259
3075
|
this.integrations = new EllipsisIntegrations(this.transport);
|
|
1260
3076
|
this.memories = new EllipsisMemories(this.transport);
|
|
1261
|
-
this.models = new EllipsisModels(this.transport);
|
|
1262
3077
|
this.reviews = new EllipsisReviews(this.transport);
|
|
1263
3078
|
this.secrets = new EllipsisSecrets(this.transport);
|
|
1264
3079
|
this.sessions = new EllipsisSessions(this.transport);
|
|
1265
|
-
this.
|
|
3080
|
+
this.support = new EllipsisSupport(this.transport);
|
|
1266
3081
|
this.templates = new EllipsisTemplates(this.transport);
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
*/
|
|
1273
|
-
async budget() {
|
|
1274
|
-
const path = "/v1/budget";
|
|
1275
|
-
return await this.transport.request("GET", path);
|
|
3082
|
+
this.user = new EllipsisUser(this.transport);
|
|
3083
|
+
this.vmExecutions = new EllipsisVmExecutions(this.transport);
|
|
3084
|
+
this.vmImages = new EllipsisVmImages(this.transport);
|
|
3085
|
+
this.vms = new EllipsisVms(this.transport);
|
|
3086
|
+
this.webhooks = new EllipsisWebhooks(this.transport);
|
|
1276
3087
|
}
|
|
1277
3088
|
/**
|
|
1278
3089
|
* Current Identity
|
|
1279
3090
|
*
|
|
1280
3091
|
* Return the identity behind the caller's credential.
|
|
1281
|
-
*/
|
|
1282
|
-
async me() {
|
|
1283
|
-
const path = "/v1/me";
|
|
1284
|
-
return await this.transport.request("GET", path);
|
|
1285
|
-
}
|
|
1286
|
-
/**
|
|
1287
|
-
* Get Usage
|
|
1288
3092
|
*
|
|
1289
|
-
*
|
|
3093
|
+
* Required permissions: read:account.
|
|
3094
|
+
* API key: Supported.
|
|
3095
|
+
* CLI user token: Supported.
|
|
3096
|
+
* Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
3097
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
1290
3098
|
*/
|
|
1291
|
-
async
|
|
1292
|
-
const path = "/v1/
|
|
3099
|
+
async identity() {
|
|
3100
|
+
const path = "/v1/identity";
|
|
1293
3101
|
return await this.transport.request("GET", path);
|
|
1294
3102
|
}
|
|
1295
3103
|
};
|