@opencode-ai/sdk 1.2.26 → 1.2.27
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/v2/gen/types.gen.d.ts +91 -91
- package/package.json +1 -1
|
@@ -46,6 +46,96 @@ export type EventServerInstanceDisposed = {
|
|
|
46
46
|
directory: string;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
+
export type PermissionRequest = {
|
|
50
|
+
id: string;
|
|
51
|
+
sessionID: string;
|
|
52
|
+
permission: string;
|
|
53
|
+
patterns: Array<string>;
|
|
54
|
+
metadata: {
|
|
55
|
+
[key: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
always: Array<string>;
|
|
58
|
+
tool?: {
|
|
59
|
+
messageID: string;
|
|
60
|
+
callID: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export type EventPermissionAsked = {
|
|
64
|
+
type: "permission.asked";
|
|
65
|
+
properties: PermissionRequest;
|
|
66
|
+
};
|
|
67
|
+
export type EventPermissionReplied = {
|
|
68
|
+
type: "permission.replied";
|
|
69
|
+
properties: {
|
|
70
|
+
sessionID: string;
|
|
71
|
+
requestID: string;
|
|
72
|
+
reply: "once" | "always" | "reject";
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export type QuestionOption = {
|
|
76
|
+
/**
|
|
77
|
+
* Display text (1-5 words, concise)
|
|
78
|
+
*/
|
|
79
|
+
label: string;
|
|
80
|
+
/**
|
|
81
|
+
* Explanation of choice
|
|
82
|
+
*/
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
export type QuestionInfo = {
|
|
86
|
+
/**
|
|
87
|
+
* Complete question
|
|
88
|
+
*/
|
|
89
|
+
question: string;
|
|
90
|
+
/**
|
|
91
|
+
* Very short label (max 30 chars)
|
|
92
|
+
*/
|
|
93
|
+
header: string;
|
|
94
|
+
/**
|
|
95
|
+
* Available choices
|
|
96
|
+
*/
|
|
97
|
+
options: Array<QuestionOption>;
|
|
98
|
+
/**
|
|
99
|
+
* Allow selecting multiple choices
|
|
100
|
+
*/
|
|
101
|
+
multiple?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Allow typing a custom answer (default: true)
|
|
104
|
+
*/
|
|
105
|
+
custom?: boolean;
|
|
106
|
+
};
|
|
107
|
+
export type QuestionRequest = {
|
|
108
|
+
id: string;
|
|
109
|
+
sessionID: string;
|
|
110
|
+
/**
|
|
111
|
+
* Questions to ask
|
|
112
|
+
*/
|
|
113
|
+
questions: Array<QuestionInfo>;
|
|
114
|
+
tool?: {
|
|
115
|
+
messageID: string;
|
|
116
|
+
callID: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export type EventQuestionAsked = {
|
|
120
|
+
type: "question.asked";
|
|
121
|
+
properties: QuestionRequest;
|
|
122
|
+
};
|
|
123
|
+
export type QuestionAnswer = Array<string>;
|
|
124
|
+
export type EventQuestionReplied = {
|
|
125
|
+
type: "question.replied";
|
|
126
|
+
properties: {
|
|
127
|
+
sessionID: string;
|
|
128
|
+
requestID: string;
|
|
129
|
+
answers: Array<QuestionAnswer>;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export type EventQuestionRejected = {
|
|
133
|
+
type: "question.rejected";
|
|
134
|
+
properties: {
|
|
135
|
+
sessionID: string;
|
|
136
|
+
requestID: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
49
139
|
export type EventServerConnected = {
|
|
50
140
|
type: "server.connected";
|
|
51
141
|
properties: {
|
|
@@ -473,32 +563,6 @@ export type EventMessagePartRemoved = {
|
|
|
473
563
|
partID: string;
|
|
474
564
|
};
|
|
475
565
|
};
|
|
476
|
-
export type PermissionRequest = {
|
|
477
|
-
id: string;
|
|
478
|
-
sessionID: string;
|
|
479
|
-
permission: string;
|
|
480
|
-
patterns: Array<string>;
|
|
481
|
-
metadata: {
|
|
482
|
-
[key: string]: unknown;
|
|
483
|
-
};
|
|
484
|
-
always: Array<string>;
|
|
485
|
-
tool?: {
|
|
486
|
-
messageID: string;
|
|
487
|
-
callID: string;
|
|
488
|
-
};
|
|
489
|
-
};
|
|
490
|
-
export type EventPermissionAsked = {
|
|
491
|
-
type: "permission.asked";
|
|
492
|
-
properties: PermissionRequest;
|
|
493
|
-
};
|
|
494
|
-
export type EventPermissionReplied = {
|
|
495
|
-
type: "permission.replied";
|
|
496
|
-
properties: {
|
|
497
|
-
sessionID: string;
|
|
498
|
-
requestID: string;
|
|
499
|
-
reply: "once" | "always" | "reject";
|
|
500
|
-
};
|
|
501
|
-
};
|
|
502
566
|
export type SessionStatus = {
|
|
503
567
|
type: "idle";
|
|
504
568
|
} | {
|
|
@@ -522,70 +586,6 @@ export type EventSessionIdle = {
|
|
|
522
586
|
sessionID: string;
|
|
523
587
|
};
|
|
524
588
|
};
|
|
525
|
-
export type QuestionOption = {
|
|
526
|
-
/**
|
|
527
|
-
* Display text (1-5 words, concise)
|
|
528
|
-
*/
|
|
529
|
-
label: string;
|
|
530
|
-
/**
|
|
531
|
-
* Explanation of choice
|
|
532
|
-
*/
|
|
533
|
-
description: string;
|
|
534
|
-
};
|
|
535
|
-
export type QuestionInfo = {
|
|
536
|
-
/**
|
|
537
|
-
* Complete question
|
|
538
|
-
*/
|
|
539
|
-
question: string;
|
|
540
|
-
/**
|
|
541
|
-
* Very short label (max 30 chars)
|
|
542
|
-
*/
|
|
543
|
-
header: string;
|
|
544
|
-
/**
|
|
545
|
-
* Available choices
|
|
546
|
-
*/
|
|
547
|
-
options: Array<QuestionOption>;
|
|
548
|
-
/**
|
|
549
|
-
* Allow selecting multiple choices
|
|
550
|
-
*/
|
|
551
|
-
multiple?: boolean;
|
|
552
|
-
/**
|
|
553
|
-
* Allow typing a custom answer (default: true)
|
|
554
|
-
*/
|
|
555
|
-
custom?: boolean;
|
|
556
|
-
};
|
|
557
|
-
export type QuestionRequest = {
|
|
558
|
-
id: string;
|
|
559
|
-
sessionID: string;
|
|
560
|
-
/**
|
|
561
|
-
* Questions to ask
|
|
562
|
-
*/
|
|
563
|
-
questions: Array<QuestionInfo>;
|
|
564
|
-
tool?: {
|
|
565
|
-
messageID: string;
|
|
566
|
-
callID: string;
|
|
567
|
-
};
|
|
568
|
-
};
|
|
569
|
-
export type EventQuestionAsked = {
|
|
570
|
-
type: "question.asked";
|
|
571
|
-
properties: QuestionRequest;
|
|
572
|
-
};
|
|
573
|
-
export type QuestionAnswer = Array<string>;
|
|
574
|
-
export type EventQuestionReplied = {
|
|
575
|
-
type: "question.replied";
|
|
576
|
-
properties: {
|
|
577
|
-
sessionID: string;
|
|
578
|
-
requestID: string;
|
|
579
|
-
answers: Array<QuestionAnswer>;
|
|
580
|
-
};
|
|
581
|
-
};
|
|
582
|
-
export type EventQuestionRejected = {
|
|
583
|
-
type: "question.rejected";
|
|
584
|
-
properties: {
|
|
585
|
-
sessionID: string;
|
|
586
|
-
requestID: string;
|
|
587
|
-
};
|
|
588
|
-
};
|
|
589
589
|
export type EventSessionCompacted = {
|
|
590
590
|
type: "session.compacted";
|
|
591
591
|
properties: {
|
|
@@ -811,7 +811,7 @@ export type EventWorktreeFailed = {
|
|
|
811
811
|
message: string;
|
|
812
812
|
};
|
|
813
813
|
};
|
|
814
|
-
export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed |
|
|
814
|
+
export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventPermissionAsked | EventPermissionReplied | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventServerConnected | EventGlobalDisposed | EventLspClientDiagnostics | EventLspUpdated | EventFileEdited | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartDelta | EventMessagePartRemoved | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileWatcherUpdated | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventWorktreeReady | EventWorktreeFailed;
|
|
815
815
|
export type GlobalEvent = {
|
|
816
816
|
directory: string;
|
|
817
817
|
payload: Event;
|