mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-29 06:13:46 +00:00
merge: hapi upstream main 2026-10-19 (34 commits past v0.30.7)
Bring in the post-0.30.7 upstream work while keeping local team, macaron, requirement, DSH and deployment features: - runner/hub: cross-platform orphan reap on archive and tracking loss, machine-spawn preallocated stubs, keepalive-only sessions reconcile to idle - hub: prepared-statement cache, stale/canceled permission request handling - cli: Codex compaction announcements, dynamic Kimi models, MCP bridge reap - web: session toolbar icon shedding, mark-all-read, unread/active sections, Russian locale, external-link preference, 48px search chrome - ios/android: locale and font-size updates Conflict resolution keeps local-only behavior (agent team spawns, macaron skins, collapsible sidebar, workspace markdown images) layered on the new upstream toolbar and session lifecycle plumbing. Test infrastructure: skip the Docker-only pwsh integration test quickly when Docker is unavailable, and exclude the Bun-only usageScan test from vitest. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+38
-1
@@ -27,6 +27,11 @@ export type CreateOrLoadMachineRequest = z.infer<typeof CreateOrLoadMachineReque
|
||||
|
||||
export const CreateOrLoadSessionRequestSchema = z.object({
|
||||
id: z.string().uuid().optional(),
|
||||
/**
|
||||
* When true with `id`, bind a hub-preallocated stub (overwrite tag/metadata)
|
||||
* instead of create/getOrCreate. Rejects non-stub rows (#1911 adopt).
|
||||
*/
|
||||
adopt: z.boolean().optional(),
|
||||
tag: z.string().min(1),
|
||||
metadata: z.unknown(),
|
||||
agentState: z.unknown().nullable().optional(),
|
||||
@@ -34,6 +39,14 @@ export const CreateOrLoadSessionRequestSchema = z.object({
|
||||
modelReasoningEffort: z.string().optional(),
|
||||
effort: z.string().optional(),
|
||||
machine: CreateOrLoadMachineRequestSchema.optional()
|
||||
}).superRefine((value, ctx) => {
|
||||
if (value.adopt === true && !value.id) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: 'adopt requires id',
|
||||
path: ['id'],
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
export type CreateOrLoadSessionRequest = z.infer<typeof CreateOrLoadSessionRequestSchema>
|
||||
@@ -1142,6 +1155,22 @@ export type CopilotModelsResponse = {
|
||||
|
||||
export type ListCopilotModelsResponse = CopilotModelsResponse
|
||||
|
||||
export type KimiModelSummary = {
|
||||
/** Kimi model alias as used by `--model` / `session/set_model`. */
|
||||
modelId: string
|
||||
name?: string
|
||||
provider?: string
|
||||
}
|
||||
|
||||
export type KimiModelsResponse = {
|
||||
success: boolean
|
||||
availableModels?: KimiModelSummary[]
|
||||
currentModelId?: string | null
|
||||
error?: string
|
||||
}
|
||||
|
||||
export type ListKimiModelsResponse = KimiModelsResponse
|
||||
|
||||
export type GrokReasoningEffortResponse = {
|
||||
success: boolean
|
||||
options?: GrokReasoningEffortOption[]
|
||||
@@ -1181,7 +1210,15 @@ export type ListAgyModelsResponse = AgyModelsResponse
|
||||
|
||||
export type CursorModelSummary = OpencodeModelSummary
|
||||
|
||||
export type CursorModelsResponse = OpencodeModelsResponse
|
||||
export type CursorModelsResponse = OpencodeModelsResponse & {
|
||||
/**
|
||||
* True when ACP advertised Cursor's parameterized model picker: bare model bases
|
||||
* plus separate `fast` / `thought_level` config options. The ACP apply path
|
||||
* expresses variant CLI skus through those options, so variant rows stay valid
|
||||
* even when the catalog itself carries no bracket wire ids.
|
||||
*/
|
||||
parameterized?: boolean
|
||||
}
|
||||
|
||||
export type ListCursorModelsResponse = CursorModelsResponse
|
||||
|
||||
|
||||
Reference in New Issue
Block a user