Quellcode durchsuchen

Remove LICENSE, add disclaimer to README — research/educational use only

sachin1801 vor 3 Tagen
Ursprung
Commit
491dadc4b5

+ 451 - 0
AGENTS.md

@@ -0,0 +1,451 @@
+# Workbench CLI — Project Map
+
+> **This file must be kept up to date.** Whenever you add files, create stubs, extract new sources, or change the build — update the relevant section here. This is the single source of truth for what's in this repo and how it works.
+
+## How to Build & Run
+
+```bash
+bun install          # install dependencies
+bun run build        # bundles to dist/cli.js (~23MB)
+bun run typecheck    # currently fails: missing extracted/generated files + type drift
+bun dist/cli.js      # run the bundled CLI
+python3 -m http.server 8080 --directory docs  # preview the static documentation site
+```
+
+## Using with Agent SDK (in Tauri or other apps)
+
+```typescript
+import { query } from "@anthropic-ai/claude-agent-sdk";
+const response = query({
+  prompt: "your prompt",
+  options: {
+    pathToClaudeCodeExecutable: "/path/to/workbench/dist/cli.js",
+  },
+});
+```
+
+## Project Structure
+
+```
+Workbench/
+├── docs/                          # Static documentation site (hostable as GitHub Pages or any static host)
+│   ├── index.html                # Architecture, current state, cloud notes, and 20 improvements
+│   └── styles.css                # Styling for the docs site
+│
+├── dist/                          # Build output (gitignored)
+│   └── cli.js                     # Bundled CLI (23MB, single file)
+│
+├── src/                           # Main source (1,929 files) — leaked from Anthropic
+│   ├── main.tsx                   # CLI entrypoint — Commander.js parser, all flags
+│   ├── entrypoints/
+│   │   ├── cli.tsx                # Bootstrap — version check, fast-paths
+│   │   ├── init.ts                # Initialization — telemetry, config, auth
+│   │   ├── mcp.ts                 # MCP server entrypoint
+│   │   └── sdk/                   # Agent SDK types
+│   │       ├── coreSchemas.ts     # Zod schemas (source of truth for types)
+│   │       ├── coreTypes.ts       # Re-exports generated types
+│   │       ├── coreTypes.generated.ts  # [GENERATED] from coreSchemas.ts
+│   │       ├── runtimeTypes.ts    # [STUB] SDK runtime types
+│   │       ├── toolTypes.ts       # [STUB] SDK tool types
+│   │       └── settingsTypes.generated.ts  # [STUB] Settings types
+│   │
+│   ├── commands/                  # Slash commands (~50)
+│   │   ├── agents-platform/       # [STUB] Ant-only
+│   │   └── assistant/             # [STUB] Assistant wizard
+│   │
+│   ├── tools/                     # Agent tools (~40)
+│   │   ├── BashTool/              # Shell execution
+│   │   ├── FileEditTool/          # File editing
+│   │   ├── FileReadTool/          # File reading
+│   │   ├── FileWriteTool/         # File writing
+│   │   ├── GlobTool/              # File search
+│   │   ├── GrepTool/              # Content search
+│   │   ├── AgentTool/             # Subagent spawning
+│   │   ├── WebFetchTool/          # HTTP fetching
+│   │   ├── TungstenTool/          # [STUB] Ant-only debug tool
+│   │   ├── REPLTool/              # [STUB] Ant-only REPL
+│   │   ├── SuggestBackgroundPRTool/ # [STUB] Ant-only
+│   │   ├── VerifyPlanExecutionTool/ # [STUB] Env-gated
+│   │   └── WorkflowTool/          # [STUB] Feature-gated (WORKFLOW_SCRIPTS)
+│   │
+│   ├── components/                # React (Ink) UI components (~140)
+│   │   ├── agents/
+│   │   │   └── SnapshotUpdateDialog.tsx  # [STUB]
+│   │   ├── design-system/         # Theme, colors, tokens
+│   │   ├── LogoV2/                # Welcome screen, release notes
+│   │   ├── Message.tsx            # Message rendering
+│   │   ├── StructuredDiff/        # Syntax-highlighted diffs
+│   │   └── permissions/           # Permission approval dialogs
+│   │
+│   ├── screens/
+│   │   └── REPL.tsx               # Main interactive screen (2800+ lines)
+│   │
+│   ├── ink/                       # Custom Ink fork (terminal React renderer)
+│   │   ├── layout/                # Flexbox layout engine
+│   │   ├── components/            # Box, Text, ScrollBox, Button, etc.
+│   │   ├── hooks/                 # useInput, useStdin, useSelection, etc.
+│   │   ├── events/                # Click, keyboard, focus events
+│   │   ├── termio/                # Terminal I/O, ANSI parsing
+│   │   └── reconciler.ts          # React reconciler
+│   │
+│   ├── services/
+│   │   ├── api/                   # Anthropic API client, streaming, errors
+│   │   ├── mcp/                   # MCP client/server implementation
+│   │   ├── oauth/                 # OAuth flow
+│   │   ├── analytics/             # Telemetry, GrowthBook, DataDog
+│   │   ├── lsp/                   # Language Server Protocol
+│   │   ├── compact/               # Context compaction
+│   │   │   ├── snipCompact.ts     # [STUB] Feature-gated (HISTORY_SNIP)
+│   │   │   └── cachedMicrocompact.ts  # [STUB] Feature-gated
+│   │   ├── contextCollapse/       # [STUB] Not in leak
+│   │   ├── plugins/               # Plugin installation & management
+│   │   └── tools/                 # Tool execution (StreamingToolExecutor)
+│   │
+│   ├── native-ts/                 # Pure TypeScript ports of native modules
+│   │   ├── yoga-layout/           # Flexbox engine (port of Meta's Yoga)
+│   │   ├── color-diff/            # Syntax-highlighted diffs (port of Rust module)
+│   │   └── file-index/            # Fuzzy file search (port of nucleo)
+│   │
+│   ├── constants/
+│   │   ├── prompts.ts             # FULL system prompt — the actual instructions sent to the assistant runtime
+│   │   ├── oauth.ts               # OAuth config (client IDs, endpoints)
+│   │   └── product.ts             # Product constants
+│   │
+│   ├── utils/
+│   │   ├── autoUpdater.ts         # Version check [PATCHED — remote check disabled]
+│   │   ├── computerUse/           # Computer use integration layer
+│   │   │   └── executor.ts        # 22KB CLI executor — wraps Swift/Rust native modules
+│   │   ├── claudeInChrome/        # Chrome integration layer
+│   │   ├── sandbox/               # Sandbox adapter
+│   │   ├── settings/              # Settings system
+│   │   ├── model/                 # Model selection, aliases
+│   │   ├── auth.ts                # Authentication
+│   │   ├── hooks/                 # Hook execution engine (155 files total)
+│   │   │   ├── AsyncHookRegistry.ts    # Hook registration & lifecycle
+│   │   │   ├── execAgentHook.ts        # Agent-spawning hooks
+│   │   │   ├── execHttpHook.ts         # HTTP webhook hooks
+│   │   │   ├── execPromptHook.ts       # Prompt-based hooks
+│   │   │   ├── hookEvents.ts           # All hook event types
+│   │   │   └── hooksConfigManager.ts   # settings.json hook config
+│   │   ├── plugins/               # Plugin system (65+ files)
+│   │   │   ├── pluginLoader.ts         # Loads plugins from directories
+│   │   │   ├── loadPluginAgents.ts     # Agent definitions from plugins
+│   │   │   ├── loadPluginCommands.ts   # Slash commands from plugins
+│   │   │   ├── loadPluginHooks.ts      # Hooks from plugins
+│   │   │   ├── schemas.ts             # plugin.json schema validation
+│   │   │   └── marketplaceManager.ts  # Marketplace browsing/install
+│   │   ├── permissions/           # Permission & auto-mode classifier
+│   │   │   ├── yoloClassifier.ts  # 52KB — auto-mode LLM classifier logic
+│   │   │   ├── bashClassifier.ts  # Bash-specific classifier
+│   │   │   ├── classifierDecision.ts  # Safe tool allowlist
+│   │   │   ├── autoModeState.ts   # Auto-mode state management
+│   │   │   └── yolo-classifier-prompts/  # [MISSING] DCE'd by feature flag
+│   │   ├── protectedNamespace.ts  # [STUB] Ant-only
+│   │   └── filePersistence/
+│   │       └── types.ts           # [STUB]
+│   │
+│   ├── skills/                    # Built-in skills (23 files)
+│   │   ├── bundledSkills.ts       # Skill registry
+│   │   ├── loadSkillsDir.ts       # Load skills from directories
+│   │   └── bundled/               # 16 bundled skills (batch, claudeApi, debug, loop, etc.)
+│   │
+│   ├── assistant/
+│   │   ├── sessionHistory.ts      # Session history
+│   │   └── AssistantSessionChooser.tsx  # [STUB]
+│   │
+│   ├── vim/                       # Vim mode (motions, operators, text objects)
+│   ├── state/                     # App state management
+│   ├── hooks/                     # React hooks
+│   ├── types/
+│   │   └── connectorText.ts       # [STUB]
+│   ├── bridge/                    # Cloud session bridging
+│   ├── coordinator/               # Multi-agent coordinator
+│   ├── plugins/                   # Plugin system entry
+│   ├── bootstrap/                 # Bootstrap/startup state
+│   └── voice/                     # Voice mode
+│
+├── stubs/                         # Extracted proprietary source code and compatibility shims
+│   ├── @ant/                      # Private Anthropic packages (32 files)
+│   │   ├── computer-use-mcp/      # Computer Use MCP server
+│   │   │   ├── package.json       # Local package manifest for workspace installs
+│   │   │   └── src/
+│   │   │       ├── index.ts       # Exports
+│   │   │       ├── toolCalls.ts   # 137KB — full tool implementation
+│   │   │       ├── tools.ts       # Tool definitions
+│   │   │       ├── mcpServer.ts   # MCP server setup
+│   │   │       ├── types.ts       # All CU types
+│   │   │       ├── deniedApps.ts  # App blocklist
+│   │   │       ├── keyBlocklist.ts # Key combo blocklist
+│   │   │       ├── sentinelApps.ts # Sentinel app detection
+│   │   │       ├── imageResize.ts # Screenshot resizing
+│   │   │       ├── pixelCompare.ts # Click target validation
+│   │   │       ├── executor.ts    # [STUB] Native Swift/Rust bridge interface
+│   │   │       └── subGates.ts    # [STUB] Permission sub-gates
+│   │   │
+│   │   ├── claude-for-chrome-mcp/ # Chrome automation (8 source files)
+│   │   │   ├── package.json       # Local package manifest for workspace installs
+│   │   │   └── src/
+│   │   │       ├── index.ts       # Exports
+│   │   │       ├── bridgeClient.ts # 37KB — Chrome bridge via WebSocket
+│   │   │       ├── browserTools.ts # 25KB — browser tool definitions
+│   │   │       ├── mcpServer.ts   # MCP server
+│   │   │       ├── mcpSocketClient.ts # WebSocket client
+│   │   │       ├── mcpSocketPool.ts   # Connection pooling
+│   │   │       ├── toolCalls.ts   # Tool call handling
+│   │   │       └── types.ts       # Types
+│   │   │
+│   │   ├── computer-use-swift/    # macOS native bridge
+│   │   │   ├── package.json       # Local package manifest for workspace installs
+│   │   │   └── js/index.js        # JS loader for Swift binary
+│   │   │
+│   │   └── computer-use-input/    # Input device bridge
+│   │       ├── package.json       # Local package manifest for workspace installs
+│   │       └── js/index.js        # JS loader for Rust binary
+│   │
+│   ├── @anthropic-ai/            # Anthropic SDK sources (105+ files)
+│   │   ├── sandbox-runtime/       # Sandbox system (17 files, 180KB)
+│   │   │   ├── dist/
+│   │   │   │   ├── sandbox/
+│   │   │   │   │   ├── sandbox-manager.js    # 31KB — core orchestrator
+│   │   │   │   │   ├── sandbox-config.js     # Config/schema
+│   │   │   │   │   ├── sandbox-schemas.js    # Zod schemas
+│   │   │   │   │   ├── parent-proxy.js       # 17KB — parent process proxy
+│   │   │   │   │   ├── macos-sandbox-utils.js # 28KB — macOS Seatbelt profiles
+│   │   │   │   │   ├── linux-sandbox-utils.js # 42KB — Linux namespaces + seccomp
+│   │   │   │   │   ├── generate-seccomp-filter.js # 12KB — raw BPF bytecode gen
+│   │   │   │   │   ├── http-proxy.js         # HTTP egress proxy
+│   │   │   │   │   ├── socks-proxy.js        # SOCKS proxy
+│   │   │   │   │   └── sandbox-violation-store.js
+│   │   │   │   └── utils/
+│   │   │   │       └── config-loader.js      # Config file loader
+│   │   │   └── vendor/
+│   │   │       ├── seccomp-src/
+│   │   │       │   ├── apply-seccomp.c       # C — seccomp BPF loader
+│   │   │       │   └── seccomp-unix-block.c  # C — Unix socket blocker
+│   │   │       └── seccomp/                  # Precompiled binaries (arm64 + x64)
+│   │   │
+│   │   ├── mcpb/                  # MCP Bundle tools (11 files, 75KB)
+│   │   │   └── dist/
+│   │   │       ├── cli/           # pack.js, unpack.js, init.js (26KB scaffolder)
+│   │   │       ├── node/          # files.js, sign.js (12KB), validate.js
+│   │   │       └── shared/        # config.js, log.js
+│   │   │
+│   │   ├── sdk/                   # Anthropic SDK source (40+ files, 232KB)
+│   │   │   ├── client.mjs         # 28KB — main API client
+│   │   │   ├── resources/         # API resources (messages, models, batches, skills)
+│   │   │   ├── lib/
+│   │   │   │   ├── MessageStream.mjs     # 29KB — response streaming
+│   │   │   │   ├── BetaMessageStream.mjs # 31KB — beta streaming
+│   │   │   │   ├── tools/BetaToolRunner.mjs # 18KB — tool use loop
+│   │   │   │   ├── tools/CompactionControl.mjs # Context compaction
+│   │   │   │   └── parser.mjs           # Partial JSON streaming parser
+│   │   │   └── internal/          # Headers, auth, request handling
+│   │   │
+│   │   ├── bedrock-sdk/           # AWS Bedrock (12 files, 36KB)
+│   │   │   ├── client.mjs         # Bedrock API client
+│   │   │   └── core/auth.mjs      # SigV4 signing
+│   │   │
+│   │   ├── vertex-sdk/            # GCP Vertex (7 files, 13KB)
+│   │   │   └── client.mjs         # Vertex AI client with Google auth
+│   │   │
+│   │   └── foundry-sdk/           # Foundry (8 files, 16KB)
+│   │       └── client.mjs         # Foundry client with custom auth
+│   │
+│   └── downloads/                 # Additional packages from npm + GCS
+│       ├── tokenizer/             # Codex's BPE tokenizer
+│       │   ├── Codex.json        # 680KB — full vocabulary (64,739 tokens)
+│       │   ├── index.ts           # Tokenizer implementation
+│       │   └── tests/             # Test suite
+│       │
+│       ├── Codex-trace/          # OTEL trace viewer for Codex sessions
+│       │   ├── dist/server.cjs    # 838KB — trace server
+│       │   └── viewer/dist/       # Web UI (HTML + JS + CSS)
+│       │
+│       ├── claude-agent-sdk/      # Agent SDK package
+│       │   ├── sdk.mjs            # Main SDK — spawns CLI as subprocess
+│       │   ├── sdk.d.ts           # Full type definitions
+│       │   ├── bridge.mjs         # Session bridge protocol
+│       │   ├── browser-sdk.js     # Browser-compatible SDK
+│       │   ├── embed.js           # Embedding helpers
+│       │   └── manifest.json      # SDK manifest
+│       │
+│       └── official-plugins/      # Official plugin marketplace (from GCS bucket)
+│           └── marketplaces/Codex-plugins-official/
+│               ├── plugins/       # 32 official plugins
+│               │   ├── feature-dev/       # Feature dev with agents
+│               │   ├── code-review/       # Code review
+│               │   ├── plugin-dev/        # Plugin development tools
+│               │   ├── mcp-server-dev/    # MCP server builder
+│               │   ├── Codex-setup/ # Automation recommender
+│               │   ├── Codex-md-management/ # AGENTS.md improver
+│               │   ├── skill-creator/     # Skill creation
+│               │   ├── frontend-design/   # Frontend design generation
+│               │   ├── security-guidance/ # Security review
+│               │   ├── agent-sdk-dev/     # Agent SDK tools
+│               │   ├── hookify/           # Hook creation
+│               │   ├── commit-commands/   # Git commit helpers
+│               │   ├── playground/        # Plugin playground
+│               │   ├── ralph-loop/        # Looping agent
+│               │   ├── math-olympiad/     # Math problem solving
+│               │   ├── typescript-lsp/    # TypeScript LSP
+│               │   ├── pyright-lsp/       # Python LSP
+│               │   ├── rust-analyzer-lsp/ # Rust LSP
+│               │   ├── gopls-lsp/         # Go LSP
+│               │   └── ... (13 more LSP + output style plugins)
+│               └── external_plugins/  # 3rd-party plugins (asana, context7, discord)
+│
+│   ├── color-diff-napi/           # Local shim package for structured diff fallback
+│   │   ├── index.ts               # Re-exports the TypeScript diff implementation
+│   │   └── package.json           # Local package manifest for workspace installs
+│   └── modifiers-napi/            # Local shim package for modifier-key fallback
+│       ├── index.js               # No-op/native-compat shim
+│       └── package.json           # Local package manifest for workspace installs
+│
+├── shims/                         # Build-time shims
+│   ├── bun-bundle.ts              # Runtime shim for feature() — returns false
+│   ├── bun-bundle.d.ts            # Type declaration
+│   └── globals.d.ts               # MACRO.* type declarations
+│
+├── scripts/
+│   └── generate-sdk-types.ts      # Generates coreTypes.generated.ts from Zod schemas
+│
+├── vendor/                        # Native binaries from npm package (gitignored)
+│   ├── ripgrep/                   # rg binary (arm64/x64 for darwin/linux/win32)
+│   └── audio-capture/             # Voice capture native addon (all platforms)
+│
+├── build.ts                       # Bun build script
+├── package.json                   # Dependencies & scripts
+├── tsconfig.json                  # TypeScript config
+├── bun.lock                       # Bun lockfile
+├── .gitignore
+├── LICENSE                        # MIT
+├── README.md
+│
+├── cli.js.map                     # Original 57MB source map (gitignored, saved locally)
+└── sourcemap-extract.tar.gz       # Full extraction archive (gitignored, saved locally)
+```
+
+## What's Patched
+
+- `src/utils/autoUpdater.ts` — remote version check disabled (line 72: early return)
+- `build.ts` — standalone Workbench metadata injected (`0.1.0`, feedback channel, package URLs) and all feature() flags return false
+- `package.json` — renamed package/bin to `workbench-cli` / `workbench` and wired file-based stub dependencies for private/native modules
+- `src/entrypoints/cli.tsx` and `src/main.tsx` — public CLI/version/help branding switched to Workbench
+
+## What's Stubbed (marked [STUB] above)
+
+Files that exist but contain minimal placeholder code because:
+1. **Not in leak** — source files excluded from the original zip
+2. **Native bindings** — Rust/Swift code can't be in a source map (executor.ts, subGates.ts)
+3. **Generated files** — were generated by build scripts (coreTypes.generated.ts — we regenerated this)
+4. **Ant-only** — internal Anthropic tools gated by `USER_TYPE === 'ant'`
+
+## Feature Flags (all disabled)
+
+The source uses `feature('FLAG_NAME')` from `bun:bundle` for dead code elimination.
+Our shim returns `false` for all flags. Known flags:
+VOICE_MODE, COORDINATOR_MODE, KAIROS, PROACTIVE, ULTRAPLAN, BRIDGE_MODE,
+BG_SESSIONS, WORKFLOW_SCRIPTS, TRANSCRIPT_CLASSIFIER, TOKEN_BUDGET,
+HISTORY_SNIP, BUDDY, TEAMMEM, AGENT_TRIGGERS, WEB_BROWSER_TOOL,
+MESSAGE_ACTIONS, HOOK_PROMPTS, CACHED_MICROCOMPACT, CHICAGO_MCP,
+ABLATION_BASELINE, DUMP_SYSTEM_PROMPT
+
+## What Works vs What Doesn't
+
+### Current audited state (2026-03-31)
+- `bun install` succeeds in a fresh checkout
+- `bun run build` succeeds and emits `dist/cli.js`
+- `bun run typecheck` currently fails with 4,469 TypeScript errors, dominated by missing extracted/generated modules such as `src/types/message.ts`, `src/types/tools.ts`, `src/entrypoints/sdk/controlTypes.ts`, and related support files
+
+### Fully Working
+- All standard tools (Bash, Edit, Read, Write, Grep, Glob, WebFetch, WebSearch, Agent)
+- Terminal UI (full React/Ink REPL with custom flexbox layout)
+- OAuth authentication (same flow as official)
+- MCP server support
+- Slash commands (/help, /clear, /compact, /resume, etc.)
+- Session persistence and resume
+- Plugin system (full source: loading, agents, commands, hooks, marketplace)
+- Hook system (full source: async registry, agent/HTTP/prompt hooks, SSRF guard)
+- Skill system (full source: 16 bundled skills, skill loader, MCP skill builders)
+- Vim mode
+- Sandbox mode (real @anthropic-ai/sandbox-runtime from npm)
+- AWS Bedrock / GCP Vertex / Foundry backends (real SDKs from npm)
+- Agent SDK integration (set `pathToClaudeCodeExecutable` to `dist/cli.js`)
+- System prompt (full source in src/constants/prompts.ts)
+
+### Not Working
+- **Computer Use** — full logic extracted (137KB toolCalls.ts) but needs native
+  Swift/Rust binaries for screen capture and input. Could be rebuilt using macOS
+  system commands (screencapture, osascript, pbcopy/pbpaste). The 22KB executor
+  wrapper (src/utils/computerUse/executor.ts) shows the exact native API surface.
+- **Auto-mode classifier prompts** — the classifier logic is all there (52KB
+  yoloClassifier.ts) but the 3 prompt .txt files were DCE'd by the
+  TRANSCRIPT_CLASSIFIER feature flag. The code shows the expected format
+  (allow/soft_deny/environment rules with XML tags).
+- **Feature-flagged features** — voice, coordinator, ultraplan, etc. All disabled
+  via feature() shim. The source is there but many depend on backend infra.
+- **Ant-only tools** — TungstenTool, REPLTool, SuggestBackgroundPRTool. Internal
+  tools never available in external builds.
+
+## Source Extraction Summary
+
+| Source | Method | Files | What |
+|--------|--------|-------|------|
+| Original leak | .map file on R2 bucket | 1,929 | Full src/ directory |
+| npm source map | `cli.js.map` in `@anthropic-ai/Codex` | 4,756 total | Everything bundled into the CLI |
+| npm source map | Same file, `@ant/*` entries | 20 | Computer use + Chrome (private, not on npm) |
+| npm source map | Same file, `@anthropic-ai/*` entries | 105 | SDK, sandbox, mcpb, bedrock, vertex, foundry |
+| npm registry | `npm pack @anthropic-ai/tokenizer` | 15 | Codex's BPE tokenizer + 64,739-token vocabulary |
+| npm registry | `npm pack @anthropic-ai/Codex-trace` | 6 | OTEL session trace viewer |
+| npm registry | `npm pack @anthropic-ai/claude-agent-sdk` | 18 | Agent SDK source + types |
+| npm registry | `npm pack @anthropic-ai/sandbox-runtime` | 10 | Extra files not in source map (parent-proxy, seccomp C source) |
+| GCS bucket | `storage.googleapis.com/Codex-dist-*` | 334 | Official plugin marketplace (32 plugins) |
+| GCS bucket | Same bucket, `manifest.json` per version | 228 versions | Native binary manifests (all platforms, checksums) |
+
+## All @anthropic-ai npm Packages (as of 2026-03-31)
+
+| Package | On npm? | In our repo? | Status |
+|---------|---------|-------------|--------|
+| `@anthropic-ai/Codex` | Yes | src/ + stubs/ | **Full source extracted** |
+| `@anthropic-ai/claude-agent-sdk` | Yes | stubs/downloads/ | **Downloaded** |
+| `@anthropic-ai/sdk` | Yes | stubs/@anthropic-ai/sdk/ | **Source from map + npm install** |
+| `@anthropic-ai/bedrock-sdk` | Yes | stubs/@anthropic-ai/bedrock-sdk/ | **Source from map + npm install** |
+| `@anthropic-ai/vertex-sdk` | Yes | stubs/@anthropic-ai/vertex-sdk/ | **Source from map + npm install** |
+| `@anthropic-ai/foundry-sdk` | Yes | stubs/@anthropic-ai/foundry-sdk/ | **Source from map + npm install** |
+| `@anthropic-ai/sandbox-runtime` | Yes | stubs/@anthropic-ai/sandbox-runtime/ | **Source from map + npm + extras** |
+| `@anthropic-ai/mcpb` | Yes | stubs/@anthropic-ai/mcpb/ | **Source from map + npm install** |
+| `@anthropic-ai/tokenizer` | Yes | stubs/downloads/tokenizer/ | **Downloaded** |
+| `@anthropic-ai/Codex-trace` | Yes | stubs/downloads/Codex-trace/ | **Downloaded** |
+| `@ant/computer-use-mcp` | **No** (private) | stubs/@ant/computer-use-mcp/ | **Source from map** |
+| `@ant/claude-for-chrome-mcp` | **No** (private) | stubs/@ant/claude-for-chrome-mcp/ | **Source from map** |
+| `@ant/computer-use-swift` | **No** (private) | stubs/@ant/computer-use-swift/ | **JS loader only** (binary missing) |
+| `@ant/computer-use-input` | **No** (private) | stubs/@ant/computer-use-input/ | **JS loader only** (binary missing) |
+
+## Open GCS Bucket (no auth required)
+
+```
+https://storage.googleapis.com/Codex-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/
+├── Codex-releases/
+│   ├── {version}/                 # 228 versions (1.0.100 → 2.1.88)
+│   │   ├── manifest.json          # Platform checksums and sizes
+│   │   ├── darwin-arm64/Codex    # macOS ARM binary
+│   │   ├── darwin-x64/Codex     # macOS Intel binary
+│   │   ├── linux-arm64/Codex    # Linux ARM binary
+│   │   ├── linux-x64/Codex      # Linux x64 binary
+│   │   ├── win32-x64/Codex.exe  # Windows binary
+│   │   └── ...
+│   └── plugins/
+│       └── Codex-plugins-official/
+│           ├── latest             # Points to current hash
+│           └── {hash}.zip         # Plugin marketplace bundles
+└── test-uploads/                  # Just a test.txt
+```
+
+## Keeping This File Updated
+
+**When you modify this repo, update this file:**
+- Added a new stub? Add it to the structure tree with `[STUB]` tag
+- Extracted new source? Add to extraction summary table
+- Found a new npm package? Add to the packages table
+- Changed what works/doesn't? Update the status section
+- New build steps? Update "How to Build & Run"

