防护思路
点击放大

This repository hosts a static mirror of a TypeScript src/ tree for educational use, defensi research, and software supply-chain analysis. It is maintained by an independent uni student as a personal research project.
Naming. Splinterworks, Clawd, and Clawd Code are fictional stand-ins for a , assistant, and terminal coding-agent CLI—same spirit as Macrohard for a giant software company. They name a _style_ of product for this mirror, not a real shipping brand.
---
Please read this section before using or redistributing anything from this repository.
LICENSE file here implying open-source permission o content.---
This archi to support:
Use it only in ways that comply with applicable law and third-party terms. Do not use this repository to harm others, bypass security, or misuse upstream services.
---
Public discussion in March 2026 suggested that source map artifacts associated with an npm distribution may have made TypeScript source material easier to obtain than intended.
The tree contains a mirrored src/ snapshot preserved for research and analysis.
Clawd Code (upstream) is a terminal-oriented CLI used with Splinterworks’s coding-assistant stack for tasks such as editing files, running commands, searching codebases, and coordinating workflows. This mirror is not a supported build, fork, or replacement for the official product.
| Attribute | Detail |
| ---------------------- | -------------------------------------------------- |
| Snapshot context | Public discussion, 2026-03-31 |
| Language | TypeScript |
| Runtime (upstream) | Bun |
| Terminal UI (upstream) | React + Ink |
| Scale (approximate) | ~1,900 files, 512,000+ lines of code |
---
Na documentation for the src/ tree li docs/. It mirrors and expands this README into a sidebar (guide, architecture, reference) and includes a generated index of top-level src/ entries.
From the repository root:
---
If you are a rights holder or authorized representative and belie in this repository infringes your rights or applicable law, contact the maintainer by opening a GitHub Issue on this repository (or use any contact method the maintainer publishes on their GitHub profile).
Upon receipt of a valid legal notice (for example, a DMCA notice that meets statutory requirements where applicable), the maintainer will review it promptly and, where appropriate, disable or remove the identified content or the repository. Good-faith cooperation does not waive any party’s legal rights or remedies.
---
---
The following describes obser in the mirrored tree for research purposes. It is descripti, not official product documentation.
src/tools/)Each in tool is implemented as a self-contained module defining input schema, permission model, and execution logic.
| Tool | Description |
| ---------------------------------------- | ---------------------------------------------- |
| BashTool | Shell command execution |
| FileReadTool | File reading (images, PDFs, notebooks) |
| FileWriteTool | File creation / o |
| FileEditTool | Partial file modification (string replacement) |
| GlobTool | File pattern matching search |
| GrepTool | ripgrep-based content search |
| WebFetchTool | Fetch URL content |
| WebSearchTool | Web search |
| AgentTool | Sub-agent spawning |
| SkillTool | Skill execution |
| MCPTool | MCP server tool in |
| LSPTool | Language Ser integration |
| NotebookEditTool | Jupyter notebook editing |
| TaskCreateTool / TaskUpdateTool | Task creation and management |
| SendMessageTool | Inter-agent messaging |
| TeamCreateTool / TeamDeleteTool | Team agent management |
| EnterPlanModeTool / ExitPlanModeTool | Plan mode toggle |
| EnterWorktreeTool / ExitWorktreeTool | Git worktree isolation |
| ToolSearchTool | Deferred tool discovery |
| CronCreateTool | Scheduled trigger creation |
| RemoteTriggerTool | Remote trigger |
| SleepTool | Proactive mode wait |
| SyntheticOutputTool | Structured output generation |
src/commands/)User-facing slash commands invoked with a / prefix.
| Command | Description |
| -------------------- | ---------------------------- |
| /commit | Create a git commit |
| /review | Code review |
| /compact | Context compression |
| /mcp | MCP ser |
| /config | Settings management |
| /doctor | En diagnostics |
| /login / /logout | Authentication |
| /memory | Persistent memory management |
| /skills | Skill management |
| /tasks | Task management |
| /vim | Vim mode toggle |
| /diff | View changes |
| /cost | Check usage cost |
| /theme | Change theme |
| /context | Context |
| /pr_comments | View PR comments |
| /resume | Restore previous session |
| /share | Share session |
| /desktop | Desktop app handoff |
| /mobile | Mobile app handoff |
src/services/)| Service | Description |
| ------------------------ | ------------------------------------------------------- |
| api/ | Splinterworks API client, file API, bootstrap |
| mcp/ | Model Context Protocol ser and management |
| oauth/ | OAuth 2.0 authentication flow |
| lsp/ | Language Ser manager |
| analytics/ | GrowthBook-based feature flags and analytics |
| plugins/ | Plugin loader |
| compact/ | Con context compression |
| policyLimits/ | Organization policy limits |
| remoteManagedSettings/ | Remote managed settings |
| extractMemories/ | Automatic memory extraction |
| tokenEstimation.ts | Token count estimation |
| teamMemorySync/ | Team memory synchronization |
src/bridge/)Bidirectional communication between IDE extensions (VS Code, JetBrains) and the CLI.
bridgeMain.ts — Bridge main loopbridgeMessaging.ts — Message protocolbridgePermissionCallbacks.ts — Permission callbacksreplBridge.ts — REPL session bridgejwtUtils.ts — JWT-based authenticationsessionRunner.ts — Session execution managementsrc/hooks/toolPermission/)Permission checks on tool in: user prompt or automatic resolution depending on configured permission mode (default, plan, bypassPermissions, auto, etc.).
Dead code elimination via Bun’s bun:bundle feature flags:
Notable flags: PROACTIVE, KAIROS, BRIDGE_MODE, DAEMON, , AGENT_TRIGGERS, MONITOR_TOOL
---
QueryEngine.ts (~46K lines)Core engine for LLM API calls: streaming responses, tool-call loops, thinking mode, retry logic, token counting.
Tool.ts (~29K lines)Base types and interfaces for tools — input schemas, permission models, progress state types.
commands.ts (~25K lines)Registration and execution of slash commands; conditional imports for en command sets.
main.tsxCommander.js-based CLI parsing and React/Ink renderer setup; startup paths include MDM settings, keychain prefetch, and GrowthBook initialization for boot performance.
---
| Category | Technology |
| ----------------- | ----------------------------------------------------------------------- |
| Runtime | Bun |
| Language | TypeScript (strict) |
| Terminal UI | React + Ink |
| CLI Parsing | Commander.js (extra-typings) |
| Schema | Zod v4 |
| Code Search | ripgrep |
| Protocols | MCP SDK, LSP |
| API | Splinterworks SDK |
| Telemetry | OpenTelemetry + gRPC |
| Feature Flags | GrowthBook |
| Auth | OAuth 2.0, JWT, macOS Keychain |
---
Startup prefetch of MDM settings, keychain reads, and API preconnect in parallel before heavier module e.
Hea (OpenTelemetry, gRPC, analytics, and some feature-gated subsystems) deferred import() until needed.
Sub-agents via AgentTool; coordinator/ for multi-agent orchestration; TeamCreateTool for team-le work.
Workflows under skills/ executed through SkillTool; upstream product supports user-defined skills.
Plugins loaded through the plugins/ subsystem.
---
Non-affiliation. Not affiliated with, endorsed by, or maintained by Splinterworks or any named rights holder.
Intellectual property. Original works remain the property of their respecti; this mirror does not transfer any rights.
Disclaimer. Provided “AS IS” without warranty; not legal advice. Use at your own risk.
开发语言:TypeScript
Star 数:35
该项目属于防护思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕This repository hosts a static mirror of a TypeScript src/ tree for educational use, defensive security research, and software supply-chain analysis. It is maintained by an independent university student as a personal research project.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | clawd-code - This repository hosts a static mirror of a TypeScr |
| 所属分类 | 防护思路 |
| 发布作者 | admin |
| 发布时间 | 2026-10-06 00:09:43 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 440 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |