UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

411 lines • 18.3 kB
/** The schemas of the host-level inbound records and of the answers a client sends back (senpi#4324). */ import Type from "typebox"; export declare const HOST_RECORD_SCHEMAS: { get_protocol_info: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"get_protocol_info">; } & { readonly auth: Type.TOptional<Type.TObject<{ client_nonce: Type.TString; }>>; readonly observe: Type.TOptional<Type.TBoolean>; }>; open_session: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"open_session">; } & { retry: Type.TOptional<Type.TLiteral<true>>; attended: Type.TOptional<Type.TLiteral<false>>; spawnedBy: Type.TOptional<Type.TObject<{ parentSessionId: Type.TString; rootSessionId: Type.TString; taskId: Type.TString; }>>; expectedHostInstance: Type.TOptional<Type.TString>; sessionPath: Type.TOptional<Type.TString>; cwd: Type.TOptional<Type.TString>; provider: Type.TOptional<Type.TString>; modelId: Type.TOptional<Type.TString>; thinkingLevel: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; permissionPreset: Type.TOptional<Type.TString>; retain_on_disconnect: Type.TOptional<Type.TBoolean>; kind: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; context: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>; auto_title: Type.TOptional<Type.TBoolean>; durableSessionId: Type.TOptional<Type.TString>; promptSurface: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; browserEngine: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; retryFallback: Type.TOptional<Type.TObject<{ modelFallback: Type.TBoolean; fallbackChains: Type.TRecord<"^.*$", Type.TImmutable<Type.TArray<Type.TString>>>; }>>; env: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>; }>; claim_session: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"claim_session">; } & { readonly retry: Type.TOptional<Type.TLiteral<true>>; readonly attended: Type.TOptional<Type.TLiteral<false>>; readonly spawnedBy: Type.TOptional<Type.TObject<{ parentSessionId: Type.TString; rootSessionId: Type.TString; taskId: Type.TString; }>>; readonly expectedHostInstance: Type.TOptional<Type.TString>; readonly sessionPath: Type.TOptional<Type.TString>; readonly provider: Type.TOptional<Type.TString>; readonly modelId: Type.TOptional<Type.TString>; readonly thinkingLevel: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; readonly permissionPreset: Type.TOptional<Type.TString>; readonly retain_on_disconnect: Type.TOptional<Type.TBoolean>; readonly kind: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; readonly context: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>; readonly auto_title: Type.TOptional<Type.TBoolean>; readonly durableSessionId: Type.TOptional<Type.TString>; readonly promptSurface: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; readonly browserEngine: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; readonly retryFallback: Type.TOptional<Type.TObject<{ modelFallback: Type.TBoolean; fallbackChains: Type.TRecord<"^.*$", Type.TImmutable<Type.TArray<Type.TString>>>; }>>; readonly env: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>; readonly cwd: Type.TString; }>; park_session: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"park_session">; } & { readonly cwd: Type.TString; readonly kind: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; readonly context: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>; }>; close_session: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"close_session">; } & { readonly sessionId: Type.TString; }>; move_session: Type.TUnion<[Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"prepare">; readonly moveId: Type.TString; readonly cwd: Type.TOptional<Type.TString>; readonly repository: Type.TOptional<Type.TObject<{ rootCommits: Type.TArray<Type.TString>; originUrl: Type.TOptional<Type.TString>; }>>; }>, Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"cancel">; readonly moveId: Type.TString; }>, Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"identity">; readonly sessionPath: Type.TString; }>, Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"identity">; readonly cwd: Type.TString; }>, Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"status">; readonly moveId: Type.TString; readonly sessionPath: Type.TOptional<Type.TString>; readonly landing: Type.TOptional<Type.TObject<{ cwd: Type.TString; sessionFileName: Type.TString; sessionDir: Type.TOptional<Type.TString>; }>>; }>, Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"export">; readonly sessionPath: Type.TString; readonly moveId: Type.TString; readonly target: Type.TString; readonly droppedUserMessages: Type.TOptional<Type.TArray<Type.TString>>; readonly inline: Type.TOptional<Type.TLiteral<true>>; readonly inlineMaxBytes: Type.TOptional<Type.TInteger>; }>, Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"import">; readonly cwd: Type.TString; readonly from: Type.TOptional<Type.TString>; readonly bundleDir: Type.TOptional<Type.TString>; readonly files: Type.TOptional<Type.TArray<Type.TObject<{ path: Type.TString; sha256: Type.TString; base64: Type.TString; }>>>; readonly sessionDir: Type.TOptional<Type.TString>; readonly open: Type.TOptional<Type.TUnion<[Type.TLiteral<true>, Type.TObject<{ retry: Type.TOptional<Type.TLiteral<true>>; attended: Type.TOptional<Type.TLiteral<false>>; spawnedBy: Type.TOptional<Type.TObject<{ parentSessionId: Type.TString; rootSessionId: Type.TString; taskId: Type.TString; }>>; expectedHostInstance: Type.TOptional<Type.TString>; provider: Type.TOptional<Type.TString>; modelId: Type.TOptional<Type.TString>; thinkingLevel: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; permissionPreset: Type.TOptional<Type.TString>; retain_on_disconnect: Type.TOptional<Type.TBoolean>; kind: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; context: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>; auto_title: Type.TOptional<Type.TBoolean>; durableSessionId: Type.TOptional<Type.TString>; promptSurface: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; browserEngine: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; retryFallback: Type.TOptional<Type.TObject<{ modelFallback: Type.TBoolean; fallbackChains: Type.TRecord<"^.*$", Type.TImmutable<Type.TArray<Type.TString>>>; }>>; env: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>; }>]>>; }>, Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"finish">; readonly sessionPath: Type.TString; readonly moveId: Type.TString; readonly answer: Type.TUnknown; }>, Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"revoke">; readonly sessionPath: Type.TString; readonly moveId: Type.TString; }>, Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"move_session">; } & { readonly op: Type.TLiteral<"copy">; readonly sessionPath: Type.TString; readonly sessionId: Type.TString; readonly sessionDir: Type.TOptional<Type.TString>; }>]>; release_session: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"release_session">; } & { readonly sessionId: Type.TString; readonly reason: Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>; readonly moveId: Type.TOptional<Type.TString>; readonly target: Type.TOptional<Type.TString>; readonly interrupt: Type.TOptional<Type.TBoolean>; readonly force: Type.TOptional<Type.TBoolean>; }>; unload_session: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"unload_session">; } & { readonly sessionId: Type.TString; readonly effectId: Type.TOptional<Type.TString>; readonly interrupt: Type.TOptional<Type.TBoolean>; readonly clearQueue: Type.TOptional<Type.TBoolean>; readonly children: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; readonly force: Type.TOptional<Type.TBoolean>; readonly deliveries: Type.TOptional<Type.TLiteral<"refuse">>; readonly graceful: Type.TOptional<Type.TBoolean>; readonly waitMs: Type.TOptional<Type.TInteger>; }>; detach_connection: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"detach_connection">; }>; find_session: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"find_session">; } & { readonly durableSessionId: Type.TString; }>; get_subscription_limits: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"get_subscription_limits">; } & { readonly observe: Type.TOptional<Type.TBoolean>; }>; list_sessions: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"list_sessions">; } & { readonly include_workers: Type.TOptional<Type.TBoolean>; readonly observe: Type.TOptional<Type.TBoolean>; }>; subscribe_sessions: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"subscribe_sessions">; } & { readonly retry: Type.TOptional<Type.TLiteral<true>>; readonly sessions: Type.TOptional<Type.TUnion<[Type.TLiteral<"all">, Type.TObject<{ ids: Type.TArray<Type.TString>; }>, Type.TObject<{ childrenOf: Type.TString; }>]>>; readonly include_workers: Type.TOptional<Type.TBoolean>; readonly include_context: Type.TOptional<Type.TBoolean>; readonly effects: Type.TOptional<Type.TBoolean>; readonly dialogs: Type.TOptional<Type.TBoolean>; readonly mirror: Type.TOptional<Type.TUnion<[Type.TLiteral<"none">, Type.TLiteral<"all">, Type.TArray<Type.TString>]>>; readonly observe: Type.TOptional<Type.TBoolean>; }>; unsubscribe_sessions: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"unsubscribe_sessions">; } & { readonly subscriptionId: Type.TString; readonly observe: Type.TOptional<Type.TBoolean>; }>; set_session_context: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"set_session_context">; } & { readonly sessionId: Type.TString; readonly patch: Type.TRecord<"^.*$", Type.TUnion<[Type.TString, Type.TNumber, Type.TBoolean, Type.TNull]>>; }>; warm: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"warm">; } & { readonly cwd: Type.TOptional<Type.TString>; readonly kind: Type.TOptional<Type.TUnion<[Type.TLiteral<string>, ...Type.TLiteral<string>[]]>>; readonly context: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>; }>; attach_session: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"attach_session">; } & { readonly sessionId: Type.TString; readonly durableSessionId: Type.TString; readonly expectedHostInstance: Type.TOptional<Type.TString>; readonly retry: Type.TOptional<Type.TLiteral<true>>; readonly takeover: Type.TOptional<Type.TLiteral<true>>; readonly holder: Type.TOptional<Type.TString>; }>; release_attachment: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"release_attachment">; } & { readonly sessionId: Type.TString; }>; list_hands: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"list_hands">; } & { readonly sessionId: Type.TOptional<Type.TString>; }>; select_hand: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"select_hand">; } & { readonly sessionId: Type.TString; readonly device: Type.TUnion<[Type.TString, Type.TNull]>; }>; reclaim_session: Type.TObject<{ id: Type.TOptional<Type.TString>; admissionId: Type.TOptional<Type.TString>; type: Type.TLiteral<"reclaim_session">; } & { readonly sessionPath: Type.TString; readonly durableSessionId: Type.TString; readonly expectedHostInstance: Type.TString; }>; extension_ui_response: Type.TUnion<[Type.TObject<{ secret: Type.TOptional<Type.TBoolean>; type: Type.TLiteral<"extension_ui_response">; id: Type.TString; uiRequestId: Type.TOptional<Type.TString>; answerId: Type.TOptional<Type.TString>; value: Type.TString; }>, Type.TObject<{ secret: Type.TOptional<Type.TBoolean>; type: Type.TLiteral<"extension_ui_response">; id: Type.TString; uiRequestId: Type.TOptional<Type.TString>; answerId: Type.TOptional<Type.TString>; confirmed: Type.TBoolean; }>, Type.TObject<{ secret: Type.TOptional<Type.TBoolean>; type: Type.TLiteral<"extension_ui_response">; id: Type.TString; uiRequestId: Type.TOptional<Type.TString>; answerId: Type.TOptional<Type.TString>; cancelled: Type.TLiteral<true>; }>, Type.TObject<{ secret: Type.TOptional<Type.TBoolean>; type: Type.TLiteral<"extension_ui_response">; id: Type.TString; uiRequestId: Type.TOptional<Type.TString>; answerId: Type.TOptional<Type.TString>; answers: Type.TRecord<"^.*$", Type.TObject<{ selected: Type.TArray<Type.TString>; text: Type.TOptional<Type.TString>; }>>; comment: Type.TOptional<Type.TString>; }>]>; extension_ui_progress: Type.TObject<{ type: Type.TLiteral<"extension_ui_progress">; id: Type.TString; answers: Type.TOptional<Type.TRecord<"^.*$", Type.TObject<{ selected: Type.TArray<Type.TString>; text: Type.TOptional<Type.TString>; }>>>; comment: Type.TOptional<Type.TString>; sessionId: Type.TOptional<Type.TString>; }>; host_response: Type.TObject<{ type: Type.TLiteral<"host_response">; id: Type.TString; sessionId: Type.TOptional<Type.TString>; data: Type.TOptional<Type.TUnknown>; error: Type.TOptional<Type.TString>; }>; }; //# sourceMappingURL=method-classes-schema-host.d.ts.map