feat(mini): migrate mini to v2 (#34895)
feat(run): migrate non-interactive prompts to V2 feat(run): route mini prompts through V2 fix(run): use current session contracts fix(run): fix V2 prompt turns feat(cli): add mini subcommand feat(run): use settled execution events fix(run): handle remote prompt file attachments feat(run): send prompt files as attachments feat(run): use current APIs for run state fix(run): adopt app-node runtime deps feat(run): track subagent sessions feat(run): move catalogs and default model onto current APIs
This commit is contained in:
@@ -301,6 +301,8 @@ import type {
|
||||
V2LocationGetResponses,
|
||||
V2McpListErrors,
|
||||
V2McpListResponses,
|
||||
V2ModelDefaultErrors,
|
||||
V2ModelDefaultResponses,
|
||||
V2ModelListErrors,
|
||||
V2ModelListResponses,
|
||||
V2PermissionRequestListErrors,
|
||||
@@ -6120,6 +6122,28 @@ export class Model extends HeyApiClient {
|
||||
...params,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default model
|
||||
*
|
||||
* Retrieve the model used when a session has no explicit model selection.
|
||||
*/
|
||||
public default<ThrowOnError extends boolean = false>(
|
||||
parameters?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }])
|
||||
return (options?.client ?? this.client).get<V2ModelDefaultResponses, V2ModelDefaultErrors, ThrowOnError>({
|
||||
url: "/api/model/default",
|
||||
...options,
|
||||
...params,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export class Generate extends HeyApiClient {
|
||||
|
||||
@@ -24,6 +24,7 @@ export type Event =
|
||||
| EventSessionNextForked
|
||||
| EventSessionNextPrompted
|
||||
| EventSessionNextPromptAdmitted
|
||||
| EventSessionNextExecutionSettled
|
||||
| EventSessionNextContextUpdated
|
||||
| EventSessionNextSynthetic
|
||||
| EventSessionNextSkillActivated
|
||||
@@ -923,6 +924,16 @@ export type GlobalEvent = {
|
||||
delivery: "steer" | "queue"
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "session.next.execution.settled"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
outcome: "success" | "failure" | "interrupted"
|
||||
error?: SessionErrorUnknown
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "session.next.context.updated"
|
||||
@@ -3010,6 +3021,7 @@ export type V2Event =
|
||||
| SessionNextForked
|
||||
| SessionNextPrompted
|
||||
| SessionNextPromptAdmitted
|
||||
| SessionNextExecutionSettled
|
||||
| SessionNextContextUpdated
|
||||
| SessionNextSynthetic
|
||||
| SessionNextSkillActivated
|
||||
@@ -5597,6 +5609,26 @@ export type MessagePartRemoved = {
|
||||
}
|
||||
}
|
||||
|
||||
export type SessionNextExecutionSettled = {
|
||||
id: string
|
||||
metadata?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
type: "session.next.execution.settled"
|
||||
durable?: {
|
||||
aggregateID: string
|
||||
seq: number
|
||||
version: number
|
||||
}
|
||||
location?: LocationRef
|
||||
data: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
outcome: "success" | "failure" | "interrupted"
|
||||
error?: SessionErrorUnknown
|
||||
}
|
||||
}
|
||||
|
||||
export type SessionNextTextDelta = {
|
||||
id: string
|
||||
metadata?: {
|
||||
@@ -6802,6 +6834,17 @@ export type EventSessionNextPromptAdmitted = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextExecutionSettled = {
|
||||
id: string
|
||||
type: "session.next.execution.settled"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
outcome: "success" | "failure" | "interrupted"
|
||||
error?: SessionErrorUnknown
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextContextUpdated = {
|
||||
id: string
|
||||
type: "session.next.context.updated"
|
||||
@@ -12875,6 +12918,47 @@ export type V2ModelListResponses = {
|
||||
|
||||
export type V2ModelListResponse = V2ModelListResponses[keyof V2ModelListResponses]
|
||||
|
||||
export type V2ModelDefaultData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/model/default"
|
||||
}
|
||||
|
||||
export type V2ModelDefaultErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
/**
|
||||
* ServiceUnavailableError
|
||||
*/
|
||||
503: ServiceUnavailableError
|
||||
}
|
||||
|
||||
export type V2ModelDefaultError = V2ModelDefaultErrors[keyof V2ModelDefaultErrors]
|
||||
|
||||
export type V2ModelDefaultResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: {
|
||||
location: LocationInfo
|
||||
data: ModelV2Info
|
||||
}
|
||||
}
|
||||
|
||||
export type V2ModelDefaultResponse = V2ModelDefaultResponses[keyof V2ModelDefaultResponses]
|
||||
|
||||
export type V2GenerateTextData = {
|
||||
body: {
|
||||
prompt: string
|
||||
|
||||
Reference in New Issue
Block a user