fix: add missing stubs and dependencies for compilation

- 22 missing source files: stub implementations for ant-only/internal modules
- 28 npm packages: OpenTelemetry, AWS SDK, Azure, fflate, yaml, sharp, etc.
- 2 internal package stubs: @ant/claude-for-chrome-mcp, @anthropic-ai/sandbox-runtime

Build: 5743 modules, 23.37MB bundled output
This commit is contained in:
Roger
2026-03-31 23:54:42 +08:00
parent 0723d9b0f4
commit dda2af29f7
29 changed files with 666537 additions and 21 deletions

800
bun.lock

File diff suppressed because it is too large Load Diff

658475
dist/main.js vendored Normal file

File diff suppressed because one or more lines are too long

7088
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -8,12 +8,35 @@
},
"dependencies": {
"@alcalzone/ansi-tokenize": "^0.1.0",
"@anthropic-ai/bedrock-sdk": "*",
"@anthropic-ai/foundry-sdk": "*",
"@anthropic-ai/mcpb": "*",
"@anthropic-ai/sdk": "^0.39.0",
"@anthropic-ai/vertex-sdk": "*",
"@aws-sdk/client-bedrock": "*",
"@aws-sdk/client-bedrock-runtime": "^3.700.0",
"@aws-sdk/client-sts": "*",
"@azure/identity": "*",
"@commander-js/extra-typings": "^13.0.0",
"@growthbook/growthbook": "^1.6.5",
"@modelcontextprotocol/sdk": "^1.0.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/api-logs": "*",
"@opentelemetry/exporter-logs-otlp-grpc": "*",
"@opentelemetry/exporter-logs-otlp-http": "*",
"@opentelemetry/exporter-logs-otlp-proto": "*",
"@opentelemetry/exporter-metrics-otlp-grpc": "*",
"@opentelemetry/exporter-metrics-otlp-http": "*",
"@opentelemetry/exporter-metrics-otlp-proto": "*",
"@opentelemetry/exporter-prometheus": "*",
"@opentelemetry/exporter-trace-otlp-grpc": "*",
"@opentelemetry/exporter-trace-otlp-http": "*",
"@opentelemetry/exporter-trace-otlp-proto": "*",
"@opentelemetry/resources": "*",
"@opentelemetry/sdk-logs": "*",
"@opentelemetry/sdk-metrics": "*",
"@opentelemetry/sdk-trace-base": "*",
"@opentelemetry/semantic-conventions": "*",
"ajv": "^8.17.0",
"asciichart": "^1.5.25",
"auto-bind": "^5.0.1",
@@ -23,10 +46,12 @@
"chokidar": "^4.0.0",
"cli-boxes": "^3.0.0",
"code-excerpt": "^4.0.0",
"color-diff-napi": "*",
"diff": "^7.0.0",
"emoji-regex": "^10.4.0",
"env-paths": "^3.0.0",
"execa": "^9.5.0",
"fflate": "^0.8.2",
"figures": "^6.0.0",
"fuse.js": "^7.0.0",
"get-east-asian-width": "^1.0.0",
@@ -40,6 +65,7 @@
"lodash-es": "^4.17.21",
"lru-cache": "^11.0.0",
"marked": "^15.0.0",
"modifiers-napi": "*",
"p-map": "^7.0.0",
"picomatch": "^4.0.0",
"proper-lockfile": "^4.1.2",
@@ -47,6 +73,7 @@
"react": "^19.0.0",
"react-reconciler": "^0.31.0",
"semver": "^7.6.0",
"sharp": "*",
"shell-quote": "^1.8.0",
"signal-exit": "^4.1.0",
"stack-utils": "^2.0.6",
@@ -62,6 +89,7 @@
"wrap-ansi": "^9.0.0",
"ws": "^8.18.0",
"xss": "^1.0.0",
"yaml": "^2.8.3",
"zod": "^3.23.0"
}
}
}

View File

@@ -0,0 +1 @@
export function launchAssistantSessionChooser(_args?: unknown): void {}

View File

@@ -0,0 +1 @@
export default null

View File

@@ -0,0 +1 @@
export function launchAssistantInstallWizard(_args?: unknown): void {}

View File

@@ -0,0 +1,4 @@
import type React from 'react'
export function launchSnapshotUpdateDialog(_args?: unknown): void {}
export function buildMergePrompt(_args?: unknown): string { return '' }

View File

@@ -0,0 +1,2 @@
// coreTypes generated stub
export {}

View File

@@ -0,0 +1,2 @@
// runtimeTypes stub
export {}

View File

@@ -0,0 +1,2 @@
// toolTypes stub
export {}

1
src/global.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
// global type declarations

1
src/ink/devtools.ts Normal file
View File

@@ -0,0 +1 @@
// devtools stub — actual connection handled by react-devtools-core at runtime

1
src/ink/global.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
// global type declarations

View File

