|
|
@@ -47,13 +47,6 @@ export type EventProjectUpdated = {
|
|
|
properties: Project
|
|
|
}
|
|
|
|
|
|
-export type EventFileEdited = {
|
|
|
- type: "file.edited"
|
|
|
- properties: {
|
|
|
- file: string
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
export type EventServerInstanceDisposed = {
|
|
|
type: "server.instance.disposed"
|
|
|
properties: {
|
|
|
@@ -61,121 +54,6 @@ export type EventServerInstanceDisposed = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-export type EventFileWatcherUpdated = {
|
|
|
- type: "file.watcher.updated"
|
|
|
- properties: {
|
|
|
- file: string
|
|
|
- event: "add" | "change" | "unlink"
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export type PermissionRequest = {
|
|
|
- id: string
|
|
|
- sessionID: string
|
|
|
- permission: string
|
|
|
- patterns: Array<string>
|
|
|
- metadata: {
|
|
|
- [key: string]: unknown
|
|
|
- }
|
|
|
- always: Array<string>
|
|
|
- tool?: {
|
|
|
- messageID: string
|
|
|
- callID: string
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export type EventPermissionAsked = {
|
|
|
- type: "permission.asked"
|
|
|
- properties: PermissionRequest
|
|
|
-}
|
|
|
-
|
|
|
-export type EventPermissionReplied = {
|
|
|
- type: "permission.replied"
|
|
|
- properties: {
|
|
|
- sessionID: string
|
|
|
- requestID: string
|
|
|
- reply: "once" | "always" | "reject"
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export type EventVcsBranchUpdated = {
|
|
|
- type: "vcs.branch.updated"
|
|
|
- properties: {
|
|
|
- branch?: string
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export type QuestionOption = {
|
|
|
- /**
|
|
|
- * Display text (1-5 words, concise)
|
|
|
- */
|
|
|
- label: string
|
|
|
- /**
|
|
|
- * Explanation of choice
|
|
|
- */
|
|
|
- description: string
|
|
|
-}
|
|
|
-
|
|
|
-export type QuestionInfo = {
|
|
|
- /**
|
|
|
- * Complete question
|
|
|
- */
|
|
|
- question: string
|
|
|
- /**
|
|
|
- * Very short label (max 30 chars)
|
|
|
- */
|
|
|
- header: string
|
|
|
- /**
|
|
|
- * Available choices
|
|
|
- */
|
|
|
- options: Array<QuestionOption>
|
|
|
- /**
|
|
|
- * Allow selecting multiple choices
|
|
|
- */
|
|
|
- multiple?: boolean
|
|
|
- /**
|
|
|
- * Allow typing a custom answer (default: true)
|
|
|
- */
|
|
|
- custom?: boolean
|
|
|
-}
|
|
|
-
|
|
|
-export type QuestionRequest = {
|
|
|
- id: string
|
|
|
- sessionID: string
|
|
|
- /**
|
|
|
- * Questions to ask
|
|
|
- */
|
|
|
- questions: Array<QuestionInfo>
|
|
|
- tool?: {
|
|
|
- messageID: string
|
|
|
- callID: string
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export type EventQuestionAsked = {
|
|
|
- type: "question.asked"
|
|
|
- properties: QuestionRequest
|
|
|
-}
|
|
|
-
|
|
|
-export type QuestionAnswer = Array<string>
|
|
|
-
|
|
|
-export type EventQuestionReplied = {
|
|
|
- type: "question.replied"
|
|
|
- properties: {
|
|
|
- sessionID: string
|
|
|
- requestID: string
|
|
|
- answers: Array<QuestionAnswer>
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export type EventQuestionRejected = {
|
|
|
- type: "question.rejected"
|
|
|
- properties: {
|
|
|
- sessionID: string
|
|
|
- requestID: string
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
export type EventServerConnected = {
|
|
|
type: "server.connected"
|
|
|
properties: {
|
|
|
@@ -205,6 +83,13 @@ export type EventLspUpdated = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+export type EventFileEdited = {
|
|
|
+ type: "file.edited"
|
|
|
+ properties: {
|
|
|
+ file: string
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export type OutputFormatText = {
|
|
|
type: "text"
|
|
|
}
|
|
|
@@ -664,6 +549,35 @@ export type EventMessagePartRemoved = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+export type PermissionRequest = {
|
|
|
+ id: string
|
|
|
+ sessionID: string
|
|
|
+ permission: string
|
|
|
+ patterns: Array<string>
|
|
|
+ metadata: {
|
|
|
+ [key: string]: unknown
|
|
|
+ }
|
|
|
+ always: Array<string>
|
|
|
+ tool?: {
|
|
|
+ messageID: string
|
|
|
+ callID: string
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export type EventPermissionAsked = {
|
|
|
+ type: "permission.asked"
|
|
|
+ properties: PermissionRequest
|
|
|
+}
|
|
|
+
|
|
|
+export type EventPermissionReplied = {
|
|
|
+ type: "permission.replied"
|
|
|
+ properties: {
|
|
|
+ sessionID: string
|
|
|
+ requestID: string
|
|
|
+ reply: "once" | "always" | "reject"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export type SessionStatus =
|
|
|
| {
|
|
|
type: "idle"
|
|
|
@@ -693,6 +607,77 @@ export type EventSessionIdle = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+export type QuestionOption = {
|
|
|
+ /**
|
|
|
+ * Display text (1-5 words, concise)
|
|
|
+ */
|
|
|
+ label: string
|
|
|
+ /**
|
|
|
+ * Explanation of choice
|
|
|
+ */
|
|
|
+ description: string
|
|
|
+}
|
|
|
+
|
|
|
+export type QuestionInfo = {
|
|
|
+ /**
|
|
|
+ * Complete question
|
|
|
+ */
|
|
|
+ question: string
|
|
|
+ /**
|
|
|
+ * Very short label (max 30 chars)
|
|
|
+ */
|
|
|
+ header: string
|
|
|
+ /**
|
|
|
+ * Available choices
|
|
|
+ */
|
|
|
+ options: Array<QuestionOption>
|
|
|
+ /**
|
|
|
+ * Allow selecting multiple choices
|
|
|
+ */
|
|
|
+ multiple?: boolean
|
|
|
+ /**
|
|
|
+ * Allow typing a custom answer (default: true)
|
|
|
+ */
|
|
|
+ custom?: boolean
|
|
|
+}
|
|
|
+
|
|
|
+export type QuestionRequest = {
|
|
|
+ id: string
|
|
|
+ sessionID: string
|
|
|
+ /**
|
|
|
+ * Questions to ask
|
|
|
+ */
|
|
|
+ questions: Array<QuestionInfo>
|
|
|
+ tool?: {
|
|
|
+ messageID: string
|
|
|
+ callID: string
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export type EventQuestionAsked = {
|
|
|
+ type: "question.asked"
|
|
|
+ properties: QuestionRequest
|
|
|
+}
|
|
|
+
|
|
|
+export type QuestionAnswer = Array<string>
|
|
|
+
|
|
|
+export type EventQuestionReplied = {
|
|
|
+ type: "question.replied"
|
|
|
+ properties: {
|
|
|
+ sessionID: string
|
|
|
+ requestID: string
|
|
|
+ answers: Array<QuestionAnswer>
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export type EventQuestionRejected = {
|
|
|
+ type: "question.rejected"
|
|
|
+ properties: {
|
|
|
+ sessionID: string
|
|
|
+ requestID: string
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export type EventSessionCompacted = {
|
|
|
type: "session.compacted"
|
|
|
properties: {
|
|
|
@@ -700,6 +685,14 @@ export type EventSessionCompacted = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+export type EventFileWatcherUpdated = {
|
|
|
+ type: "file.watcher.updated"
|
|
|
+ properties: {
|
|
|
+ file: string
|
|
|
+ event: "add" | "change" | "unlink"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export type Todo = {
|
|
|
/**
|
|
|
* Brief description of the task
|
|
|
@@ -889,6 +882,13 @@ export type EventSessionError = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+export type EventVcsBranchUpdated = {
|
|
|
+ type: "vcs.branch.updated"
|
|
|
+ properties: {
|
|
|
+ branch?: string
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export type EventWorkspaceReady = {
|
|
|
type: "workspace.ready"
|
|
|
properties: {
|
|
|
@@ -961,27 +961,26 @@ export type Event =
|
|
|
| EventInstallationUpdated
|
|
|
| EventInstallationUpdateAvailable
|
|
|
| EventProjectUpdated
|
|
|
- | EventFileEdited
|
|
|
| EventServerInstanceDisposed
|
|
|
- | EventFileWatcherUpdated
|
|
|
- | EventPermissionAsked
|
|
|
- | EventPermissionReplied
|
|
|
- | EventVcsBranchUpdated
|
|
|
- | EventQuestionAsked
|
|
|
- | EventQuestionReplied
|
|
|
- | EventQuestionRejected
|
|
|
| EventServerConnected
|
|
|
| EventGlobalDisposed
|
|
|
| EventLspClientDiagnostics
|
|
|
| EventLspUpdated
|
|
|
+ | EventFileEdited
|
|
|
| EventMessageUpdated
|
|
|
| EventMessageRemoved
|
|
|
| EventMessagePartUpdated
|
|
|
| EventMessagePartDelta
|
|
|
| EventMessagePartRemoved
|
|
|
+ | EventPermissionAsked
|
|
|
+ | EventPermissionReplied
|
|
|
| EventSessionStatus
|
|
|
| EventSessionIdle
|
|
|
+ | EventQuestionAsked
|
|
|
+ | EventQuestionReplied
|
|
|
+ | EventQuestionRejected
|
|
|
| EventSessionCompacted
|
|
|
+ | EventFileWatcherUpdated
|
|
|
| EventTodoUpdated
|
|
|
| EventTuiPromptAppend
|
|
|
| EventTuiCommandExecute
|
|
|
@@ -995,6 +994,7 @@ export type Event =
|
|
|
| EventSessionDeleted
|
|
|
| EventSessionDiff
|
|
|
| EventSessionError
|
|
|
+ | EventVcsBranchUpdated
|
|
|
| EventWorkspaceReady
|
|
|
| EventWorkspaceFailed
|
|
|
| EventPtyCreated
|
|
|
@@ -1534,8 +1534,6 @@ export type WellKnownAuth = {
|
|
|
token: string
|
|
|
}
|
|
|
|
|
|
-export type Auth = OAuth | ApiAuth | WellKnownAuth
|
|
|
-
|
|
|
export type NotFoundError = {
|
|
|
name: "NotFoundError"
|
|
|
data: {
|
|
|
@@ -2058,7 +2056,7 @@ export type AuthRemoveResponses = {
|
|
|
export type AuthRemoveResponse = AuthRemoveResponses[keyof AuthRemoveResponses]
|
|
|
|
|
|
export type AuthSetData = {
|
|
|
- body?: Auth
|
|
|
+ body?: OAuth | ApiAuth | WellKnownAuth
|
|
|
path: {
|
|
|
providerID: string
|
|
|
}
|