@ellipsis-dev/sdk 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-RMPAMUAE.js → chunk-YJC53TA7.js} +11 -1
- package/dist/index.d.ts +1749 -72
- package/dist/index.js +887 -84
- package/dist/store/index.d.ts +5 -2
- package/dist/store/index.js +217 -23
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.js +1 -1
- package/dist/{types-ClEF_IA9.d.ts → types-B-jIFh4_.d.ts} +20446 -10002
- package/package.json +1 -1
- package/schema/collection_frames.schema.json +3623 -0
- package/schema/frames.schema.json +9534 -3142
- package/schema/lifecycle.schema.json +18 -0
- package/schema/openapi.v1.json +25149 -8434
- package/schema/trigger_fields.schema.json +1 -1
package/dist/index.js
CHANGED
|
@@ -243,6 +243,445 @@ 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
|
+
async create(options) {
|
|
260
|
+
const path = "/v1/account/api-keys";
|
|
261
|
+
const body = buildBody({ name: options.name });
|
|
262
|
+
return await this.transport.request("POST", path, { body });
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* List Api Keys
|
|
266
|
+
*/
|
|
267
|
+
async list() {
|
|
268
|
+
const path = "/v1/account/api-keys";
|
|
269
|
+
return await this.transport.request("GET", path);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Revoke Api Key
|
|
273
|
+
*
|
|
274
|
+
* Revoke an organization key as a verified GitHub administrator.
|
|
275
|
+
*/
|
|
276
|
+
async revoke(api_key_id) {
|
|
277
|
+
const path = `/v1/account/api-keys/${enc(api_key_id)}`;
|
|
278
|
+
return await this.transport.request("DELETE", path);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
var EllipsisAccountBillingAutoRecharge = class {
|
|
282
|
+
constructor(transport) {
|
|
283
|
+
this.transport = transport;
|
|
284
|
+
}
|
|
285
|
+
transport;
|
|
286
|
+
/**
|
|
287
|
+
* Get Auto Recharge
|
|
288
|
+
*
|
|
289
|
+
* Get your automatic credit recharge settings.
|
|
290
|
+
*
|
|
291
|
+
* An account without saved settings returns disabled defaults and no
|
|
292
|
+
* card. No payment-method identifier or card details are exposed.
|
|
293
|
+
*/
|
|
294
|
+
async get() {
|
|
295
|
+
const path = "/v1/account/billing/auto-recharge";
|
|
296
|
+
return await this.transport.request("GET", path);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Update Auto Recharge
|
|
300
|
+
*
|
|
301
|
+
* Set your automatic credit recharge policy.
|
|
302
|
+
*
|
|
303
|
+
* Requires a human account administrator; API keys and sandbox tokens
|
|
304
|
+
* cannot change this policy. Supply enabled explicitly. Saving amounts
|
|
305
|
+
* with enabled=false keeps recharge off; enabling requires a saved card.
|
|
306
|
+
* A recharge buys amount_cents of credit and charges the platform fee
|
|
307
|
+
* in addition. Amounts and thresholds preserve exact cents.
|
|
308
|
+
*/
|
|
309
|
+
async set(options) {
|
|
310
|
+
const path = "/v1/account/billing/auto-recharge";
|
|
311
|
+
const body = buildBody({ amount_cents: options.amount_cents, enabled: options.enabled, threshold_cents: options.threshold_cents });
|
|
312
|
+
return await this.transport.request("PUT", path, { body });
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
var EllipsisAccountBilling = class {
|
|
316
|
+
constructor(transport) {
|
|
317
|
+
this.transport = transport;
|
|
318
|
+
this.autoRecharge = new EllipsisAccountBillingAutoRecharge(transport);
|
|
319
|
+
}
|
|
320
|
+
transport;
|
|
321
|
+
autoRecharge;
|
|
322
|
+
/**
|
|
323
|
+
* Create Card Setup Session
|
|
324
|
+
*
|
|
325
|
+
* Save a card through Stripe's hosted setup flow.
|
|
326
|
+
*
|
|
327
|
+
* Requires a human account administrator. Open the returned URL to
|
|
328
|
+
* finish setup and return to Billing. Saving a card does not enable
|
|
329
|
+
* auto-recharge or buy credit.
|
|
330
|
+
*/
|
|
331
|
+
async cardSetup() {
|
|
332
|
+
const path = "/v1/account/billing/card-setup";
|
|
333
|
+
return await this.transport.request("POST", path);
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Create Credit Checkout Session
|
|
337
|
+
*
|
|
338
|
+
* Buy prepaid credit through Stripe's hosted checkout.
|
|
339
|
+
*
|
|
340
|
+
* Requires a human account administrator. Open the returned URL to
|
|
341
|
+
* complete payment. Credit is granted only after payment succeeds;
|
|
342
|
+
* the platform fee is charged in addition to amount_cents. Returning
|
|
343
|
+
* to Billing carries the checkout session ID for receipt lookup.
|
|
344
|
+
*/
|
|
345
|
+
async checkout(options) {
|
|
346
|
+
const path = "/v1/account/billing/checkout";
|
|
347
|
+
const body = buildBody({ amount_cents: options.amount_cents });
|
|
348
|
+
return await this.transport.request("POST", path, { body });
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Claim Signup Credit
|
|
352
|
+
*
|
|
353
|
+
* The "Claim $100" button. Runs the same idempotent billing
|
|
354
|
+
* bootstrap that otherwise fires lazily at the first session (Stripe
|
|
355
|
+
* customer + usage subscription + the signup grant). A repeat call is
|
|
356
|
+
* a no-op that returns the current state.
|
|
357
|
+
*/
|
|
358
|
+
async claimSignupCredit() {
|
|
359
|
+
const path = "/v1/account/billing/claim-signup-credit";
|
|
360
|
+
return await this.transport.request("POST", path);
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Get Fee Schedule
|
|
364
|
+
*
|
|
365
|
+
* Get the account's rate card, in US dollars.
|
|
366
|
+
*/
|
|
367
|
+
async feeSchedule() {
|
|
368
|
+
const path = "/v1/account/billing/fee-schedule";
|
|
369
|
+
return await this.transport.request("GET", path);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* List Credit Grants
|
|
373
|
+
*
|
|
374
|
+
* List your confirmed credit grants and reversals.
|
|
375
|
+
*
|
|
376
|
+
* Returns only your account's grants. The total is before usage;
|
|
377
|
+
* /v1/account/budget reports the available balance.
|
|
378
|
+
*/
|
|
379
|
+
async grants() {
|
|
380
|
+
const path = "/v1/account/billing/credit-grants";
|
|
381
|
+
return await this.transport.request("GET", path);
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Get Credit Purchase
|
|
385
|
+
*
|
|
386
|
+
* Read the amount collected for a credit purchase.
|
|
387
|
+
*
|
|
388
|
+
* The amount includes the platform fee and comes from Stripe. An
|
|
389
|
+
* incomplete, missing, or other-account purchase returns 404.
|
|
390
|
+
*/
|
|
391
|
+
async purchase(checkout_id) {
|
|
392
|
+
const path = `/v1/account/billing/purchases/${enc(checkout_id)}`;
|
|
393
|
+
return await this.transport.request("GET", path);
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Get Credit Purchase Options
|
|
397
|
+
*
|
|
398
|
+
* Get credit purchase bounds and the platform fee.
|
|
399
|
+
*
|
|
400
|
+
* All amounts are integer US cents. The fee is added to the credit
|
|
401
|
+
* amount; it does not reduce the credit granted.
|
|
402
|
+
*/
|
|
403
|
+
async purchaseOptions() {
|
|
404
|
+
const path = "/v1/account/billing/purchase-options";
|
|
405
|
+
return await this.transport.request("GET", path);
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Get Account Billing
|
|
409
|
+
*
|
|
410
|
+
* Explain whether your account can start sessions.
|
|
411
|
+
*
|
|
412
|
+
* Uses the same account gate as session admission, including credit,
|
|
413
|
+
* contact email, and personal Claude subscription eligibility. Scoped
|
|
414
|
+
* spend limits are reported separately by /v1/account/budget.
|
|
415
|
+
*/
|
|
416
|
+
async status() {
|
|
417
|
+
const path = "/v1/account/billing";
|
|
418
|
+
return await this.transport.request("GET", path);
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
var EllipsisAccountModels = class {
|
|
422
|
+
constructor(transport) {
|
|
423
|
+
this.transport = transport;
|
|
424
|
+
}
|
|
425
|
+
transport;
|
|
426
|
+
/**
|
|
427
|
+
* List Account Models
|
|
428
|
+
*
|
|
429
|
+
* List selectable agent models.
|
|
430
|
+
*
|
|
431
|
+
* Grouped by manufacturer and model family, newest versions first
|
|
432
|
+
* within each family, with the organization's default model
|
|
433
|
+
* flagged (`is_default_agent_model`: the `default_model` of
|
|
434
|
+
* `GET /v1/account/settings`).
|
|
435
|
+
*
|
|
436
|
+
* Reads the same registry as the dashboard's rate table, so a
|
|
437
|
+
* client's model picker can never drift from what's offered. The
|
|
438
|
+
* selectable set is global; only the flag is account-scoped.
|
|
439
|
+
*/
|
|
440
|
+
async list() {
|
|
441
|
+
const path = "/v1/account/models";
|
|
442
|
+
return await this.transport.request("GET", path);
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
var EllipsisAccountNotifications = class {
|
|
446
|
+
constructor(transport) {
|
|
447
|
+
this.transport = transport;
|
|
448
|
+
}
|
|
449
|
+
transport;
|
|
450
|
+
/**
|
|
451
|
+
* Send Test Notification Email
|
|
452
|
+
*
|
|
453
|
+
* Send the alert email template to one address with sample data,
|
|
454
|
+
* so a typo'd finance alias is caught by a human instead of failing
|
|
455
|
+
* silently when a real alert fires.
|
|
456
|
+
*/
|
|
457
|
+
async testEmail(options) {
|
|
458
|
+
const path = "/v1/account/notifications/test-email";
|
|
459
|
+
const body = buildBody({ email: options.email });
|
|
460
|
+
return await this.transport.request("POST", path, { body });
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
var EllipsisAccountProvidersAnthropic = class {
|
|
464
|
+
constructor(transport) {
|
|
465
|
+
this.transport = transport;
|
|
466
|
+
}
|
|
467
|
+
transport;
|
|
468
|
+
/**
|
|
469
|
+
* Delete Anthropic Config
|
|
470
|
+
*/
|
|
471
|
+
async delete() {
|
|
472
|
+
const path = "/v1/account/providers/anthropic";
|
|
473
|
+
await this.transport.request("DELETE", path);
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Get Anthropic Config
|
|
477
|
+
*/
|
|
478
|
+
async get() {
|
|
479
|
+
const path = "/v1/account/providers/anthropic";
|
|
480
|
+
return await this.transport.request("GET", path);
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Put Anthropic Config
|
|
484
|
+
*/
|
|
485
|
+
async set(options) {
|
|
486
|
+
const path = "/v1/account/providers/anthropic";
|
|
487
|
+
const body = buildBody({ api_key: options.api_key });
|
|
488
|
+
return await this.transport.request("PUT", path, { body });
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Validate Anthropic Config
|
|
492
|
+
*/
|
|
493
|
+
async validate() {
|
|
494
|
+
const path = "/v1/account/providers/anthropic/validate";
|
|
495
|
+
return await this.transport.request("POST", path);
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
var EllipsisAccountProvidersBedrock = class {
|
|
499
|
+
constructor(transport) {
|
|
500
|
+
this.transport = transport;
|
|
501
|
+
}
|
|
502
|
+
transport;
|
|
503
|
+
/**
|
|
504
|
+
* Delete Bedrock Config
|
|
505
|
+
*/
|
|
506
|
+
async delete() {
|
|
507
|
+
const path = "/v1/account/providers/bedrock";
|
|
508
|
+
await this.transport.request("DELETE", path);
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Get Bedrock Config
|
|
512
|
+
*/
|
|
513
|
+
async get() {
|
|
514
|
+
const path = "/v1/account/providers/bedrock";
|
|
515
|
+
return await this.transport.request("GET", path);
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Put Bedrock Config
|
|
519
|
+
*/
|
|
520
|
+
async set(options) {
|
|
521
|
+
const path = "/v1/account/providers/bedrock";
|
|
522
|
+
const body = buildBody({ model_map: options.model_map, region: options.region, role_arn: options.role_arn });
|
|
523
|
+
return await this.transport.request("PUT", path, { body });
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Validate Bedrock Config
|
|
527
|
+
*/
|
|
528
|
+
async validate() {
|
|
529
|
+
const path = "/v1/account/providers/bedrock/validate";
|
|
530
|
+
return await this.transport.request("POST", path);
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
var EllipsisAccountProviders = class {
|
|
534
|
+
constructor(transport) {
|
|
535
|
+
this.transport = transport;
|
|
536
|
+
this.anthropic = new EllipsisAccountProvidersAnthropic(transport);
|
|
537
|
+
this.bedrock = new EllipsisAccountProvidersBedrock(transport);
|
|
538
|
+
}
|
|
539
|
+
transport;
|
|
540
|
+
anthropic;
|
|
541
|
+
bedrock;
|
|
542
|
+
};
|
|
543
|
+
var EllipsisAccountSettings = class {
|
|
544
|
+
constructor(transport) {
|
|
545
|
+
this.transport = transport;
|
|
546
|
+
}
|
|
547
|
+
transport;
|
|
548
|
+
/**
|
|
549
|
+
* Get Account Settings
|
|
550
|
+
*
|
|
551
|
+
* Get the organization settings.
|
|
552
|
+
*
|
|
553
|
+
* Session model and budget defaults, code review and mention behavior,
|
|
554
|
+
* analytics, retention, and notification contacts. PATCH replaces
|
|
555
|
+
* supplied sections; PUT preserves its model-and-budget-only behavior.
|
|
556
|
+
*/
|
|
557
|
+
async get() {
|
|
558
|
+
const path = "/v1/account/settings";
|
|
559
|
+
return await this.transport.request("GET", path);
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Set Organization Settings
|
|
563
|
+
*
|
|
564
|
+
* Set the organization settings.
|
|
565
|
+
*
|
|
566
|
+
* Replaces both: `default_model` accepts an alias or canonical id
|
|
567
|
+
* and is stored canonical, and cannot be cleared (it is the only
|
|
568
|
+
* default a session's model resolves against);
|
|
569
|
+
* `budget_ceiling.session` is in US dollars, at most the platform
|
|
570
|
+
* ceiling, and null clears it.
|
|
571
|
+
* Refused for sandbox tokens (potentially prompt-injected code must
|
|
572
|
+
* not repoint the organization's defaults).
|
|
573
|
+
*/
|
|
574
|
+
async set(options) {
|
|
575
|
+
const path = "/v1/account/settings";
|
|
576
|
+
const body = buildBody({ budget_ceiling: options.budget_ceiling, default_model: options.default_model });
|
|
577
|
+
return await this.transport.request("PUT", path, { body });
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Patch Account Settings
|
|
581
|
+
*
|
|
582
|
+
* Replace supplied settings sections without changing omitted sections.
|
|
583
|
+
*
|
|
584
|
+
* Changes to model or budget defaults require a GitHub administrator.
|
|
585
|
+
*/
|
|
586
|
+
async update(options = {}) {
|
|
587
|
+
const path = "/v1/account/settings";
|
|
588
|
+
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, mention: options.mention, notifications: options.notifications });
|
|
589
|
+
return await this.transport.request("PATCH", path, { body });
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
var EllipsisAccount = class {
|
|
593
|
+
constructor(transport) {
|
|
594
|
+
this.transport = transport;
|
|
595
|
+
this.apiKeys = new EllipsisAccountApiKeys(transport);
|
|
596
|
+
this.billing = new EllipsisAccountBilling(transport);
|
|
597
|
+
this.models = new EllipsisAccountModels(transport);
|
|
598
|
+
this.notifications = new EllipsisAccountNotifications(transport);
|
|
599
|
+
this.providers = new EllipsisAccountProviders(transport);
|
|
600
|
+
this.settings = new EllipsisAccountSettings(transport);
|
|
601
|
+
}
|
|
602
|
+
transport;
|
|
603
|
+
apiKeys;
|
|
604
|
+
billing;
|
|
605
|
+
models;
|
|
606
|
+
notifications;
|
|
607
|
+
providers;
|
|
608
|
+
settings;
|
|
609
|
+
/**
|
|
610
|
+
* Get Customer Activity
|
|
611
|
+
*
|
|
612
|
+
* All-time per-surface activity flags: the dashboards' demo-data
|
|
613
|
+
* fallback reads these instead of inferring "no history" from a
|
|
614
|
+
* windowed, filtered response.
|
|
615
|
+
*/
|
|
616
|
+
async activity() {
|
|
617
|
+
const path = "/v1/account/activity";
|
|
618
|
+
return await this.transport.request("GET", path);
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Get Customer Audit Log
|
|
622
|
+
*/
|
|
623
|
+
async auditLog() {
|
|
624
|
+
const path = "/v1/account/audit-log";
|
|
625
|
+
return await this.transport.request("GET", path);
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Get Account Budget
|
|
629
|
+
*
|
|
630
|
+
* Get prepaid credit, actual trailing budgets, and developer/API-key limits.
|
|
631
|
+
*
|
|
632
|
+
* Budgets cover the trailing 1, 7 and 28 days; they do not replenish
|
|
633
|
+
* prepaid credit. Amounts include measured usage from active sessions.
|
|
634
|
+
* Each paid LLM request requires positive credit and budget headroom.
|
|
635
|
+
* An admitted request can overshoot; concurrency is limited to five
|
|
636
|
+
* paid requests per account and one per session.
|
|
637
|
+
*/
|
|
638
|
+
async budget() {
|
|
639
|
+
const path = "/v1/account/budget";
|
|
640
|
+
return await this.transport.request("GET", path);
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Update Customer
|
|
644
|
+
*/
|
|
645
|
+
async update(options = {}) {
|
|
646
|
+
const path = "/v1/account";
|
|
647
|
+
const body = buildBody({ can_start_job_runs: options.can_start_job_runs, contact_email: options.contact_email });
|
|
648
|
+
return await this.transport.request("PATCH", path, { body });
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Update Budget
|
|
652
|
+
*
|
|
653
|
+
* Update spending policy or budget alerts as an account administrator.
|
|
654
|
+
*
|
|
655
|
+
* Each supplied section replaces that section; omitted sections are
|
|
656
|
+
* preserved. Set policy.developer_defaults to null to disable developer
|
|
657
|
+
* limits. Null override windows inherit their default. API keys use
|
|
658
|
+
* their stable ID, not their secret. Changes apply to the next paid
|
|
659
|
+
* request, including sessions already running. API keys and sandbox
|
|
660
|
+
* credentials cannot edit budgets. The session ceiling remains at
|
|
661
|
+
* /account/settings; purchasing credits is separate from budget policy.
|
|
662
|
+
*/
|
|
663
|
+
async updateBudget(options = {}) {
|
|
664
|
+
const path = "/v1/account/budget";
|
|
665
|
+
const body = buildBody({ alerts: options.alerts, policy: options.policy });
|
|
666
|
+
return await this.transport.request("PATCH", path, { body });
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Get Usage
|
|
670
|
+
*
|
|
671
|
+
* Get usage for a calendar month, including its funding sources.
|
|
672
|
+
*
|
|
673
|
+
* Omit period_start for the current UTC month; select a period returned
|
|
674
|
+
* in billing_periods to view history. Credit debits are distinct from
|
|
675
|
+
* rated token usage through BYOK, customer Bedrock, or a developer's
|
|
676
|
+
* Claude subscription. Rated usage estimates are not provider invoices.
|
|
677
|
+
* Pending and unresolved requests identify missing measurements.
|
|
678
|
+
*/
|
|
679
|
+
async usage(options = {}) {
|
|
680
|
+
const path = "/v1/account/usage";
|
|
681
|
+
const query = buildQuery({ period_start: options.period_start });
|
|
682
|
+
return await this.transport.request("GET", path, { query });
|
|
683
|
+
}
|
|
684
|
+
};
|
|
246
685
|
var EllipsisAlerts = class {
|
|
247
686
|
constructor(transport) {
|
|
248
687
|
this.transport = transport;
|
|
@@ -467,18 +906,28 @@ var EllipsisAutomations = class {
|
|
|
467
906
|
*
|
|
468
907
|
* Invoke an automation.
|
|
469
908
|
*
|
|
470
|
-
* Runs
|
|
471
|
-
* environment, permissions, skills, and budget
|
|
472
|
-
* the session it started. The
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
909
|
+
* Runs a certified automation with its configured instructions, model,
|
|
910
|
+
* environment, permissions, skills, and budget, and returns
|
|
911
|
+
* the session it started. The session runs once and does not accept
|
|
912
|
+
* follow-up messages. If the automation declares input.json_schema,
|
|
913
|
+
* send only `input` for its initial message. Otherwise send a non-empty
|
|
914
|
+
* `prompt`, which becomes the initial message verbatim. Both fields
|
|
915
|
+
* together, neither field, and input that renders an empty message are
|
|
916
|
+
* rejected with 422. An optional `budget` lowers the session cap;
|
|
917
|
+
* `metadata` tags the session. Codex invocations are not supported.
|
|
476
918
|
*/
|
|
477
919
|
async run(automation_id, options = {}) {
|
|
478
920
|
const path = `/v1/automations/${enc(automation_id)}/sessions`;
|
|
479
|
-
const body = buildBody({ budget: options.budget, input: options.input, metadata: options.metadata });
|
|
921
|
+
const body = buildBody({ budget: options.budget, input: options.input, metadata: options.metadata, prompt: options.prompt });
|
|
480
922
|
return await this.transport.request("POST", path, { body });
|
|
481
923
|
}
|
|
924
|
+
/**
|
|
925
|
+
* Get Automations Stream Ticket
|
|
926
|
+
*/
|
|
927
|
+
async streamTicket() {
|
|
928
|
+
const path = "/v1/automations/stream-ticket";
|
|
929
|
+
return await this.transport.request("GET", path);
|
|
930
|
+
}
|
|
482
931
|
/**
|
|
483
932
|
* Unlink Automation
|
|
484
933
|
*
|
|
@@ -619,7 +1068,12 @@ var EllipsisFiles = class {
|
|
|
619
1068
|
* Return one file's metadata and download link.
|
|
620
1069
|
*
|
|
621
1070
|
* Includes the gated dashboard URL and a short-lived presigned
|
|
622
|
-
* `download_url
|
|
1071
|
+
* `download_url`, plus the owning account's GitHub login.
|
|
1072
|
+
*
|
|
1073
|
+
* Signed-in dashboard users are checked against the file's owning
|
|
1074
|
+
* account, regardless of their selected organization. API keys,
|
|
1075
|
+
* CLI user tokens, and sandbox tokens remain restricted to their
|
|
1076
|
+
* own account. Missing, deleted, and inaccessible files return 404.
|
|
623
1077
|
*
|
|
624
1078
|
* To fetch the bytes locally, call this and then GET download_url
|
|
625
1079
|
* immediately — the JSON API never carries the file. The CLI's
|
|
@@ -634,12 +1088,14 @@ var EllipsisFiles = class {
|
|
|
634
1088
|
*
|
|
635
1089
|
* List uploaded files, newest first.
|
|
636
1090
|
*
|
|
637
|
-
* Metadata only
|
|
638
|
-
*
|
|
1091
|
+
* Metadata only by default. Set include_download_urls=true to get
|
|
1092
|
+
* a download_urls map keyed by file id for thumbnails or batch
|
|
1093
|
+
* downloads. URLs expire within about a minute. session_id scopes
|
|
1094
|
+
* the list to one session's uploads.
|
|
639
1095
|
*/
|
|
640
1096
|
async list(options = {}) {
|
|
641
1097
|
const path = "/v1/files";
|
|
642
|
-
const query = buildQuery({ session_id: options.session_id, limit: options.limit, cursor: options.cursor });
|
|
1098
|
+
const query = buildQuery({ session_id: options.session_id, limit: options.limit, cursor: options.cursor, include_download_urls: options.include_download_urls });
|
|
643
1099
|
const response = await this.transport.request("GET", path, { query });
|
|
644
1100
|
return new Page(
|
|
645
1101
|
response,
|
|
@@ -677,12 +1133,27 @@ var EllipsisIntegrationsGithub = class {
|
|
|
677
1133
|
const path = "/v1/integrations/github/repos";
|
|
678
1134
|
return await this.transport.request("GET", path);
|
|
679
1135
|
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Uninstall Github App
|
|
1138
|
+
*/
|
|
1139
|
+
async uninstall(options) {
|
|
1140
|
+
const path = "/v1/integrations/github/uninstall";
|
|
1141
|
+
const body = buildBody({ confirm_account_login: options.confirm_account_login });
|
|
1142
|
+
return await this.transport.request("POST", path, { body });
|
|
1143
|
+
}
|
|
680
1144
|
};
|
|
681
1145
|
var EllipsisIntegrationsLinear = class {
|
|
682
1146
|
constructor(transport) {
|
|
683
1147
|
this.transport = transport;
|
|
684
1148
|
}
|
|
685
1149
|
transport;
|
|
1150
|
+
/**
|
|
1151
|
+
* Delete Linear Integration
|
|
1152
|
+
*/
|
|
1153
|
+
async delete() {
|
|
1154
|
+
const path = "/v1/integrations/linear";
|
|
1155
|
+
return await this.transport.request("DELETE", path);
|
|
1156
|
+
}
|
|
686
1157
|
/**
|
|
687
1158
|
* List Linear Teams
|
|
688
1159
|
*
|
|
@@ -692,12 +1163,27 @@ var EllipsisIntegrationsLinear = class {
|
|
|
692
1163
|
const path = "/v1/integrations/linear/teams";
|
|
693
1164
|
return await this.transport.request("GET", path);
|
|
694
1165
|
}
|
|
1166
|
+
/**
|
|
1167
|
+
* Update Linear Teams
|
|
1168
|
+
*/
|
|
1169
|
+
async updateSettings(options) {
|
|
1170
|
+
const path = "/v1/integrations/linear/settings";
|
|
1171
|
+
const body = buildBody({ mcp_inclusion: options.mcp_inclusion, teams: options.teams });
|
|
1172
|
+
return await this.transport.request("PUT", path, { body });
|
|
1173
|
+
}
|
|
695
1174
|
};
|
|
696
1175
|
var EllipsisIntegrationsSentry = class {
|
|
697
1176
|
constructor(transport) {
|
|
698
1177
|
this.transport = transport;
|
|
699
1178
|
}
|
|
700
1179
|
transport;
|
|
1180
|
+
/**
|
|
1181
|
+
* Delete Sentry Integration
|
|
1182
|
+
*/
|
|
1183
|
+
async delete(integration_id) {
|
|
1184
|
+
const path = `/v1/integrations/sentry/${enc(integration_id)}`;
|
|
1185
|
+
return await this.transport.request("DELETE", path);
|
|
1186
|
+
}
|
|
701
1187
|
/**
|
|
702
1188
|
* List Sentry Organizations
|
|
703
1189
|
*
|
|
@@ -723,6 +1209,20 @@ var EllipsisIntegrationsSlack = class {
|
|
|
723
1209
|
const path = "/v1/integrations/slack/channels";
|
|
724
1210
|
return await this.transport.request("GET", path);
|
|
725
1211
|
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Create Operations Channel
|
|
1214
|
+
*/
|
|
1215
|
+
async createOperationsChannel() {
|
|
1216
|
+
const path = "/v1/integrations/slack/operations-channel";
|
|
1217
|
+
return await this.transport.request("POST", path);
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* Delete Slack Integration
|
|
1221
|
+
*/
|
|
1222
|
+
async delete() {
|
|
1223
|
+
const path = "/v1/integrations/slack";
|
|
1224
|
+
return await this.transport.request("DELETE", path);
|
|
1225
|
+
}
|
|
726
1226
|
/**
|
|
727
1227
|
* List Slack Members
|
|
728
1228
|
*
|
|
@@ -733,6 +1233,14 @@ var EllipsisIntegrationsSlack = class {
|
|
|
733
1233
|
const path = "/v1/integrations/slack/members";
|
|
734
1234
|
return await this.transport.request("GET", path);
|
|
735
1235
|
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Update Slack Settings
|
|
1238
|
+
*/
|
|
1239
|
+
async updateSettings(options) {
|
|
1240
|
+
const path = "/v1/integrations/slack/settings";
|
|
1241
|
+
const body = buildBody({ mcp_inclusion: options.mcp_inclusion });
|
|
1242
|
+
return await this.transport.request("PUT", path, { body });
|
|
1243
|
+
}
|
|
736
1244
|
};
|
|
737
1245
|
var EllipsisIntegrations = class {
|
|
738
1246
|
constructor(transport) {
|
|
@@ -845,33 +1353,18 @@ var EllipsisMemories = class {
|
|
|
845
1353
|
return await this.transport.request("GET", path, { query });
|
|
846
1354
|
}
|
|
847
1355
|
};
|
|
848
|
-
var
|
|
1356
|
+
var EllipsisReviews = class {
|
|
849
1357
|
constructor(transport) {
|
|
850
1358
|
this.transport = transport;
|
|
851
1359
|
}
|
|
852
1360
|
transport;
|
|
853
1361
|
/**
|
|
854
|
-
* List
|
|
855
|
-
*
|
|
856
|
-
* List selectable agent models.
|
|
857
|
-
*
|
|
858
|
-
* Most expensive first, with the platform default flagged.
|
|
859
|
-
*
|
|
860
|
-
* Reads the same registry as the dashboard's rate table, so a
|
|
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.
|
|
1362
|
+
* List Review Configs
|
|
864
1363
|
*/
|
|
865
|
-
async
|
|
866
|
-
const path = "/v1/
|
|
1364
|
+
async configs() {
|
|
1365
|
+
const path = "/v1/reviews/configs";
|
|
867
1366
|
return await this.transport.request("GET", path);
|
|
868
1367
|
}
|
|
869
|
-
};
|
|
870
|
-
var EllipsisReviews = class {
|
|
871
|
-
constructor(transport) {
|
|
872
|
-
this.transport = transport;
|
|
873
|
-
}
|
|
874
|
-
transport;
|
|
875
1368
|
/**
|
|
876
1369
|
* Create Review
|
|
877
1370
|
*
|
|
@@ -933,6 +1426,33 @@ var EllipsisReviews = class {
|
|
|
933
1426
|
);
|
|
934
1427
|
}
|
|
935
1428
|
};
|
|
1429
|
+
var EllipsisSandboxes = class {
|
|
1430
|
+
constructor(transport) {
|
|
1431
|
+
this.transport = transport;
|
|
1432
|
+
}
|
|
1433
|
+
transport;
|
|
1434
|
+
/**
|
|
1435
|
+
* Get Single Sandbox
|
|
1436
|
+
*/
|
|
1437
|
+
async get(sandbox_id) {
|
|
1438
|
+
const path = `/v1/sandboxes/${enc(sandbox_id)}`;
|
|
1439
|
+
return await this.transport.request("GET", path);
|
|
1440
|
+
}
|
|
1441
|
+
/**
|
|
1442
|
+
* Get Sandboxes
|
|
1443
|
+
*/
|
|
1444
|
+
async list() {
|
|
1445
|
+
const path = "/v1/sandboxes";
|
|
1446
|
+
await this.transport.request("GET", path);
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* Get Sandbox Stream Ticket
|
|
1450
|
+
*/
|
|
1451
|
+
async streamTicket(sandbox_id) {
|
|
1452
|
+
const path = `/v1/sandboxes/${enc(sandbox_id)}/stream-ticket`;
|
|
1453
|
+
return await this.transport.request("GET", path);
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
936
1456
|
var EllipsisSecrets = class {
|
|
937
1457
|
constructor(transport) {
|
|
938
1458
|
this.transport = transport;
|
|
@@ -983,6 +1503,23 @@ var EllipsisSessions = class {
|
|
|
983
1503
|
this.transport = transport;
|
|
984
1504
|
}
|
|
985
1505
|
transport;
|
|
1506
|
+
/**
|
|
1507
|
+
* Get Agent Session Analytics
|
|
1508
|
+
*
|
|
1509
|
+
* Measured tokens and spend over time, plus estimated content cost.
|
|
1510
|
+
*
|
|
1511
|
+
* Token lanes use the request's saved rates. Content attribution
|
|
1512
|
+
* apportions input/cache spend by text size, counting carried context
|
|
1513
|
+
* on every request. It is an estimate, not a tool execution fee.
|
|
1514
|
+
* Only the latest 200 retained request bodies are inspected; missing
|
|
1515
|
+
* or unsupported context remains explicitly unattributed. No raw
|
|
1516
|
+
* prompts or tool results are returned. Sandbox tokens may read only
|
|
1517
|
+
* their own session's analytics.
|
|
1518
|
+
*/
|
|
1519
|
+
async analytics(session_id) {
|
|
1520
|
+
const path = `/v1/sessions/${enc(session_id)}/analytics`;
|
|
1521
|
+
return await this.transport.request("GET", path);
|
|
1522
|
+
}
|
|
986
1523
|
/**
|
|
987
1524
|
* Get Agent Session Diff
|
|
988
1525
|
*
|
|
@@ -998,6 +1535,20 @@ var EllipsisSessions = class {
|
|
|
998
1535
|
const path = `/v1/sessions/${enc(session_id)}/diff`;
|
|
999
1536
|
return await this.transport.request("GET", path);
|
|
1000
1537
|
}
|
|
1538
|
+
/**
|
|
1539
|
+
* List Session Executions
|
|
1540
|
+
*
|
|
1541
|
+
* Return the session's execution attempts, oldest first.
|
|
1542
|
+
*
|
|
1543
|
+
* Includes the selected harness, model, resolved instructions, initial
|
|
1544
|
+
* query, and common result summary. Complete native outputs remain in
|
|
1545
|
+
* the session's records. Internal launch options and checkpoint storage
|
|
1546
|
+
* references are excluded.
|
|
1547
|
+
*/
|
|
1548
|
+
async executions(session_id) {
|
|
1549
|
+
const path = `/v1/sessions/${enc(session_id)}/executions`;
|
|
1550
|
+
return await this.transport.request("GET", path);
|
|
1551
|
+
}
|
|
1001
1552
|
/**
|
|
1002
1553
|
* Export Agent Session
|
|
1003
1554
|
*
|
|
@@ -1032,6 +1583,18 @@ var EllipsisSessions = class {
|
|
|
1032
1583
|
const path = `/v1/sessions/${enc(session_id)}`;
|
|
1033
1584
|
return await this.transport.request("GET", path);
|
|
1034
1585
|
}
|
|
1586
|
+
/**
|
|
1587
|
+
* Get Agent Session Git
|
|
1588
|
+
*
|
|
1589
|
+
* The session's GitHub-side git view: its commits, and each PR it
|
|
1590
|
+
* opened joined to the live gh_prs row and reviews. The identity list
|
|
1591
|
+
* (output_git) rides the session itself over the WebSocket; this is
|
|
1592
|
+
* the join a "run" notify tells an open pane to refetch.
|
|
1593
|
+
*/
|
|
1594
|
+
async git(session_id) {
|
|
1595
|
+
const path = `/v1/sessions/${enc(session_id)}/git`;
|
|
1596
|
+
return await this.transport.request("GET", path);
|
|
1597
|
+
}
|
|
1035
1598
|
/**
|
|
1036
1599
|
* Ingest Agent Session Transcript
|
|
1037
1600
|
*
|
|
@@ -1058,7 +1621,7 @@ var EllipsisSessions = class {
|
|
|
1058
1621
|
*/
|
|
1059
1622
|
async list(options = {}) {
|
|
1060
1623
|
const path = "/v1/sessions";
|
|
1061
|
-
const query = buildQuery({ automation: options.automation, source: options.source, 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 });
|
|
1624
|
+
const query = buildQuery({ automation: options.automation, source: options.source, 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
1625
|
const response = await this.transport.request("GET", path, { query });
|
|
1063
1626
|
return new Page(
|
|
1064
1627
|
response,
|
|
@@ -1079,7 +1642,7 @@ var EllipsisSessions = class {
|
|
|
1079
1642
|
*/
|
|
1080
1643
|
async output(session_id) {
|
|
1081
1644
|
const path = `/v1/sessions/${enc(session_id)}/output`;
|
|
1082
|
-
await this.transport.request("GET", path);
|
|
1645
|
+
return await this.transport.request("GET", path);
|
|
1083
1646
|
}
|
|
1084
1647
|
/**
|
|
1085
1648
|
* Get Agent Session Records
|
|
@@ -1102,6 +1665,14 @@ var EllipsisSessions = class {
|
|
|
1102
1665
|
(cursor) => this.records(session_id, { ...options, cursor })
|
|
1103
1666
|
);
|
|
1104
1667
|
}
|
|
1668
|
+
/**
|
|
1669
|
+
* Search Agent Sessions
|
|
1670
|
+
*/
|
|
1671
|
+
async search(options = {}) {
|
|
1672
|
+
const path = "/v1/sessions/search";
|
|
1673
|
+
const query = buildQuery({ q: options.q, scope: options.scope, source: options.source, author_id: options.author_id, automation_id: options.automation_id, session_ids: options.session_ids, repo: options.repo, status: options.status, start: options.start, end: options.end, limit: options.limit });
|
|
1674
|
+
return await this.transport.request("GET", path, { query });
|
|
1675
|
+
}
|
|
1105
1676
|
/**
|
|
1106
1677
|
* Send Agent Session Message
|
|
1107
1678
|
*
|
|
@@ -1117,6 +1688,13 @@ var EllipsisSessions = class {
|
|
|
1117
1688
|
const body = buildBody({ idempotency_key: options.idempotency_key, images: options.images, message: options.message });
|
|
1118
1689
|
return await this.transport.request("POST", path, { body });
|
|
1119
1690
|
}
|
|
1691
|
+
/**
|
|
1692
|
+
* Get Session Stream Ticket
|
|
1693
|
+
*/
|
|
1694
|
+
async sessionStreamTicket(session_id) {
|
|
1695
|
+
const path = `/v1/sessions/${enc(session_id)}/stream-ticket`;
|
|
1696
|
+
return await this.transport.request("GET", path);
|
|
1697
|
+
}
|
|
1120
1698
|
/**
|
|
1121
1699
|
* Start Agent Session
|
|
1122
1700
|
*
|
|
@@ -1133,9 +1711,9 @@ var EllipsisSessions = class {
|
|
|
1133
1711
|
* when `budget` exceeds the organization's per-session ceiling. To
|
|
1134
1712
|
* run a saved automation, use POST /v1/automations/{automation_id}/sessions.
|
|
1135
1713
|
*/
|
|
1136
|
-
async start(options
|
|
1714
|
+
async start(options) {
|
|
1137
1715
|
const path = "/v1/sessions";
|
|
1138
|
-
const body = buildBody({ budget: options.budget,
|
|
1716
|
+
const body = buildBody({ budget: options.budget, environment: options.environment, force_rebuild: options.force_rebuild, harness: options.harness, images: options.images, instructions: options.instructions, interactive: options.interactive, metadata: options.metadata, output: options.output, permissions: options.permissions, prompt: options.prompt, repositories: options.repositories, skills: options.skills });
|
|
1139
1717
|
return await this.transport.request("POST", path, { body });
|
|
1140
1718
|
}
|
|
1141
1719
|
/**
|
|
@@ -1150,6 +1728,13 @@ var EllipsisSessions = class {
|
|
|
1150
1728
|
const path = `/v1/sessions/${enc(session_id)}/stop`;
|
|
1151
1729
|
return await this.transport.request("POST", path);
|
|
1152
1730
|
}
|
|
1731
|
+
/**
|
|
1732
|
+
* Get Sessions Stream Ticket
|
|
1733
|
+
*/
|
|
1734
|
+
async streamTicket() {
|
|
1735
|
+
const path = "/v1/sessions/stream-ticket";
|
|
1736
|
+
return await this.transport.request("GET", path);
|
|
1737
|
+
}
|
|
1153
1738
|
// ---- lifecycle sugar (hand-written layer over the generated core) ----
|
|
1154
1739
|
/** Start a session and return a handle over it. */
|
|
1155
1740
|
async run(options) {
|
|
@@ -1162,48 +1747,42 @@ var EllipsisSessions = class {
|
|
|
1162
1747
|
return new SessionHandle(this, response.session);
|
|
1163
1748
|
}
|
|
1164
1749
|
};
|
|
1165
|
-
var
|
|
1750
|
+
var EllipsisSupportSlack = class {
|
|
1166
1751
|
constructor(transport) {
|
|
1167
1752
|
this.transport = transport;
|
|
1168
1753
|
}
|
|
1169
1754
|
transport;
|
|
1170
1755
|
/**
|
|
1171
|
-
*
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1756
|
+
* Request Slack Help
|
|
1757
|
+
*/
|
|
1758
|
+
async create(options) {
|
|
1759
|
+
const path = "/v1/support/slack";
|
|
1760
|
+
const body = buildBody({ emails: options.emails, resend: options.resend });
|
|
1761
|
+
return await this.transport.request("POST", path, { body });
|
|
1762
|
+
}
|
|
1763
|
+
/**
|
|
1764
|
+
* Get Slack Help
|
|
1178
1765
|
*/
|
|
1179
1766
|
async get() {
|
|
1180
|
-
const path = "/v1/
|
|
1181
|
-
|
|
1767
|
+
const path = "/v1/support/slack";
|
|
1768
|
+
await this.transport.request("GET", path);
|
|
1182
1769
|
}
|
|
1183
1770
|
/**
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1186
|
-
* Set the organization settings.
|
|
1187
|
-
*
|
|
1188
|
-
* Replaces both: `default_model` accepts an alias or canonical id
|
|
1189
|
-
* and is stored canonical; `budget_ceiling.session` is in US
|
|
1190
|
-
* dollars, at most the platform ceiling. Null clears each.
|
|
1191
|
-
* Refused for sandbox tokens (potentially prompt-injected code must
|
|
1192
|
-
* not repoint the organization's defaults).
|
|
1771
|
+
* Invite To Slack Help
|
|
1193
1772
|
*/
|
|
1194
|
-
async
|
|
1195
|
-
const path = "/v1/
|
|
1196
|
-
const body = buildBody({
|
|
1197
|
-
return await this.transport.request("
|
|
1773
|
+
async invite(options) {
|
|
1774
|
+
const path = "/v1/support/slack/invites";
|
|
1775
|
+
const body = buildBody({ emails: options.emails, resend: options.resend });
|
|
1776
|
+
return await this.transport.request("POST", path, { body });
|
|
1198
1777
|
}
|
|
1199
1778
|
};
|
|
1200
|
-
var
|
|
1779
|
+
var EllipsisSupport = class {
|
|
1201
1780
|
constructor(transport) {
|
|
1202
1781
|
this.transport = transport;
|
|
1203
|
-
this.
|
|
1782
|
+
this.slack = new EllipsisSupportSlack(transport);
|
|
1204
1783
|
}
|
|
1205
1784
|
transport;
|
|
1206
|
-
|
|
1785
|
+
slack;
|
|
1207
1786
|
};
|
|
1208
1787
|
var EllipsisTemplates = class {
|
|
1209
1788
|
constructor(transport) {
|
|
@@ -1232,8 +1811,245 @@ var EllipsisTemplates = class {
|
|
|
1232
1811
|
return await this.transport.request("GET", path);
|
|
1233
1812
|
}
|
|
1234
1813
|
};
|
|
1814
|
+
var EllipsisUserSubscriptionTokens = class {
|
|
1815
|
+
constructor(transport) {
|
|
1816
|
+
this.transport = transport;
|
|
1817
|
+
}
|
|
1818
|
+
transport;
|
|
1819
|
+
/**
|
|
1820
|
+
* Delete Subscription Token
|
|
1821
|
+
*
|
|
1822
|
+
* Delete your subscription token for a provider.
|
|
1823
|
+
*
|
|
1824
|
+
* Your sessions stop billing your subscription immediately, and the
|
|
1825
|
+
* usage reading goes with it — it described that token's plan.
|
|
1826
|
+
*/
|
|
1827
|
+
async delete(provider) {
|
|
1828
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}`;
|
|
1829
|
+
await this.transport.request("DELETE", path);
|
|
1830
|
+
}
|
|
1831
|
+
/**
|
|
1832
|
+
* Get Subscription Token
|
|
1833
|
+
*
|
|
1834
|
+
* Get one provider's subscription token.
|
|
1835
|
+
*
|
|
1836
|
+
* `configured` is false when nothing is saved. The token itself is
|
|
1837
|
+
* never returned, only `token_last4`.
|
|
1838
|
+
*/
|
|
1839
|
+
async get(provider) {
|
|
1840
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}`;
|
|
1841
|
+
return await this.transport.request("GET", path);
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
* List Subscription Tokens
|
|
1845
|
+
*
|
|
1846
|
+
* List your subscription tokens.
|
|
1847
|
+
*
|
|
1848
|
+
* One entry per supported provider, whether or not you have saved a
|
|
1849
|
+
* token for it. Tokens are write-only: the response carries only
|
|
1850
|
+
* `token_last4`, never the token.
|
|
1851
|
+
*/
|
|
1852
|
+
async list() {
|
|
1853
|
+
const path = "/v1/user/subscription_tokens";
|
|
1854
|
+
return await this.transport.request("GET", path);
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* Set Subscription Token
|
|
1858
|
+
*
|
|
1859
|
+
* Save your subscription token for a provider.
|
|
1860
|
+
*
|
|
1861
|
+
* Replaces whatever was stored. The token is saved DISABLED and
|
|
1862
|
+
* routes nothing until `POST /v1/user/subscription_tokens/{provider}/verify`
|
|
1863
|
+
* succeeds. For Claude, use `claude setup-token`. For Codex, paste
|
|
1864
|
+
* the auth.json credentials from a ChatGPT login. Each subscription
|
|
1865
|
+
* pays only for models from its corresponding provider.
|
|
1866
|
+
*/
|
|
1867
|
+
async set(provider, options) {
|
|
1868
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}`;
|
|
1869
|
+
const body = buildBody({ token: options.token });
|
|
1870
|
+
return await this.transport.request("POST", path, { body });
|
|
1871
|
+
}
|
|
1872
|
+
/**
|
|
1873
|
+
* Get Subscription Usage
|
|
1874
|
+
*
|
|
1875
|
+
* Get your plan's last-observed rate-limit windows.
|
|
1876
|
+
*
|
|
1877
|
+
* Display-only, and only as fresh as your last call through Ellipsis
|
|
1878
|
+
* (`observed_at`) — the same plan used outside Ellipsis moves the
|
|
1879
|
+
* real windows without us seeing them. Null unless a token is
|
|
1880
|
+
* enabled for the provider: a disabled token routes nothing, so any
|
|
1881
|
+
* reading behind it is stale by construction.
|
|
1882
|
+
*/
|
|
1883
|
+
async usage(provider) {
|
|
1884
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}/usage`;
|
|
1885
|
+
return await this.transport.request("GET", path);
|
|
1886
|
+
}
|
|
1887
|
+
/**
|
|
1888
|
+
* Verify Subscription Token
|
|
1889
|
+
*
|
|
1890
|
+
* Verify the stored token by using it.
|
|
1891
|
+
*
|
|
1892
|
+
* Makes one minimal call on the exact runtime path, so a pass proves
|
|
1893
|
+
* the token is what will pay. This is the gate on routing: success
|
|
1894
|
+
* enables the token, failure disables it, so verifying a revoked
|
|
1895
|
+
* token is how you stop it routing. A 200 with `ok: false` is the
|
|
1896
|
+
* normal way a bad token is reported — it is an answer, not a
|
|
1897
|
+
* transport failure.
|
|
1898
|
+
*/
|
|
1899
|
+
async verify(provider) {
|
|
1900
|
+
const path = `/v1/user/subscription_tokens/${enc(String(provider))}/verify`;
|
|
1901
|
+
return await this.transport.request("POST", path);
|
|
1902
|
+
}
|
|
1903
|
+
};
|
|
1904
|
+
var EllipsisUserTokens = class {
|
|
1905
|
+
constructor(transport) {
|
|
1906
|
+
this.transport = transport;
|
|
1907
|
+
}
|
|
1908
|
+
transport;
|
|
1909
|
+
/**
|
|
1910
|
+
* List User Tokens
|
|
1911
|
+
*/
|
|
1912
|
+
async list() {
|
|
1913
|
+
const path = "/v1/user/tokens";
|
|
1914
|
+
return await this.transport.request("GET", path);
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Revoke User Token
|
|
1918
|
+
*/
|
|
1919
|
+
async revoke(token_id) {
|
|
1920
|
+
const path = `/v1/user/tokens/${enc(token_id)}`;
|
|
1921
|
+
return await this.transport.request("DELETE", path);
|
|
1922
|
+
}
|
|
1923
|
+
};
|
|
1924
|
+
var EllipsisUser = class {
|
|
1925
|
+
constructor(transport) {
|
|
1926
|
+
this.transport = transport;
|
|
1927
|
+
this.subscriptionTokens = new EllipsisUserSubscriptionTokens(transport);
|
|
1928
|
+
this.tokens = new EllipsisUserTokens(transport);
|
|
1929
|
+
}
|
|
1930
|
+
transport;
|
|
1931
|
+
subscriptionTokens;
|
|
1932
|
+
tokens;
|
|
1933
|
+
};
|
|
1934
|
+
var EllipsisWebhooksDeliveries = class {
|
|
1935
|
+
constructor(transport) {
|
|
1936
|
+
this.transport = transport;
|
|
1937
|
+
}
|
|
1938
|
+
transport;
|
|
1939
|
+
/**
|
|
1940
|
+
* Get Webhook Delivery
|
|
1941
|
+
*
|
|
1942
|
+
* Inspect a delivery's payload and attempts.
|
|
1943
|
+
*
|
|
1944
|
+
* Payloads are immutable across retries. Attempt details include HTTP
|
|
1945
|
+
* status, timing, and errors. Response bodies are not retained.
|
|
1946
|
+
*/
|
|
1947
|
+
async get(delivery_id) {
|
|
1948
|
+
const path = `/v1/webhooks/deliveries/${enc(delivery_id)}`;
|
|
1949
|
+
return await this.transport.request("GET", path);
|
|
1950
|
+
}
|
|
1951
|
+
/**
|
|
1952
|
+
* List Webhook Deliveries
|
|
1953
|
+
*
|
|
1954
|
+
* List webhook deliveries, newest first.
|
|
1955
|
+
*
|
|
1956
|
+
* Includes verification pings and deliveries for deleted webhooks.
|
|
1957
|
+
* History is retained for 30 days. Retries belong to the same delivery.
|
|
1958
|
+
*/
|
|
1959
|
+
async list(options = {}) {
|
|
1960
|
+
const path = "/v1/webhooks/deliveries";
|
|
1961
|
+
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 });
|
|
1962
|
+
const response = await this.transport.request("GET", path, { query });
|
|
1963
|
+
return new Page(
|
|
1964
|
+
response,
|
|
1965
|
+
"deliveries",
|
|
1966
|
+
(cursor) => this.list({ ...options, cursor })
|
|
1967
|
+
);
|
|
1968
|
+
}
|
|
1969
|
+
};
|
|
1970
|
+
var EllipsisWebhooks = class {
|
|
1971
|
+
constructor(transport) {
|
|
1972
|
+
this.transport = transport;
|
|
1973
|
+
this.deliveries = new EllipsisWebhooksDeliveries(transport);
|
|
1974
|
+
}
|
|
1975
|
+
transport;
|
|
1976
|
+
deliveries;
|
|
1977
|
+
/**
|
|
1978
|
+
* Create Webhook
|
|
1979
|
+
*
|
|
1980
|
+
* Create a webhook and send a verification ping.
|
|
1981
|
+
*
|
|
1982
|
+
* Save the signing secret from this response; it is returned once.
|
|
1983
|
+
* Accounts can have three webhooks, including unverified and pending
|
|
1984
|
+
* ones. A ping returning HTTP 200 moves unverified to pending. Contact
|
|
1985
|
+
* Ellipsis to activate it and receive session.create events.
|
|
1986
|
+
*/
|
|
1987
|
+
async create(options) {
|
|
1988
|
+
const path = "/v1/webhooks";
|
|
1989
|
+
const body = buildBody({ description: options.description, events: options.events, url: options.url });
|
|
1990
|
+
return await this.transport.request("POST", path, { body });
|
|
1991
|
+
}
|
|
1992
|
+
/**
|
|
1993
|
+
* Delete Webhook
|
|
1994
|
+
*
|
|
1995
|
+
* Delete a webhook and cancel outstanding deliveries.
|
|
1996
|
+
*
|
|
1997
|
+
* An HTTP request already in flight may finish. Delivery history remains
|
|
1998
|
+
* available for 30 days. Deletion frees one of the account's three slots.
|
|
1999
|
+
*/
|
|
2000
|
+
async delete(webhook_id) {
|
|
2001
|
+
const path = `/v1/webhooks/${enc(webhook_id)}`;
|
|
2002
|
+
await this.transport.request("DELETE", path);
|
|
2003
|
+
}
|
|
2004
|
+
/**
|
|
2005
|
+
* Get Webhook
|
|
2006
|
+
*
|
|
2007
|
+
* Get a webhook's configuration and approval state.
|
|
2008
|
+
*/
|
|
2009
|
+
async get(webhook_id) {
|
|
2010
|
+
const path = `/v1/webhooks/${enc(webhook_id)}`;
|
|
2011
|
+
return await this.transport.request("GET", path);
|
|
2012
|
+
}
|
|
2013
|
+
/**
|
|
2014
|
+
* List Webhooks
|
|
2015
|
+
*
|
|
2016
|
+
* List your webhooks and their delivery summaries.
|
|
2017
|
+
*/
|
|
2018
|
+
async list() {
|
|
2019
|
+
const path = "/v1/webhooks";
|
|
2020
|
+
return await this.transport.request("GET", path);
|
|
2021
|
+
}
|
|
2022
|
+
/**
|
|
2023
|
+
* Ping Webhook
|
|
2024
|
+
*
|
|
2025
|
+
* Send a signed verification or test ping.
|
|
2026
|
+
*
|
|
2027
|
+
* Available in every state. Only HTTP 200 verifies a destination;
|
|
2028
|
+
* successful pings never activate it. At most five pings per account
|
|
2029
|
+
* per minute, including pings from creation and URL changes.
|
|
2030
|
+
*/
|
|
2031
|
+
async ping(webhook_id) {
|
|
2032
|
+
const path = `/v1/webhooks/${enc(webhook_id)}/ping`;
|
|
2033
|
+
await this.transport.request("POST", path);
|
|
2034
|
+
}
|
|
2035
|
+
/**
|
|
2036
|
+
* Update Webhook
|
|
2037
|
+
*
|
|
2038
|
+
* Replace a webhook's configuration.
|
|
2039
|
+
*
|
|
2040
|
+
* Changing the URL cancels outstanding deliveries, clears verification
|
|
2041
|
+
* and approval, and sends another ping. State and signing secret cannot
|
|
2042
|
+
* be set here. Updating description or subscriptions preserves approval.
|
|
2043
|
+
*/
|
|
2044
|
+
async update(webhook_id, options) {
|
|
2045
|
+
const path = `/v1/webhooks/${enc(webhook_id)}`;
|
|
2046
|
+
const body = buildBody({ description: options.description, events: options.events, url: options.url });
|
|
2047
|
+
return await this.transport.request("PUT", path, { body });
|
|
2048
|
+
}
|
|
2049
|
+
};
|
|
1235
2050
|
var Ellipsis = class {
|
|
1236
2051
|
transport;
|
|
2052
|
+
account;
|
|
1237
2053
|
alerts;
|
|
1238
2054
|
analytics;
|
|
1239
2055
|
auth;
|
|
@@ -1242,14 +2058,17 @@ var Ellipsis = class {
|
|
|
1242
2058
|
files;
|
|
1243
2059
|
integrations;
|
|
1244
2060
|
memories;
|
|
1245
|
-
models;
|
|
1246
2061
|
reviews;
|
|
2062
|
+
sandboxes;
|
|
1247
2063
|
secrets;
|
|
1248
2064
|
sessions;
|
|
1249
|
-
|
|
2065
|
+
support;
|
|
1250
2066
|
templates;
|
|
2067
|
+
user;
|
|
2068
|
+
webhooks;
|
|
1251
2069
|
constructor(options) {
|
|
1252
2070
|
this.transport = new Transport(options);
|
|
2071
|
+
this.account = new EllipsisAccount(this.transport);
|
|
1253
2072
|
this.alerts = new EllipsisAlerts(this.transport);
|
|
1254
2073
|
this.analytics = new EllipsisAnalytics(this.transport);
|
|
1255
2074
|
this.auth = new EllipsisAuth(this.transport);
|
|
@@ -1258,38 +2077,22 @@ var Ellipsis = class {
|
|
|
1258
2077
|
this.files = new EllipsisFiles(this.transport);
|
|
1259
2078
|
this.integrations = new EllipsisIntegrations(this.transport);
|
|
1260
2079
|
this.memories = new EllipsisMemories(this.transport);
|
|
1261
|
-
this.models = new EllipsisModels(this.transport);
|
|
1262
2080
|
this.reviews = new EllipsisReviews(this.transport);
|
|
2081
|
+
this.sandboxes = new EllipsisSandboxes(this.transport);
|
|
1263
2082
|
this.secrets = new EllipsisSecrets(this.transport);
|
|
1264
2083
|
this.sessions = new EllipsisSessions(this.transport);
|
|
1265
|
-
this.
|
|
2084
|
+
this.support = new EllipsisSupport(this.transport);
|
|
1266
2085
|
this.templates = new EllipsisTemplates(this.transport);
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
* Get Budget
|
|
1270
|
-
*
|
|
1271
|
-
* Return the caller's current budget summary.
|
|
1272
|
-
*/
|
|
1273
|
-
async budget() {
|
|
1274
|
-
const path = "/v1/budget";
|
|
1275
|
-
return await this.transport.request("GET", path);
|
|
2086
|
+
this.user = new EllipsisUser(this.transport);
|
|
2087
|
+
this.webhooks = new EllipsisWebhooks(this.transport);
|
|
1276
2088
|
}
|
|
1277
2089
|
/**
|
|
1278
2090
|
* Current Identity
|
|
1279
2091
|
*
|
|
1280
2092
|
* Return the identity behind the caller's credential.
|
|
1281
2093
|
*/
|
|
1282
|
-
async
|
|
1283
|
-
const path = "/v1/
|
|
1284
|
-
return await this.transport.request("GET", path);
|
|
1285
|
-
}
|
|
1286
|
-
/**
|
|
1287
|
-
* Get Usage
|
|
1288
|
-
*
|
|
1289
|
-
* Return the caller's usage dashboard data.
|
|
1290
|
-
*/
|
|
1291
|
-
async usage() {
|
|
1292
|
-
const path = "/v1/usage";
|
|
2094
|
+
async identity() {
|
|
2095
|
+
const path = "/v1/identity";
|
|
1293
2096
|
return await this.transport.request("GET", path);
|
|
1294
2097
|
}
|
|
1295
2098
|
};
|