@@ -0,0 +1,8 @@
export type CachedMCState = Record<string, unknown>
export type CacheEditsBlock = Record<string, unknown>
export function isCachedMicrocompactEnabled(): boolean { return false }
export function isModelSupportedForCacheEditing(_model: string): boolean { return false }
export function getCachedMCConfig(): Record<string, unknown> { return { supportedModels: [] } }
export function createCachedMCState(): CachedMCState { return {} }
export function resetCachedMCState(_state: CachedMCState): void {}

View File

@@ -0,0 +1,3 @@
export function snipCompactIfNeeded(_messages: unknown, _options?: unknown): unknown {
return null
}

View File

@@ -0,0 +1 @@
export {}

View File

@@ -0,0 +1,3 @@
# Verify Skill
Stub skill for compilation.

View File

@@ -0,0 +1,3 @@
# CLI Examples
Stub for compilation.

View File

@@ -0,0 +1,3 @@
# Server Examples
Stub for compilation.

View File

@@ -0,0 +1,25 @@
import type { z } from 'zod/v4'
export const REPLTool = {
name: 'REPLTool',
aliases: [],
searchHint: 'execute REPL commands',
async call() {
return { return_value: '', data: { result: [] } }
},
async description() {
return 'REPL tool'
},
inputSchema: {} as z.ZodType,
isConcurrencySafe() { return true },
isEnabled() { return false },
isReadOnly() { return true },
maxResultSizeChars: Infinity,
async checkPermissions() { return { result: true as const } },
async prompt() { return '' },
userFacingName() { return 'REPL' },
toAutoClassifierInput() { return '' },
mapToolResultToToolResultBlockParam(content: unknown, toolUseID: string) {
return { type: 'tool_result' as const, tool_use_id: toolUseID, content: '' }
},
}

View File

@@ -0,0 +1,25 @@
import type { z } from 'zod/v4'
export const SuggestBackgroundPRTool = {
name: 'SuggestBackgroundPR',
aliases: [],
searchHint: 'suggest background PR',
async call() {
return { return_value: '', data: {} }
},
async description() {
return 'Suggest background PR tool'
},
inputSchema: {} as z.ZodType,
isConcurrencySafe() { return true },
isEnabled() { return false },
isReadOnly() { return true },
maxResultSizeChars: 100000,
async checkPermissions() { return { result: true as const } },
async prompt() { return '' },
userFacingName() { return 'SuggestBackgroundPR' },
toAutoClassifierInput() { return '' },
mapToolResultToToolResultBlockParam(content: unknown, toolUseID: string) {
return { type: 'tool_result' as const, tool_use_id: toolUseID, content: '' }
},
}

View File

@@ -0,0 +1,3 @@
import type React from 'react'
export const TungstenLiveMonitor: React.FC = () => null

View File

@@ -0,0 +1,25 @@
import type { z } from 'zod/v4'
export const VerifyPlanExecutionTool = {
name: 'VerifyPlanExecution',
aliases: [],
searchHint: 'verify plan execution',
async call() {
return { return_value: '', data: {} }
},
async description() {
return 'Verify plan execution tool'
},
inputSchema: {} as z.ZodType,
isConcurrencySafe() { return true },
isEnabled() { return false },
isReadOnly() { return true },
maxResultSizeChars: 100000,
async checkPermissions() { return { result: true as const } },
async prompt() { return '' },
userFacingName() { return 'VerifyPlanExecution' },
toAutoClassifierInput() { return '' },
mapToolResultToToolResultBlockParam(content: unknown, toolUseID: string) {
return { type: 'tool_result' as const, tool_use_id: toolUseID, content: '' }
},
}

View File

@@ -0,0 +1,25 @@
import type { z } from 'zod/v4'
export const WorkflowTool = {
name: 'Workflow',
aliases: [],
searchHint: 'run workflow scripts',
async call() {
return { return_value: '', data: {} }
},
async description() {
return 'Workflow tool'
},
inputSchema: {} as z.ZodType,
isConcurrencySafe() { return true },
isEnabled() { return false },
isReadOnly() { return true },
maxResultSizeChars: 100000,
async checkPermissions() { return { result: true as const } },
async prompt() { return '' },
userFacingName() { return 'Workflow' },
toAutoClassifierInput() { return '' },
mapToolResultToToolResultBlockParam(content: unknown, toolUseID: string) {
return { type: 'tool_result' as const, tool_use_id: toolUseID, content: '' }
},
}

View File

@@ -0,0 +1 @@
export const WORKFLOW_TOOL_NAME = 'Workflow'

View File

@@ -0,0 +1,20 @@
export type FailedPersistence = {
path: string
error: string
}
export type PersistedFile = {
path: string
fileId: string
}
export type TurnStartTime = number
export type FilesPersistedEventData = {
filesCount: number
durationMs: number
}
export const DEFAULT_UPLOAD_CONCURRENCY = 4
export const FILE_COUNT_LIMIT = 100
export const OUTPUTS_SUBDIR = 'outputs'

View File

@@ -0,0 +1,3 @@
export function isInProtectedNamespace(_name?: string): boolean {
return false
}

View File

@@ -0,0 +1 @@
stub