@ellipsis-dev/sdk 0.37.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/index.d.ts +166 -317
- package/dist/index.js +88 -320
- package/dist/store/index.d.ts +9 -3
- package/dist/store/index.js +10 -2
- package/dist/stream/index.d.ts +1 -1
- package/dist/{types-BXbnHOQe.d.ts → types-BAJ82SH6.d.ts} +838 -2675
- package/package.json +1 -1
- package/schema/collection_frames.schema.json +360 -25
- package/schema/frames.schema.json +373 -25
- package/schema/lifecycle.schema.json +13 -0
- package/schema/openapi.v1.json +2580 -5745
- package/schema/trigger_fields.schema.json +6 -1
package/dist/index.js
CHANGED
|
@@ -308,6 +308,33 @@ var EllipsisAccountApiKeys = class {
|
|
|
308
308
|
return await this.transport.request("DELETE", path);
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
|
+
var EllipsisAccountApiRequests = class {
|
|
312
|
+
constructor(transport) {
|
|
313
|
+
this.transport = transport;
|
|
314
|
+
}
|
|
315
|
+
transport;
|
|
316
|
+
/**
|
|
317
|
+
* List Api Requests
|
|
318
|
+
*
|
|
319
|
+
* List requests made to the API with API keys, user tokens, and session tokens, newest first.
|
|
320
|
+
*
|
|
321
|
+
* Required permissions: read:account.
|
|
322
|
+
* API key: Supported.
|
|
323
|
+
* CLI user token: Supported.
|
|
324
|
+
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
325
|
+
* Higher permission levels include lower levels: read < write < delete.
|
|
326
|
+
*/
|
|
327
|
+
async list(options = {}) {
|
|
328
|
+
const path = "/v1/account/api-requests";
|
|
329
|
+
const query = buildQuery({ start: options.start, end: options.end, operation: options.operation, status_code: options.status_code, credential_type: options.credential_type, credential_id: options.credential_id, limit: options.limit, cursor: options.cursor });
|
|
330
|
+
const response = await this.transport.request("GET", path, { query });
|
|
331
|
+
return new Page(
|
|
332
|
+
response,
|
|
333
|
+
"api_requests",
|
|
334
|
+
(cursor) => this.list({ ...options, cursor })
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
};
|
|
311
338
|
var EllipsisAccountBillingAutoRecharge = class {
|
|
312
339
|
constructor(transport) {
|
|
313
340
|
this.transport = transport;
|
|
@@ -331,28 +358,6 @@ var EllipsisAccountBillingAutoRecharge = class {
|
|
|
331
358
|
const path = "/v1/account/billing/auto-recharge";
|
|
332
359
|
return await this.transport.request("GET", path);
|
|
333
360
|
}
|
|
334
|
-
/**
|
|
335
|
-
* Update Auto Recharge
|
|
336
|
-
*
|
|
337
|
-
* Set your automatic credit recharge policy.
|
|
338
|
-
*
|
|
339
|
-
* Requires a human account administrator; API keys and session tokens
|
|
340
|
-
* cannot change this policy. Supply enabled explicitly. Saving amounts
|
|
341
|
-
* with enabled=false keeps recharge off; enabling requires a saved card.
|
|
342
|
-
* A recharge buys `amount` of credit and charges the platform fee in
|
|
343
|
-
* addition. Amounts and thresholds are millicents in whole cents.
|
|
344
|
-
*
|
|
345
|
-
* Required permissions: write:account.
|
|
346
|
-
* API key: Requires a CLI user token belonging to an account administrator.
|
|
347
|
-
* CLI user token: Requires an account administrator.
|
|
348
|
-
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
349
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
350
|
-
*/
|
|
351
|
-
async set(options) {
|
|
352
|
-
const path = "/v1/account/billing/auto-recharge";
|
|
353
|
-
const body = buildBody({ amount: options.amount, enabled: options.enabled, threshold: options.threshold });
|
|
354
|
-
return await this.transport.request("PUT", path, { body });
|
|
355
|
-
}
|
|
356
361
|
};
|
|
357
362
|
var EllipsisAccountBilling = class {
|
|
358
363
|
constructor(transport) {
|
|
@@ -361,64 +366,6 @@ var EllipsisAccountBilling = class {
|
|
|
361
366
|
}
|
|
362
367
|
transport;
|
|
363
368
|
autoRecharge;
|
|
364
|
-
/**
|
|
365
|
-
* Create Card Setup Session
|
|
366
|
-
*
|
|
367
|
-
* Save a card through Stripe's hosted setup flow.
|
|
368
|
-
*
|
|
369
|
-
* Requires a human account administrator. Open the returned URL to
|
|
370
|
-
* finish setup and return to Billing. Saving a card does not enable
|
|
371
|
-
* auto-recharge or buy credit.
|
|
372
|
-
*
|
|
373
|
-
* Required permissions: write:account.
|
|
374
|
-
* API key: Requires a CLI user token belonging to an account administrator.
|
|
375
|
-
* CLI user token: Requires an account administrator.
|
|
376
|
-
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
377
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
378
|
-
*/
|
|
379
|
-
async cardSetup() {
|
|
380
|
-
const path = "/v1/account/billing/card-setup";
|
|
381
|
-
return await this.transport.request("POST", path);
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* Create Credit Checkout Session
|
|
385
|
-
*
|
|
386
|
-
* Buy prepaid credit through Stripe's hosted checkout.
|
|
387
|
-
*
|
|
388
|
-
* Requires a human account administrator. Open the returned URL to
|
|
389
|
-
* complete payment. Credit is granted only after payment succeeds;
|
|
390
|
-
* the platform fee is charged in addition to `amount`. Returning
|
|
391
|
-
* to Billing carries the checkout session ID for receipt lookup.
|
|
392
|
-
*
|
|
393
|
-
* Required permissions: write:account.
|
|
394
|
-
* API key: Requires a CLI user token belonging to an account administrator.
|
|
395
|
-
* CLI user token: Requires an account administrator.
|
|
396
|
-
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
397
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
398
|
-
*/
|
|
399
|
-
async checkout(options) {
|
|
400
|
-
const path = "/v1/account/billing/checkout";
|
|
401
|
-
const body = buildBody({ amount: options.amount });
|
|
402
|
-
return await this.transport.request("POST", path, { body });
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Claim Signup Credit
|
|
406
|
-
*
|
|
407
|
-
* The "Claim $100" button. Runs the same idempotent billing
|
|
408
|
-
* bootstrap that otherwise fires lazily at the first session (Stripe
|
|
409
|
-
* customer + usage subscription + the signup grant). A repeat call is
|
|
410
|
-
* a no-op that returns the current state.
|
|
411
|
-
*
|
|
412
|
-
* Required permissions: write:account.
|
|
413
|
-
* API key: Supported.
|
|
414
|
-
* CLI user token: Supported.
|
|
415
|
-
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
416
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
417
|
-
*/
|
|
418
|
-
async claimSignupCredit() {
|
|
419
|
-
const path = "/v1/account/billing/claim-signup-credit";
|
|
420
|
-
return await this.transport.request("POST", path);
|
|
421
|
-
}
|
|
422
369
|
/**
|
|
423
370
|
* Get Fee Schedule
|
|
424
371
|
*
|
|
@@ -536,75 +483,6 @@ var EllipsisAccountModels = class {
|
|
|
536
483
|
return await this.transport.request("GET", path);
|
|
537
484
|
}
|
|
538
485
|
};
|
|
539
|
-
var EllipsisAccountNotifications = class {
|
|
540
|
-
constructor(transport) {
|
|
541
|
-
this.transport = transport;
|
|
542
|
-
}
|
|
543
|
-
transport;
|
|
544
|
-
/**
|
|
545
|
-
* Send Test Notification Email
|
|
546
|
-
*
|
|
547
|
-
* Send the alert email template to one address with sample data,
|
|
548
|
-
* so a typo'd finance alias is caught by a human instead of failing
|
|
549
|
-
* silently when a real alert fires.
|
|
550
|
-
*
|
|
551
|
-
* Required permissions: write:account.
|
|
552
|
-
* API key: Supported.
|
|
553
|
-
* CLI user token: Supported.
|
|
554
|
-
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
555
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
556
|
-
*/
|
|
557
|
-
async testEmail(options) {
|
|
558
|
-
const path = "/v1/account/notifications/test-email";
|
|
559
|
-
const body = buildBody({ email: options.email });
|
|
560
|
-
return await this.transport.request("POST", path, { body });
|
|
561
|
-
}
|
|
562
|
-
};
|
|
563
|
-
var EllipsisAccountOnboarding = class {
|
|
564
|
-
constructor(transport) {
|
|
565
|
-
this.transport = transport;
|
|
566
|
-
}
|
|
567
|
-
transport;
|
|
568
|
-
/**
|
|
569
|
-
* Get Account Onboarding
|
|
570
|
-
*
|
|
571
|
-
* Read the account's saved onboarding answers, or null before setup.
|
|
572
|
-
*
|
|
573
|
-
* Required permissions: read:account.
|
|
574
|
-
* API key: Supported.
|
|
575
|
-
* CLI user token: Supported.
|
|
576
|
-
* Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
577
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
578
|
-
*/
|
|
579
|
-
async get() {
|
|
580
|
-
const path = "/v1/account/onboarding";
|
|
581
|
-
return await this.transport.request("GET", path);
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
* Update Account Onboarding
|
|
585
|
-
*
|
|
586
|
-
* Save supplied onboarding answers, preserving omitted answers.
|
|
587
|
-
*
|
|
588
|
-
* Organizations can save their work email before selecting use cases.
|
|
589
|
-
* Saving use cases requires a valid organization work email and at
|
|
590
|
-
* least one choice. When Other is the only choice, describe it.
|
|
591
|
-
* Personal accounts save a null work email. This does not change the
|
|
592
|
-
* billing contact email. Session tokens cannot update answers.
|
|
593
|
-
* Supplying an organization work email requires a human user and sends
|
|
594
|
-
* a Slack Connect invitation. Slack failures do not undo saved answers.
|
|
595
|
-
*
|
|
596
|
-
* Required permissions: write:account.
|
|
597
|
-
* API key: Supported.
|
|
598
|
-
* CLI user token: Supported.
|
|
599
|
-
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
600
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
601
|
-
*/
|
|
602
|
-
async update(options = {}) {
|
|
603
|
-
const path = "/v1/account/onboarding";
|
|
604
|
-
const body = buildBody({ finished: options.finished, other_use_case: options.other_use_case, use_cases: options.use_cases, work_email: options.work_email });
|
|
605
|
-
return await this.transport.request("PATCH", path, { body });
|
|
606
|
-
}
|
|
607
|
-
};
|
|
608
486
|
var EllipsisAccountSettings = class {
|
|
609
487
|
constructor(transport) {
|
|
610
488
|
this.transport = transport;
|
|
@@ -673,18 +551,16 @@ var EllipsisAccount = class {
|
|
|
673
551
|
constructor(transport) {
|
|
674
552
|
this.transport = transport;
|
|
675
553
|
this.apiKeys = new EllipsisAccountApiKeys(transport);
|
|
554
|
+
this.apiRequests = new EllipsisAccountApiRequests(transport);
|
|
676
555
|
this.billing = new EllipsisAccountBilling(transport);
|
|
677
556
|
this.models = new EllipsisAccountModels(transport);
|
|
678
|
-
this.notifications = new EllipsisAccountNotifications(transport);
|
|
679
|
-
this.onboarding = new EllipsisAccountOnboarding(transport);
|
|
680
557
|
this.settings = new EllipsisAccountSettings(transport);
|
|
681
558
|
}
|
|
682
559
|
transport;
|
|
683
560
|
apiKeys;
|
|
561
|
+
apiRequests;
|
|
684
562
|
billing;
|
|
685
563
|
models;
|
|
686
|
-
notifications;
|
|
687
|
-
onboarding;
|
|
688
564
|
settings;
|
|
689
565
|
/**
|
|
690
566
|
* Get Customer Activity
|
|
@@ -900,13 +776,14 @@ var EllipsisAgents = class {
|
|
|
900
776
|
/**
|
|
901
777
|
* Get Agent Metrics
|
|
902
778
|
*
|
|
903
|
-
* Return an agent's session distribution
|
|
904
|
-
* by id or by name.
|
|
779
|
+
* Return an agent's session distribution, trailing spend, and
|
|
780
|
+
* usage over a window, by id or by name.
|
|
905
781
|
*
|
|
906
782
|
* `samples` carries one entry per finished session (duration, cost,
|
|
907
783
|
* tokens) for distributions; `spend_windows` carries what the
|
|
908
784
|
* agent's sessions cost over the last 1, 7, and 28 days against
|
|
909
|
-
* its budget for each window
|
|
785
|
+
* its budget for each window; `buckets` splits start to end by
|
|
786
|
+
* `interval`, chosen from the window's length.
|
|
910
787
|
*
|
|
911
788
|
* Required permissions: read:configs.
|
|
912
789
|
* API key: Supported.
|
|
@@ -915,9 +792,10 @@ var EllipsisAgents = class {
|
|
|
915
792
|
* Higher permission levels include lower levels: read < write < delete.
|
|
916
793
|
* Grant match patterns can further restrict access to individual resources.
|
|
917
794
|
*/
|
|
918
|
-
async metrics(id) {
|
|
795
|
+
async metrics(id, options) {
|
|
919
796
|
const path = `/v1/agents/${enc(id)}/metrics`;
|
|
920
|
-
|
|
797
|
+
const query = buildQuery({ start: options.start, end: options.end });
|
|
798
|
+
return await this.transport.request("GET", path, { query });
|
|
921
799
|
}
|
|
922
800
|
/**
|
|
923
801
|
* Start Agent Session
|
|
@@ -1071,80 +949,6 @@ var EllipsisAlerts = class {
|
|
|
1071
949
|
);
|
|
1072
950
|
}
|
|
1073
951
|
};
|
|
1074
|
-
var EllipsisAnalytics = class {
|
|
1075
|
-
constructor(transport) {
|
|
1076
|
-
this.transport = transport;
|
|
1077
|
-
}
|
|
1078
|
-
transport;
|
|
1079
|
-
/**
|
|
1080
|
-
* Get Analytics Metrics
|
|
1081
|
-
*
|
|
1082
|
-
* Return PR and review analytics metrics.
|
|
1083
|
-
*
|
|
1084
|
-
* The same data as the analytics dashboard.
|
|
1085
|
-
*
|
|
1086
|
-
* Windowing: pass explicit start/end, or days (default: the last
|
|
1087
|
-
* 30 days). `interval` names the width of each entry in `series`,
|
|
1088
|
-
* chosen from the window's length. account_type in all|user|bot
|
|
1089
|
-
* scopes the authors (bot = the apps/agents). Available to all
|
|
1090
|
-
* credential types: the responses expose the organization's own
|
|
1091
|
-
* GitHub PR/review activity, no secrets.
|
|
1092
|
-
*
|
|
1093
|
-
* Required permissions: read:account.
|
|
1094
|
-
* API key: Supported.
|
|
1095
|
-
* CLI user token: Supported.
|
|
1096
|
-
* Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1097
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
1098
|
-
*/
|
|
1099
|
-
async metrics(options = {}) {
|
|
1100
|
-
const path = "/v1/analytics/metrics";
|
|
1101
|
-
const query = buildQuery({ days: options.days, start: options.start, end: options.end, repo: options.repo, author: options.author, account_type: options.account_type, status: options.status });
|
|
1102
|
-
return await this.transport.request("GET", path, { query });
|
|
1103
|
-
}
|
|
1104
|
-
/**
|
|
1105
|
-
* Get Analytics Pull Requests
|
|
1106
|
-
*
|
|
1107
|
-
* Return pull-request analytics.
|
|
1108
|
-
*
|
|
1109
|
-
* Windowing: pass explicit start/end, or days (default: the last
|
|
1110
|
-
* 30 days). `interval` names the width of each entry in `series`,
|
|
1111
|
-
* chosen from the window's length. account_type in all|user|bot
|
|
1112
|
-
* scopes the authors.
|
|
1113
|
-
*
|
|
1114
|
-
* Required permissions: read:account.
|
|
1115
|
-
* API key: Supported.
|
|
1116
|
-
* CLI user token: Supported.
|
|
1117
|
-
* Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1118
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
1119
|
-
*/
|
|
1120
|
-
async pullRequests(options = {}) {
|
|
1121
|
-
const path = "/v1/analytics/pull-requests";
|
|
1122
|
-
const query = buildQuery({ days: options.days, start: options.start, end: options.end, repo: options.repo, author: options.author, account_type: options.account_type, status: options.status });
|
|
1123
|
-
return await this.transport.request("GET", path, { query });
|
|
1124
|
-
}
|
|
1125
|
-
/**
|
|
1126
|
-
* Get Analytics Reviews
|
|
1127
|
-
*
|
|
1128
|
-
* Return pull request review analytics.
|
|
1129
|
-
*
|
|
1130
|
-
* account_type scopes reviewers (bot|user|all) — e.g. "what apps
|
|
1131
|
-
* review the most PRs?" is the reviewer facets here with
|
|
1132
|
-
* account_type=bot. Windowing: pass explicit start/end, or days
|
|
1133
|
-
* (default: the last 30 days). `interval` names the width of each
|
|
1134
|
-
* entry in `series`, chosen from the window's length.
|
|
1135
|
-
*
|
|
1136
|
-
* Required permissions: read:account.
|
|
1137
|
-
* API key: Supported.
|
|
1138
|
-
* CLI user token: Supported.
|
|
1139
|
-
* Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1140
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
1141
|
-
*/
|
|
1142
|
-
async reviews(options = {}) {
|
|
1143
|
-
const path = "/v1/analytics/reviews";
|
|
1144
|
-
const query = buildQuery({ days: options.days, start: options.start, end: options.end, repo: options.repo, author: options.author, account_type: options.account_type, review_state: options.review_state });
|
|
1145
|
-
return await this.transport.request("GET", path, { query });
|
|
1146
|
-
}
|
|
1147
|
-
};
|
|
1148
952
|
var EllipsisAuthCli = class {
|
|
1149
953
|
constructor(transport) {
|
|
1150
954
|
this.transport = transport;
|
|
@@ -1320,8 +1124,8 @@ var EllipsisHandlers = class {
|
|
|
1320
1124
|
*
|
|
1321
1125
|
* Return session counts and accumulated spend for a saved handler.
|
|
1322
1126
|
*
|
|
1323
|
-
* Filters only by session creation time.
|
|
1324
|
-
*
|
|
1127
|
+
* Filters only by session creation time. `buckets` splits the window
|
|
1128
|
+
* by `interval`, chosen from the window's length. Counts use the current turn and conversation state, so an open
|
|
1325
1129
|
* conversation awaiting another message remains active. Spend includes the selected sessions' full
|
|
1326
1130
|
* accumulated cost, including activity after the creation-time window.
|
|
1327
1131
|
* Only sessions carrying this exact saved handler id are counted;
|
|
@@ -1342,7 +1146,7 @@ var EllipsisHandlers = class {
|
|
|
1342
1146
|
* Higher permission levels include lower levels: read < write < delete.
|
|
1343
1147
|
* Grant match patterns can further restrict access to individual resources.
|
|
1344
1148
|
*/
|
|
1345
|
-
async metrics(id, options
|
|
1149
|
+
async metrics(id, options) {
|
|
1346
1150
|
const path = `/v1/handlers/${enc(id)}/metrics`;
|
|
1347
1151
|
const query = buildQuery({ start: options.start, end: options.end });
|
|
1348
1152
|
return await this.transport.request("GET", path, { query });
|
|
@@ -1507,19 +1311,6 @@ var EllipsisIntegrationsSlack = class {
|
|
|
1507
1311
|
const path = "/v1/integrations/slack/channels";
|
|
1508
1312
|
return await this.transport.request("GET", path);
|
|
1509
1313
|
}
|
|
1510
|
-
/**
|
|
1511
|
-
* Create Operations Channel
|
|
1512
|
-
*
|
|
1513
|
-
* Required permissions: write:integrations.
|
|
1514
|
-
* API key: Supported.
|
|
1515
|
-
* CLI user token: Supported.
|
|
1516
|
-
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
1517
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
1518
|
-
*/
|
|
1519
|
-
async createOperationsChannel() {
|
|
1520
|
-
const path = "/v1/integrations/slack/operations-channel";
|
|
1521
|
-
return await this.transport.request("POST", path);
|
|
1522
|
-
}
|
|
1523
1314
|
/**
|
|
1524
1315
|
* Delete Slack Integration
|
|
1525
1316
|
*
|
|
@@ -1836,27 +1627,22 @@ var EllipsisSessions = class {
|
|
|
1836
1627
|
return await this.transport.request("GET", path);
|
|
1837
1628
|
}
|
|
1838
1629
|
/**
|
|
1839
|
-
*
|
|
1630
|
+
* Get Session Image
|
|
1840
1631
|
*
|
|
1841
|
-
*
|
|
1632
|
+
* Return an image sent with a message to the session.
|
|
1842
1633
|
*
|
|
1843
|
-
*
|
|
1844
|
-
* interactive sessions.
|
|
1634
|
+
* Each message lists its images, with their IDs, in `images`.
|
|
1845
1635
|
*
|
|
1846
|
-
*
|
|
1847
|
-
* Idempotent by transcript line uuid; tolerant of malformed lines.
|
|
1848
|
-
*
|
|
1849
|
-
* Required permissions: write:sessions.
|
|
1636
|
+
* Required permissions: read:sessions.
|
|
1850
1637
|
* API key: Supported.
|
|
1851
1638
|
* CLI user token: Supported.
|
|
1852
|
-
* Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1639
|
+
* Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1853
1640
|
* Higher permission levels include lower levels: read < write < delete.
|
|
1854
1641
|
* Grant match patterns can further restrict access to individual resources.
|
|
1855
1642
|
*/
|
|
1856
|
-
async
|
|
1857
|
-
const path = `/v1/sessions/${enc(id)}
|
|
1858
|
-
|
|
1859
|
-
return await this.transport.request("POST", path, { body });
|
|
1643
|
+
async image(session_id, id) {
|
|
1644
|
+
const path = `/v1/sessions/${enc(session_id)}/images/${enc(id)}`;
|
|
1645
|
+
return await this.transport.request("GET", path);
|
|
1860
1646
|
}
|
|
1861
1647
|
/**
|
|
1862
1648
|
* List Sessions
|
|
@@ -1930,28 +1716,13 @@ var EllipsisSessions = class {
|
|
|
1930
1716
|
(cursor) => this.records(id, { ...options, cursor })
|
|
1931
1717
|
);
|
|
1932
1718
|
}
|
|
1933
|
-
/**
|
|
1934
|
-
* Search Sessions
|
|
1935
|
-
*
|
|
1936
|
-
* Required permissions: read:sessions.
|
|
1937
|
-
* API key: Supported.
|
|
1938
|
-
* CLI user token: Supported.
|
|
1939
|
-
* Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
1940
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
1941
|
-
* Grant match patterns can further restrict access to individual resources.
|
|
1942
|
-
*/
|
|
1943
|
-
async search(options = {}) {
|
|
1944
|
-
const path = "/v1/sessions/search";
|
|
1945
|
-
const query = buildQuery({ q: options.q, scope: options.scope, source: options.source, service: options.service, handler: options.handler, author_id: options.author_id, agent_id: options.agent_id, session_ids: options.session_ids, repo: options.repo, status: options.status, start: options.start, end: options.end, limit: options.limit });
|
|
1946
|
-
return await this.transport.request("GET", path, { query });
|
|
1947
|
-
}
|
|
1948
1719
|
/**
|
|
1949
1720
|
* Send Session Message
|
|
1950
1721
|
*
|
|
1951
1722
|
* Send a message to a session.
|
|
1952
1723
|
*
|
|
1953
|
-
* 409 for mention, non-interactive, closed, and
|
|
1954
|
-
* sessions. Returns the created message; a retried send with the
|
|
1724
|
+
* 409 for mention, non-interactive, closed, archived, and
|
|
1725
|
+
* out-of-budget sessions. Returns the created message; a retried send with the
|
|
1955
1726
|
* same idempotency_key returns the original one. The message is
|
|
1956
1727
|
* answered once the session's status is `idle` or `closed`.
|
|
1957
1728
|
*
|
|
@@ -2048,13 +1819,28 @@ var EllipsisSessions = class {
|
|
|
2048
1819
|
/**
|
|
2049
1820
|
* Update Session
|
|
2050
1821
|
*
|
|
2051
|
-
* Archive or unarchive a session and return it.
|
|
1822
|
+
* Archive or unarchive a session, or set its summary, and return it.
|
|
2052
1823
|
*
|
|
2053
1824
|
* Set archived to true to record the current server time and the
|
|
2054
1825
|
* authenticated GitHub user. API-key requests record no user.
|
|
2055
1826
|
* Repeated archive requests preserve the original time and user.
|
|
2056
|
-
*
|
|
2057
|
-
*
|
|
1827
|
+
* Archiving stops the message in progress. An archived session takes
|
|
1828
|
+
* no messages (409 `session_archived`), and a reply on the Slack
|
|
1829
|
+
* thread, pull request, issue, or Linear issue it answers starts a
|
|
1830
|
+
* new session. A session is also archived when it closes and after
|
|
1831
|
+
* the account's `archive_inactive_sessions_days` without a message.
|
|
1832
|
+
* When the account sets session log retention, the session's
|
|
1833
|
+
* records, messages, and prompt are deleted that many days after it
|
|
1834
|
+
* was archived (`archived.deletes_at`). The session itself stays.
|
|
1835
|
+
*
|
|
1836
|
+
* Set archived to false to clear both fields and let the session
|
|
1837
|
+
* take messages again. 409 `session_superseded` when a newer session
|
|
1838
|
+
* now answers the same thread.
|
|
1839
|
+
*
|
|
1840
|
+
* Set summary to name the session. The summary's source becomes
|
|
1841
|
+
* `user`, and Ellipsis never replaces it with a generated one. With
|
|
1842
|
+
* both fields, the archive change applies first, and a refused
|
|
1843
|
+
* archive change leaves the summary as it was.
|
|
2058
1844
|
*
|
|
2059
1845
|
* Changes are delivered to session and session-list streams.
|
|
2060
1846
|
*
|
|
@@ -2065,9 +1851,9 @@ var EllipsisSessions = class {
|
|
|
2065
1851
|
* Higher permission levels include lower levels: read < write < delete.
|
|
2066
1852
|
* Grant match patterns can further restrict access to individual resources.
|
|
2067
1853
|
*/
|
|
2068
|
-
async update(id, options) {
|
|
1854
|
+
async update(id, options = {}) {
|
|
2069
1855
|
const path = `/v1/sessions/${enc(id)}`;
|
|
2070
|
-
const body = buildBody({ archived: options.archived });
|
|
1856
|
+
const body = buildBody({ archived: options.archived, summary: options.summary });
|
|
2071
1857
|
return await this.transport.request("PUT", path, { body });
|
|
2072
1858
|
}
|
|
2073
1859
|
// ---- lifecycle sugar (hand-written layer over the generated core) ----
|
|
@@ -2082,60 +1868,44 @@ var EllipsisSessions = class {
|
|
|
2082
1868
|
return new SessionHandle(this, response.session);
|
|
2083
1869
|
}
|
|
2084
1870
|
};
|
|
2085
|
-
var
|
|
1871
|
+
var EllipsisUserSettings = class {
|
|
2086
1872
|
constructor(transport) {
|
|
2087
1873
|
this.transport = transport;
|
|
2088
1874
|
}
|
|
2089
1875
|
transport;
|
|
2090
1876
|
/**
|
|
2091
|
-
*
|
|
1877
|
+
* Get User Settings
|
|
2092
1878
|
*
|
|
2093
|
-
*
|
|
1879
|
+
* Get the signed in user's own settings.
|
|
1880
|
+
*
|
|
1881
|
+
* Required permissions: read:user.
|
|
2094
1882
|
* API key: Requires a CLI user token.
|
|
2095
1883
|
* CLI user token: Supported.
|
|
2096
1884
|
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
2097
1885
|
* Higher permission levels include lower levels: read < write < delete.
|
|
2098
1886
|
*/
|
|
2099
|
-
async create(options) {
|
|
2100
|
-
const path = "/v1/support/slack";
|
|
2101
|
-
const body = buildBody({ emails: options.emails, resend: options.resend });
|
|
2102
|
-
return await this.transport.request("POST", path, { body });
|
|
2103
|
-
}
|
|
2104
|
-
/**
|
|
2105
|
-
* Get Slack Help
|
|
2106
|
-
*
|
|
2107
|
-
* Required permissions: read:account.
|
|
2108
|
-
* API key: Supported.
|
|
2109
|
-
* CLI user token: Supported.
|
|
2110
|
-
* Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
|
|
2111
|
-
* Higher permission levels include lower levels: read < write < delete.
|
|
2112
|
-
*/
|
|
2113
1887
|
async get() {
|
|
2114
|
-
const path = "/v1/
|
|
2115
|
-
await this.transport.request("GET", path);
|
|
1888
|
+
const path = "/v1/user/settings";
|
|
1889
|
+
return await this.transport.request("GET", path);
|
|
2116
1890
|
}
|
|
2117
1891
|
/**
|
|
2118
|
-
*
|
|
1892
|
+
* Patch User Settings
|
|
2119
1893
|
*
|
|
2120
|
-
*
|
|
1894
|
+
* Change the signed in user's own settings.
|
|
1895
|
+
*
|
|
1896
|
+
* Only the keys sent change, and the response is every setting.
|
|
1897
|
+
*
|
|
1898
|
+
* Required permissions: write:user.
|
|
2121
1899
|
* API key: Requires a CLI user token.
|
|
2122
1900
|
* CLI user token: Supported.
|
|
2123
1901
|
* Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
|
|
2124
1902
|
* Higher permission levels include lower levels: read < write < delete.
|
|
2125
1903
|
*/
|
|
2126
|
-
async
|
|
2127
|
-
const path = "/v1/
|
|
2128
|
-
const body = buildBody({
|
|
2129
|
-
return await this.transport.request("
|
|
2130
|
-
}
|
|
2131
|
-
};
|
|
2132
|
-
var EllipsisSupport = class {
|
|
2133
|
-
constructor(transport) {
|
|
2134
|
-
this.transport = transport;
|
|
2135
|
-
this.slack = new EllipsisSupportSlack(transport);
|
|
1904
|
+
async update(options = {}) {
|
|
1905
|
+
const path = "/v1/user/settings";
|
|
1906
|
+
const body = buildBody({ web: options.web });
|
|
1907
|
+
return await this.transport.request("PATCH", path, { body });
|
|
2136
1908
|
}
|
|
2137
|
-
transport;
|
|
2138
|
-
slack;
|
|
2139
1909
|
};
|
|
2140
1910
|
var EllipsisUserTokens = class {
|
|
2141
1911
|
constructor(transport) {
|
|
@@ -2172,9 +1942,11 @@ var EllipsisUserTokens = class {
|
|
|
2172
1942
|
var EllipsisUser = class {
|
|
2173
1943
|
constructor(transport) {
|
|
2174
1944
|
this.transport = transport;
|
|
1945
|
+
this.settings = new EllipsisUserSettings(transport);
|
|
2175
1946
|
this.tokens = new EllipsisUserTokens(transport);
|
|
2176
1947
|
}
|
|
2177
1948
|
transport;
|
|
1949
|
+
settings;
|
|
2178
1950
|
tokens;
|
|
2179
1951
|
};
|
|
2180
1952
|
var EllipsisVmExecutions = class {
|
|
@@ -2488,7 +2260,6 @@ var Ellipsis = class {
|
|
|
2488
2260
|
account;
|
|
2489
2261
|
agents;
|
|
2490
2262
|
alerts;
|
|
2491
|
-
analytics;
|
|
2492
2263
|
auth;
|
|
2493
2264
|
environments;
|
|
2494
2265
|
handlers;
|
|
@@ -2496,7 +2267,6 @@ var Ellipsis = class {
|
|
|
2496
2267
|
reviews;
|
|
2497
2268
|
secrets;
|
|
2498
2269
|
sessions;
|
|
2499
|
-
support;
|
|
2500
2270
|
user;
|
|
2501
2271
|
vmExecutions;
|
|
2502
2272
|
vmImages;
|
|
@@ -2507,7 +2277,6 @@ var Ellipsis = class {
|
|
|
2507
2277
|
this.account = new EllipsisAccount(this.transport);
|
|
2508
2278
|
this.agents = new EllipsisAgents(this.transport);
|
|
2509
2279
|
this.alerts = new EllipsisAlerts(this.transport);
|
|
2510
|
-
this.analytics = new EllipsisAnalytics(this.transport);
|
|
2511
2280
|
this.auth = new EllipsisAuth(this.transport);
|
|
2512
2281
|
this.environments = new EllipsisEnvironments(this.transport);
|
|
2513
2282
|
this.handlers = new EllipsisHandlers(this.transport);
|
|
@@ -2515,7 +2284,6 @@ var Ellipsis = class {
|
|
|
2515
2284
|
this.reviews = new EllipsisReviews(this.transport);
|
|
2516
2285
|
this.secrets = new EllipsisSecrets(this.transport);
|
|
2517
2286
|
this.sessions = new EllipsisSessions(this.transport);
|
|
2518
|
-
this.support = new EllipsisSupport(this.transport);
|
|
2519
2287
|
this.user = new EllipsisUser(this.transport);
|
|
2520
2288
|
this.vmExecutions = new EllipsisVmExecutions(this.transport);
|
|
2521
2289
|
this.vmImages = new EllipsisVmImages(this.transport);
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as CodexAgentMessage,
|
|
1
|
+
import { s as CodexAgentMessage, cT as SessionRecord, N as CodexFileChangeItem, L as CodexEvent, _ as CodexMcpToolCallItem, ch as SdkRecord, cu as Session, d6 as StreamFrame } from '../types-BAJ82SH6.js';
|
|
2
2
|
|
|
3
3
|
type WorkPhase = 'queued' | 'preparing' | 'starting' | 'working';
|
|
4
4
|
interface MessageTiming {
|
|
@@ -192,11 +192,17 @@ type EntryBody = {
|
|
|
192
192
|
};
|
|
193
193
|
declare function isWorkFold(item: TranscriptItem): boolean;
|
|
194
194
|
declare function reasoningSummaryTitle(summary: string): string;
|
|
195
|
-
declare function
|
|
195
|
+
declare function harnessName(session: {
|
|
196
|
+
claude_code?: unknown;
|
|
197
|
+
codex?: unknown;
|
|
198
|
+
gemini?: unknown;
|
|
199
|
+
}): string | null;
|
|
200
|
+
declare function entryBody(entry: LedgerEntry, { live, now, liveText, liveSummary, harness, }: {
|
|
196
201
|
live: boolean;
|
|
197
202
|
now: number;
|
|
198
203
|
liveText?: string;
|
|
199
204
|
liveSummary?: string;
|
|
205
|
+
harness?: string | null;
|
|
200
206
|
}): EntryBody;
|
|
201
207
|
|
|
202
208
|
interface ToolActivity {
|
|
@@ -252,4 +258,4 @@ declare class SessionTranscriptStore {
|
|
|
252
258
|
ingest: (rawFrame: StreamFrame) => void;
|
|
253
259
|
}
|
|
254
260
|
|
|
255
|
-
export { BRANCH_GLYPH, type ChatNode, type ChatToolNode, type ChatTurn, type EntryBody, type EnvironmentLogKind, type EnvironmentLogLine, type EnvironmentState, type EventToItemsOptions, type ItemKind, LIVE_GLYPH, type LedgerEntry, type MessageProgress, type MessageTiming, type PlacedItem, type RecordSlice, type SessionTranscriptSnapshot, SessionTranscriptStore, StreamFrame, type ToolActivity, type TranscriptItem, USER_BAR, type WorkPhase, activitySummary, awaitingAgentPhase, cacheTierLabel, chatTurnsToItems, clampLines, claudePayload, codexChangedPaths, codexEventToItems, codexMcpToolName, codexSubagentThreads, collapseToolRuns, deliveredUnechoedSends, deriveEnvironmentState, emptySessionTranscriptSnapshot, entryBody, entrySeconds, environmentOutputLine, environmentOutputLines, environmentOutputStep, environmentPhaseLabel, environmentSummary, eventToItems, foldCosts, foldGutter, foldRun, formatDuration, groupRecordsToChatTurns, gutterFor, hookPhrase, humanDuration, isCodexSubagentRecord, isConnectVisibleRecord, isConversationOver, isFoldable, isToolActivity, isToolFold, isWorkFold, lastLines, layOutItems, lifecycleText, messageEndedText, oneLine, pendingToolCalls, reasoningSummaryTitle, recordSlice, recordToItems, resultCostUsd, seedTranscriptStore, sessionLogText, splitLedger, startupHeadline, startupSettled, statusActivityText, summarizeToolInput, tailLines, toolActivities, toolResultText, toolRunMembers };
|
|
261
|
+
export { BRANCH_GLYPH, type ChatNode, type ChatToolNode, type ChatTurn, type EntryBody, type EnvironmentLogKind, type EnvironmentLogLine, type EnvironmentState, type EventToItemsOptions, type ItemKind, LIVE_GLYPH, type LedgerEntry, type MessageProgress, type MessageTiming, type PlacedItem, type RecordSlice, type SessionTranscriptSnapshot, SessionTranscriptStore, StreamFrame, type ToolActivity, type TranscriptItem, USER_BAR, type WorkPhase, activitySummary, awaitingAgentPhase, cacheTierLabel, chatTurnsToItems, clampLines, claudePayload, codexChangedPaths, codexEventToItems, codexMcpToolName, codexSubagentThreads, collapseToolRuns, deliveredUnechoedSends, deriveEnvironmentState, emptySessionTranscriptSnapshot, entryBody, entrySeconds, environmentOutputLine, environmentOutputLines, environmentOutputStep, environmentPhaseLabel, environmentSummary, eventToItems, foldCosts, foldGutter, foldRun, formatDuration, groupRecordsToChatTurns, gutterFor, harnessName, hookPhrase, humanDuration, isCodexSubagentRecord, isConnectVisibleRecord, isConversationOver, isFoldable, isToolActivity, isToolFold, isWorkFold, lastLines, layOutItems, lifecycleText, messageEndedText, oneLine, pendingToolCalls, reasoningSummaryTitle, recordSlice, recordToItems, resultCostUsd, seedTranscriptStore, sessionLogText, splitLedger, startupHeadline, startupSettled, statusActivityText, summarizeToolInput, tailLines, toolActivities, toolResultText, toolRunMembers };
|
package/dist/store/index.js
CHANGED
|
@@ -1829,11 +1829,18 @@ function reasoningSummaryTitle(summary) {
|
|
|
1829
1829
|
const title = line.replace(/^#{1,6}\s+/, "").replace(/^[*_`]+|[*_`]+$/g, "").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").trim();
|
|
1830
1830
|
return title.length > 120 ? `${title.slice(0, 119).trimEnd()}\u2026` : title;
|
|
1831
1831
|
}
|
|
1832
|
+
function harnessName(session) {
|
|
1833
|
+
if (session.claude_code) return "Claude Code";
|
|
1834
|
+
if (session.codex) return "Codex";
|
|
1835
|
+
if (session.gemini) return "Gemini CLI";
|
|
1836
|
+
return null;
|
|
1837
|
+
}
|
|
1832
1838
|
function entryBody(entry, {
|
|
1833
1839
|
live,
|
|
1834
1840
|
now,
|
|
1835
1841
|
liveText = "",
|
|
1836
|
-
liveSummary = ""
|
|
1842
|
+
liveSummary = "",
|
|
1843
|
+
harness = null
|
|
1837
1844
|
}) {
|
|
1838
1845
|
live = live && (entry.progress === void 0 || entry.progress.phase !== null);
|
|
1839
1846
|
const raw = chatTurnsToItems(entry.turns);
|
|
@@ -1847,7 +1854,7 @@ function entryBody(entry, {
|
|
|
1847
1854
|
const header = {
|
|
1848
1855
|
key,
|
|
1849
1856
|
kind: "summary",
|
|
1850
|
-
text: live ? phase === "preparing" ? "Preparing environment" : phase === "starting" ?
|
|
1857
|
+
text: live ? phase === "preparing" ? "Preparing environment" : phase === "starting" ? `Starting ${harness ?? "agent"}` : phase === "queued" ? "Queued" : reasoningSummaryTitle(liveSummary) || "Working" : seconds == null ? "Session startup" : `Worked for ${humanDuration(seconds)}`,
|
|
1851
1858
|
spaceBefore: true,
|
|
1852
1859
|
...entry.cancelled || entry.turns.some((turn) => turn.isError) ? { isError: true } : {},
|
|
1853
1860
|
...live ? { loading: true } : {}
|
|
@@ -2173,6 +2180,7 @@ export {
|
|
|
2173
2180
|
formatDuration,
|
|
2174
2181
|
groupRecordsToChatTurns,
|
|
2175
2182
|
gutterFor,
|
|
2183
|
+
harnessName,
|
|
2176
2184
|
hookPhrase,
|
|
2177
2185
|
humanDuration,
|
|
2178
2186
|
isCodexSubagentRecord,
|
package/dist/stream/index.d.ts
CHANGED