+ 0 - 35
LICENSE

@@ -1,35 +0,0 @@
-DISCLAIMER & LICENSE
-
-Copyright (c) 2026
-
-IMPORTANT NOTICE:
-This repository is provided strictly for educational and research purposes only.
-It is intended for individuals who wish to study and learn from the Claude Code
-project architecture and implementation.
-
-This is NOT officially published, endorsed, or maintained by Anthropic or any of
-its affiliates. The source code contained herein was obtained from publicly
-available online sources (npm package source maps). No proprietary systems were
-breached or reverse-engineered beyond what was publicly accessible.
-
-USE AT YOUR OWN RISK.
-
-The authors and contributors of this repository make no claims of ownership over
-the original source code. All intellectual property rights belong to their
-respective owners.
-
-By using this repository, you acknowledge that:
-
-1. This is an unofficial, community-driven research resource.
-2. This is not endorsed by Anthropic.
-3. You will use this code solely for learning and research purposes.
-4. You assume all responsibility and risk associated with its use.
-5. No warranty of any kind is provided — express or implied.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 31 - 20
README.md

@@ -1,20 +1,33 @@
-# Claude Code — Rebuilt from Leaked Source
+# Claude Code — Source Study
 
-On March 31, 2026, the full source code of Anthropic's Claude Code CLI was leaked via a `.map` file exposed in their npm registry. This repo contains that source rebuilt into a runnable CLI.
+> **Disclaimer: This repository is NOT officially published, endorsed, or maintained by Anthropic.**
+>
+> The source code in this repository was obtained from **publicly available online sources** — specifically, a 57MB source map file (`cli.js.map`) shipped inside the `@anthropic-ai/claude-code` npm package (v2.1.88). No proprietary systems were breached.
+>
+> **All intellectual property rights belong to Anthropic.** This repository is provided solely for **educational and research purposes** — to study the architecture and implementation patterns of a production AI coding agent. Use it at your own risk. The maintainers of this repository claim no ownership over the code and assume no liability for its use.
+
+---
+
+This repository contains the reconstructed source of Anthropic's Claude Code — a Bun-based terminal coding assistant with a custom Ink UI, a large tool system, MCP integration, plugin loading, and cloud session flows.
 
 ## Quick Start
 
 **Prerequisites:** [Bun](https://bun.sh) v1.1+
 
 ```bash
-git clone https://github.com/fazxes/claude-code.git
-cd claude-code
+git clone <your-repo-url>
+cd <repo-dir>
 bun install
 bun run build
 bun dist/cli.js
 ```
 
-That's it. The CLI will launch and prompt you to authenticate via OAuth (same flow as the official Claude Code).
+Current state:
+
+- `bun install` works
+- `bun run build` works and emits `dist/cli.js`
+- `bun run typecheck` is not clean yet
+- Static project documentation lives in `docs/`
 
 ## Commands
 
@@ -24,18 +37,9 @@ bun dist/cli.js --help             # Show all options
 bun dist/cli.js --version          # Show version
 bun dist/cli.js -p "your prompt"   # Non-interactive mode (pipe-friendly)
 bun dist/cli.js auth login         # Authenticate
+python3 -m http.server 8080 --directory docs
 ```
 
-## How It Was Leaked
-
-[Chaofan Shou (@Fried_rice)](https://x.com/Fried_rice) discovered the leak:
-
-> **"Claude code source code has been leaked via a map file in their npm registry!"**
->
-> — [@Fried_rice, March 31, 2026](https://x.com/Fried_rice/status/2038894956459290963)
-
-The source map in the published npm package contained a reference to the full, unobfuscated TypeScript source, downloadable as a zip from Anthropic's R2 storage bucket.
-
 ## What's Inside
 
 - **~1,900 source files**, 512,000+ lines of TypeScript
@@ -68,7 +72,7 @@ src/
 
 ## What's Stubbed Out
 
-Some internal Anthropic features weren't included in the leak or are behind private packages. These are stubbed with no-ops:
+Some internal Anthropic features weren't included in the recovered sources or are behind private packages. These are stubbed with no-ops:
 
 - **Computer Use** (`@ant/computer-use-*`) — screen control tools
 - **Chrome Integration** (`@ant/claude-for-chrome-mcp`) — browser automation
@@ -76,17 +80,24 @@ Some internal Anthropic features weren't included in the leak or are behind priv
 - **TungstenTool, REPLTool** — internal-only tools
 - **Context Collapse** — internal compaction feature
 
-The core CLI, all standard tools (Bash, Edit, Read, Write, Grep, Glob, etc.), MCP support, and the full terminal UI work.
+The core architecture, standard tool surfaces, MCP support, and the full terminal UI are present in source. The repository is now buildable, but it still needs type cleanup and feature hardening before it can be treated as a stable release.
 
 ## Build Details
 
 The build script (`build.ts`) uses Bun's bundler to:
-1. Bundle 4,500+ modules into a single `dist/cli.js` (~21 MB)
+1. Bundle 4,500+ modules into a single `dist/cli.js` (~23 MB)
 2. Define `MACRO.*` build-time constants (version, feedback channel)
 3. Externalize optional native deps (`sharp`, `react-devtools-core`)
 
 Feature flags from `bun:bundle`'s `feature()` all return `false` — internal Anthropic features (voice mode, coordinator mode, etc.) are disabled.
 
-## License
+## Documentation
+
+- Static site: `docs/index.html`
+- Project map: `AGENTS.md`
+
+---
+
+## Disclaimer
 
-This is leaked proprietary source code from Anthropic. Use at your own discretion.
+This repository is **not affiliated with Anthropic** in any way. It exists purely as a research and learning resource. All code is the intellectual property of Anthropic. If you are a representative of Anthropic and would like this repository removed, please open an issue and it will be taken down immediately.

+ 8 - 5
build.ts

@@ -1,15 +1,15 @@
 #!/usr/bin/env bun
 /**
- * Build script for Claude Code from leaked source.
+ * Build script for the reconstructed Workbench CLI.
  *
  * Usage: bun build.ts
  */
 import { $ } from 'bun';
 
-const version = process.env.VERSION || '2.1.88';
+const version = process.env.VERSION || '0.1.0';
 const buildTime = new Date().toISOString();
 
-console.log(`Building Claude Code v${version}...`);
+console.log(`Building Workbench CLI v${version}...`);
 
 const result = await Bun.build({
   entrypoints: ['src/entrypoints/cli.tsx'],
@@ -19,10 +19,13 @@ const result = await Bun.build({
   define: {
     'MACRO.VERSION': JSON.stringify(version),
     'MACRO.BUILD_TIME': JSON.stringify(buildTime),
-    'MACRO.FEEDBACK_CHANNEL': JSON.stringify('#claude-code'),
+    'MACRO.FEEDBACK_CHANNEL': JSON.stringify('#workbench-cli'),
     'MACRO.ISSUES_EXPLAINER': JSON.stringify(
-      'report the issue at https://github.com/anthropics/claude-code/issues',
+      'report the issue in this repository issue tracker',
     ),
+    'MACRO.PACKAGE_URL': JSON.stringify('workbench-cli'),
+    'MACRO.NATIVE_PACKAGE_URL': JSON.stringify('workbench-cli-native'),
+    'MACRO.VERSION_CHANGELOG': JSON.stringify(''),
   },
   external: ['react-devtools-core', 'sharp'],
 });

+ 18 - 0
bun.lock

@@ -6,6 +6,10 @@
       "name": "claude-code",
       "dependencies": {
         "@alcalzone/ansi-tokenize": "^0.1.0",
+        "@ant/claude-for-chrome-mcp": "file:stubs/@ant/claude-for-chrome-mcp",
+        "@ant/computer-use-input": "file:stubs/@ant/computer-use-input",
+        "@ant/computer-use-mcp": "file:stubs/@ant/computer-use-mcp",
+        "@ant/computer-use-swift": "file:stubs/@ant/computer-use-swift",
         "@anthropic-ai/bedrock-sdk": "^0.26.4",
         "@anthropic-ai/claude-agent-sdk": "^0.1.0",
         "@anthropic-ai/foundry-sdk": "^0.2.3",
@@ -47,6 +51,7 @@
         "chokidar": "^4.0.0",
         "cli-boxes": "^3.0.0",
         "code-excerpt": "^4.0.0",
+        "color-diff-napi": "file:stubs/color-diff-napi",
         "commander": "12.1.0",
         "diff": "^7.0.0",
         "emoji-regex": "^10.4.0",
@@ -65,6 +70,7 @@
         "lodash-es": "^4.17.0",
         "lru-cache": "^11.0.0",
         "marked": "^15.0.0",
+        "modifiers-napi": "file:stubs/modifiers-napi",
         "p-map": "^7.0.0",
         "picomatch": "^4.0.0",
         "proper-lockfile": "^4.1.0",
@@ -113,6 +119,14 @@
   "packages": {
     "@alcalzone/ansi-tokenize": ["@alcalzone/ansi-tokenize@0.1.3", "", { "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^4.0.0" } }, "sha512-3yWxPTq3UQ/FY9p1ErPxIyfT64elWaMvM9lIHnaqpyft63tkxodF5aUElYHrdisWve5cETkh1+KBw1yJuW0aRw=="],
 
+    "@ant/claude-for-chrome-mcp": ["@ant/claude-for-chrome-mcp@file:stubs/@ant/claude-for-chrome-mcp", {}],
+
+    "@ant/computer-use-input": ["@ant/computer-use-input@file:stubs/@ant/computer-use-input", {}],
+
+    "@ant/computer-use-mcp": ["@ant/computer-use-mcp@file:stubs/@ant/computer-use-mcp", {}],
+
+    "@ant/computer-use-swift": ["@ant/computer-use-swift@file:stubs/@ant/computer-use-swift", {}],
+
     "@anthropic-ai/bedrock-sdk": ["@anthropic-ai/bedrock-sdk@0.26.4", "", { "dependencies": { "@anthropic-ai/sdk": ">=0.50.3 <1", "@aws-crypto/sha256-js": "^4.0.0", "@aws-sdk/client-bedrock-runtime": "^3.797.0", "@aws-sdk/credential-providers": "^3.796.0", "@smithy/eventstream-serde-node": "^2.0.10", "@smithy/fetch-http-handler": "^5.0.4", "@smithy/protocol-http": "^3.0.6", "@smithy/signature-v4": "^3.1.1", "@smithy/smithy-client": "^2.1.9", "@smithy/types": "^2.3.4", "@smithy/util-base64": "^2.0.0" } }, "sha512-0Z2NY3T2wnzT9esRit6BiWpQXvL+F2b3z3Z9in3mXh7MDf122rVi2bcPowQHmo9ITXAPJmv/3H3t0V1z3Fugfw=="],
 
     "@anthropic-ai/claude-agent-sdk": ["@anthropic-ai/claude-agent-sdk@0.1.77", "", { "optionalDependencies": { "@img/sharp-darwin-arm64": "^0.33.5", "@img/sharp-darwin-x64": "^0.33.5", "@img/sharp-linux-arm": "^0.33.5", "@img/sharp-linux-arm64": "^0.33.5", "@img/sharp-linux-x64": "^0.33.5", "@img/sharp-linuxmusl-arm64": "^0.33.5", "@img/sharp-linuxmusl-x64": "^0.33.5", "@img/sharp-win32-x64": "^0.33.5" }, "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" } }, "sha512-ZEjWQtkoB2MEY6K16DWMmF+8OhywAynH0m08V265cerbZ8xPD/2Ng2jPzbbO40mPeFSsMDJboShL+a3aObP0Jg=="],
@@ -579,6 +593,8 @@
 
     "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
 
+    "color-diff-napi": ["color-diff-napi@file:stubs/color-diff-napi", {}],
+
     "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
 
     "combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],
@@ -831,6 +847,8 @@
 
     "mime-types": ["mime-types@3.0.2", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A=="],
 
+    "modifiers-napi": ["modifiers-napi@file:stubs/modifiers-napi", {}],
+
     "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
 
     "mute-stream": ["mute-stream@1.0.0", "", {}, "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA=="],

+ 548 - 0
docs/index.html

@@ -0,0 +1,548 @@
+<!doctype html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <title>Workbench CLI Audit</title>
+    <meta
+      name="description"
+      content="Architecture, current state, cloud runtime notes, and a 20-item improvement backlog for the reconstructed Workbench CLI repository."
+    />
+    <link rel="stylesheet" href="./styles.css" />
+  </head>
+  <body>
+    <header class="hero">
+      <div class="hero-inner">
+        <p class="eyebrow">Static project documentation</p>
+        <h1>Workbench CLI</h1>
+        <p class="lede">
+          This site documents how the reconstructed Workbench CLI works, what
+          the cloud and remote-control surfaces do, what state the repo is in
+          right now, and the 20 highest-value improvements that would move it
+          closer to a maintainable release.
+        </p>
+        <div class="meta">
+          <span>Audit date: 2026-03-31</span>
+          <span>Source files in <code>src/</code>: 1,929</span>
+          <span>Extracted files in <code>stubs/</code>: 493</span>
+        </div>
+        <div class="status-grid">
+          <article class="status-card ok">
+            <h2>Install</h2>
+            <p><code>bun install</code> succeeds.</p>
+          </article>
+          <article class="status-card ok">
+            <h2>Build</h2>
+            <p>
+              <code>bun run build</code> succeeds and emits
+              <code>dist/cli.js</code>.
+            </p>
+          </article>
+          <article class="status-card warn">
+            <h2>Typecheck</h2>
+            <p>
+              <code>bun run typecheck</code> reports 4,469 TypeScript errors in
+              this checkout.
+            </p>
+          </article>
+          <article class="status-card info">
+            <h2>Cloud Logic</h2>
+            <p>
+              Remote control, teleport, direct connect, and managed settings
+              are all materially implemented.
+            </p>
+          </article>
+        </div>
+      </div>
+    </header>
+
+    <div class="page">
+      <aside class="toc">
+        <h2>Contents</h2>
+        <nav>
+          <a href="#overview">Overview</a>
+          <a href="#flow">How it works</a>
+          <a href="#files">Main files</a>
+          <a href="#cloud">Cloud architecture</a>
+          <a href="#state">Current state</a>
+          <a href="#improvements">20 improvements</a>
+          <a href="#hosting">Hosting</a>
+        </nav>
+      </aside>
+
+      <main class="content">
+        <section id="overview" class="panel">
+          <h2>Overview</h2>
+          <p>
+            This repository is a reconstructed agentic CLI codebase built
+            around Bun, React, a custom Ink fork, a large tool system, MCP
+            integration, and several cloud-facing session flows. The central
+            runtime is real and substantial: there is enough code here to study
+            architecture, trace the execution path, and understand how local,
+            remote, and teleported sessions are meant to behave.
+          </p>
+          <p>
+            The repo is not in release shape. The biggest gaps are missing
+            generated or extracted source files, partial native/private shims,
+            and heavy type drift between the recovered source and the
+            dependency versions currently installed.
+          </p>
+          <div class="summary-grid">
+            <article>
+              <h3>Architecture completeness</h3>
+              <p>High. Most of the core execution, UI, tools, and cloud flows are present.</p>
+            </article>
+            <article>
+              <h3>Build integrity</h3>
+              <p>Medium. A fresh install now produces a working bundle, but the fallback shim layer is still fragile.</p>
+            </article>
+            <article>
+              <h3>Type integrity</h3>
+              <p>Low. The checkout currently fails typecheck at scale.</p>
+            </article>
+            <article>
+              <h3>Cloud feature depth</h3>
+              <p>Medium. Remote-control and teleport logic are real, but the release surface is incomplete.</p>
+            </article>
+          </div>
+        </section>
+
+        <section id="flow" class="panel">
+          <h2>How it works</h2>
+          <ol class="step-list">
+            <li>
+              <strong>Build stage.</strong> <code>build.ts</code> bundles
+              <code>src/entrypoints/cli.tsx</code>, injects a small
+              <code>MACRO</code> set, and relies on <code>shims/bun-bundle.ts</code>
+              to disable all feature flags by returning <code>false</code>.
+            </li>
+            <li>
+              <strong>CLI bootstrap.</strong> <code>src/entrypoints/cli.tsx</code>
+              handles fast paths such as version printing and special entrypoints,
+              then hands control to <code>src/main.tsx</code>.
+            </li>
+            <li>
+              <strong>Initialization.</strong> <code>src/entrypoints/init.ts</code>
+              turns on config loading, safe environment variables, TLS and proxy
+              setup, telemetry bootstrapping, scratchpad setup, and cleanup hooks.
+            </li>
+            <li>
+              <strong>Context collection.</strong> <code>src/context.ts</code>
+              prepares system and user context, including git state snapshots and
+              <code>CLAUDE.md</code> memory injection.
+            </li>
+            <li>
+              <strong>Conversation engine.</strong> <code>src/QueryEngine.ts</code>
+              owns turn lifecycle, message state, usage, and SDK-facing session
+              behavior. <code>src/query.ts</code> runs the actual streaming loop.
+            </li>
+            <li>
+              <strong>Model and tool orchestration.</strong>
+              <code>src/services/api/claude.ts</code> streams model responses,
+              while <code>src/services/tools/StreamingToolExecutor.ts</code> and
+              <code>src/services/tools/toolOrchestration.ts</code> execute tool
+              calls with permission checks and concurrency rules.
+            </li>
+            <li>
+              <strong>Terminal UI.</strong> <code>src/replLauncher.tsx</code>
+              mounts <code>src/screens/REPL.tsx</code>, which is the main full
+              screen interface built on top of the custom Ink implementation in
+              <code>src/ink/</code>.
+            </li>
+            <li>
+              <strong>Extensibility.</strong> Slash commands come from
+              <code>src/commands.ts</code>, tools from <code>src/tools.ts</code>,
+              MCP servers from <code>src/services/mcp/</code>, plugins from
+              <code>src/utils/plugins/</code>, and skills from
+              <code>src/skills/</code>.
+            </li>
+            <li>
+              <strong>Cloud and remote execution.</strong> Remote-control,
+              teleport, direct connect, and session transport are split across
+              <code>src/bridge/</code>, <code>src/remote/</code>,
+              <code>src/server/</code>, and <code>src/utils/teleport.tsx</code>.
+            </li>
+          </ol>
+        </section>
+
+        <section id="files" class="panel">
+          <h2>Main files at a glance</h2>
+          <table>
+            <thead>
+              <tr>
+                <th>File</th>
+                <th>Role</th>
+                <th>Why it matters</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr>
+                <td><code>build.ts</code></td>
+                <td>Bundle entry and macro injection</td>
+                <td>Defines what ships and what feature-gated code survives.</td>
+              </tr>
+              <tr>
+                <td><code>src/entrypoints/cli.tsx</code></td>
+                <td>Fast-path bootstrap</td>
+                <td>Decides whether the process becomes the CLI, a bridge, or a special worker.</td>
+              </tr>
+              <tr>
+                <td><code>src/main.tsx</code></td>
+                <td>Main runtime coordinator</td>
+                <td>Registers commands, parses options, handles resume, teleport, and remote sessions.</td>
+              </tr>
+              <tr>
+                <td><code>src/entrypoints/init.ts</code></td>
+                <td>Config, auth, network, telemetry init</td>
+                <td>Most cross-cutting startup side effects live here.</td>
+              </tr>
+              <tr>
+                <td><code>src/context.ts</code></td>
+                <td>Prompt context builder</td>
+                <td>Injects git and memory context into every session.</td>
+              </tr>
+              <tr>
+                <td><code>src/QueryEngine.ts</code></td>
+                <td>Per-session execution engine</td>
+                <td>Holds state across turns for SDK and future non-REPL usage.</td>
+              </tr>
+              <tr>
+                <td><code>src/query.ts</code></td>
+                <td>Streaming query loop</td>
+                <td>Runs model sampling, tool execution, retries, and compaction behavior.</td>
+              </tr>
+              <tr>
+                <td><code>src/services/api/claude.ts</code></td>
+                <td>Model request layer</td>
+                <td>Converts tools, context, betas, and auth into model calls.</td>
+              </tr>
+              <tr>
+                <td><code>src/services/api/client.ts</code></td>
+                <td>Provider client factory</td>
+                <td>Creates Anthropic, Bedrock, Foundry, or Vertex clients.</td>
+              </tr>
+              <tr>
+                <td><code>src/services/tools/StreamingToolExecutor.ts</code></td>
+                <td>Streaming tool runner</td>
+                <td>Controls tool concurrency, cancellation, and result ordering.</td>
+              </tr>
+              <tr>
+                <td><code>src/screens/REPL.tsx</code></td>
+                <td>Main interactive UI</td>
+                <td>Largest single UI file and the center of operator experience.</td>
+              </tr>
+              <tr>
+                <td><code>src/services/mcp/client.ts</code></td>
+                <td>MCP transport and tool binding</td>
+                <td>Connects external MCP servers into the tool layer.</td>
+              </tr>
+              <tr>
+                <td><code>src/utils/plugins/pluginLoader.ts</code></td>
+                <td>Plugin discovery and loading</td>
+                <td>Owns marketplace, cache, versioning, and local plugin resolution.</td>
+              </tr>
+              <tr>
+                <td><code>src/skills/loadSkillsDir.ts</code></td>
+                <td>Skill loader</td>
+                <td>Bridges markdown skill files into executable prompt commands.</td>
+              </tr>
+              <tr>
+                <td><code>src/remote/RemoteSessionManager.ts</code></td>
+                <td>Remote session controller</td>
+                <td>Handles cloud session messaging and permission prompts.</td>
+              </tr>
+              <tr>
+                <td><code>src/bridge/bridgeMain.ts</code></td>
+                <td>Remote-control bridge supervisor</td>
+                <td>Runs long-lived environment registration and work polling.</td>
+              </tr>
+              <tr>
+                <td><code>src/utils/teleport.tsx</code></td>
+                <td>Teleport flow</td>
+                <td>Creates or resumes sessions across machines and repositories.</td>
+              </tr>
+            </tbody>
+          </table>
+        </section>
+
+        <section id="cloud" class="panel">
+          <h2>Cloud and remote architecture</h2>
+          <p>
+            The cloud-facing part of the repo is not a single subsystem. It is a
+            stack of session transport, bridge control, and state handoff layers.
+          </p>
+          <pre class="diagram">Local CLI
+  |
+  +-- main.tsx
+  |     |
+  |     +-- REPL / QueryEngine / tools / MCP
+  |
+  +-- Remote session path
+  |     |
+  |     +-- remote/RemoteSessionManager.ts
+  |     +-- remote/SessionsWebSocket.ts
+  |     +-- remote/sdkMessageAdapter.ts
+  |
+  +-- Direct connect path
+  |     |
+  |     +-- server/directConnectManager.ts
+  |
+  +-- Remote-control bridge path
+  |     |
+  |     +-- bridge/bridgeMain.ts
+  |     +-- bridge/createSession.ts
+  |     +-- bridge/replBridge.ts
+  |
+  +-- Teleport path
+        |
+        +-- utils/teleport.tsx
+        +-- utils/teleport/api.ts
+        +-- services/api/sessionIngress.ts</pre>
+          <div class="summary-grid">
+            <article>
+              <h3>Remote session</h3>
+              <p>
+                Used when the REPL attaches to a cloud session. Messages come
+                over WebSocket and are adapted back into local REPL message types.
+              </p>
+            </article>
+            <article>
+              <h3>Direct connect</h3>
+              <p>
+                A simpler WebSocket path that forwards structured SDK messages
+                and permission requests directly to a remote endpoint.
+              </p>
+            </article>
+            <article>
+              <h3>Remote control bridge</h3>
+              <p>
+                A long-running environment bridge that polls for work, spawns or
+                resumes sessions, heartbeats them, and keeps web/mobile control alive.
+              </p>
+            </article>
+            <article>
+              <h3>Teleport</h3>
+              <p>
+                A session handoff path that validates git state, creates or
+                resumes remote sessions, and restores the branch or transcript.
+              </p>
+            </article>
+            <article>
+              <h3>Managed settings</h3>
+              <p>
+                Enterprise settings can be fetched remotely and applied before
+                other systems initialize, which affects policy, MCP, and auth.
+              </p>
+            </article>
+            <article>
+              <h3>MCP</h3>
+              <p>
+                MCP is the extension spine. The client layer supports stdio,
+                SSE, streamable HTTP, WebSocket, and SDK in-process transports.
+              </p>
+            </article>
+          </div>
+        </section>
+
+        <section id="state" class="panel">
+          <h2>Current state</h2>
+          <div class="summary-grid">
+            <article>
+              <h3>What is solid</h3>
+              <p>
+                The repo contains real core logic for startup, REPL rendering,
+                query execution, tool orchestration, MCP integration, plugin
+                loading, skills, auth, and cloud session flows.
+              </p>
+            </article>
+            <article>
+              <h3>What is incomplete</h3>
+              <p>
+                Several generated or extracted files are missing, some native or
+                private integrations only have compatibility shims, and the
+                type surface is out of sync with the installed dependency graph.
+              </p>
+            </article>
+            <article>
+              <h3>What is intentionally disabled</h3>
+              <p>
+                All feature flags are forced off by <code>shims/bun-bundle.ts</code>,
+                so internal or Anthropic-only paths stay dead unless they are
+                restored deliberately.
+              </p>
+            </article>
+            <article>
+              <h3>Release readiness</h3>
+              <p>
+                This is now a buildable developer artifact, not a production
+                release. It is useful for study, customization, and targeted
+                salvage, but not for shipping unchanged.
+              </p>
+            </article>
+          </div>
+
+          <h3>Verification snapshot</h3>
+          <ul class="checklist">
+            <li><code>bun install</code> passed.</li>
+            <li>
+              <code>bun run build</code> passed after wiring local file-based
+              stub packages for <code>@ant/claude-for-chrome-mcp</code>,
+              <code>@ant/computer-use-*</code>, <code>color-diff-napi</code>,
+              and <code>modifiers-napi</code>.
+            </li>
+            <li>
+              <code>bun run typecheck</code> failed with 4,469 TypeScript
+              errors.
+            </li>
+            <li>
+              The largest error families were:
+              <code>TS7006</code> (2,087), <code>TS2307</code> (535),
+              <code>TS2339</code> (470), and <code>TS2305</code> (410).
+            </li>
+            <li>
+              The most common missing-module failures were
+              <code>../../types/message.js</code> (81),
+              <code>../types/message.js</code> (71), <code>./types.js</code> (51),
+              <code>src/types/message.js</code> (20), and
+              <code>../../types/tools.js</code> (15).
+            </li>
+          </ul>
+        </section>
+
+        <section id="improvements" class="panel">
+          <h2>20 improvements</h2>
+          <ol class="improvement-list">
+            <li>
+              <strong>P0: Add smoke coverage for the local stub package layer.</strong>
+              The bundle now resolves the private and native placeholder modules,
+              but the stubs are hand-maintained and can drift from the import
+              surface expected by the runtime.
+            </li>
+            <li>
+              <strong>P0: Replace fallback native shims with explicit capability detection.</strong>
+              <code>color-diff-napi</code> and <code>modifiers-napi</code> now
+              resolve, but the current placeholders silently degrade behavior.
+              The runtime should announce unavailable features and select TS
+              fallbacks intentionally.
+            </li>
+            <li>
+              <strong>P0: Generate and commit <code>src/entrypoints/sdk/controlTypes.ts</code>.</strong>
+              The code imports <code>./sdk/controlTypes.js</code> from many places,
+              but only <code>controlSchemas.ts</code> exists. The protocol surface is
+              incomplete without the generated types.
+            </li>
+            <li>
+              <strong>P0: Restore <code>src/types/message.ts</code>.</strong>
+              Message types are imported all over the runtime, UI, and cloud
+              layers. Their absence alone causes a large fraction of the typecheck failures.
+            </li>
+            <li>
+              <strong>P0: Restore <code>src/types/tools.ts</code> and related shared type files.</strong>
+              Tool progress and transport types are missing, which breaks tool UIs,
+              structured IO, and process-user-input helpers.
+            </li>
+            <li>
+              <strong>P0: Restore or remove other dangling shared modules.</strong>
+              Missing files such as <code>src/utils/secureStorage/types.ts</code>,
+              assistant helpers, and transport helper files should either be recreated
+              or fully compiled out of the external build.
+            </li>
+            <li>
+              <strong>P0: Finish or fully fence off <code>contextCollapse</code>.</strong>
+              Only <code>src/services/contextCollapse/index.ts</code> exists, but the
+              repo still imports <code>operations.js</code> and <code>persist.js</code>.
+              That makes the feature half-stubbed and half-live.
+            </li>
+            <li>
+              <strong>P1: Decide whether the standalone release metadata should stay and wire it to a real distribution flow.</strong>
+              The build now defines <code>MACRO.PACKAGE_URL</code>,
+              <code>MACRO.NATIVE_PACKAGE_URL</code>, and
+              <code>MACRO.VERSION_CHANGELOG</code>, but they still point to a
+              placeholder release story instead of a maintained updater pipeline.
+            </li>
+            <li>
+              <strong>P1: Decide whether version enforcement should exist and implement it cleanly.</strong>
+              <code>src/utils/autoUpdater.ts</code> short-circuits
+              <code>assertMinVersion()</code> immediately, which makes the rest of the
+              minimum-version path dead code.
+            </li>
+            <li>
+              <strong>P1: Pin a dependency set that matches the leaked source.</strong>
+              The current checkout shows type incompatibilities in OpenTelemetry,
+              MCP, and other libraries. A compatibility matrix or lockfile audit is needed.
+            </li>
+            <li>
+              <strong>P1: Handle <code>react/compiler-runtime</code> intentionally.</strong>
+              Roughly 395 files import the compiler runtime helper. The repo needs
+              either the right typings and transform pipeline, or a conversion back
+              to normal authored TSX.
+            </li>
+            <li>
+              <strong>P1: Split <code>src/main.tsx</code> into domain modules.</strong>
+              It currently mixes CLI parsing, bootstrapping, remote flows, resume
+              logic, and command wiring in one huge file, which slows onboarding
+              and raises change risk.
+            </li>
+            <li>
+              <strong>P1: Split <code>src/screens/REPL.tsx</code> into smaller view-model slices.</strong>
+              The REPL is the operator surface and currently does too much:
+              messaging, tasks, permission dialogs, bridge state, IDE hooks, and notifications.
+            </li>
+            <li>
+              <strong>P1: Unify the cloud transport layer.</strong>
+              <code>RemoteSessionManager</code>, <code>SessionsWebSocket</code>,
+              <code>DirectConnectSessionManager</code>, and the bridge stack all
+              solve overlapping connection and message-routing problems differently.
+            </li>
+            <li>
+              <strong>P1: Add reconnect, heartbeat, and backoff to direct connect.</strong>
+              The direct-connect manager is much thinner than the bridge and CCR
+              session managers. It should share the same resilience behavior.
+            </li>
+            <li>
+              <strong>P1: Consolidate tool orchestration.</strong>
+              The repo has both <code>StreamingToolExecutor</code> and
+              <code>toolOrchestration.ts</code>. The concurrency and cancellation
+              behavior should come from one path so fixes land once.
+            </li>
+            <li>
+              <strong>P2: Cache heavyweight provider clients.</strong>
+              <code>src/services/api/client.ts</code> already carries a TODO about
+              reusing <code>GoogleAuth</code>. The same mindset should apply to other
+              expensive auth and provider objects.
+            </li>
+            <li>
+              <strong>P2: Add CI gates that reflect reality.</strong>
+              The repo needs automated install, build, typecheck, and smoke tests.
+              Right now the current failure set is easy to miss until someone tries a fresh checkout.
+            </li>
+            <li>
+              <strong>P2: Add regression tests for remote-control, teleport, MCP, and permissions.</strong>
+              Those are the highest-risk paths because they mix auth, filesystem state,
+              session transport, and tool execution.
+            </li>
+            <li>
+              <strong>P2: Make the public-facing docs and README operational instead of historical.</strong>
+              The current README is leak-centered. The repo needs a product-facing
+              explanation of architecture, setup, cloud features, and limitations.
+            </li>
+          </ol>
+        </section>
+
+        <section id="hosting" class="panel">
+          <h2>Hosting this documentation</h2>
+          <p>
+            This site is plain static HTML and CSS. You can host it as-is from
+            the repository <code>/docs</code> directory with GitHub Pages, Netlify,
+            Cloudflare Pages, S3, or any static web server.
+          </p>
+          <ul class="checklist">
+            <li>GitHub Pages: publish the repository <code>docs/</code> folder.</li>
+            <li>Local preview: <code>python3 -m http.server 8080 --directory docs</code>.</li>
+            <li>No build step is required for the documentation site itself.</li>
+          </ul>
+        </section>
+      </main>
+    </div>
+  </body>
+</html>

+ 331 - 0
docs/styles.css

@@ -0,0 +1,331 @@
+:root {
+  --bg: #f5f1e8;
+  --panel: #fffdf7;
+  --panel-strong: #f0eadc;
+  --ink: #1d2433;
+  --muted: #586174;
+  --line: #d8ccb4;
+  --accent: #0f766e;
+  --accent-soft: #d2efe9;
+  --warn: #b45309;
+  --warn-soft: #fff1db;
+  --ok: #166534;
+  --ok-soft: #e3f4e6;
+  --info: #1d4ed8;
+  --info-soft: #dde9ff;
+  --shadow: 0 14px 40px rgba(44, 37, 21, 0.08);
+  --max: 1180px;
+}
+
+* {
+  box-sizing: border-box;
+}
+
+html {
+  scroll-behavior: smooth;
+}
+
+body {
+  margin: 0;
+  color: var(--ink);
+  background:
+    radial-gradient(circle at top left, rgba(15, 118, 110, 0.09), transparent 28rem),
+    radial-gradient(circle at top right, rgba(180, 83, 9, 0.09), transparent 32rem),
+    var(--bg);
+  font:
+    16px/1.65 "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino,
+    "Times New Roman", serif;
+}
+
+a {
+  color: inherit;
+}
+
+code {
+  font-family:
+    "SFMono-Regular", ui-monospace, "Cascadia Code", "Source Code Pro", Menlo,
+    Consolas, monospace;
+  font-size: 0.92em;
+  background: rgba(29, 36, 51, 0.06);
+  padding: 0.1rem 0.32rem;
+  border-radius: 0.3rem;
+}
+
+.hero {
+  padding: 4.5rem 1.5rem 2rem;
+}
+
+.hero-inner,
+.page {
+  width: min(var(--max), calc(100vw - 2rem));
+  margin: 0 auto;
+}
+
+.eyebrow {
+  margin: 0 0 0.6rem;
+  text-transform: uppercase;
+  letter-spacing: 0.16em;
+  font-size: 0.78rem;
+  color: var(--accent);
+  font-weight: 700;
+}
+
+h1,
+h2,
+h3 {
+  margin: 0;
+  line-height: 1.1;
+  font-weight: 700;
+}
+
+h1 {
+  font-size: clamp(2.8rem, 6vw, 5.2rem);
+  max-width: 12ch;
+}
+
+h2 {
+  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
+  margin-bottom: 1rem;
+}
+
+h3 {
+  font-size: 1.05rem;
+  margin-bottom: 0.55rem;
+}
+
+.lede {
+  max-width: 58rem;
+  font-size: 1.12rem;
+  color: var(--muted);
+  margin: 1rem 0 1.25rem;
+}
+
+.meta {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 0.75rem;
+  color: var(--muted);
+  margin-bottom: 1.5rem;
+}
+
+.meta span {
+  background: rgba(255, 255, 255, 0.66);
+  border: 1px solid rgba(216, 204, 180, 0.85);
+  border-radius: 999px;
+  padding: 0.4rem 0.75rem;
+}
+
+.status-grid,
+.summary-grid {
+  display: grid;
+  gap: 1rem;
+  grid-template-columns: repeat(4, minmax(0, 1fr));
+}
+
+.status-card,
+.summary-grid article,
+.panel {
+  background: var(--panel);
+  border: 1px solid var(--line);
+  border-radius: 1.2rem;
+  box-shadow: var(--shadow);
+}
+
+.status-card {
+  padding: 1.1rem 1.15rem 1.2rem;
+}
+
+.status-card h2 {
+  font-size: 0.98rem;
+  margin-bottom: 0.45rem;
+}
+
+.status-card p,
+.summary-grid p,
+.panel p,
+.panel li {
+  color: var(--muted);
+}
+
+.status-card.ok {
+  background: linear-gradient(180deg, var(--ok-soft), var(--panel));
+}
+
+.status-card.warn {
+  background: linear-gradient(180deg, var(--warn-soft), var(--panel));
+}
+
+.status-card.info {
+  background: linear-gradient(180deg, var(--info-soft), var(--panel));
+}
+
+.page {
+  display: grid;
+  grid-template-columns: 15rem minmax(0, 1fr);
+  gap: 1.25rem;
+  padding: 0 0 3rem;
+}
+
+.toc {
+  position: sticky;
+  top: 1rem;
+  align-self: start;
+  background: rgba(255, 253, 247, 0.82);
+  border: 1px solid var(--line);
+  border-radius: 1rem;
+  padding: 1rem;
+  backdrop-filter: blur(10px);
+}
+
+.toc h2 {
+  font-size: 1rem;
+  margin-bottom: 0.8rem;
+}
+
+.toc nav {
+  display: grid;
+  gap: 0.45rem;
+}
+
+.toc a {
+  text-decoration: none;
+  color: var(--muted);
+  padding: 0.3rem 0;
+}
+
+.toc a:hover {
+  color: var(--accent);
+}
+
+.content {
+  display: grid;
+  gap: 1.25rem;
+}
+
+.panel {
+  padding: 1.35rem 1.4rem 1.5rem;
+}
+
+.summary-grid {
+  margin-top: 1rem;
+  grid-template-columns: repeat(2, minmax(0, 1fr));
+}
+
+.summary-grid article {
+  padding: 1rem 1.05rem 1.1rem;
+}
+
+.step-list,
+.checklist,
+.improvement-list {
+  margin: 0;
+  padding-left: 1.25rem;
+}
+
+.step-list li,
+.checklist li,
+.improvement-list li {
+  margin: 0 0 0.9rem;
+}
+
+.improvement-list li {
+  padding-left: 0.2rem;
+}
+
+.diagram {
+  margin: 1rem 0;
+  overflow-x: auto;
+  background: #18212f;
+  color: #e7f0ff;
+  border-radius: 1rem;
+  padding: 1rem 1.1rem;
+  font:
+    0.88rem/1.55 "SFMono-Regular", ui-monospace, "Cascadia Code",
+    "Source Code Pro", Menlo, Consolas, monospace;
+}
+
+table {
+  width: 100%;
+  border-collapse: collapse;
+  font-size: 0.97rem;
+}
+
+thead th {
+  text-align: left;
+  padding: 0.85rem 0.7rem;
+  border-bottom: 1px solid var(--line);
+  color: var(--ink);
+}
+
+tbody td {
+  vertical-align: top;
+  padding: 0.85rem 0.7rem;
+  border-bottom: 1px solid rgba(216, 204, 180, 0.7);
+  color: var(--muted);
+}
+
+tbody tr:last-child td {
+  border-bottom: 0;
+}
+
+@media (max-width: 980px) {
+  .page {
+    grid-template-columns: 1fr;
+  }
+
+  .toc {
+    position: static;
+  }
+
+  .status-grid,
+  .summary-grid {
+    grid-template-columns: repeat(2, minmax(0, 1fr));
+  }
+}
+
+@media (max-width: 640px) {
+  .hero {
+    padding-top: 3rem;
+  }
+
+  .hero-inner,
+  .page {
+    width: min(var(--max), calc(100vw - 1rem));
+  }
+
+  .status-grid,
+  .summary-grid {
+    grid-template-columns: 1fr;
+  }
+
+  .panel {
+    padding: 1.1rem 1rem 1.2rem;
+  }
+
+  table,
+  thead,
+  tbody,
+  tr,
+  th,
+  td {
+    display: block;
+  }
+
+  thead {
+    display: none;
+  }
+
+  tbody td {
+    padding: 0.45rem 0;
+    border-bottom: 0;
+  }
+
+  tbody tr {
+    padding: 0.8rem 0;
+    border-bottom: 1px solid rgba(216, 204, 180, 0.7);
+  }
+
+  tbody tr:last-child {
+    border-bottom: 0;
+  }
+}

+ 20 - 0
excalidraw.log

@@ -0,0 +1,20 @@
+2026-03-31 10:21:52.203 [info] Starting Excalidraw MCP server...
+2026-03-31 10:21:52.244 [info] Canvas daemon already running at http://localhost:3001
+2026-03-31 10:21:52.244 [debug] Connecting to stdio transport...
+2026-03-31 10:21:52.244 [info] Excalidraw MCP server running on stdio
+2026-03-31 10:21:52.247 [info] Listing available tools
+2026-03-31 10:22:26.462 [info] Starting Excalidraw MCP server...
+2026-03-31 10:22:26.482 [info] Canvas daemon already running at http://localhost:3001
+2026-03-31 10:22:26.482 [debug] Connecting to stdio transport...
+2026-03-31 10:22:26.482 [info] Excalidraw MCP server running on stdio
+2026-03-31 10:22:26.486 [info] Listing available tools
+2026-03-31 10:22:53.844 [info] Starting Excalidraw MCP server...
+2026-03-31 10:22:53.852 [info] Starting Excalidraw MCP server...
+2026-03-31 10:22:53.876 [info] Canvas daemon already running at http://localhost:3001
+2026-03-31 10:22:53.877 [debug] Connecting to stdio transport...
+2026-03-31 10:22:53.878 [info] Excalidraw MCP server running on stdio
+2026-03-31 10:22:53.887 [info] Listing available tools
+2026-03-31 10:22:53.889 [info] Canvas daemon already running at http://localhost:3001
+2026-03-31 10:22:53.889 [debug] Connecting to stdio transport...
+2026-03-31 10:22:53.889 [info] Excalidraw MCP server running on stdio
+2026-03-31 10:22:53.897 [info] Listing available tools

+ 9 - 3
package.json

@@ -1,12 +1,16 @@
 {
-  "name": "claude-code",
-  "version": "2.1.88",
+  "name": "workbench-cli",
+  "version": "0.1.0",
   "type": "module",
   "private": true,
   "bin": {
-    "claude": "./dist/cli.js"
+    "workbench": "./dist/cli.js"
   },
   "dependencies": {
+    "@ant/claude-for-chrome-mcp": "file:stubs/@ant/claude-for-chrome-mcp",
+    "@ant/computer-use-input": "file:stubs/@ant/computer-use-input",
+    "@ant/computer-use-mcp": "file:stubs/@ant/computer-use-mcp",
+    "@ant/computer-use-swift": "file:stubs/@ant/computer-use-swift",
     "@alcalzone/ansi-tokenize": "^0.1.0",
     "@anthropic-ai/bedrock-sdk": "^0.26.4",
     "@anthropic-ai/claude-agent-sdk": "^0.1.0",
@@ -49,6 +53,7 @@
     "chokidar": "^4.0.0",
     "cli-boxes": "^3.0.0",
     "code-excerpt": "^4.0.0",
+    "color-diff-napi": "file:stubs/color-diff-napi",
     "commander": "12.1.0",
     "diff": "^7.0.0",
     "emoji-regex": "^10.4.0",
@@ -67,6 +72,7 @@
     "lodash-es": "^4.17.0",
     "lru-cache": "^11.0.0",
     "marked": "^15.0.0",
+    "modifiers-napi": "file:stubs/modifiers-napi",
     "p-map": "^7.0.0",
     "picomatch": "^4.0.0",
     "proper-lockfile": "^4.1.0",

+ 3 - 0
shims/globals.d.ts

@@ -4,4 +4,7 @@ declare const MACRO: {
   BUILD_TIME: string;
   FEEDBACK_CHANNEL: string;
   ISSUES_EXPLAINER: string;
+  PACKAGE_URL: string;
+  NATIVE_PACKAGE_URL: string;
+  VERSION_CHANGELOG: string;
 };

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
src/entrypoints/cli.tsx


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 3
src/main.tsx


+ 4 - 0
stubs/@ant/claude-for-chrome-mcp/index.ts

@@ -1,3 +1,7 @@
 export const BROWSER_TOOLS: any[] = [];
 export function createClaudeInChromeMcpServer(..._args: any[]): any { throw new Error('Not available'); }
+export function createClaudeForChromeMcpServer(...args: any[]): any { return createClaudeInChromeMcpServer(...args); }
 export function getClaudeInChromeMcpTransport(..._args: any[]): any { throw new Error('Not available'); }
+export type ClaudeForChromeContext = any;
+export type Logger = any;
+export type PermissionMode = any;

+ 8 - 0
stubs/@ant/claude-for-chrome-mcp/package.json

@@ -0,0 +1,8 @@
+{
+  "name": "@ant/claude-for-chrome-mcp",
+  "version": "0.0.0-stub",
+  "type": "module",
+  "exports": {
+    ".": "./index.ts"
+  }
+}

+ 8 - 0
stubs/@ant/computer-use-input/package.json

@@ -0,0 +1,8 @@
+{
+  "name": "@ant/computer-use-input",
+  "version": "0.0.0-stub",
+  "type": "module",
+  "exports": {
+    ".": "./index.ts"
+  }
+}

+ 10 - 0
stubs/@ant/computer-use-mcp/package.json

@@ -0,0 +1,10 @@
+{
+  "name": "@ant/computer-use-mcp",
+  "version": "0.0.0-stub",
+  "type": "module",
+  "exports": {
+    ".": "./index.ts",
+    "./types": "./types/index.ts",
+    "./sentinelApps": "./sentinelApps/index.ts"
+  }
+}

+ 8 - 0
stubs/@ant/computer-use-swift/package.json

@@ -0,0 +1,8 @@
+{
+  "name": "@ant/computer-use-swift",
+  "version": "0.0.0-stub",
+  "type": "module",
+  "exports": {
+    ".": "./index.ts"
+  }
+}

+ 8 - 0
stubs/color-diff-napi/package.json

@@ -0,0 +1,8 @@
+{
+  "name": "color-diff-napi",
+  "version": "0.0.0-stub",
+  "type": "module",
+  "exports": {
+    ".": "./index.ts"
+  }
+}

+ 5 - 0
stubs/modifiers-napi/index.js

@@ -0,0 +1,5 @@
+export function prewarm() {}
+
+export function isModifierPressed() {
+  return false;
+}

+ 8 - 0
stubs/modifiers-napi/package.json

@@ -0,0 +1,8 @@
+{
+  "name": "modifiers-napi",
+  "version": "0.0.0-stub",
+  "type": "module",
+  "exports": {
+    ".": "./index.js"
+  }
+}

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.