Merge remote-tracking branch 'origin/master' into worktree/attachment-alignment-2

This commit is contained in:
creatixchu
2026-08-12 13:02:39 +08:00
201 files changed
+3681 -1720

No files matched your search

@@ -82,6 +82,7 @@ export const hostFrameSchema = z.discriminatedUnion('type', [
z.object({ type: z.literal('host/agent-error'), sessionId: sessionIdSchema, message: z.string() }),
z.object({ type: z.literal('host/workspace-changed'), workspace: workspaceViewSchema }),
z.object({ type: z.literal('host/workspace-removed'), workspaceId: workspaceIdSchema }),
z.object({ type: z.literal('host/workspace-order-changed'), workspaceIds: z.array(workspaceIdSchema) }),
z.object({ type: z.literal('host/archived-sessions-changed'), archivedSessionIds: z.array(sessionIdSchema) }),
// args stays wide, the same posture as session/projection's value: the frame
// arrives from JSON.parse, so every element is already a JSON value, and the
+3 -1
View File
@@ -119,7 +119,8 @@ export type MuxFrame =
* workspace mutation (create/attach/order change — the client upserts, while
* `workspace.list` provides the reconnect baseline); workspace-removed is the
* committed registration-deletion increment and never implies directory or
* session-log deletion; archived-sessions-changed pushes the full registry
* session-log deletion; workspace-order-changed pushes the complete durable
* registry order after a reorder; archived-sessions-changed pushes the full registry
* archive set after every durable change (same full-snapshot posture as
* workspace-changed — `workspace.list` re-baselines it on reconnect).
*/
@@ -138,6 +139,7 @@ export type HostFrame =
| { type: 'host/agent-error'; sessionId: SessionId; message: string }
| { type: 'host/workspace-changed'; workspace: WorkspaceView }
| { type: 'host/workspace-removed'; workspaceId: WorkspaceView['workspaceId'] }
| { type: 'host/workspace-order-changed'; workspaceIds: WorkspaceView['workspaceId'][] }
| { type: 'host/archived-sessions-changed'; archivedSessionIds: SessionId[] }
/**
* One allowlisted host cordis event forwarded verbatim. The allowlist is
@@ -47,6 +47,7 @@ export interface RpcMethodMap {
'workspace.create': WorkspaceApi['create']
'workspace.rename': WorkspaceApi['rename']
'workspace.delete': WorkspaceApi['delete']
'workspace.insertBefore': WorkspaceApi['insertBefore']
'workspace.insertSessionBefore': WorkspaceApi['insertSessionBefore']
'workspace.archiveSession': WorkspaceApi['archiveSession']
'skill.list': SkillsApi['list']
@@ -66,6 +66,17 @@ export const workspaceDeleteValueSchema = z.object({
deleted: z.literal(true),
}) satisfies z.ZodType<Wire<ResponseValue<'workspace.delete'>>>
/** workspace.insertBefore request payload (anchor omitted = append to end). */
export const workspaceInsertBeforeRequestSchema = z.object({
workspaceId: workspaceIdSchema,
beforeWorkspaceId: workspaceIdSchema.optional(),
}) satisfies z.ZodType<Wire<RequestPayload<'workspace.insertBefore'>>>
/** workspace.insertBefore response value: the complete durable display order. */
export const workspaceInsertBeforeValueSchema = z.object({
workspaceIds: z.array(workspaceIdSchema),
}) satisfies z.ZodType<Wire<ResponseValue<'workspace.insertBefore'>>>
/** workspace.insertSessionBefore request payload (anchor omitted = append to end). */
export const workspaceInsertSessionBeforeRequestSchema = z.object({
workspaceId: workspaceIdSchema,
@@ -73,6 +73,15 @@ export interface WorkspaceApi {
delete(request: RpcRequest<{ workspaceId: WorkspaceId }>):
Promise<RpcResponse<{ deleted: true }>>
/**
* Moves one Workspace within the registry display order,
* DOM-insertBefore-like. An omitted anchor appends to the end.
*/
insertBefore(request: RpcRequest<{
workspaceId: WorkspaceId
beforeWorkspaceId?: WorkspaceId
}>): Promise<RpcResponse<{ workspaceIds: WorkspaceId[] }>>
/**
* Moves an accounted session within its workspace's manual order,
* DOM-insertBefore-like: with `beforeSessionId` the session is inserted