@ellipsis-dev/sdk 0.25.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 +1760 -77
- package/dist/index.js +897 -91
- package/dist/store/index.d.ts +36 -4
- package/dist/store/index.js +452 -85
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.js +1 -1
- package/dist/{types-DJzmFABi.d.ts → types-B-jIFh4_.d.ts} +20476 -9961
- package/package.json +1 -1
- package/schema/collection_frames.schema.json +3623 -0
- package/schema/frames.schema.json +9543 -3114
- package/schema/lifecycle.schema.json +18 -0
- package/schema/openapi.v1.json +25191 -8381
- package/schema/trigger_fields.schema.json +1 -1
package/dist/index.js
CHANGED
|
@@ -72,10 +72,12 @@ var SessionHandle = class {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
// Post into the session's inbox (delivered at the next turn boundary;
|
|
75
|
-
// wakes a parked session).
|
|
75
|
+
// wakes a parked session). `images` ride the message as content blocks the
|
|
76
|
+
// model sees on that turn — a paste into Claude Code.
|
|
76
77
|
async send(message, options = {}) {
|
|
77
78
|
const response = await this.sessions.sendMessage(this.id, {
|
|
78
79
|
message,
|
|
80
|
+
images: options.images,
|
|
79
81
|
idempotency_key: options.idempotencyKey
|
|
80
82
|
});
|
|
81
83
|
return response.message;
|
|
@@ -241,6 +243,445 @@ var Transport = class {
|
|
|
241
243
|
|
|
242
244
|
// src/core/client.ts
|
|
243
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
|
+
};
|
|
244
685
|
var EllipsisAlerts = class {
|
|
245
686
|
constructor(transport) {
|
|
246
687
|
this.transport = transport;
|
|
@@ -465,18 +906,28 @@ var EllipsisAutomations = class {
|
|
|
465
906
|
*
|
|
466
907
|
* Invoke an automation.
|
|
467
908
|
*
|
|
468
|
-
* Runs
|
|
469
|
-
* environment, permissions, skills, and budget
|
|
470
|
-
* the session it started. The
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
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.
|
|
474
918
|
*/
|
|
475
919
|
async run(automation_id, options = {}) {
|
|
476
920
|
const path = `/v1/automations/${enc(automation_id)}/sessions`;
|
|
477
|
-
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 });
|
|
478
922
|
return await this.transport.request("POST", path, { body });
|
|
479
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
|
+
}
|
|
480
931
|
/**
|
|
481
932
|
* Unlink Automation
|
|
482
933
|
*
|
|
@@ -617,7 +1068,12 @@ var EllipsisFiles = class {
|
|
|
617
1068
|
* Return one file's metadata and download link.
|
|
618
1069
|
*
|
|
619
1070
|
* Includes the gated dashboard URL and a short-lived presigned
|
|
620
|
-
* `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.
|
|
621
1077
|
*
|
|
622
1078
|
* To fetch the bytes locally, call this and then GET download_url
|
|
623
1079
|
* immediately — the JSON API never carries the file. The CLI's
|
|
@@ -632,12 +1088,14 @@ var EllipsisFiles = class {
|
|
|
632
1088
|
*
|
|
633
1089
|
* List uploaded files, newest first.
|
|
634
1090
|
*
|
|
635
|
-
* Metadata only
|
|
636
|
-
*
|
|
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.
|
|
637
1095
|
*/
|
|
638
1096
|
async list(options = {}) {
|
|
639
1097
|
const path = "/v1/files";
|
|
640
|
-
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 });
|
|
641
1099
|
const response = await this.transport.request("GET", path, { query });
|
|
642
1100
|
return new Page(
|
|
643
1101
|
response,
|
|
@@ -675,12 +1133,27 @@ var EllipsisIntegrationsGithub = class {
|
|
|
675
1133
|
const path = "/v1/integrations/github/repos";
|
|
676
1134
|
return await this.transport.request("GET", path);
|
|
677
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
|
+
}
|
|
678
1144
|
};
|
|
679
1145
|
var EllipsisIntegrationsLinear = class {
|
|
680
1146
|
constructor(transport) {
|
|
681
1147
|
this.transport = transport;
|
|
682
1148
|
}
|
|
683
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
|
+
}
|
|
684
1157
|
/**
|
|
685
1158
|
* List Linear Teams
|
|
686
1159
|
*
|
|
@@ -690,12 +1163,27 @@ var EllipsisIntegrationsLinear = class {
|
|
|
690
1163
|
const path = "/v1/integrations/linear/teams";
|
|
691
1164
|
return await this.transport.request("GET", path);
|
|
692
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
|
+
}
|
|
693
1174
|
};
|
|
694
1175
|
var EllipsisIntegrationsSentry = class {
|
|
695
1176
|
constructor(transport) {
|
|
696
1177
|
this.transport = transport;
|
|
697
1178
|
}
|
|
698
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
|
+
}
|
|
699
1187
|
/**
|
|
700
1188
|
* List Sentry Organizations
|
|
701
1189
|
*
|
|
@@ -721,6 +1209,20 @@ var EllipsisIntegrationsSlack = class {
|
|
|
721
1209
|
const path = "/v1/integrations/slack/channels";
|
|
722
1210
|
return await this.transport.request("GET", path);
|
|
723
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
|
+
}
|
|
724
1226
|
/**
|
|
725
1227
|
* List Slack Members
|
|
726
1228
|
*
|
|
@@ -731,6 +1233,14 @@ var EllipsisIntegrationsSlack = class {
|
|
|
731
1233
|
const path = "/v1/integrations/slack/members";
|
|
732
1234
|
return await this.transport.request("GET", path);
|
|
733
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
|
+
}
|
|
734
1244
|
};
|
|
735
1245
|
var EllipsisIntegrations = class {
|
|
736
1246
|
constructor(transport) {
|
|
@@ -843,33 +1353,18 @@ var EllipsisMemories = class {
|
|
|
843
1353
|
return await this.transport.request("GET", path, { query });
|
|
844
1354
|
}
|
|
845
1355
|
};
|
|
846
|
-
var
|
|
1356
|
+
var EllipsisReviews = class {
|
|
847
1357
|
constructor(transport) {
|
|
848
1358
|
this.transport = transport;
|
|
849
1359
|
}
|
|
850
1360
|
transport;
|
|
851
1361
|
/**
|
|
852
|
-
* List
|
|
853
|
-
*
|
|
854
|
-
* List selectable agent models.
|
|
855
|
-
*
|
|
856
|
-
* Most expensive first, with the platform default flagged.
|
|
857
|
-
*
|
|
858
|
-
* Reads the same registry as the dashboard's rate table, so a
|
|
859
|
-
* client's model picker can never drift from what's offered.
|
|
860
|
-
* Behind auth but not account-scoped — the selectable set is
|
|
861
|
-
* global.
|
|
1362
|
+
* List Review Configs
|
|
862
1363
|
*/
|
|
863
|
-
async
|
|
864
|
-
const path = "/v1/
|
|
1364
|
+
async configs() {
|
|
1365
|
+
const path = "/v1/reviews/configs";
|
|
865
1366
|
return await this.transport.request("GET", path);
|
|
866
1367
|
}
|
|
867
|
-
};
|
|
868
|
-
var EllipsisReviews = class {
|
|
869
|
-
constructor(transport) {
|
|
870
|
-
this.transport = transport;
|
|
871
|
-
}
|
|
872
|
-
transport;
|
|
873
1368
|
/**
|
|
874
1369
|
* Create Review
|
|
875
1370
|
*
|
|
@@ -914,14 +1409,15 @@ var EllipsisReviews = class {
|
|
|
914
1409
|
*
|
|
915
1410
|
* `findings` and `configuration` are omitted (counters only). Each
|
|
916
1411
|
* filter is a set: repeat `repository`, `pull_request_number`, or
|
|
917
|
-
* `status` to match any of several values.
|
|
1412
|
+
* `status` to match any of several values. `start` and `end` bound
|
|
1413
|
+
* the review's creation time.
|
|
918
1414
|
*
|
|
919
1415
|
* Webhook-created reviews appear here too, so this answers "show
|
|
920
1416
|
* me every review on this PR".
|
|
921
1417
|
*/
|
|
922
1418
|
async list(options = {}) {
|
|
923
1419
|
const path = "/v1/reviews";
|
|
924
|
-
const query = buildQuery({ repository: options.repository, pull_request_number: options.pull_request_number, status: options.status, limit: options.limit, cursor: options.cursor });
|
|
1420
|
+
const query = buildQuery({ repository: options.repository, pull_request_number: options.pull_request_number, status: options.status, start: options.start, end: options.end, limit: options.limit, cursor: options.cursor });
|
|
925
1421
|
const response = await this.transport.request("GET", path, { query });
|
|
926
1422
|
return new Page(
|
|
927
1423
|
response,
|
|
@@ -930,6 +1426,33 @@ var EllipsisReviews = class {
|
|
|
930
1426
|
);
|
|
931
1427
|
}
|
|
932
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
|
+
};
|
|
933
1456
|
var EllipsisSecrets = class {
|
|
934
1457
|
constructor(transport) {
|
|
935
1458
|
this.transport = transport;
|
|
@@ -980,6 +1503,23 @@ var EllipsisSessions = class {
|
|
|
980
1503
|
this.transport = transport;
|
|
981
1504
|
}
|
|
982
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
|
+
}
|
|
983
1523
|
/**
|
|
984
1524
|
* Get Agent Session Diff
|
|
985
1525
|
*
|
|
@@ -995,6 +1535,20 @@ var EllipsisSessions = class {
|
|
|
995
1535
|
const path = `/v1/sessions/${enc(session_id)}/diff`;
|
|
996
1536
|
return await this.transport.request("GET", path);
|
|
997
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
|
+
}
|
|
998
1552
|
/**
|
|
999
1553
|
* Export Agent Session
|
|
1000
1554
|
*
|
|
@@ -1029,6 +1583,18 @@ var EllipsisSessions = class {
|
|
|
1029
1583
|
const path = `/v1/sessions/${enc(session_id)}`;
|
|
1030
1584
|
return await this.transport.request("GET", path);
|
|
1031
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
|
+
}
|
|
1032
1598
|
/**
|
|
1033
1599
|
* Ingest Agent Session Transcript
|
|
1034
1600
|
*
|
|
@@ -1055,7 +1621,7 @@ var EllipsisSessions = class {
|
|
|
1055
1621
|
*/
|
|
1056
1622
|
async list(options = {}) {
|
|
1057
1623
|
const path = "/v1/sessions";
|
|
1058
|
-
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 });
|
|
1059
1625
|
const response = await this.transport.request("GET", path, { query });
|
|
1060
1626
|
return new Page(
|
|
1061
1627
|
response,
|
|
@@ -1076,7 +1642,7 @@ var EllipsisSessions = class {
|
|
|
1076
1642
|
*/
|
|
1077
1643
|
async output(session_id) {
|
|
1078
1644
|
const path = `/v1/sessions/${enc(session_id)}/output`;
|
|
1079
|
-
await this.transport.request("GET", path);
|
|
1645
|
+
return await this.transport.request("GET", path);
|
|
1080
1646
|
}
|
|
1081
1647
|
/**
|
|
1082
1648
|
* Get Agent Session Records
|
|
@@ -1099,6 +1665,14 @@ var EllipsisSessions = class {
|
|
|
1099
1665
|
(cursor) => this.records(session_id, { ...options, cursor })
|
|
1100
1666
|
);
|
|
1101
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
|
+
}
|
|
1102
1676
|
/**
|
|
1103
1677
|
* Send Agent Session Message
|
|
1104
1678
|
*
|
|
@@ -1111,9 +1685,16 @@ var EllipsisSessions = class {
|
|
|
1111
1685
|
*/
|
|
1112
1686
|
async sendMessage(session_id, options) {
|
|
1113
1687
|
const path = `/v1/sessions/${enc(session_id)}/messages`;
|
|
1114
|
-
const body = buildBody({ idempotency_key: options.idempotency_key, message: options.message });
|
|
1688
|
+
const body = buildBody({ idempotency_key: options.idempotency_key, images: options.images, message: options.message });
|
|
1115
1689
|
return await this.transport.request("POST", path, { body });
|
|
1116
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
|
+
}
|
|
1117
1698
|
/**
|
|
1118
1699
|
* Start Agent Session
|
|
1119
1700
|
*
|
|
@@ -1121,17 +1702,18 @@ var EllipsisSessions = class {
|
|
|
1121
1702
|
*
|
|
1122
1703
|
* The daily driver: a prompt, optionally where to run it
|
|
1123
1704
|
* (`environment`) and the run's own settings, in the AutomationConfig
|
|
1124
|
-
* vocabulary.
|
|
1125
|
-
*
|
|
1705
|
+
* vocabulary. What you send is what runs: omit `environment` and the
|
|
1706
|
+
* session runs in the built-in basic sandbox. A missing model or
|
|
1707
|
+
* budget comes from the organization's settings, so
|
|
1126
1708
|
* `{"prompt": "..."}` alone is a complete request. `prompt` is the
|
|
1127
1709
|
* first message; omit it and the session starts idle, waiting for
|
|
1128
1710
|
* one. 400 when `interactive` is false and there is no prompt, or
|
|
1129
1711
|
* when `budget` exceeds the organization's per-session ceiling. To
|
|
1130
1712
|
* run a saved automation, use POST /v1/automations/{automation_id}/sessions.
|
|
1131
1713
|
*/
|
|
1132
|
-
async start(options
|
|
1714
|
+
async start(options) {
|
|
1133
1715
|
const path = "/v1/sessions";
|
|
1134
|
-
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 });
|
|
1135
1717
|
return await this.transport.request("POST", path, { body });
|
|
1136
1718
|
}
|
|
1137
1719
|
/**
|
|
@@ -1146,6 +1728,13 @@ var EllipsisSessions = class {
|
|
|
1146
1728
|
const path = `/v1/sessions/${enc(session_id)}/stop`;
|
|
1147
1729
|
return await this.transport.request("POST", path);
|
|
1148
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
|
+
}
|
|
1149
1738
|
// ---- lifecycle sugar (hand-written layer over the generated core) ----
|
|
1150
1739
|
/** Start a session and return a handle over it. */
|
|
1151
1740
|
async run(options) {
|
|
@@ -1158,49 +1747,42 @@ var EllipsisSessions = class {
|
|
|
1158
1747
|
return new SessionHandle(this, response.session);
|
|
1159
1748
|
}
|
|
1160
1749
|
};
|
|
1161
|
-
var
|
|
1750
|
+
var EllipsisSupportSlack = class {
|
|
1162
1751
|
constructor(transport) {
|
|
1163
1752
|
this.transport = transport;
|
|
1164
1753
|
}
|
|
1165
1754
|
transport;
|
|
1166
1755
|
/**
|
|
1167
|
-
*
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
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
|
|
1174
1765
|
*/
|
|
1175
1766
|
async get() {
|
|
1176
|
-
const path = "/v1/
|
|
1177
|
-
|
|
1767
|
+
const path = "/v1/support/slack";
|
|
1768
|
+
await this.transport.request("GET", path);
|
|
1178
1769
|
}
|
|
1179
1770
|
/**
|
|
1180
|
-
*
|
|
1181
|
-
*
|
|
1182
|
-
* Set the organization settings.
|
|
1183
|
-
*
|
|
1184
|
-
* Replaces all three: `default_model` accepts an alias or canonical
|
|
1185
|
-
* id and is stored canonical; `default_environment` accepts a name
|
|
1186
|
-
* or `env_` id and is stored as the id; `budget_ceiling.session` is
|
|
1187
|
-
* in US dollars, at most the platform ceiling. Null clears each.
|
|
1188
|
-
* Refused for sandbox tokens (potentially prompt-injected code must
|
|
1189
|
-
* not repoint the organization's defaults).
|
|
1771
|
+
* Invite To Slack Help
|
|
1190
1772
|
*/
|
|
1191
|
-
async
|
|
1192
|
-
const path = "/v1/
|
|
1193
|
-
const body = buildBody({
|
|
1194
|
-
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 });
|
|
1195
1777
|
}
|
|
1196
1778
|
};
|
|
1197
|
-
var
|
|
1779
|
+
var EllipsisSupport = class {
|
|
1198
1780
|
constructor(transport) {
|
|
1199
1781
|
this.transport = transport;
|
|
1200
|
-
this.
|
|
1782
|
+
this.slack = new EllipsisSupportSlack(transport);
|
|
1201
1783
|
}
|
|
1202
1784
|
transport;
|
|
1203
|
-
|
|
1785
|
+
slack;
|
|
1204
1786
|
};
|
|
1205
1787
|
var EllipsisTemplates = class {
|
|
1206
1788
|
constructor(transport) {
|
|
@@ -1229,8 +1811,245 @@ var EllipsisTemplates = class {
|
|
|
1229
1811
|
return await this.transport.request("GET", path);
|
|
1230
1812
|
}
|
|
1231
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
|
+
};
|
|
1232
2050
|
var Ellipsis = class {
|
|
1233
2051
|
transport;
|
|
2052
|
+
account;
|
|
1234
2053
|
alerts;
|
|
1235
2054
|
analytics;
|
|
1236
2055
|
auth;
|
|
@@ -1239,14 +2058,17 @@ var Ellipsis = class {
|
|
|
1239
2058
|
files;
|
|
1240
2059
|
integrations;
|
|
1241
2060
|
memories;
|
|
1242
|
-
models;
|
|
1243
2061
|
reviews;
|
|
2062
|
+
sandboxes;
|
|
1244
2063
|
secrets;
|
|
1245
2064
|
sessions;
|
|
1246
|
-
|
|
2065
|
+
support;
|
|
1247
2066
|
templates;
|
|
2067
|
+
user;
|
|
2068
|
+
webhooks;
|
|
1248
2069
|
constructor(options) {
|
|
1249
2070
|
this.transport = new Transport(options);
|
|
2071
|
+
this.account = new EllipsisAccount(this.transport);
|
|
1250
2072
|
this.alerts = new EllipsisAlerts(this.transport);
|
|
1251
2073
|
this.analytics = new EllipsisAnalytics(this.transport);
|
|
1252
2074
|
this.auth = new EllipsisAuth(this.transport);
|
|
@@ -1255,38 +2077,22 @@ var Ellipsis = class {
|
|
|
1255
2077
|
this.files = new EllipsisFiles(this.transport);
|
|
1256
2078
|
this.integrations = new EllipsisIntegrations(this.transport);
|
|
1257
2079
|
this.memories = new EllipsisMemories(this.transport);
|
|
1258
|
-
this.models = new EllipsisModels(this.transport);
|
|
1259
2080
|
this.reviews = new EllipsisReviews(this.transport);
|
|
2081
|
+
this.sandboxes = new EllipsisSandboxes(this.transport);
|
|
1260
2082
|
this.secrets = new EllipsisSecrets(this.transport);
|
|
1261
2083
|
this.sessions = new EllipsisSessions(this.transport);
|
|
1262
|
-
this.
|
|
2084
|
+
this.support = new EllipsisSupport(this.transport);
|
|
1263
2085
|
this.templates = new EllipsisTemplates(this.transport);
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
* Get Budget
|
|
1267
|
-
*
|
|
1268
|
-
* Return the caller's current budget summary.
|
|
1269
|
-
*/
|
|
1270
|
-
async budget() {
|
|
1271
|
-
const path = "/v1/budget";
|
|
1272
|
-
return await this.transport.request("GET", path);
|
|
2086
|
+
this.user = new EllipsisUser(this.transport);
|
|
2087
|
+
this.webhooks = new EllipsisWebhooks(this.transport);
|
|
1273
2088
|
}
|
|
1274
2089
|
/**
|
|
1275
2090
|
* Current Identity
|
|
1276
2091
|
*
|
|
1277
2092
|
* Return the identity behind the caller's credential.
|
|
1278
2093
|
*/
|
|
1279
|
-
async
|
|
1280
|
-
const path = "/v1/
|
|
1281
|
-
return await this.transport.request("GET", path);
|
|
1282
|
-
}
|
|
1283
|
-
/**
|
|
1284
|
-
* Get Usage
|
|
1285
|
-
*
|
|
1286
|
-
* Return the caller's usage dashboard data.
|
|
1287
|
-
*/
|
|
1288
|
-
async usage() {
|
|
1289
|
-
const path = "/v1/usage";
|
|
2094
|
+
async identity() {
|
|
2095
|
+
const path = "/v1/identity";
|
|
1290
2096
|
return await this.transport.request("GET", path);
|
|
1291
2097
|
}
|
|
1292
2098
|
};
|