chore: merge dev
This commit is contained in:
commit
d3fe65e2f7
312 changed files with 32857 additions and 4562 deletions
|
|
@ -1,4 +1,9 @@
|
|||
export * from "./gen/types.gen.js"
|
||||
export type {
|
||||
FileSystemBinaryContent as LocationFileSystemBinaryContent,
|
||||
FileSystemEntry as LocationFileSystemEntry,
|
||||
FileSystemTextContent as LocationFileSystemTextContent,
|
||||
} from "./gen/types.gen.js"
|
||||
|
||||
import { createClient } from "./gen/client/client.gen.js"
|
||||
import { type Config } from "./gen/client/types.gen.js"
|
||||
|
|
@ -30,8 +35,10 @@ function rewrite(request: Request, values: { directory?: string; workspace?: str
|
|||
key === "directory" ? encodeURIComponent : undefined,
|
||||
)
|
||||
if (!value) continue
|
||||
if (!url.searchParams.has(key)) {
|
||||
url.searchParams.set(key, value)
|
||||
for (const query of url.pathname.startsWith("/api/") ? [key, `location[${key}]`] : [key]) {
|
||||
if (!url.searchParams.has(query)) {
|
||||
url.searchParams.set(query, value)
|
||||
}
|
||||
}
|
||||
changed = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ import type {
|
|||
QuestionRejectResponses,
|
||||
QuestionReplyErrors,
|
||||
QuestionReplyResponses,
|
||||
QuestionV2Reply,
|
||||
SessionAbortErrors,
|
||||
SessionAbortResponses,
|
||||
SessionChildrenErrors,
|
||||
|
|
@ -178,7 +179,6 @@ import type {
|
|||
SessionDeleteMessageErrors,
|
||||
SessionDeleteMessageResponses,
|
||||
SessionDeleteResponses,
|
||||
SessionDelivery,
|
||||
SessionDiffErrors,
|
||||
SessionDiffResponses,
|
||||
SessionForkErrors,
|
||||
|
|
@ -279,6 +279,8 @@ import type {
|
|||
V2ProviderGetResponses,
|
||||
V2ProviderListErrors,
|
||||
V2ProviderListResponses,
|
||||
V2QuestionRequestListErrors,
|
||||
V2QuestionRequestListResponses,
|
||||
V2SessionCompactErrors,
|
||||
V2SessionCompactResponses,
|
||||
V2SessionContextErrors,
|
||||
|
|
@ -293,6 +295,10 @@ import type {
|
|||
V2SessionPermissionReplyResponses,
|
||||
V2SessionPromptErrors,
|
||||
V2SessionPromptResponses,
|
||||
V2SessionQuestionRejectErrors,
|
||||
V2SessionQuestionRejectResponses,
|
||||
V2SessionQuestionReplyErrors,
|
||||
V2SessionQuestionReplyResponses,
|
||||
V2SessionWaitErrors,
|
||||
V2SessionWaitResponses,
|
||||
V2SkillListErrors,
|
||||
|
|
@ -5020,6 +5026,83 @@ export class Permission2 extends HeyApiClient {
|
|||
}
|
||||
}
|
||||
|
||||
export class Question2 extends HeyApiClient {
|
||||
/**
|
||||
* Reply to pending question request
|
||||
*
|
||||
* Answer a pending question request owned by a session.
|
||||
*/
|
||||
public reply<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
sessionID: string
|
||||
requestID: string
|
||||
questionV2Reply: QuestionV2Reply
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams(
|
||||
[parameters],
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "sessionID" },
|
||||
{ in: "path", key: "requestID" },
|
||||
{ key: "questionV2Reply", map: "body" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).post<
|
||||
V2SessionQuestionReplyResponses,
|
||||
V2SessionQuestionReplyErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/session/{sessionID}/question/request/{requestID}/reply",
|
||||
...options,
|
||||
...params,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
...params.headers,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Reject pending question request
|
||||
*
|
||||
* Reject a pending question request owned by a session.
|
||||
*/
|
||||
public reject<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
sessionID: string
|
||||
requestID: string
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams(
|
||||
[parameters],
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "sessionID" },
|
||||
{ in: "path", key: "requestID" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).post<
|
||||
V2SessionQuestionRejectResponses,
|
||||
V2SessionQuestionRejectErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/session/{sessionID}/question/request/{requestID}/reject",
|
||||
...options,
|
||||
...params,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export class Session3 extends HeyApiClient {
|
||||
/**
|
||||
* List v2 sessions
|
||||
|
|
@ -5066,13 +5149,15 @@ export class Session3 extends HeyApiClient {
|
|||
/**
|
||||
* Send v2 message
|
||||
*
|
||||
* Create a v2 session message and queue it for the agent loop.
|
||||
* Durably admit one v2 session input and schedule agent-loop execution unless resume is false.
|
||||
*/
|
||||
public prompt<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
sessionID: string
|
||||
id?: string
|
||||
prompt?: Prompt
|
||||
delivery?: SessionDelivery
|
||||
delivery?: "steer" | "queue"
|
||||
resume?: boolean
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
|
|
@ -5082,8 +5167,10 @@ export class Session3 extends HeyApiClient {
|
|||
{
|
||||
args: [
|
||||
{ in: "path", key: "sessionID" },
|
||||
{ in: "body", key: "id" },
|
||||
{ in: "body", key: "prompt" },
|
||||
{ in: "body", key: "delivery" },
|
||||
{ in: "body", key: "resume" },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
@ -5195,6 +5282,11 @@ export class Session3 extends HeyApiClient {
|
|||
get permission(): Permission2 {
|
||||
return (this._permission ??= new Permission2({ client: this.client }))
|
||||
}
|
||||
|
||||
private _question?: Question2
|
||||
get question(): Question2 {
|
||||
return (this._question ??= new Question2({ client: this.client }))
|
||||
}
|
||||
}
|
||||
|
||||
export class Model extends HeyApiClient {
|
||||
|
|
@ -5510,6 +5602,41 @@ export class Event2 extends HeyApiClient {
|
|||
}
|
||||
}
|
||||
|
||||
export class Request2 extends HeyApiClient {
|
||||
/**
|
||||
* List pending question requests
|
||||
*
|
||||
* Retrieve pending question requests for a location.
|
||||
*/
|
||||
public list<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<
|
||||
V2QuestionRequestListResponses,
|
||||
V2QuestionRequestListErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/question/request",
|
||||
...options,
|
||||
...params,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export class Question3 extends HeyApiClient {
|
||||
private _request?: Request2
|
||||
get request(): Request2 {
|
||||
return (this._request ??= new Request2({ client: this.client }))
|
||||
}
|
||||
}
|
||||
|
||||
export class V2 extends HeyApiClient {
|
||||
private _health?: Health
|
||||
get health(): Health {
|
||||
|
|
@ -5560,6 +5687,11 @@ export class V2 extends HeyApiClient {
|
|||
get event(): Event2 {
|
||||
return (this._event ??= new Event2({ client: this.client }))
|
||||
}
|
||||
|
||||
private _question?: Question3
|
||||
get question(): Question3 {
|
||||
return (this._question ??= new Question3({ client: this.client }))
|
||||
}
|
||||
}
|
||||
|
||||
export class OpencodeClient extends HeyApiClient {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue