@ellipsis-dev/sdk 0.22.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +64 -31
- package/dist/index.js +55 -19
- package/dist/store/index.d.ts +33 -4
- package/dist/store/index.js +238 -65
- package/dist/stream/index.d.ts +1 -1
- package/dist/{types-BKAbWcLN.d.ts → types-ClEF_IA9.d.ts} +1349 -938
- package/package.json +1 -1
- package/schema/frames.schema.json +1334 -1298
- package/schema/openapi.v1.json +1820 -1358
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as components } from './types-
|
|
2
|
-
export { A as
|
|
1
|
+
import { c as components } from './types-ClEF_IA9.js';
|
|
2
|
+
export { A as AttributionType, B as BudgetSource, C as ClaudeSessionRecord, a as CodexEvent, b as CodexItem, d as CodexSessionRecord, e as CreateReviewRequest, D as DeltaFrame, f as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, g as GithubAccountType, H as Harness, h as HeartbeatFrame, L as LifecycleSessionRecord, P as ParentKind, i as PromptBlockedReason, R as RecordsAppendFrame, j as ResolvedReviewScope, k as Review, l as ReviewConfiguration, m as ReviewCounters, n as ReviewFinding, o as ReviewRequester, p as ReviewScope, q as ReviewScopeKind, r as ReviewStage, s as ReviewedCommit, t as ReviewsListResponse, S as SdkAssistantRecord, u as SdkContentBlock, v as SdkRateLimitRecord, w as SdkRecord, x as SdkResultRecord, y as SdkSystemRecord, z as SdkUserRecord, I as SendSessionMessageRequest, J as Session, K as SessionExitStatus, M as SessionFrame, N as SessionGit, O as SessionLiveness, Q as SessionMessage, T as SessionMessageResponse, U as SessionMessageStatus, V as SessionPrompting, W as SessionRecord, X as SessionRecordsListResponse, Y as SessionResponse, Z as SessionSource, _ as SessionState, $ as SessionStatus, a0 as SessionStreamFrame, a1 as SessionSurface, a2 as SessionsListResponse, a3 as SnapshotFrame, a4 as StreamFrame, a5 as TokensInfo, a6 as paths } from './types-ClEF_IA9.js';
|
|
3
3
|
|
|
4
4
|
interface CursorResponse {
|
|
5
5
|
has_more: boolean;
|
|
@@ -23,6 +23,7 @@ interface SessionsApi {
|
|
|
23
23
|
stop(sessionId: string): Promise<S$1['SessionResponse']>;
|
|
24
24
|
sendMessage(sessionId: string, options: {
|
|
25
25
|
message: string;
|
|
26
|
+
images?: S$1['ImageAttachment'][];
|
|
26
27
|
idempotency_key?: string | null;
|
|
27
28
|
}): Promise<S$1['SessionMessageResponse']>;
|
|
28
29
|
records(sessionId: string, options?: {
|
|
@@ -42,6 +43,7 @@ declare class SessionHandle {
|
|
|
42
43
|
pollIntervalMs?: number;
|
|
43
44
|
}): Promise<S$1['Session']>;
|
|
44
45
|
send(message: string, options?: {
|
|
46
|
+
images?: S$1['ImageAttachment'][];
|
|
45
47
|
idempotencyKey?: string;
|
|
46
48
|
}): Promise<S$1['SessionMessage']>;
|
|
47
49
|
stop(): Promise<S$1['Session']>;
|
|
@@ -209,7 +211,7 @@ declare class EllipsisAutomations {
|
|
|
209
211
|
* 409 when another live automation already holds the name.
|
|
210
212
|
*/
|
|
211
213
|
create(options: {
|
|
212
|
-
automation: S['
|
|
214
|
+
automation: S['AutomationConfig'];
|
|
213
215
|
}): Promise<S['AutomationResponse']>;
|
|
214
216
|
/**
|
|
215
217
|
* Delete Automation
|
|
@@ -247,6 +249,18 @@ declare class EllipsisAutomations {
|
|
|
247
249
|
* List automations.
|
|
248
250
|
*/
|
|
249
251
|
list(): Promise<S['AutomationsListResponse']>;
|
|
252
|
+
/**
|
|
253
|
+
* Get Automation Metrics
|
|
254
|
+
*
|
|
255
|
+
* Return an automation's session distribution and trailing spend,
|
|
256
|
+
* by id or by name.
|
|
257
|
+
*
|
|
258
|
+
* `samples` carries one entry per finished session (duration, cost,
|
|
259
|
+
* tokens) for distributions; `spend_windows` carries what the
|
|
260
|
+
* automation's sessions cost over the last 1, 7, and 28 days against
|
|
261
|
+
* its budget for each window.
|
|
262
|
+
*/
|
|
263
|
+
metrics(automation_id: string): Promise<S['AutomationMetricsResponse']>;
|
|
250
264
|
/**
|
|
251
265
|
* Start Automation Session
|
|
252
266
|
*
|
|
@@ -285,7 +299,7 @@ declare class EllipsisAutomations {
|
|
|
285
299
|
* would revert the change — unlink it first to take ownership.
|
|
286
300
|
*/
|
|
287
301
|
update(automation_id: string, options: {
|
|
288
|
-
automation: S['
|
|
302
|
+
automation: S['AutomationConfig'];
|
|
289
303
|
}): Promise<S['AutomationResponse']>;
|
|
290
304
|
}
|
|
291
305
|
declare class EllipsisEnvironments {
|
|
@@ -301,7 +315,7 @@ declare class EllipsisEnvironments {
|
|
|
301
315
|
* 409 when another live environment already holds the name.
|
|
302
316
|
*/
|
|
303
317
|
create(options: {
|
|
304
|
-
environment: S['
|
|
318
|
+
environment: S['EnvironmentDocument'];
|
|
305
319
|
}): Promise<S['EnvironmentResponse']>;
|
|
306
320
|
/**
|
|
307
321
|
* Delete Environment
|
|
@@ -338,7 +352,7 @@ declare class EllipsisEnvironments {
|
|
|
338
352
|
* defined by a repository file is a 409.
|
|
339
353
|
*/
|
|
340
354
|
update(environment_id: string, options: {
|
|
341
|
-
environment: S['
|
|
355
|
+
environment: S['EnvironmentDocument'];
|
|
342
356
|
}): Promise<S['EnvironmentResponse']>;
|
|
343
357
|
}
|
|
344
358
|
declare class EllipsisFiles {
|
|
@@ -578,9 +592,10 @@ declare class EllipsisReviews {
|
|
|
578
592
|
*
|
|
579
593
|
* Run a code review on demand.
|
|
580
594
|
*
|
|
581
|
-
* Reviews an
|
|
582
|
-
*
|
|
583
|
-
*
|
|
595
|
+
* Reviews an open pull request. Which pipeline runs is not a
|
|
596
|
+
* parameter: it resolves from the repository's files exactly as
|
|
597
|
+
* it does for a push, so an on-demand review never disagrees with
|
|
598
|
+
* the automatic one.
|
|
584
599
|
*
|
|
585
600
|
* A review is one pipeline run over one commit range, with one
|
|
586
601
|
* agent session per stage: `review.id` is the run id, and
|
|
@@ -613,16 +628,20 @@ declare class EllipsisReviews {
|
|
|
613
628
|
*
|
|
614
629
|
* List code reviews, newest first.
|
|
615
630
|
*
|
|
616
|
-
* `findings`
|
|
631
|
+
* `findings` and `configuration` are omitted (counters only). Each
|
|
632
|
+
* filter is a set: repeat `repository`, `pull_request_number`, or
|
|
633
|
+
* `status` to match any of several values. `start` and `end` bound
|
|
634
|
+
* the review's creation time.
|
|
617
635
|
*
|
|
618
636
|
* Webhook-created reviews appear here too, so this answers "show
|
|
619
637
|
* me every review on this PR".
|
|
620
638
|
*/
|
|
621
639
|
list(options?: {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
640
|
+
repository?: (string)[];
|
|
641
|
+
pull_request_number?: (number)[];
|
|
642
|
+
status?: (S['CodeReviewRunStatus'])[];
|
|
643
|
+
start?: string | null;
|
|
644
|
+
end?: string | null;
|
|
626
645
|
limit?: number;
|
|
627
646
|
cursor?: string | null;
|
|
628
647
|
}): Promise<Page<S['Review'], S['ReviewsListResponse']>>;
|
|
@@ -665,6 +684,18 @@ declare class EllipsisSecrets {
|
|
|
665
684
|
declare class EllipsisSessions {
|
|
666
685
|
private readonly transport;
|
|
667
686
|
constructor(transport: Transport);
|
|
687
|
+
/**
|
|
688
|
+
* Get Agent Session Diff
|
|
689
|
+
*
|
|
690
|
+
* Return the session's uncommitted changes as a patch.
|
|
691
|
+
*
|
|
692
|
+
* One unified-diff section per changed file, captured from the
|
|
693
|
+
* sandbox's working tree when the session ended. The per-file
|
|
694
|
+
* counts ride on the session itself (`git.repos[].files`); this
|
|
695
|
+
* is the text behind them. Empty when the tree was clean. A
|
|
696
|
+
* sandbox token may read only its own session's diff.
|
|
697
|
+
*/
|
|
698
|
+
diff(session_id: string): Promise<S['SessionDiffResponse']>;
|
|
668
699
|
/**
|
|
669
700
|
* Export Agent Session
|
|
670
701
|
*
|
|
@@ -767,6 +798,7 @@ declare class EllipsisSessions {
|
|
|
767
798
|
*/
|
|
768
799
|
sendMessage(session_id: string, options: {
|
|
769
800
|
idempotency_key?: string | null;
|
|
801
|
+
images?: (S['ImageAttachment'])[];
|
|
770
802
|
message: string;
|
|
771
803
|
}): Promise<S['SessionMessageResponse']>;
|
|
772
804
|
/**
|
|
@@ -775,9 +807,10 @@ declare class EllipsisSessions {
|
|
|
775
807
|
* Start a cloud agent session.
|
|
776
808
|
*
|
|
777
809
|
* The daily driver: a prompt, optionally where to run it
|
|
778
|
-
* (`environment`) and the run's own settings, in the
|
|
779
|
-
* vocabulary.
|
|
780
|
-
*
|
|
810
|
+
* (`environment`) and the run's own settings, in the AutomationConfig
|
|
811
|
+
* vocabulary. What you send is what runs: omit `environment` and the
|
|
812
|
+
* session runs in the built-in basic sandbox. A missing model or
|
|
813
|
+
* budget comes from the organization's settings, so
|
|
781
814
|
* `{"prompt": "..."}` alone is a complete request. `prompt` is the
|
|
782
815
|
* first message; omit it and the session starts idle, waiting for
|
|
783
816
|
* one. 400 when `interactive` is false and there is no prompt, or
|
|
@@ -786,16 +819,18 @@ declare class EllipsisSessions {
|
|
|
786
819
|
*/
|
|
787
820
|
start(options?: {
|
|
788
821
|
budget?: number | null;
|
|
789
|
-
claude?: S['
|
|
790
|
-
codex?: S['
|
|
791
|
-
environment?: string | S['
|
|
822
|
+
claude?: S['ClaudeConfig'] | null;
|
|
823
|
+
codex?: S['CodexConfig'] | null;
|
|
824
|
+
environment?: string | S['EnvironmentConfig'] | null;
|
|
792
825
|
force_rebuild?: boolean;
|
|
826
|
+
images?: (S['ImageAttachment'])[];
|
|
793
827
|
interactive?: boolean;
|
|
794
828
|
metadata?: Record<string, string>;
|
|
795
|
-
output?: S['
|
|
796
|
-
permissions?: S['
|
|
829
|
+
output?: S['OutputConfig'] | null;
|
|
830
|
+
permissions?: S['PermissionsConfig'] | null;
|
|
797
831
|
prompt?: string | null;
|
|
798
|
-
|
|
832
|
+
repositories?: (string)[] | null;
|
|
833
|
+
skills?: (S['SkillRef'])[] | null;
|
|
799
834
|
}): Promise<S['SessionResponse']>;
|
|
800
835
|
/**
|
|
801
836
|
* Stop Agent Session
|
|
@@ -819,9 +854,9 @@ declare class EllipsisSettingsOrganization {
|
|
|
819
854
|
*
|
|
820
855
|
* Get the organization settings.
|
|
821
856
|
*
|
|
822
|
-
* The default model
|
|
823
|
-
*
|
|
824
|
-
*
|
|
857
|
+
* The default model every session falls back to when neither its
|
|
858
|
+
* request nor its automation names one, and the per-session budget
|
|
859
|
+
* ceiling no session may exceed.
|
|
825
860
|
*/
|
|
826
861
|
get(): Promise<S['OrganizationSettings']>;
|
|
827
862
|
/**
|
|
@@ -829,16 +864,14 @@ declare class EllipsisSettingsOrganization {
|
|
|
829
864
|
*
|
|
830
865
|
* Set the organization settings.
|
|
831
866
|
*
|
|
832
|
-
* Replaces
|
|
833
|
-
*
|
|
834
|
-
*
|
|
835
|
-
* in US dollars, at most the platform ceiling. Null clears each.
|
|
867
|
+
* Replaces both: `default_model` accepts an alias or canonical id
|
|
868
|
+
* and is stored canonical; `budget_ceiling.session` is in US
|
|
869
|
+
* dollars, at most the platform ceiling. Null clears each.
|
|
836
870
|
* Refused for sandbox tokens (potentially prompt-injected code must
|
|
837
871
|
* not repoint the organization's defaults).
|
|
838
872
|
*/
|
|
839
873
|
set(options?: {
|
|
840
874
|
budget_ceiling?: S['BudgetCeiling'];
|
|
841
|
-
default_environment?: string | null;
|
|
842
875
|
default_model?: string | null;
|
|
843
876
|
}): Promise<S['OrganizationSettings']>;
|
|
844
877
|
}
|
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;
|
|
@@ -445,6 +447,21 @@ var EllipsisAutomations = class {
|
|
|
445
447
|
const path = "/v1/automations";
|
|
446
448
|
return await this.transport.request("GET", path);
|
|
447
449
|
}
|
|
450
|
+
/**
|
|
451
|
+
* Get Automation Metrics
|
|
452
|
+
*
|
|
453
|
+
* Return an automation's session distribution and trailing spend,
|
|
454
|
+
* by id or by name.
|
|
455
|
+
*
|
|
456
|
+
* `samples` carries one entry per finished session (duration, cost,
|
|
457
|
+
* tokens) for distributions; `spend_windows` carries what the
|
|
458
|
+
* automation's sessions cost over the last 1, 7, and 28 days against
|
|
459
|
+
* its budget for each window.
|
|
460
|
+
*/
|
|
461
|
+
async metrics(automation_id) {
|
|
462
|
+
const path = `/v1/automations/${enc(automation_id)}/metrics`;
|
|
463
|
+
return await this.transport.request("GET", path);
|
|
464
|
+
}
|
|
448
465
|
/**
|
|
449
466
|
* Start Automation Session
|
|
450
467
|
*
|
|
@@ -860,9 +877,10 @@ var EllipsisReviews = class {
|
|
|
860
877
|
*
|
|
861
878
|
* Run a code review on demand.
|
|
862
879
|
*
|
|
863
|
-
* Reviews an
|
|
864
|
-
*
|
|
865
|
-
*
|
|
880
|
+
* Reviews an open pull request. Which pipeline runs is not a
|
|
881
|
+
* parameter: it resolves from the repository's files exactly as
|
|
882
|
+
* it does for a push, so an on-demand review never disagrees with
|
|
883
|
+
* the automatic one.
|
|
866
884
|
*
|
|
867
885
|
* A review is one pipeline run over one commit range, with one
|
|
868
886
|
* agent session per stage: `review.id` is the run id, and
|
|
@@ -896,14 +914,17 @@ var EllipsisReviews = class {
|
|
|
896
914
|
*
|
|
897
915
|
* List code reviews, newest first.
|
|
898
916
|
*
|
|
899
|
-
* `findings`
|
|
917
|
+
* `findings` and `configuration` are omitted (counters only). Each
|
|
918
|
+
* filter is a set: repeat `repository`, `pull_request_number`, or
|
|
919
|
+
* `status` to match any of several values. `start` and `end` bound
|
|
920
|
+
* the review's creation time.
|
|
900
921
|
*
|
|
901
922
|
* Webhook-created reviews appear here too, so this answers "show
|
|
902
923
|
* me every review on this PR".
|
|
903
924
|
*/
|
|
904
925
|
async list(options = {}) {
|
|
905
926
|
const path = "/v1/reviews";
|
|
906
|
-
const query = buildQuery({
|
|
927
|
+
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 });
|
|
907
928
|
const response = await this.transport.request("GET", path, { query });
|
|
908
929
|
return new Page(
|
|
909
930
|
response,
|
|
@@ -962,6 +983,21 @@ var EllipsisSessions = class {
|
|
|
962
983
|
this.transport = transport;
|
|
963
984
|
}
|
|
964
985
|
transport;
|
|
986
|
+
/**
|
|
987
|
+
* Get Agent Session Diff
|
|
988
|
+
*
|
|
989
|
+
* Return the session's uncommitted changes as a patch.
|
|
990
|
+
*
|
|
991
|
+
* One unified-diff section per changed file, captured from the
|
|
992
|
+
* sandbox's working tree when the session ended. The per-file
|
|
993
|
+
* counts ride on the session itself (`git.repos[].files`); this
|
|
994
|
+
* is the text behind them. Empty when the tree was clean. A
|
|
995
|
+
* sandbox token may read only its own session's diff.
|
|
996
|
+
*/
|
|
997
|
+
async diff(session_id) {
|
|
998
|
+
const path = `/v1/sessions/${enc(session_id)}/diff`;
|
|
999
|
+
return await this.transport.request("GET", path);
|
|
1000
|
+
}
|
|
965
1001
|
/**
|
|
966
1002
|
* Export Agent Session
|
|
967
1003
|
*
|
|
@@ -1078,7 +1114,7 @@ var EllipsisSessions = class {
|
|
|
1078
1114
|
*/
|
|
1079
1115
|
async sendMessage(session_id, options) {
|
|
1080
1116
|
const path = `/v1/sessions/${enc(session_id)}/messages`;
|
|
1081
|
-
const body = buildBody({ idempotency_key: options.idempotency_key, message: options.message });
|
|
1117
|
+
const body = buildBody({ idempotency_key: options.idempotency_key, images: options.images, message: options.message });
|
|
1082
1118
|
return await this.transport.request("POST", path, { body });
|
|
1083
1119
|
}
|
|
1084
1120
|
/**
|
|
@@ -1087,9 +1123,10 @@ var EllipsisSessions = class {
|
|
|
1087
1123
|
* Start a cloud agent session.
|
|
1088
1124
|
*
|
|
1089
1125
|
* The daily driver: a prompt, optionally where to run it
|
|
1090
|
-
* (`environment`) and the run's own settings, in the
|
|
1091
|
-
* vocabulary.
|
|
1092
|
-
*
|
|
1126
|
+
* (`environment`) and the run's own settings, in the AutomationConfig
|
|
1127
|
+
* vocabulary. What you send is what runs: omit `environment` and the
|
|
1128
|
+
* session runs in the built-in basic sandbox. A missing model or
|
|
1129
|
+
* budget comes from the organization's settings, so
|
|
1093
1130
|
* `{"prompt": "..."}` alone is a complete request. `prompt` is the
|
|
1094
1131
|
* first message; omit it and the session starts idle, waiting for
|
|
1095
1132
|
* one. 400 when `interactive` is false and there is no prompt, or
|
|
@@ -1098,7 +1135,7 @@ var EllipsisSessions = class {
|
|
|
1098
1135
|
*/
|
|
1099
1136
|
async start(options = {}) {
|
|
1100
1137
|
const path = "/v1/sessions";
|
|
1101
|
-
const body = buildBody({ budget: options.budget, claude: options.claude, codex: options.codex, environment: options.environment, force_rebuild: options.force_rebuild, interactive: options.interactive, metadata: options.metadata, output: options.output, permissions: options.permissions, prompt: options.prompt, skills: options.skills });
|
|
1138
|
+
const body = buildBody({ budget: options.budget, claude: options.claude, codex: options.codex, environment: options.environment, force_rebuild: options.force_rebuild, images: options.images, interactive: options.interactive, metadata: options.metadata, output: options.output, permissions: options.permissions, prompt: options.prompt, repositories: options.repositories, skills: options.skills });
|
|
1102
1139
|
return await this.transport.request("POST", path, { body });
|
|
1103
1140
|
}
|
|
1104
1141
|
/**
|
|
@@ -1135,9 +1172,9 @@ var EllipsisSettingsOrganization = class {
|
|
|
1135
1172
|
*
|
|
1136
1173
|
* Get the organization settings.
|
|
1137
1174
|
*
|
|
1138
|
-
* The default model
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1175
|
+
* The default model every session falls back to when neither its
|
|
1176
|
+
* request nor its automation names one, and the per-session budget
|
|
1177
|
+
* ceiling no session may exceed.
|
|
1141
1178
|
*/
|
|
1142
1179
|
async get() {
|
|
1143
1180
|
const path = "/v1/settings/organization";
|
|
@@ -1148,16 +1185,15 @@ var EllipsisSettingsOrganization = class {
|
|
|
1148
1185
|
*
|
|
1149
1186
|
* Set the organization settings.
|
|
1150
1187
|
*
|
|
1151
|
-
* Replaces
|
|
1152
|
-
*
|
|
1153
|
-
*
|
|
1154
|
-
* in US dollars, at most the platform ceiling. Null clears each.
|
|
1188
|
+
* Replaces both: `default_model` accepts an alias or canonical id
|
|
1189
|
+
* and is stored canonical; `budget_ceiling.session` is in US
|
|
1190
|
+
* dollars, at most the platform ceiling. Null clears each.
|
|
1155
1191
|
* Refused for sandbox tokens (potentially prompt-injected code must
|
|
1156
1192
|
* not repoint the organization's defaults).
|
|
1157
1193
|
*/
|
|
1158
1194
|
async set(options = {}) {
|
|
1159
1195
|
const path = "/v1/settings/organization";
|
|
1160
|
-
const body = buildBody({ budget_ceiling: options.budget_ceiling,
|
|
1196
|
+
const body = buildBody({ budget_ceiling: options.budget_ceiling, default_model: options.default_model });
|
|
1161
1197
|
return await this.transport.request("PUT", path, { body });
|
|
1162
1198
|
}
|
|
1163
1199
|
};
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { W as SessionRecord, a7 as CodexFileChangeItem, a as CodexEvent, a8 as CodexMcpToolCallItem, w as SdkRecord, J as Session, Q as SessionMessage, a4 as StreamFrame } from '../types-ClEF_IA9.js';
|
|
2
2
|
|
|
3
3
|
interface ChatToolNode {
|
|
4
4
|
key: string;
|
|
@@ -55,6 +55,7 @@ type RecordSlice = {
|
|
|
55
55
|
};
|
|
56
56
|
declare function recordSlice(records: readonly SessionRecord[]): readonly RecordSlice[];
|
|
57
57
|
declare function humanDuration(seconds: number): string;
|
|
58
|
+
declare const SESSION_WAKING = "Session waking";
|
|
58
59
|
declare function sessionLogText(recordType: string, payload: Record<string, unknown>): string | null;
|
|
59
60
|
declare function awaitingAgentPhase(records: readonly RecordSlice[]): 'boot' | 'turn' | null;
|
|
60
61
|
declare function deliveredUnechoedSends(records: readonly RecordSlice[]): {
|
|
@@ -67,6 +68,7 @@ type SandboxLogLine = {
|
|
|
67
68
|
key: string;
|
|
68
69
|
kind: SandboxLogKind;
|
|
69
70
|
text: string;
|
|
71
|
+
loading?: boolean;
|
|
70
72
|
};
|
|
71
73
|
type SandboxState = {
|
|
72
74
|
headline: string;
|
|
@@ -79,6 +81,8 @@ type SandboxState = {
|
|
|
79
81
|
};
|
|
80
82
|
declare function hookPhrase(step: string): string;
|
|
81
83
|
declare function deriveSandboxState(records: readonly RecordSlice[], minFeedSeq: number): SandboxState | null;
|
|
84
|
+
declare function startupSettled(sandbox: SandboxState | null, status: string): boolean;
|
|
85
|
+
declare function startupHeadline(sandbox: SandboxState | null, status: string): string;
|
|
82
86
|
declare function sandboxSummary(sandbox: SandboxState | null): string;
|
|
83
87
|
declare function lastLines(log: readonly SandboxLogLine[], max: number): SandboxLogLine[];
|
|
84
88
|
|
|
@@ -95,6 +99,7 @@ interface TranscriptItem {
|
|
|
95
99
|
name: string;
|
|
96
100
|
input?: Record<string, unknown>;
|
|
97
101
|
};
|
|
102
|
+
loading?: boolean;
|
|
98
103
|
}
|
|
99
104
|
declare function oneLine(text: string, max: number): string;
|
|
100
105
|
declare function summarizeToolInput(name: string, input: unknown): string;
|
|
@@ -110,7 +115,11 @@ declare function codexMcpToolName(item: CodexMcpToolCallItem): string;
|
|
|
110
115
|
declare function recordToItems(record: SessionRecord, keyBase: string, options?: EventToItemsOptions): TranscriptItem[];
|
|
111
116
|
declare function isConnectVisibleRecord(record: SessionRecord): boolean;
|
|
112
117
|
declare function pendingToolCalls(items: TranscriptItem[]): TranscriptItem[];
|
|
113
|
-
declare function
|
|
118
|
+
declare function isFoldable(item: TranscriptItem): boolean;
|
|
119
|
+
declare function foldRun(group: TranscriptItem[], loading: boolean): TranscriptItem;
|
|
120
|
+
declare function collapseToolRuns(items: TranscriptItem[], { working }?: {
|
|
121
|
+
working?: boolean;
|
|
122
|
+
}): TranscriptItem[];
|
|
114
123
|
declare function clampLines(text: string, maxLines: number): {
|
|
115
124
|
body: string;
|
|
116
125
|
more: number;
|
|
@@ -129,7 +138,6 @@ declare function gutterFor(item: TranscriptItem): string;
|
|
|
129
138
|
declare function chatTurnsToItems(turns: readonly ChatTurn[]): TranscriptItem[];
|
|
130
139
|
declare function isToolFold(item: TranscriptItem): boolean;
|
|
131
140
|
declare function isToolActivity(item: TranscriptItem): boolean;
|
|
132
|
-
declare function isAgentSpeech(item: TranscriptItem): boolean;
|
|
133
141
|
type PlacedItem = {
|
|
134
142
|
item: TranscriptItem;
|
|
135
143
|
nested: boolean;
|
|
@@ -143,6 +151,27 @@ declare function tailLines(text: string, maxLines: number): {
|
|
|
143
151
|
};
|
|
144
152
|
declare function toolRunMembers(items: readonly TranscriptItem[]): Map<string, TranscriptItem[]>;
|
|
145
153
|
|
|
154
|
+
interface LedgerEntry {
|
|
155
|
+
key: string;
|
|
156
|
+
prompt: string;
|
|
157
|
+
cancelled: boolean;
|
|
158
|
+
turns: ChatTurn[];
|
|
159
|
+
}
|
|
160
|
+
declare function splitLedger(turns: readonly ChatTurn[]): {
|
|
161
|
+
preamble: ChatTurn[];
|
|
162
|
+
entries: LedgerEntry[];
|
|
163
|
+
};
|
|
164
|
+
declare function entrySeconds(entry: LedgerEntry, now: number): number;
|
|
165
|
+
type EntryBody = {
|
|
166
|
+
items: TranscriptItem[];
|
|
167
|
+
members: Map<string, TranscriptItem[]>;
|
|
168
|
+
};
|
|
169
|
+
declare function entryBody(entry: LedgerEntry, { live, now, liveText, }: {
|
|
170
|
+
live: boolean;
|
|
171
|
+
now: number;
|
|
172
|
+
liveText?: string;
|
|
173
|
+
}): EntryBody;
|
|
174
|
+
|
|
146
175
|
declare function sandboxOutputStep(payload: Record<string, unknown>): string;
|
|
147
176
|
declare function sandboxOutputLines(payload: Record<string, unknown>): string[];
|
|
148
177
|
declare function sandboxOutputLine(payload: Record<string, unknown>): string | null;
|
|
@@ -186,4 +215,4 @@ declare class SessionTranscriptStore {
|
|
|
186
215
|
ingest: (rawFrame: StreamFrame) => void;
|
|
187
216
|
}
|
|
188
217
|
|
|
189
|
-
export { BRANCH_GLYPH, type ChatNode, type ChatToolNode, type ChatTurn, type EventToItemsOptions, type ItemKind, LIVE_GLYPH, type PlacedItem, type RecordSlice, type SandboxLogKind, type SandboxLogLine, type SandboxState, type SessionTranscriptSnapshot, SessionTranscriptStore, StreamFrame, type TranscriptItem, USER_BAR, awaitingAgentPhase, cacheTierLabel, chatTurnsToItems, clampLines, codexChangedPaths, codexEventToItems, codexMcpToolName, collapseToolRuns, deliveredUnechoedSends, deriveSandboxState, emptySessionTranscriptSnapshot, eventToItems, foldCosts, foldGutter, formatDuration, groupRecordsToChatTurns, gutterFor, hookPhrase, humanDuration,
|
|
218
|
+
export { BRANCH_GLYPH, type ChatNode, type ChatToolNode, type ChatTurn, type EntryBody, type EventToItemsOptions, type ItemKind, LIVE_GLYPH, type LedgerEntry, type PlacedItem, type RecordSlice, SESSION_WAKING, type SandboxLogKind, type SandboxLogLine, type SandboxState, type SessionTranscriptSnapshot, SessionTranscriptStore, StreamFrame, type TranscriptItem, USER_BAR, awaitingAgentPhase, cacheTierLabel, chatTurnsToItems, clampLines, codexChangedPaths, codexEventToItems, codexMcpToolName, collapseToolRuns, deliveredUnechoedSends, deriveSandboxState, emptySessionTranscriptSnapshot, entryBody, entrySeconds, eventToItems, foldCosts, foldGutter, foldRun, formatDuration, groupRecordsToChatTurns, gutterFor, hookPhrase, humanDuration, isConnectVisibleRecord, isConversationOver, isFoldable, isToolActivity, isToolFold, lastLines, layOutItems, lifecycleText, oneLine, pendingToolCalls, recordSlice, recordToItems, resultCostUsd, sandboxOutputLine, sandboxOutputLines, sandboxOutputStep, sandboxPhaseLabel, sandboxSummary, seedTranscriptStore, sessionLogText, splitLedger, startupHeadline, startupSettled, statusActivityText, summarizeToolInput, tailLines, toolResultText, toolRunMembers };
|