TypeScript/Bun 版的渐进式 agent harness 教学项目。
这个仓库把原先的 Python 教学实现重写成了 Bun + TypeScript 版本,并保留原有的 20 个递进章节:
s01_agent_loop/code.ts到s20_comprehensive/code.tsagents/下基于共享核心的 20 个入口,以及完整版本agents/s_full.tsdocs/en|zh|ja三语章节文档web/交互式文档站
安装依赖:
bun install
cp .env.example .env运行测试:
bun test启动任意章节:
bun s01_agent_loop/code.ts
bun s07_skill_loading/code.ts
bun s20_comprehensive/code.ts也可以通过根脚本运行复用 src/core 的共享核心版本:
bun run s01
bun run s05
bun run s20
bun run full两套入口覆盖相同的学习路径:根目录章节便于逐文件阅读和对照上游,agents/ 入口便于复用、测试与扩展共享运行时。
生成展示数据并启动文档站:
bun run web:extract
bun run web:dev构建文档站:
bun run web:builds01_.../ Teaching entrypoints for each progressive stage
agents/ Shared-core entrypoints and the full harness
src/core/ Shared runtime, tools, managers, and scenario builders
docs/ English / Chinese / Japanese lesson notes
skills/ Example SKILL.md bundles used by s07
tests/ Bun test suite for core runtime and extraction
web/ Next.js documentation site
s01The Agent Loops02Tool Uses03Permission Systems04Hooks Systems05Todo Writes06Subagents07Skill Loadings08Context Compacts09Memorys10System Prompts11Error Recoverys12Task Systems13Background Taskss14Cron Schedulers15Agent Teamss16Team Protocolss17Autonomous Agentss18Worktree Isolations19MCP Plugins20Comprehensive
这个仓库是对上游项目 shareAI-lab/learn-claude-code 的 TypeScript/Bun 重构版。
- 当前对齐版本记录在
upstream.json - 上游许可证:MIT
- 上游版权声明:Copyright (c) 2024 shareAI Lab
- 当前仓库保留原 MIT 许可通知,并将本仓库新增修改继续按 MIT 分发
分发或复制本仓库时,请一并保留根目录下的 LICENSE 与 NOTICE。
- 运行时默认使用 Bun。
- 模型客户端默认接 Anthropic,读取
ANTHROPIC_API_KEY和MODEL_ID。 web/scripts/extract-content.ts会从根目录的 TypeScript agent 源码和文档中生成展示数据,不再依赖旧的 Python 源目录。