@nikcli-ai/sdk 1.166.0 → 1.168.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TopLevelVcsStatusOutput, TopLevelVcsApplyInput, TopLevelCommandOutput, TopLevelAgentOutput, TopLevelSkillOutput, TopLevelLspOutput, TopLevelFormatterOutput, AnalyticsDailyInput, AnalyticsSessionInput, AppLogInput, AppSkillCreateInput, AppSkillDeleteInput, BrainTriggerInput, ConfigUpdateInput, ConnectorsAuthSetInput, ConnectorsAuthRemoveInput, ConnectorsInvalidateInput, ExperimentalToolsInput, ExperimentalWorktreeCreateInput, ExperimentalWorktreeRemoveInput, ExperimentalWorktreeResetInput, ExperimentalManagedWorktreeCreateInput, ExperimentalManagedWorktreeRemoveInput, ExperimentalManagedWorktreeLinkInput, ExperimentalManagedWorktreeChildrenInput, ExperimentalManagedWorktreeAncestorsInput, FileFindTextInput, FileFindTextOutput, FileFindFileInput, FileFindFileOutput, FileFindSymbolInput, FileFindSymbolOutput, FileListInput, FileListOutput, FileContentInput, FileWriteInput, FileStatusOutput, McpAddInput, McpStartAuthInput, McpAuthCallbackInput, McpAuthenticateInput, McpRemoveAuthInput, McpConnectInput, McpDisconnectInput, McpToggleInput, MissionGenerateInput, MissionRecentExecsInput, MissionGetInput, MissionUpsertInput, MissionUpdateInput, MissionRemoveInput, MissionStartInput, MissionPauseInput, MissionCancelInput, MissionFeatureMutateInput, MissionExecsInput, ProjectListOutput, ProjectUpdateInput, ProviderApiInput, ProviderRemoveAuthInput, ProviderOauthAuthorizeInput, ProviderOauthAuthorizeOutput, ProviderOauthCallbackInput, QuestionListOutput, QuestionReplyInput, QuestionRejectInput, PermissionListOutput, PermissionReplyInput, PtyCreateInput, PtyGetInput, PtyUpdateInput, PtyRemoveInput, LoopGenerateInput, LoopRecentRunsInput, LoopGetInput, LoopUpsertInput, LoopUpdateInput, LoopRemoveInput, LoopToggleInput, LoopRunInput, LoopAbortInput, LoopPauseInput, LoopResumeInput, LoopRunsInput, SessionListInput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionUpdateInput, SessionForkInput, SessionAbortInput, SessionRevertInput, SessionUnrevertInput, SessionShareInput, SessionUnshareInput, SessionSummarizeInput, SessionCommandInput, SessionShellInput, SessionPermissionRespondInput, SessionChildrenInput, SessionTodoInput, SessionDiffInput, SessionMessagesInput, SessionMessageInput, SessionMessageRemoveInput, SessionPartRemoveInput,
|
|
1
|
+
import type { TopLevelVcsStatusOutput, TopLevelVcsApplyInput, TopLevelCommandOutput, TopLevelAgentOutput, TopLevelSkillOutput, TopLevelLspOutput, TopLevelFormatterOutput, AnalyticsDailyInput, AnalyticsSessionInput, AppLogInput, AppSkillCreateInput, AppSkillDeleteInput, BrainTriggerInput, ConfigUpdateInput, ConnectorsAuthSetInput, ConnectorsAuthRemoveInput, ConnectorsInvalidateInput, ExperimentalToolsInput, ExperimentalWorktreeCreateInput, ExperimentalWorktreeRemoveInput, ExperimentalWorktreeResetInput, ExperimentalManagedWorktreeCreateInput, ExperimentalManagedWorktreeRemoveInput, ExperimentalManagedWorktreeLinkInput, ExperimentalManagedWorktreeChildrenInput, ExperimentalManagedWorktreeAncestorsInput, FileFindTextInput, FileFindTextOutput, FileFindFileInput, FileFindFileOutput, FileFindSymbolInput, FileFindSymbolOutput, FileListInput, FileListOutput, FileContentInput, FileWriteInput, FileStatusOutput, McpAddInput, McpStartAuthInput, McpAuthCallbackInput, McpAuthenticateInput, McpRemoveAuthInput, McpConnectInput, McpDisconnectInput, McpToggleInput, MissionGenerateInput, MissionRecentExecsInput, MissionGetInput, MissionUpsertInput, MissionUpdateInput, MissionRemoveInput, MissionStartInput, MissionPauseInput, MissionCancelInput, MissionFeatureMutateInput, MissionExecsInput, ProjectListOutput, ProjectUpdateInput, ProviderApiInput, ProviderRemoveAuthInput, ProviderOauthAuthorizeInput, ProviderOauthAuthorizeOutput, ProviderOauthCallbackInput, QuestionListOutput, QuestionReplyInput, QuestionRejectInput, PermissionListOutput, PermissionReplyInput, PtyCreateInput, PtyGetInput, PtyUpdateInput, PtyRemoveInput, LoopGenerateInput, LoopRecentRunsInput, LoopGetInput, LoopUpsertInput, LoopUpdateInput, LoopRemoveInput, LoopToggleInput, LoopRunInput, LoopAbortInput, LoopPauseInput, LoopResumeInput, LoopRunsInput, SessionListInput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionUpdateInput, SessionForkInput, SessionAbortInput, SessionRevertInput, SessionUnrevertInput, SessionShareInput, SessionUnshareInput, SessionSummarizeInput, SessionCommandInput, SessionShellInput, SessionPermissionRespondInput, SessionChildrenInput, SessionTodoInput, SessionDiffInput, SessionMessagesInput, SessionMessageInput, SessionMessageRemoveInput, SessionPartRemoveInput, SessionV2EntriesInput, SessionV2StateInput, SessionV2EventsInput, SessionInstructionsInput, SessionContextBreakdownInput, SessionContextToggleInput, SessionGoalInput, SessionBackgroundInput, SessionBackgroundInspectInput, SessionBackgroundReadInput, SessionBackgroundCancelInput, SessionMonitorInput, SessionMonitorLogInput, SessionMonitorCancelInput, TuiAppendPromptInput, TuiExecuteCommandInput, TuiShowToastInput, TuiPublishInput, TuiSelectSessionInput, TuiControlResponseInput, WorkspaceAdaptorsOutput, WorkspaceStatusOutput, WorkspaceCreateInput, WorkspaceListOutput, WorkspaceRemoveInput, WorkspaceRestoreInput, WorkspaceSessionRestoreInput, WorkspaceWarpInput, SyncEventInput, SyncOutboxInput, SyncSnapshotInput, SyncStreamInput, SyncStreamOutput, SyncStatsInput, SyncConfigInput, AuthRemoveInput, ConfigManagementMcpAddInput, ConfigManagementMcpUpdateInput, ConfigManagementMcpRemoveInput, ConfigManagementProfileCreateInput, ConfigManagementProfileActivateInput, SessionPromptPromptInput, SessionPromptPromptAsyncInput, ShareShortInput, SharePageInput, ShareApiInput, ShareDataInput, EventsSubscribeOutput, EventsGlobalOutput, WorkspaceExtraEventsInput, WorkspaceExtraEventsOutput, WorkspaceExtraSessionWarpInput, UsersRegisterInput, UsersLoginInput, UsersUpdateInput, MobileAuthTokenListOutput, MobileAuthTokenCreateInput, MobileAuthTokenCreateOutput, MobileAuthTokenRevokeInput, MobileAuthTokenRevokeOutput, MobileCommandListOutput, MobileProjectListOutput, MobileMemoryHistoryOutput, MobileMemorySearchInput, MobileMemorySearchOutput, MobileMemoryStashListOutput, MobileMemoryStashCreateInput, MobileMemoryStashDeleteInput, MobileGithubReposOutput, MobileGithubBranchesInput, MobileGithubBranchesOutput, MobileGithubImportsOutput, MobileGithubOauthClientInput, MobileGithubOauthDevicePollInput, MobileGithubAuthSetInput, MobileGithubImportInput, MobileGithubImportOutput, MobileGithubSessionCreateInput, MobileSessionListInput, MobileSessionListOutput, MobileSessionCreateInput, MobileSessionDetailInput, MobileSessionDeleteInput, MobileSessionDiffInput, MobileSessionDiffOutput, MobileSessionCommandListInput, MobileSessionCommandListOutput, MobileSessionCommandInput, MobileSessionCommandOutput, MobileSessionMessageInput, MobileSessionAbortInput, MobilePermissionRespondInput, MobileQuestionRespondInput, MobileQuestionRejectInput, MobileSessionPublishInput, MobileSessionCleanupInput, MobileSessionStreamInput, MobileSessionStreamOutput, MobileSessionRenameInput, MobileTeleportUploadBeginOutput, MobileTeleportUploadChunkInput, MobileTeleportUploadChunkOutput, MobileTeleportInInput, MobileTeleportOutInput, MobileWorktreeCreateInput, MobileWorktreeRemoveInput, MobileWorktreeResetInput, MobileGitDiffInput, MobileGitDiffOutput, MobileGitCommitsInput, MobileGitCommitsOutput, MobileGitBranchesOutput, MobileGitCommitInput, MobileGitCommitOutput, MobileGitCheckoutInput, MobileGitStageInput, MobileGitUnstageInput, MobileGitDiscardInput, MobileGitPushInput, MobileGitPushOutput, MobileGitPullOutput, MobileLoopListOutput, MobileLoopCreateInput, MobileLoopTemplatesOutput, MobileLoopGenerateInput, MobileLoopRunsRecentInput, MobileLoopRunsRecentOutput, MobileLoopGetInput, MobileLoopGetOutput, MobileLoopDeleteInput, MobileLoopUpdateInput, MobileLoopRunsInput, MobileLoopRunsOutput, MobileLoopRunInput, MobileLoopAbortInput, MobileLoopToggleInput, MobileLoopPauseInput, MobileLoopResumeInput, MobileRoutineListOutput, MobileRoutineCreateInput, MobileRoutineGetInput, MobileRoutineDeleteInput, MobileRoutineUpdateInput, MobileRoutineRunInput, MobileRoutinePauseInput, MobileRoutineResumeInput, MobileRoutineTriggerInput, MobilePtyListOutput, MobilePtyCreateInput, MobilePtyGetInput, MobilePtyUpdateInput, MobilePtyRemoveInput } from "./types.js";
|
|
2
2
|
export interface ClientOptions {
|
|
3
3
|
readonly baseUrl: string;
|
|
4
4
|
readonly fetch?: typeof globalThis.fetch;
|
|
@@ -165,17 +165,16 @@ export declare function make(options: ClientOptions): {
|
|
|
165
165
|
share: (input: SessionShareInput, requestOptions?: RequestOptions) => Promise<any>;
|
|
166
166
|
unshare: (input: SessionUnshareInput, requestOptions?: RequestOptions) => Promise<any>;
|
|
167
167
|
summarize: (input: SessionSummarizeInput, requestOptions?: RequestOptions) => Promise<boolean>;
|
|
168
|
-
command: (input: SessionCommandInput, requestOptions?: RequestOptions) => Promise<
|
|
169
|
-
shell: (input: SessionShellInput, requestOptions?: RequestOptions) => Promise<
|
|
168
|
+
command: (input: SessionCommandInput, requestOptions?: RequestOptions) => Promise<import("./types.js").MessageWithParts>;
|
|
169
|
+
shell: (input: SessionShellInput, requestOptions?: RequestOptions) => Promise<import("./types.js").MessageWithParts>;
|
|
170
170
|
permissionRespond: (input: SessionPermissionRespondInput, requestOptions?: RequestOptions) => Promise<boolean>;
|
|
171
171
|
children: (input: SessionChildrenInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionList>;
|
|
172
172
|
todo: (input: SessionTodoInput, requestOptions?: RequestOptions) => Promise<import("./types.js").TodoList>;
|
|
173
173
|
diff: (input: SessionDiffInput, requestOptions?: RequestOptions) => Promise<import("./types.js").FileDiffList>;
|
|
174
174
|
messages: (input: SessionMessagesInput, requestOptions?: RequestOptions) => Promise<import("./types.js").MessageList>;
|
|
175
|
-
message: (input: SessionMessageInput, requestOptions?: RequestOptions) => Promise<
|
|
175
|
+
message: (input: SessionMessageInput, requestOptions?: RequestOptions) => Promise<import("./types.js").MessageWithParts>;
|
|
176
176
|
messageRemove: (input: SessionMessageRemoveInput, requestOptions?: RequestOptions) => Promise<boolean>;
|
|
177
177
|
partRemove: (input: SessionPartRemoveInput, requestOptions?: RequestOptions) => Promise<boolean>;
|
|
178
|
-
partUpdate: (input: SessionPartUpdateInput, requestOptions?: RequestOptions) => Promise<any>;
|
|
179
178
|
v2Entries: (input: SessionV2EntriesInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionV2EntryList>;
|
|
180
179
|
v2State: (input: SessionV2StateInput, requestOptions?: RequestOptions) => Promise<any>;
|
|
181
180
|
v2Events: (input: SessionV2EventsInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionV2EventList>;
|
|
@@ -948,14 +948,6 @@ export function make(options) {
|
|
|
948
948
|
declaredStatuses: [404, 409],
|
|
949
949
|
empty: false,
|
|
950
950
|
}, requestOptions),
|
|
951
|
-
partUpdate: (input, requestOptions) => request({
|
|
952
|
-
method: "PATCH",
|
|
953
|
-
path: `/session/${encodeURIComponent(input.sessionID)}/message/${encodeURIComponent(input.messageID)}/part/${encodeURIComponent(input.partID)}`,
|
|
954
|
-
body: input["payload"],
|
|
955
|
-
successStatus: 200,
|
|
956
|
-
declaredStatuses: [404, 409],
|
|
957
|
-
empty: false,
|
|
958
|
-
}, requestOptions),
|
|
959
951
|
v2Entries: (input, requestOptions) => request({
|
|
960
952
|
method: "GET",
|
|
961
953
|
path: `/session/${encodeURIComponent(input.sessionID)}/v2/entries`,
|
|
@@ -334,16 +334,259 @@ export type Pty = {
|
|
|
334
334
|
export type LoopBooleanResult = boolean;
|
|
335
335
|
export type SessionList = Array<any>;
|
|
336
336
|
export type SessionInfo = any;
|
|
337
|
-
export type
|
|
338
|
-
|
|
337
|
+
export type SessionStatus = {
|
|
338
|
+
type: "idle";
|
|
339
|
+
} | {
|
|
340
|
+
type: "retry";
|
|
341
|
+
attempt: number;
|
|
342
|
+
message: string;
|
|
343
|
+
next: number;
|
|
344
|
+
} | {
|
|
345
|
+
type: "busy";
|
|
346
|
+
since: number;
|
|
347
|
+
} | {
|
|
348
|
+
type: "busy";
|
|
339
349
|
};
|
|
340
350
|
export type BooleanResult = boolean;
|
|
341
|
-
export type
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
export type
|
|
345
|
-
|
|
346
|
-
|
|
351
|
+
export type OutputFormatText = {
|
|
352
|
+
type: "text";
|
|
353
|
+
};
|
|
354
|
+
export type JSONSchema = {
|
|
355
|
+
[x: string]: any;
|
|
356
|
+
};
|
|
357
|
+
export type FileDiff = {
|
|
358
|
+
file: string;
|
|
359
|
+
patch: string;
|
|
360
|
+
additions: number;
|
|
361
|
+
deletions: number;
|
|
362
|
+
status?: "added" | "deleted" | "modified" | undefined;
|
|
363
|
+
before: string;
|
|
364
|
+
after: string;
|
|
365
|
+
};
|
|
366
|
+
export type ProviderAuthError = {
|
|
367
|
+
name: "ProviderAuthError";
|
|
368
|
+
data: {
|
|
369
|
+
providerID: string;
|
|
370
|
+
message: string;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
export type UnknownError = {
|
|
374
|
+
name: "UnknownError";
|
|
375
|
+
data: {
|
|
376
|
+
message: string;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
export type MessageOutputLengthError = {
|
|
380
|
+
name: "MessageOutputLengthError";
|
|
381
|
+
data: {};
|
|
382
|
+
};
|
|
383
|
+
export type MessageContextOverflowError = {
|
|
384
|
+
name: "MessageContextOverflowError";
|
|
385
|
+
data: {
|
|
386
|
+
message: string;
|
|
387
|
+
responseBody?: string | undefined;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
export type MessageAbortedError = {
|
|
391
|
+
name: "MessageAbortedError";
|
|
392
|
+
data: {
|
|
393
|
+
message: string;
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
export type StructuredOutputError = {
|
|
397
|
+
name: "StructuredOutputError";
|
|
398
|
+
data: {
|
|
399
|
+
message: string;
|
|
400
|
+
retries: number;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
export type APIError = {
|
|
404
|
+
name: "APIError";
|
|
405
|
+
data: {
|
|
406
|
+
message: string;
|
|
407
|
+
statusCode?: number | undefined;
|
|
408
|
+
isRetryable: boolean;
|
|
409
|
+
responseHeaders?: {
|
|
410
|
+
[x: string]: string;
|
|
411
|
+
} | undefined;
|
|
412
|
+
responseBody?: string | undefined;
|
|
413
|
+
metadata?: {
|
|
414
|
+
[x: string]: string;
|
|
415
|
+
} | undefined;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
export type TextPart = {
|
|
419
|
+
id: string;
|
|
420
|
+
sessionID: string;
|
|
421
|
+
messageID: string;
|
|
422
|
+
type: "text";
|
|
423
|
+
text: string;
|
|
424
|
+
synthetic?: boolean | undefined;
|
|
425
|
+
ignored?: boolean | undefined;
|
|
426
|
+
time?: {
|
|
427
|
+
start: number;
|
|
428
|
+
end?: number | undefined;
|
|
429
|
+
} | undefined;
|
|
430
|
+
metadata?: {
|
|
431
|
+
[x: string]: any;
|
|
432
|
+
} | undefined;
|
|
433
|
+
};
|
|
434
|
+
export type SubtaskPart = {
|
|
435
|
+
id: string;
|
|
436
|
+
sessionID: string;
|
|
437
|
+
messageID: string;
|
|
438
|
+
type: "subtask";
|
|
439
|
+
prompt: string;
|
|
440
|
+
description: string;
|
|
441
|
+
agent: string;
|
|
442
|
+
model?: {
|
|
443
|
+
providerID: string;
|
|
444
|
+
modelID: string;
|
|
445
|
+
} | undefined;
|
|
446
|
+
command?: string | undefined;
|
|
447
|
+
background?: boolean | undefined;
|
|
448
|
+
};
|
|
449
|
+
export type ReasoningPart = {
|
|
450
|
+
id: string;
|
|
451
|
+
sessionID: string;
|
|
452
|
+
messageID: string;
|
|
453
|
+
type: "reasoning";
|
|
454
|
+
text: string;
|
|
455
|
+
metadata?: {
|
|
456
|
+
[x: string]: any;
|
|
457
|
+
} | undefined;
|
|
458
|
+
time: {
|
|
459
|
+
start: number;
|
|
460
|
+
end?: number | undefined;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
export type FilePartSourceText = {
|
|
464
|
+
value: string;
|
|
465
|
+
start: number;
|
|
466
|
+
end: number;
|
|
467
|
+
};
|
|
468
|
+
export type Range = {
|
|
469
|
+
start: {
|
|
470
|
+
line: number;
|
|
471
|
+
character: number;
|
|
472
|
+
};
|
|
473
|
+
end: {
|
|
474
|
+
line: number;
|
|
475
|
+
character: number;
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
export type ToolStatePending = {
|
|
479
|
+
status: "pending";
|
|
480
|
+
input: {
|
|
481
|
+
[x: string]: any;
|
|
482
|
+
};
|
|
483
|
+
raw: string;
|
|
484
|
+
};
|
|
485
|
+
export type ToolStateRunning = {
|
|
486
|
+
status: "running";
|
|
487
|
+
input: {
|
|
488
|
+
[x: string]: any;
|
|
489
|
+
};
|
|
490
|
+
title?: string | undefined;
|
|
491
|
+
metadata?: {
|
|
492
|
+
[x: string]: any;
|
|
493
|
+
} | undefined;
|
|
494
|
+
structured?: {
|
|
495
|
+
[x: string]: any;
|
|
496
|
+
} | undefined;
|
|
497
|
+
content?: Array<{
|
|
498
|
+
type: "text";
|
|
499
|
+
text: string;
|
|
500
|
+
} | {
|
|
501
|
+
type: "file";
|
|
502
|
+
data: string;
|
|
503
|
+
mime: string;
|
|
504
|
+
name?: string | undefined;
|
|
505
|
+
}> | undefined;
|
|
506
|
+
time: {
|
|
507
|
+
start: number;
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
export type ToolStateError = {
|
|
511
|
+
status: "error";
|
|
512
|
+
input: {
|
|
513
|
+
[x: string]: any;
|
|
514
|
+
};
|
|
515
|
+
error: string;
|
|
516
|
+
metadata?: {
|
|
517
|
+
[x: string]: any;
|
|
518
|
+
} | undefined;
|
|
519
|
+
time: {
|
|
520
|
+
start: number;
|
|
521
|
+
end: number;
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
export type StepStartPart = {
|
|
525
|
+
id: string;
|
|
526
|
+
sessionID: string;
|
|
527
|
+
messageID: string;
|
|
528
|
+
type: "step-start";
|
|
529
|
+
snapshot?: string | undefined;
|
|
530
|
+
};
|
|
531
|
+
export type StepFinishPart = {
|
|
532
|
+
id: string;
|
|
533
|
+
sessionID: string;
|
|
534
|
+
messageID: string;
|
|
535
|
+
type: "step-finish";
|
|
536
|
+
reason: string;
|
|
537
|
+
snapshot?: string | undefined;
|
|
538
|
+
cost: number;
|
|
539
|
+
tokens: {
|
|
540
|
+
total?: number | undefined;
|
|
541
|
+
input: number;
|
|
542
|
+
output: number;
|
|
543
|
+
reasoning: number;
|
|
544
|
+
cache: {
|
|
545
|
+
read: number;
|
|
546
|
+
write: number;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
export type SnapshotPart = {
|
|
551
|
+
id: string;
|
|
552
|
+
sessionID: string;
|
|
553
|
+
messageID: string;
|
|
554
|
+
type: "snapshot";
|
|
555
|
+
snapshot: string;
|
|
556
|
+
};
|
|
557
|
+
export type PatchPart = {
|
|
558
|
+
id: string;
|
|
559
|
+
sessionID: string;
|
|
560
|
+
messageID: string;
|
|
561
|
+
type: "patch";
|
|
562
|
+
hash: string;
|
|
563
|
+
files: Array<string>;
|
|
564
|
+
};
|
|
565
|
+
export type AgentPart = {
|
|
566
|
+
id: string;
|
|
567
|
+
sessionID: string;
|
|
568
|
+
messageID: string;
|
|
569
|
+
type: "agent";
|
|
570
|
+
name: string;
|
|
571
|
+
source?: {
|
|
572
|
+
value: string;
|
|
573
|
+
start: number;
|
|
574
|
+
end: number;
|
|
575
|
+
} | undefined;
|
|
576
|
+
};
|
|
577
|
+
export type CompactionPart = {
|
|
578
|
+
id: string;
|
|
579
|
+
sessionID: string;
|
|
580
|
+
messageID: string;
|
|
581
|
+
type: "compaction";
|
|
582
|
+
auto: boolean;
|
|
583
|
+
};
|
|
584
|
+
export type Todo = {
|
|
585
|
+
content: string;
|
|
586
|
+
status: string;
|
|
587
|
+
priority: string;
|
|
588
|
+
id: string;
|
|
589
|
+
};
|
|
347
590
|
export type SessionV2EntryList = Array<any>;
|
|
348
591
|
export type SessionV2State = any;
|
|
349
592
|
export type SessionV2EventList = Array<any>;
|
|
@@ -611,6 +854,79 @@ export type QuestionInfo = {
|
|
|
611
854
|
custom?: boolean | undefined;
|
|
612
855
|
};
|
|
613
856
|
export type PtyList = Array<Pty>;
|
|
857
|
+
export type SessionStatusMap = {
|
|
858
|
+
[x: string]: SessionStatus;
|
|
859
|
+
};
|
|
860
|
+
export type OutputFormatJsonSchema = {
|
|
861
|
+
type: "json_schema";
|
|
862
|
+
schema: JSONSchema;
|
|
863
|
+
retryCount: number;
|
|
864
|
+
};
|
|
865
|
+
export type FileDiffList = Array<FileDiff>;
|
|
866
|
+
export type AssistantMessage = {
|
|
867
|
+
id: string;
|
|
868
|
+
sessionID: string;
|
|
869
|
+
role: "assistant";
|
|
870
|
+
time: {
|
|
871
|
+
created: number;
|
|
872
|
+
completed?: number | undefined;
|
|
873
|
+
};
|
|
874
|
+
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageContextOverflowError | MessageAbortedError | StructuredOutputError | APIError | undefined;
|
|
875
|
+
parentID: string;
|
|
876
|
+
modelID: string;
|
|
877
|
+
providerID: string;
|
|
878
|
+
mode: string;
|
|
879
|
+
agent: string;
|
|
880
|
+
path: {
|
|
881
|
+
cwd: string;
|
|
882
|
+
root: string;
|
|
883
|
+
};
|
|
884
|
+
summary?: boolean | undefined;
|
|
885
|
+
cost: number;
|
|
886
|
+
tokens: {
|
|
887
|
+
total?: number | undefined;
|
|
888
|
+
input: number;
|
|
889
|
+
output: number;
|
|
890
|
+
reasoning: number;
|
|
891
|
+
cache: {
|
|
892
|
+
read: number;
|
|
893
|
+
write: number;
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
structured?: any | undefined;
|
|
897
|
+
finish?: string | undefined;
|
|
898
|
+
};
|
|
899
|
+
export type RetryPart = {
|
|
900
|
+
id: string;
|
|
901
|
+
sessionID: string;
|
|
902
|
+
messageID: string;
|
|
903
|
+
type: "retry";
|
|
904
|
+
attempt: number;
|
|
905
|
+
error: APIError;
|
|
906
|
+
time: {
|
|
907
|
+
created: number;
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
export type FileSource = {
|
|
911
|
+
text: FilePartSourceText;
|
|
912
|
+
type: "file";
|
|
913
|
+
path: string;
|
|
914
|
+
};
|
|
915
|
+
export type ResourceSource = {
|
|
916
|
+
text: FilePartSourceText;
|
|
917
|
+
type: "resource";
|
|
918
|
+
clientName: string;
|
|
919
|
+
uri: string;
|
|
920
|
+
};
|
|
921
|
+
export type SymbolSource = {
|
|
922
|
+
text: FilePartSourceText;
|
|
923
|
+
type: "symbol";
|
|
924
|
+
path: string;
|
|
925
|
+
range: Range;
|
|
926
|
+
name: string;
|
|
927
|
+
kind: number;
|
|
928
|
+
};
|
|
929
|
+
export type TodoList = Array<Todo>;
|
|
614
930
|
export type Workspace = {
|
|
615
931
|
id: string;
|
|
616
932
|
name: string;
|
|
@@ -699,7 +1015,83 @@ export type QuestionRequest = {
|
|
|
699
1015
|
callID: string;
|
|
700
1016
|
} | undefined;
|
|
701
1017
|
};
|
|
1018
|
+
export type OutputFormat = OutputFormatText | OutputFormatJsonSchema;
|
|
1019
|
+
export type FilePartSource = FileSource | SymbolSource | ResourceSource;
|
|
702
1020
|
export type OptionalWorkspace = Workspace | null;
|
|
1021
|
+
export type UserMessage = {
|
|
1022
|
+
id: string;
|
|
1023
|
+
sessionID: string;
|
|
1024
|
+
role: "user";
|
|
1025
|
+
time: {
|
|
1026
|
+
created: number;
|
|
1027
|
+
};
|
|
1028
|
+
format?: OutputFormat | undefined;
|
|
1029
|
+
summary?: {
|
|
1030
|
+
title?: string | undefined;
|
|
1031
|
+
body?: string | undefined;
|
|
1032
|
+
diffs: Array<FileDiff>;
|
|
1033
|
+
} | undefined;
|
|
1034
|
+
agent: string;
|
|
1035
|
+
model: {
|
|
1036
|
+
providerID: string;
|
|
1037
|
+
modelID: string;
|
|
1038
|
+
};
|
|
1039
|
+
system?: string | undefined;
|
|
1040
|
+
tools?: {
|
|
1041
|
+
[x: string]: boolean;
|
|
1042
|
+
} | undefined;
|
|
1043
|
+
variant?: string | undefined;
|
|
1044
|
+
};
|
|
1045
|
+
export type FilePart = {
|
|
1046
|
+
id: string;
|
|
1047
|
+
sessionID: string;
|
|
1048
|
+
messageID: string;
|
|
1049
|
+
type: "file";
|
|
1050
|
+
mime: string;
|
|
1051
|
+
filename?: string | undefined;
|
|
1052
|
+
url: string;
|
|
1053
|
+
source?: FilePartSource | undefined;
|
|
1054
|
+
};
|
|
1055
|
+
export type Message = UserMessage | AssistantMessage;
|
|
1056
|
+
export type ToolStateCompleted = {
|
|
1057
|
+
status: "completed";
|
|
1058
|
+
input: {
|
|
1059
|
+
[x: string]: any;
|
|
1060
|
+
};
|
|
1061
|
+
output: string;
|
|
1062
|
+
title: string;
|
|
1063
|
+
metadata: {
|
|
1064
|
+
[x: string]: any;
|
|
1065
|
+
};
|
|
1066
|
+
time: {
|
|
1067
|
+
start: number;
|
|
1068
|
+
end: number;
|
|
1069
|
+
compacted?: number | undefined;
|
|
1070
|
+
};
|
|
1071
|
+
attachments?: Array<FilePart> | undefined;
|
|
1072
|
+
};
|
|
1073
|
+
export type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;
|
|
1074
|
+
export type ToolPart = {
|
|
1075
|
+
id: string;
|
|
1076
|
+
sessionID: string;
|
|
1077
|
+
messageID: string;
|
|
1078
|
+
type: "tool";
|
|
1079
|
+
callID: string;
|
|
1080
|
+
tool: string;
|
|
1081
|
+
state: ToolState;
|
|
1082
|
+
metadata?: {
|
|
1083
|
+
[x: string]: any;
|
|
1084
|
+
} | undefined;
|
|
1085
|
+
};
|
|
1086
|
+
export type Part = TextPart | SubtaskPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;
|
|
1087
|
+
export type MessageWithParts = {
|
|
1088
|
+
info: Message;
|
|
1089
|
+
parts: Array<Part>;
|
|
1090
|
+
};
|
|
1091
|
+
export type MessageList = Array<{
|
|
1092
|
+
info: Message;
|
|
1093
|
+
parts: Array<Part>;
|
|
1094
|
+
}>;
|
|
703
1095
|
export type VcsApplyError = {
|
|
704
1096
|
readonly name: "VcsApplyError";
|
|
705
1097
|
readonly data: {
|
|
@@ -1905,7 +2297,7 @@ export type SessionShellInput = {
|
|
|
1905
2297
|
readonly command: string;
|
|
1906
2298
|
}["command"];
|
|
1907
2299
|
};
|
|
1908
|
-
export type SessionShellOutput =
|
|
2300
|
+
export type SessionShellOutput = MessageWithParts;
|
|
1909
2301
|
export type SessionPermissionRespondInput = {
|
|
1910
2302
|
readonly sessionID: {
|
|
1911
2303
|
readonly sessionID: string;
|
|
@@ -1990,25 +2382,6 @@ export type SessionPartRemoveInput = {
|
|
|
1990
2382
|
}["partID"];
|
|
1991
2383
|
};
|
|
1992
2384
|
export type SessionPartRemoveOutput = BooleanResult;
|
|
1993
|
-
export type SessionPartUpdateInput = {
|
|
1994
|
-
readonly sessionID: {
|
|
1995
|
-
readonly sessionID: string;
|
|
1996
|
-
readonly messageID: string;
|
|
1997
|
-
readonly partID: string;
|
|
1998
|
-
}["sessionID"];
|
|
1999
|
-
readonly messageID: {
|
|
2000
|
-
readonly sessionID: string;
|
|
2001
|
-
readonly messageID: string;
|
|
2002
|
-
readonly partID: string;
|
|
2003
|
-
}["messageID"];
|
|
2004
|
-
readonly partID: {
|
|
2005
|
-
readonly sessionID: string;
|
|
2006
|
-
readonly messageID: string;
|
|
2007
|
-
readonly partID: string;
|
|
2008
|
-
}["partID"];
|
|
2009
|
-
readonly payload: unknown;
|
|
2010
|
-
};
|
|
2011
|
-
export type SessionPartUpdateOutput = MessagePart;
|
|
2012
2385
|
export type SessionV2EntriesInput = {
|
|
2013
2386
|
readonly sessionID: {
|
|
2014
2387
|
readonly sessionID: string;
|
|
@@ -336,6 +336,18 @@ export type ToolStateRunning = {
|
|
|
336
336
|
metadata?: {
|
|
337
337
|
[key: string]: unknown;
|
|
338
338
|
};
|
|
339
|
+
structured?: {
|
|
340
|
+
[key: string]: unknown;
|
|
341
|
+
};
|
|
342
|
+
content?: Array<{
|
|
343
|
+
type: "text";
|
|
344
|
+
text: string;
|
|
345
|
+
} | {
|
|
346
|
+
type: "file";
|
|
347
|
+
data: string;
|
|
348
|
+
mime: string;
|
|
349
|
+
name?: string;
|
|
350
|
+
}>;
|
|
339
351
|
time: {
|
|
340
352
|
start: number;
|
|
341
353
|
};
|
|
@@ -3616,16 +3628,7 @@ export type Symbol = {
|
|
|
3616
3628
|
kind: number;
|
|
3617
3629
|
location: {
|
|
3618
3630
|
uri: string;
|
|
3619
|
-
range:
|
|
3620
|
-
start: {
|
|
3621
|
-
line: number;
|
|
3622
|
-
character: number;
|
|
3623
|
-
};
|
|
3624
|
-
end: {
|
|
3625
|
-
line: number;
|
|
3626
|
-
character: number;
|
|
3627
|
-
};
|
|
3628
|
-
};
|
|
3631
|
+
range: Range;
|
|
3629
3632
|
};
|
|
3630
3633
|
};
|
|
3631
3634
|
export type FileNode = {
|
|
@@ -6820,7 +6823,10 @@ export type SessionShellResponses = {
|
|
|
6820
6823
|
/**
|
|
6821
6824
|
* Created message
|
|
6822
6825
|
*/
|
|
6823
|
-
200:
|
|
6826
|
+
200: {
|
|
6827
|
+
info: Message;
|
|
6828
|
+
parts: Array<Part>;
|
|
6829
|
+
};
|
|
6824
6830
|
};
|
|
6825
6831
|
export type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses];
|
|
6826
6832
|
export type SessionRevertData = {
|