feat: 完成大部分操作

This commit is contained in:
claude-code-best
2026-03-31 21:40:37 +08:00
parent 3d4cb096d1
commit c4d92178b7
22 changed files with 561 additions and 98 deletions

View File

@@ -11,6 +11,10 @@ if (typeof globalThis.MACRO === "undefined") {
VERSION_CHANGELOG: "",
};
}
// Build-time constants — normally replaced by Bun bundler at compile time
(globalThis as any).BUILD_TARGET = "external";
(globalThis as any).BUILD_ENV = "production";
(globalThis as any).INTERFACE_TYPE = "stdio";
// Bugfix for corepack auto-pinning, which adds yarnpkg to peoples' package.jsons
// eslint-disable-next-line custom-rules/no-top-level-side-effects

View File

@@ -98,7 +98,8 @@ export type SDKMessage = { type: string; [key: string]: unknown }
export type SDKUserMessage = { type: "user"; content: unknown; uuid: string; [key: string]: unknown }
export type SDKUserMessageReplay = SDKUserMessage
export type SDKAssistantMessage = { type: "assistant"; content: unknown; [key: string]: unknown }
export type SDKAssistantMessageError = { type: "assistant_error"; error: unknown; [key: string]: unknown }
export type SDKAssistantErrorMessage = { type: "assistant_error"; error: unknown; [key: string]: unknown }
export type SDKAssistantMessageError = 'authentication_failed' | 'billing_error' | 'rate_limit' | 'invalid_request' | 'server_error' | 'unknown' | 'max_output_tokens'
export type SDKPartialAssistantMessage = { type: "partial_assistant"; [key: string]: unknown }
export type SDKResultMessage = { type: "result"; [key: string]: unknown }
export type SDKResultSuccess = { type: "result_success"; [key: string]: unknown }