mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:20:42 +00:00
refactor: prune stale extension types
This commit is contained in:
@@ -2,14 +2,11 @@ import type {
|
||||
ClientRequest as GeneratedClientRequest,
|
||||
InitializeParams as GeneratedInitializeParams,
|
||||
InitializeResponse as GeneratedInitializeResponse,
|
||||
ServerNotification as GeneratedServerNotification,
|
||||
ServerRequest as GeneratedServerRequest,
|
||||
ServiceTier as GeneratedServiceTier,
|
||||
v2,
|
||||
} from "./protocol-generated/typescript/index.js";
|
||||
import type { JsonValue as GeneratedJsonValue } from "./protocol-generated/typescript/serde_json/JsonValue.js";
|
||||
|
||||
export type JsonPrimitive = null | boolean | number | string;
|
||||
export type JsonValue = GeneratedJsonValue;
|
||||
export type JsonObject = { [key: string]: JsonValue };
|
||||
export type CodexServiceTier = GeneratedServiceTier;
|
||||
@@ -65,29 +62,17 @@ export type CodexTurnStartParams = v2.TurnStartParams;
|
||||
|
||||
export type CodexSandboxPolicy = v2.SandboxPolicy;
|
||||
|
||||
export type CodexTurnSteerParams = v2.TurnSteerParams;
|
||||
|
||||
export type CodexTurnInterruptParams = {
|
||||
threadId: string;
|
||||
turnId: string;
|
||||
};
|
||||
|
||||
export type CodexTurnStartResponse = v2.TurnStartResponse;
|
||||
|
||||
export type CodexThread = v2.Thread;
|
||||
|
||||
export type CodexTurn = v2.Turn;
|
||||
|
||||
export type CodexThreadItem = v2.ThreadItem;
|
||||
|
||||
export type CodexKnownServerNotification = GeneratedServerNotification;
|
||||
export type CodexServerNotification = {
|
||||
method: string;
|
||||
params?: JsonValue;
|
||||
};
|
||||
|
||||
export type CodexKnownServerRequest = GeneratedServerRequest;
|
||||
|
||||
export type CodexDynamicToolCallParams = v2.DynamicToolCallParams;
|
||||
|
||||
export type CodexDynamicToolCallResponse = v2.DynamicToolCallResponse;
|
||||
@@ -123,10 +108,3 @@ export function isJsonObject(value: JsonValue | undefined): value is JsonObject
|
||||
export function isRpcResponse(message: RpcMessage): message is RpcResponse {
|
||||
return "id" in message && !("method" in message);
|
||||
}
|
||||
|
||||
export function coerceJsonObject(value: unknown): JsonObject | undefined {
|
||||
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
||||
return undefined;
|
||||
}
|
||||
return value as JsonObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user