Total Pageviews

Friday, 9 October 2026

用muse的web版帮我在cloudflare.com平台上构建基于nextjs的静态博客程序ocl


我用email id: luckypoem@gmail.com登录cloudflare.com后,导入仓库https://github.com/brightmann/ocl

下面的插图就是我跟它的对话过程.共  张截图。


 




 我得到的博客网址是https://ocl.luckypoem.workers.dev/  支持分页。
 https://ocl.luckypoem.workers.dev/blog/fh 能显示视频
 
项目地址:
https://github.com/officialrajdeepsingh/contentlayer

https://github.com/brightmann/ocl
https://github.com/brightmann/ocl/blob/main/scripts/build-content.mjs

在此处https://github.com/brightmann/ocl/tree/main/posts,新建源帖fh.md ,内容为:

---
author: Rajdeep Singh
categories:
  - Linux
date: 2026-10-09T12:36:00Z
description: 这是一篇文章
image: /images/patreon-cover.png
tags:
  - misc1
  - misc2
  - misc3
draft: false
slug: fh
title: 战马
---

此处写正文或html codes.

------------------------------------- 

related post:

https://briteming.blogspot.com/2026/07/nextjsoc.html

加拿大工程師拆解了一輛比亞迪(BYD)汽車,其發現令所有人震驚!

 

国货当自强,比亚迪做到了

AI 到底是怎麼「思考」的?10 分鐘講透大模型的底層真相

DeepSeek Harness 桌面版正式发布!本地对接越狱模型,100%无审查,完全免费,简直爽歪歪

 

这套免费套件genoffice支持 Word, Excel, powerpoint, PDF

 无付费门槛的办公工具,可直接读写 Word、Excel 以及 PDF 文档,核心功能无需解锁,还内置pdf编辑器。

下载地址:

 https://github.com/genspark-ai/genoffice/releases/download/v0.11.505/GenOfficeSetup-v0.11.505-x64.exe

 https://github.com/genspark-ai/genoffice/releases

---------------------------------------------------

 Free, open-source AI Office suite: Docs, Sheets, Slides, PDF, Markdown and HTML editors with a built-in AI agent, plus a `genoffice` CLI and agent skill so Claude Code, Codex and Cursor can create and edit real .docx/.xlsx/.pptx files locally. Bring your own key. macOS, Windows & Linux.

 https://genoffice.ai/

The world's first full-featured open-source AI Office suite.
Word, Excel, PowerPoint and PDF files, edited by you and your AI, saved back in the real formats.

License: Apache-2.0 Latest release Downloads GitHub stars Follow @merrickbuilds on X

English ·简体中文 · 繁עברית

Download · CLI · MCP · Website · Community · X · Privacy

GenOffice is a free, open-source alternative to Microsoft Office for macOS, Windows and Linux. It opens and saves native .docx, .xlsx and .pptx files, edits PDF, Markdown and HTML, and puts an AI agent next to every document — not a chat box bolted on the side, but an editor that reads the file, makes the change, and shows you exactly what it touched.

  • Real formats, byte-preserving. Only what you edit is rewritten. Everything else in the file survives byte-for-byte, so documents keep working in Word, Excel and PowerPoint.
  • AI you can review. Edits land as tracked changes and diffs with one-click rollback. Spreadsheets get live formulas, not pasted numbers. Decks and pages are generated onto the canvas and stay fully editable.
  • Local by design. Files open, edit, save and convert on your machine. PDF → Word / Excel / PowerPoint, Markdown → Word and HTML → Word all run on-device. Only the AI calls leave the machine, to the provider you choose.
  • Find files by what they say. The home screen searches the names, folders and full text of your .docx, .xlsx, .pptx, PDF, Markdown and HTML files from a local SQLite index, CJK included. Optionally, the top hits are reranked by TypeSafe Jev, the System One judgment model, so the file that answers your question comes first.
  • Your keys or none. Sign in with Genspark and skip keys, or bring your own key for Claude, OpenAI, Gemini, DeepSeek, Kimi, GLM, Qwen, Doubao, MiniMax, Grok, Mistral, OpenRouter, Requesty, Opper, Cheaper Inference, Atlas Cloud, or any OpenAI-compatible endpoint, local servers included.
  • Scriptable and agent-ready. The app ships a genoffice command line and a skill for Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf, so a coding agent can create, convert, read and edit real Office files on your machine without opening a window.

Get it: macOS (Apple Silicon and Intel) · Windows (x64 and Arm) · Linux (deb, rpm, AppImage) — details and requirements in Download.

Demo

Six apps, one AI panel, a file search reranked by TypeSafe Jev, and a command line for your coding agent. Every screenshot is the real app on macOS, with the AI driven from the prompt you can read in the panel.

1 · Docs — open and edit .docx with an AI you can review

GenOffice Docs rendering a two-column annual-report page with a full-width cover image, shaded KPI table, header and footer, at 80% zoom with the AI panel collapsed GenOffice Docs: a company overview with a banner image; the AI tightened the Overview and inserted a new bulleted section, and the panel offers a one-click roll back
Opens the file as Word lays it out — two-column sections, full-bleed images, shaded tables, headers and footers, pagination on Word's line metrics. Styles, comments, tracked changes, equations and ink round-trip untouched. Ask for the edit — the AI reads the blocks it needs, rewrites the Overview and inserts a new bulleted section. Every AI turn is a snapshot you can roll back; with Track changes on, edits arrive as Word-style revisions.

2 · Sheets — .xlsx with live formulas and charts, not pasted numbers

GenOffice Sheets: the AI added a Summary sheet with revenue by region and category using SUMIF formulas, plus a column chart, and reports 43 applied changes with an Undo button GenOffice Sheets: asked which region led Q2 revenue, the AI answers Europe with the category breakdown and cites the cells it used as links, next to the Orders sheet
Build it — from one sentence the agent adds a Summary sheet with real SUMIFs by region and category, inserts a column chart, and applies the 43 changes as a single undoable batch. Ask it — questions about the workbook come back with the reasoning and the exact cells used as clickable citations. Under the hood: an in-house Rust .xlsx engine, pivot tables, slicers, conditional formatting and formula tracing.

3 · Slides — from a prompt to a .pptx deck

Time-lapse of GenOffice Slides generating the Aurora Home investor deck: the AI plans the storyline in the panel, slides appear on the canvas one after another, and the finished deck ends on the closing ask

GenOffice Slides: the cover slide of an AI-generated Aurora Home investor deck on the canvas, with the original one-line prompt and the AI's summary of what it built in the panel GenOffice Slides: the designed closing slide of the same 11-slide deck, with the thumbnail strip on the left and the AI panel summarizing the storyline
One line in — "Create a 10-slide investor pitch deck for Aurora Home…". GenOffice plans the storyline, researches the numbers, and drafts every slide onto the canvas as a real .pptx. A finished deck out — eleven designed slides with consistent typography, imagery and a closing call to action; keep editing with masters, layouts, smart guides and non-destructive cropping, or ask the panel to restyle, rewrite and reorder.

4 · PDF — edit PDF text in place, convert PDF to Word on-device

GenOffice PDF: Edit text mode outlines every text block on the page for in-place editing while the AI panel answers a question about the report with page citations GenOffice Docs showing a Word document converted locally from the Helios quarterly review PDF, opened in a second tab beside the original PDF
Edit inside the page — Edit text mode outlines every text block for in-place retyping; the content stream is rewritten through PDFium with the original fonts, not a cover-up annotation. Ask the AI about a long report and get answers with page citations. Convert on-device — PDF Converter → PDF to Word produces an editable .docx that opens in Docs next to the source, headings, stat rows and paragraphs intact. Excel and PowerPoint targets work the same way; scanned pages go through the system OCR.

5 · HTML — an AI page and UI builder, design brief first

Say what the page is for and who it is for. The AI proposes a design brief first — hook, palette, typography and style directions — then builds a single self-contained .html file against those tokens.

Time-lapse of GenOffice HTML restyling the Lumen landing page: one Restyle request in the panel turns the dark Midnight Studio page into the warm Solar Daybreak version while every section and all copy stay in place

GenOffice HTML: a generated landing page for a solar desk lamp in the dark Midnight Studio direction, shown in the live preview with the AI panel summarizing the page it just built The same Lumen landing page restyled by the AI into the warm Solar Daybreak direction: paper background, serif headlines and an orange accent, with every section and all copy kept
Generated from one prompt — a bold hero, feature cards, pricing and a waitlist form for Lumen, built in the Midnight Studio direction. Click any element to restyle it, double-click to edit text, or switch to the CodeMirror source view. Same design, new direction — one Restyle request swaps the brief's tokens and the page follows: warm paper, editorial serif, sun-orange accent, nothing rewritten. Present fullscreen, or export as PDF or a native editable Word document.
GenOffice HTML: a generated personal dashboard UI for a freelance designer in a warm linen style, with a left rail, serif greeting and four metric cards GenOffice HTML: a generated EV-market data report in a broadsheet style, with a serif masthead, a 17.3 million headline figure and a stat row
UI mockups — the "personal dashboard" starter turns a persona into a working layout: left rail, greeting, billable-hours sparkline, invoice and utilization cards, all real HTML you can hand to a developer. Data stories — the "data report" starter builds an editorial broadsheet: serif masthead, one headline number, a rule-separated stat row, inline SVG charts and a methodology note.

6 · Markdown — a block editor over plain .md, with Ask AI

GenOffice Markdown: a selected paragraph shows an Ask AI popover with a typed instruction and suggestion chips such as Polish, Make more concise, Expand and Fix grammar, plus Send now and Add to queue buttons GenOffice Markdown rendering a launch-notes document with a table, a Mermaid flowchart and a task list, with the AI panel's starter prompts on the left
Ask AI about a selection — select any passage and an Ask AI chip appears: type an instruction or pick a suggestion, send it now, or queue several anchored edits and run them in one pass. The same entry exists in every app. Rendered, saved as plain Markdown — headings, lists, tables, images, code blocks and Mermaid diagrams in a Tiptap block editor, written back as plain .md, with a fully local Markdown → Word export.

7 · Search — find the file that answers the question, with TypeSafe Jev

Every file in your work folder is indexed on-device: names, folders and the extracted text of Word, Excel, PowerPoint, PDF, Markdown and HTML files, in a SQLite full-text index with CJK-aware tokenizing. Switch on Jev search reranking and the top 20 local hits are judged by TypeSafe Jev, the System One model that returns one calibrated relevance score per document in a single call instead of generating text. The list is reordered by that score; if the call fails or times out, the local order stays.

Screen recording of the GenOffice home screen: typing laptop refresh policy lists a browser-cache policy, a brand-refresh plan and a dashboard-refresh schedule first while the equipment standards document is last; the Settings page shows Jev search reranking switched on under AI Media & Search with the TypeSafe endpoint; the same search then shows the equipment standards document first with a Jev badge next to the result count

Two result lists for the query laptop refresh policy side by side: without Jev the dashboard refresh schedule, brand refresh plan and browser cache refresh policy lead and the company equipment standards document is fifth; with Jev the equipment standards document, which states the three-year laptop replacement cycle, is first GenOffice Settings, AI Media & Search page: the Local file search block with the Jev search reranking switch, the endpoint choice between OpenRouter and TypeSafe, and the API key field
Same words, different answers — "laptop refresh policy" matches a browser-cache refresh policy, a brand-refresh plan and a dashboard-refresh schedule word for word, so full-text ranking puts them first. Jev reads the excerpts and moves the equipment standards document, the one that states the three-year replacement cycle, to the top. The Jev badge next to the result count shows when the order came from the model. Off by default, one switch to turn on — Settings → AI Media & Search → Local file search. Pick OpenRouter or TypeSafe direct, paste a key, hit Test connection. Only when the switch is on do excerpts of the top hits leave the device; the index itself never does.

8 · CLI — your coding agent drives GenOffice, on your machine

GenOffice ships a genoffice command line and an agent skill. Install the skill and Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode or Windsurf can create, convert, read and edit real Office files through the same engines as the apps, without opening a window.

GenOffice Slides showing an eight-slide Solar System deck that a coding agent built through the genoffice command line: the cover slide on the canvas, eight thumbnails on the left and the AI panel open

The eight rendered slides of the Solar System deck side by side: cover, exploration timeline, four key numbers, planet-diameter bar chart, rocky worlds versus giants, the Sun's 99.8% hero number, the four giants grid and takeaways GenOffice Settings, Integrations page: the genoffice skill installed into Claude Code, with Install buttons next to Codex and Cursor
One prompt to your agent — "Build an eight-slide deck about the Solar System." The agent reads the skill, writes a style sheet, an outline and one page spec per slide, generates the two photos with genoffice image, and lets genoffice slides check reject anything that overflows or overlaps before genoffice create assembles the .pptx and slides render hands back a PNG per slide to look at. Install once, from Settings → Integrations — GenOffice lists the coding agents it finds on this computer and writes the skill into each one you pick. Or download the skill as a zip, or run npx skills add genspark-ai/genoffice. Commands and the full workflow are in Command line and agent skill.

9 · MCP — the same tools over the Model Context Protocol

Every genoffice command is also an MCP tool. Claude Code, Claude Desktop, Cursor and any other MCP client can start genoffice mcp themselves, with no skill to install and no window open, and get 29 tools plus the op references as resources. A second, HTTP server inside the app lets an agent build a Word document in a visible editor tab while you watch.

Time-lapse of Claude Code building an eight-slide renewable-energy investor briefing through the genoffice MCP server: it searches for figures and photos, checks each candidate picture with media, deck_start writes the style sheet and outline, deck_page adds one checked page at a time, deck_build assembles the .pptx and slides_render returns a picture of every slide; the finished deck then opens in GenOffice Slides

GenOffice Slides showing the eight-slide Renewable Energy 2026 deck that Claude Code built through the genoffice MCP server: the cover slide with a wind-farm photograph on the canvas and eight thumbnails on the left GenOffice Settings, Integrations page, MCP part: the one-line claude mcp add command for Claude Code, the JSON block for Cursor, Claude Desktop and other MCP clients, and the local HTTP server option below
One prompt, 38 tool calls, no shell — "Build an eight-slide investor briefing about renewable energy in 2026, with a real photo on the cover and wherever a photo helps." The agent pulls the figures and the photos with search, asks media whether each candidate picture is a real photograph, calls deck_start with a style sheet and an outline, then deck_page once per slide; every page is checked against the outline and the palette before it is kept, deck_build assembles the .pptx, slides_audit looks for overflow, slides_render hands back a PNG per slide as image content the model can look at, and deck_replace fixes the three pages it did not like. Connect once, from Settings → Integrations — copy the claude mcp add line for Claude Code, or the JSON block into Cursor, Claude Desktop or any other MCP client. Option B switches on the local HTTP server for the visible Word editor. Both are described in MCP server.

Why GenOffice

  • Open source, Apache-2.0, built in the open on GitHub.
  • Yours to run. Native apps for macOS, Windows and Linux; files stay on your disk and every edit, save and conversion happens on your machine.
  • Real Office files. Native .docx, .xlsx and .pptx, byte-preserving: the parts of a file you did not touch are copied exactly as they were.
  • An AI that edits the document itself. Tracked changes in Docs, live formulas and charts in Sheets, slides drawn onto the canvas, every AI turn a snapshot you can roll back.
  • Your model, your key. Sign in with Genspark, or bring a key for Claude, OpenAI, Gemini, DeepSeek and more, local servers and any OpenAI-compatible endpoint included.
  • PDF done properly. Edit text inside the page, and convert PDF to Word, Excel or PowerPoint on-device, with system OCR for scans.
  • Markdown and HTML too, with the same AI panel and local export to Word.
  • Search that finds the answer, not the keyword. Full-text search over every document in your folders, indexed on-device, with optional reranking by TypeSafe Jev, the System One judgment model.
  • Scriptable. A genoffice command line, an agent skill and an MCP server put every engine at the service of Claude Code, Claude Desktop, Codex, Cursor and other agents, still on-device.
  • Free, for individuals and teams alike.

AI backends

Sign in with Genspark and there is nothing to configure: model calls route through the Genspark proxy (Claude, GPT and Gemini families) and the agents get web and image search, image generation, and image/audio/video analysis.

Or bring your own key. Settings → AI lists Claude, OpenAI, Gemini, DeepSeek, Kimi, GLM, Qwen, Doubao, MiniMax, Grok, Mistral, OpenRouter, Requesty, Opper, Cheaper Inference, Atlas Cloud and OpenCode Zen/Go, plus a custom slot for any OpenAI-compatible endpoint (base URL + key), including local model servers. Search and media have their own per-capability providers under AI Media & Search: Serper, Serply, Tavily or Parallel for web search, and OpenAI, Gemini, Doubao/Seedream, GLM, Grok, Qwen, MiniMax or any OpenAI-compatible images endpoint for image generation and image/video analysis, plus DeepSeek V4.1 Flash for image analysis.

TypeSafe Jev reranks the home screen's file search. Under AI Media & Search → Local file search, switch on Jev search reranking and pick an endpoint: OpenRouter (model typesafe/jev-1.13) or TypeSafe's own API. The key is stored only on this device. It is off by default; when on, the excerpts of the top 20 local hits are sent for judgment and nothing else leaves the machine.

Parallel works without an account: its free Search MCP (rate-limited) is the default web search whenever no Genspark login or search key is configured, and it runs ahead of the DuckDuckGo scrape. Select Parallel under Web search and enter a Parallel key to use the Search API instead.

The whole suite ships light, dark and system themes. Themes only change what is on screen: exports, prints and saved files always keep the document's own colors.

Command line and agent skill

Everything the apps can do to a file, the genoffice command line can do from a terminal: inspect, convert, create, read and edit Word, Excel, PowerPoint, PDF, Markdown and HTML on the same engines, headless. It installs with GenOffice, needs no runtime of its own, and never sends a document anywhere. Paired with the bundled agent skill, it turns a coding agent into a document worker that produces real Office files instead of Markdown approximations.

Works with: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf out of the box, any other agent that reads skills, and, through the MCP server, Claude Desktop and every MCP client.

Install the skill

How What happens
Settings → Integrations in the app Lists the agents found on this computer; one click writes the skill into each one you choose. An Update button appears when a GenOffice release ships a newer skill.
Download as zip on the same page The layout claude.ai, the Claude desktop apps and other assistants accept as an uploaded skill.
npx skills add genspark-ai/genoffice Installs from this repository into any skills-compatible agent.

Then start a new chat and ask for a document. The skill teaches the agent when to reach for genoffice, how to read a file before editing it, and how to check its own work.

Quickstart from the terminal

genoffice --version
genoffice info report.docx --json                  # headings and blocks; or sheets, slides, pages
genoffice convert report.md --to pdf               # md/html/docx/xlsx/pptx → pdf, pdf → docx/xlsx/pptx, …
genoffice create --type docx --from notes.md --out notes.docx
genoffice create --type xlsx --from table.json --out sales.xlsx   # "=SUM(B2:B9)" cells stay live formulas
genoffice docs read report.docx --range 0-9 --json # then `docs apply --ops edits.json` edits in place
genoffice render report.docx --out shots/          # one PNG per page, to look at what you made
genoffice open sales.xlsx                          # hand the result to the editor

Every command prints a one-line summary, or a single JSON object with --json. Edits are atomic: a rejected op leaves the file untouched and comes back with a guided error. genoffice help lists the current command surface; the full reference is packages/cli/README.md.

What the agent actually runs

The Solar System deck in the demo took one prompt in Claude Code. Behind it, the agent followed the skill's staged workflow and the CLI checked every stage before the next one started:

genoffice capabilities --json                        # which cloud tools GenOffice has configured
genoffice guide slides design                        # the deck workflow and layout library
genoffice image "the eight planets in a row …" --aspect 16:9 --out deck/assets/cover.jpg
genoffice slides check deck/outline.json --json      # 8 pages, no findings
genoffice slides check deck/pages/01.json --json     # builds one slide, audits overflow and overlap
…                                                    # one page file per slide, fixed until each check is clean
genoffice create --type pptx --spec deck/pages --outline deck/outline.json --out deck/solar-system.pptx --json
genoffice slides render deck/solar-system.pptx --out deck/shots --json
genoffice slides audit deck/solar-system.pptx --json    # 8 slides, no layout issues
genoffice slides replace deck/solar-system.pptx --slide 4 --spec deck/pages/05.json --json
genoffice open deck/solar-system.pptx

No model call happens inside genoffice: the agent does the thinking, the CLI does the building and the checking, and the result opens in GenOffice or PowerPoint as an ordinary .pptx.

MCP server

The same commands are available as Model Context Protocol tools, for assistants that cannot run a terminal or that you would rather not give one. There are two ways in, both shown with copy-ready snippets in Settings → Integrations → MCP:

Way What it is
A · genoffice mcp (recommended) A stdio server the assistant starts itself; GenOffice does not need to be open. One tool per command (info, convert, create_docx, create_xlsx, create_pptx, create_pdf, docs_read / docs_apply / docs_check, sheet_*, slides_*, render, guide, search, image, media, open) plus the staged deck flow deck_start → deck_page → deck_build → deck_replace. Ops, specs and Markdown are passed inline, so a client without a file system still works.
B · Local HTTP server Runs inside the GenOffice app on http://127.0.0.1:3093/mcp (Streamable HTTP, with legacy SSE). Its tools drive a visible Word editor tab: create_session, insert_content, replace_blocks, apply_ops, read_document, save_session, and you watch the document take shape. Off by default; switch it on in the same settings pane.
C · genoffice mcp --http The stdio tool set as a Streamable HTTP server for clients on other machines: a container, a sandbox, a shared box on your network. Files travel with the calls: PUT /files/<name> uploads one and returns a URL, every file parameter takes an http(s) URL, and a tool that writes a file hands it back as a download URL plus, when small, the bytes as an MCP resource. --host 0.0.0.0 opens it to the network, --token protects it.
# Claude Code
claude mcp add --transport stdio genoffice -- genoffice mcp
// Cursor, Claude Desktop or any other MCP client
{ "mcpServers": { "genoffice": { "command": "genoffice", "args": ["mcp"] } } }
# On the machine that has GenOffice (private network; add --token for a shared box)
genoffice mcp --http 3093 --host 0.0.0.0 --token "$GENOFFICE_MCP_TOKEN"

# From the client: upload, then use the URL wherever a tool takes a file
curl -T report.docx -H "Authorization: Bearer $GENOFFICE_MCP_TOKEN" http://server:3093/files/
#   → { "url": "http://server:3093/files/<id>/report.docx", ... }
#   docs_read({ "file": "http://server:3093/files/<id>/report.docx" })
#   docs_apply(...) → output_url, downloadable with curl -o

Over HTTP every session gets a private scratch folder, relative paths and deck folders resolve inside it, open is not offered, and with GENOFFICE_ALLOWED_ROOTS unset the tools cannot leave the server's own file store. render, convert to PDF and create_pdf still start a hidden GenOffice process, so a headless host needs the app installed and a virtual display (xvfb-run).

genoffice here is the CLI shipped inside the app (on macOS /Applications/GenOffice.app/Contents/Resources/cli/genoffice; the settings pane prints the exact path for your install). The server carries its own workflow instructions and exposes the op references as genoffice://guide/* resources, so no skill is needed; the skill and the MCP server can coexist and the assistant picks one. Cloud features (search, image, media) still go through the provider configured in GenOffice; everything else runs locally, and GENOFFICE_ALLOWED_ROOTS confines every tool to the folders you list.

The renewable-energy deck in the demo is what one prompt in Claude Code with only the genoffice MCP server attached looks like from the protocol side:

capabilities · guide(slides, spec) · guide(slides, design)
search(query) ×4                         → IEA, BNEF and IRENA figures for the slides
search(query, images) ×7 · media(url, ask) ×7
                                         → candidate photos, each one checked to be a real photograph
deck_start(dir, style, outline)          → outline checked: 8 pages to write
deck_page(dir, 0, page) … deck_page(dir, 7, page)
                                         → each page checked against the outline and the palette; one page sent again
deck_build(dir, out)                     → renewables-2026.pptx, no image failures
slides_audit(file) · slides_render(file, out)
                                         → no layout findings; 8 PNGs come back as image content
deck_replace(dir, n, page) ×3 · slides_render(file, out)
                                         → three pages fixed after looking at the renders

Thirty-eight calls, about thirteen minutes, and the assistant never touched a shell: the figures, the photos, the guides, the checks and the renders all travelled as MCP tool results. Only search and media left the machine, to the provider configured in GenOffice.

Download

Platform Requirements Download
macOS — Apple Silicon (arm64) macOS 11+ Latest .dmg (arm64)
macOS — Intel (x64) macOS 11+ Latest .dmg (x64)
Windows (x64, most PCs) Windows 10+, Intel/AMD Latest -x64.exe installer
Windows on Arm (ARM64) Windows 11 on Arm (Snapdragon X and similar) Latest -arm64.exe installer
Linux — Debian / Ubuntu x86_64, glibc 2.34+ (Ubuntu 22.04 or newer) Latest .deb
Linux — Fedora / RHEL / openSUSE x86_64, glibc 2.34+ (Fedora 35+, RHEL 9+, Leap 15.6+) Latest .rpm
Linux — other distributions x86_64, glibc 2.34+, FUSE 2 Latest .AppImage

All builds come from main; the macOS and Windows installers are signed. Older versions are on the Releases page.

Installing on Linux

How it works

Seven Electron apps — Docs, Sheets, Slides, PDF, Markdown, HTML and the tabbed shell — share one engine layer of pure TypeScript packages plus a Rust sidecar for .xlsx. The original file is always the source of truth: edits are applied as narrow patches, and everything the editor did not touch survives the round trip untouched.

open docx ─► archive original by hash (never touched)
          ─► parse word/document.xml into a block tree, each block anchored to its original XML
          ─► Tiptap editor (manual + AI editing, dirty tracking)
save      ─► dirty blocks → OOXML fragments (referencing existing styles only)
          ─► splice into the original document.xml; untouched blocks keep their bytes
          ─► repack the zip; every other entry is copied byte-for-byte

The package-by-package tour (docx/pptx engines, pdf2docx, html2docx, the agent core and providers) lives in CONTRIBUTING.md.

Development

npm install
npm run fixtures     # generate test .docx fixtures
npm test             # engine + app unit tests (docs/sheets/slides need no display)
npm run typecheck    # tsc --noEmit across every workspace
npm run dev          # all six editors + shell against Vite dev servers
npm run dev:docs     # a single app (same pattern works per workspace)
npm run dist:mac     # package macOS dmg (regenerates third-party notices)
npm run dist:win     # package Windows nsis installer
npm run dist:linux   # package Linux AppImage + deb + rpm

The sheets app additionally needs a Rust toolchain for its xlsx sidecar (cargo on PATH); npm run build -w @genoffice/sheets compiles it automatically. See CONTRIBUTING.md for the checks every change must pass and how pull requests land.

Community

GenOffice is in active development and your feedback shapes it.

  • Report a bug or request a feature in GitHub Issues.
  • Join the GenOffice group chat on GenTeam to talk to the team and other users.
  • Follow @merrickbuilds on X for release notes, demos and what is being built next.
  • Star the repo if GenOffice is useful to you — it is the best way to support the project.

FAQ

Is GenOffice free?

Can GenOffice open Microsoft Word, Excel and PowerPoint files?

Does GenOffice work offline?

Can GenOffice edit PDF files?

Can GenOffice convert PDF to Word, Excel or PowerPoint?

Can I use my own AI model or API key?

Can GenOffice convert HTML to Word?

Can I drive GenOffice from Claude Code, Codex, Cursor or a script?

Does GenOffice collect any data?

Security

See SECURITY.md for the process security posture (renderer sandboxing, IPC validation, external-link gating) and the threat models for AI-generated content.

Acknowledgements

GenOffice would not be possible without these open-source projects:

  • Electron — the desktop runtime for every app.
  • Univer (Apache-2.0) — the spreadsheet UI core that Sheets extends.
  • PDFium (BSD-3-Clause, bundled via @embedpdf/pdfium) — the content-stream engine behind true PDF text and image editing.
  • pdf.js (Apache-2.0) and pdf-lib (MIT) — PDF rendering and document assembly.
  • Tiptap / ProseMirror — the block editors in Docs and Markdown.
  • CodeMirror (MIT) — the source editor in HTML.
  • Konva — canvas rendering for Slides and Sheets charts.
  • HarfBuzz (wasm) — text-shaping metrics for complex scripts.
  • calamine and IronCalc — the read and calc layers of the Rust xlsx sidecar.
  • libeot (MPL-2.0) — the MicroType Express decoder for embedded PowerPoint fonts, ported to TypeScript.
  • React (MIT) — the UI layer of every app.
  • Mermaid (MIT) and KaTeX (MIT) — diagrams and math in Markdown and Docs.
  • opentype.js (MIT) — font parsing for metrics and glyph lookup.
  • JSZip (MIT) and fast-xml-parser (MIT) — the OOXML container and XML layers.
  • Fluent UI System Icons (MIT) — the icon set across the ribbons.
  • electron-updater (MIT) — in-app updates.
  • Liberation, Carlito, Caladea, and Noto CJK fonts (OFL/Apache-2.0) — bundled document fonts.

npm run notices regenerates the bundled third-party license summary (tools/gen-third-party-notices.mjs); all runtime dependencies are MIT/Apache-2.0/BSD-3-Clause/OFL.

from  https://github.com/genspark-ai/genoffice

ai-agent-book

 《深入理解 AI Agent:设计原理与工程实践》(李博杰 著)开源主仓库:全书正文、编译版 PDF 与按章配套代码.

PDF 在线阅读 Stars License Languages Trending GitHub Project of the Day

中文 ← 当前 · English · 繁體中文(台灣) 

📥 下载 PDF / EPUB(推荐)— 推荐使用 PDF / EPUB 离线阅读,排版最佳;也可在线阅读(支持多语言切换、章节折叠、高亮与笔记,每次推送自动更新)。

Agent = LLM + 上下文 + 工具——本书围绕这个核心公式,用 10 章把 AI Agent 从原理讲到工程实战。全书正文、配图、109 个配套实验全部开源,欢迎亲手把实验跑一遍。

📚 姊妹篇《深入理解 AI Infra:量化分析与系统设计》已开源发布,欢迎阅读:github.com/bojieli/ai-infra-book

要开发好基于模型的应用,还需要理解这类应用赖以运行的基础设施。姊妹篇讨论的就是支撑模型训练与推理的 AI Infra:参数和上下文状态存在哪里,计算怎样执行,多个加速器怎样协作。

📢 2.0 版变更(相较 1.4 版):本仓库书稿版本已由 1.4 升级为 2.0。2.0 版将原第四章中的“异步交互”部分与原第九章中关于“多模态 Agent”的内容合并,重组为新的第六章“交互:观察与动作空间的扩展”。原第六章“Agent 的评估”、第七章“模型后训练”和第八章“Agent 的持续进化”依次后移一章,现分别为第七、八、九章。

如果你看到的是旧版 PDF,建议下载最新版 PDF。新版还包含许多内容修正与调整,请以最新版为准。

📚 10 章 正文,从基础到生产 📂 109 个 配套实验(含本地项目与外部复现轨道) 🌐 15 种 语言:中 / 英 / 西 / 印尼 / 阿 / 繁體中文(台灣) / 俄 / 泰米尔 / 越 / 日 / 土耳其 / 韩 / 匈牙利 / 希伯来 / 葡萄牙语(巴西)

📖 电子书

📥 离线下载(推荐,全书正文,开源免费)。以下链接始终指向 main 分支的最新构建;固定版本见 Releases:

              繁體中文(台灣)(社区翻译,by @tigercosmos):PDF · EPUB

也可在线阅读 — 支持多语言切换、章节折叠、高亮与笔记、配套实验直达,每次 main 分支推送后自动重新构建。

中文正文源码位于 book/;英文位于 book-en/.

🔧 想自行编译 PDF / EPUB?(PDF 需 pandoc / xelatex / ElegantBook)
  • EPUB:使用统一的构建脚本,详情请参阅 EPUB 构建说明

  • 正文源码:book/introduction.md(引言)、book/chapter1.md ~ book/chapter10.md(第一至第十章)、book/afterword.md(后记)

  • 编译:安装 pandoc、xelatex、ElegantBook 文档类与相关字体后,运行

    cd book && bash build_pdf.sh

    图表以 SVG 文件存于 book/images/,编译时直接使用;排版细节见 book/preamble.tex 与 book/*.lua。

     

    内容速览(第 1–10 章)

    全书围绕核心公式 Agent = LLM + 上下文 + 工具 展开,十章层层递进:

    章 主题 一句话核心 正文 实验
    1 🚀 AI Agent 入门 Agent = LLM + 上下文 + 工具;Harness 工程才是竞争力 读 4
    2 🎯 上下文工程 上下文决定能力上限:KV Cache、提示工程、Agent Skills、上下文压缩 读 10
    3 📚 用户记忆和知识库 跨会话记住用户、接入外部知识:用户记忆、RAG、结构化索引、知识图谱 读 12
    4 🛠️ 工具 工具是 Agent 的双手:MCP 协议、感知/执行/协作三类工具与主动工具发现 读 5
    5 💻 Coding Agent 与通用 Agent 代码是「能创造新工具的工具」,生产级 Coding Agent 全景 读 16
    6 🎙️ 交互:观察与动作空间的扩展 从模态与时序两个维度扩展 Agent 的观察与动作空间:异步与事件驱动、语音交互、Computer Use 和机器人操作 读 14
    7 🎯 Agent 的评估 把表现变成可比较信号:评估环境、指标、统计显著性、评估驱动选型 读 14
    8 🧠 模型后训练 预训练/SFT/RL 三阶段:何时选 SFT、何时选 RL,工具调用内化、样本效率 读 19
    9 🔄 Agent 的持续进化 从运行轨迹获得学习信号,更新知识、指令、程序与参数 读 9
    10 🤝 多 Agent 协作 群体智能高于个体:协作框架、上下文共享/隔离、涌现的「Agent 社会」 读 6

    💡 读 = 在 GitHub 网页直接读章节正文(markdown);N = 该章正文实验数,点击查看实现与复现说明。项目类型说明(✅ 可运行 / 📖 复现 / 🚧 设计)见各章 README。

    📚 如何高效阅读本书?详见 学习建议(核心理念、学习路径、难度分级、实践建议)。

    💻 运行配套实验

    项目统一支持 Python 3.11–3.13。请在仓库根目录按章节安装依赖;将 ch1 替换为 ch2 ~ ch10 即可安装对应章节:

    # 推荐:使用提交到仓库的 uv.lock,获得可复现的章节环境
    uv sync --locked --extra ch1
    
    # 未安装 uv 时:使用 pip 从 pyproject.toml 重新解析
    python -m pip install -e ".[ch1]"

    运行会调用模型的实验前,请按该实验 README 配置凭据:支持根目录配置的实验可复制 .env.example 为 .env 并填入至少一个提供商 Key;有些实验要求在自身目录放 .env 或直接导出环境变量。只有在实验 README 或 CLI 明确列出 ollama 时,才可启动本地 Ollama 并添加 --provider ollama。

    安装后可从仓库根目录运行实验,例如:

    uv run python chapter1/context/main.py
    # 使用 pip 安装时也可直接运行:python chapter1/context/main.py
  • uv 安装方法见 官方文档;pip 仍受支持,但不会使用锁文件。
  • 各实验现有的 requirements.txt 在迁移期间继续有效,适合只运行单个项目或需要特殊版本约束的情况。
  • all 是不含本地训练栈的 CPU 友好组合,并不代表每个实验;uv sync 每次都会精确同步当前选择,使用特殊 extra 时请合并到同一条命令,例如 uv sync --locked --extra ch2 --extra vllm 或 uv sync --locked --extra ch7 --extra unsloth;pip 对应为 python -m pip install -e ".[ch2,vllm]"。
  • 浏览器、CUDA、FFmpeg、Ollama、Playwright 浏览器及外部仓库等系统依赖,请继续参考各实验 README。第 8 章部分内置第三方组件需要 Python 3.12+。

🔑 API 密钥

建议申请下面几个平台的 API Key 方便学习。模型选型可参考 这篇指南。

平台 链接 特色 访问节点
Kimi(月之暗面) https://platform.moonshot.cn/ Kimi 系列,Coding、Agent 能力强 中国大陆
智谱 GLM https://open.bigmodel.cn/ GLM-5.2 等,Coding、Agent 能力强 中国大陆
Siliconflow https://siliconflow.cn/ 各种开源模型(DeepSeek、Qwen 等),中国大陆访问速度快 中国大陆
DeepSeek https://platform.deepseek.com/ DeepSeek 官方 API 全球 + 中国大陆
Atlas Cloud https://www.atlascloud.ai/ 通过 OpenAI 兼容接口访问多个厂商的模型 全球
Krill AI www.krill-code.com 一站式访问全球及国内主流模型(OpenAI、Claude、Gemini、Grok、Kimi、GLM、DeepSeek、Qwen、Minimax) 全球 + 中国大陆
OpenRouter https://openrouter.ai/ 一站式访问全球及国内主流模型(GPT、Claude、Gemini、Kimi、GLM、DeepSeek、Qwen 等) 全球

❓ 常见问题

Q:有 PDF / EPUB 吗?需要自己编译吗? 不需要。电子书一节列出了 15 种语言的 PDF / EPUB 下载链接,始终指向 main 分支的最新构建;也可以在线阅读。只有想修改书稿并重新排版时才需要自行编译。

Q:阅读本书需要哪些前置知识? 引言的“前置知识”一节有完整说明:能读懂并修改中等复杂度的 Python 代码;用过 ChatGPT、Claude 等 LLM 产品;熟悉至少一款 AI 辅助编程工具(Claude Code、Codex、Cursor 等);了解命令行、Git、JSON、REST API 等软件工程常识。除第八章后训练外,全书对数学和机器学习的要求很低。

Q:知识点多、读完就忘,怎么消化? 不要只读正文。推荐的方式是结合每章实验自己动手——不是看配套代码,而是读懂书中的设计原则后,借助 coding agent 从头实现一遍,观察输出、排查不符合预期的地方;每章末尾的思考题也是很好的自测。更系统的路径见学习建议。一位读者的总结很贴切:先把书看薄,再把书看厚,再把书看薄。

Q:实验代码需要逐行弄明白吗? 不需要。本书的配套代码全部由 coding agent 根据书稿生成,作者也不会逐行阅读。关键是把架构、核心组件和设计原则想清楚,然后让 AI 去写代码、跑测试、修 bug,人负责最初的设计和最终的验收。

Q:思考题有参考答案吗? 有:book/reference-answers.md(在线版)。它们只是参考,不是标准答案,欢迎在 Discussions 里讨论你的不同看法。

Q:读完之后有什么可以落地的实践项目? 推荐从头做一个像 Claude Code、Codex 那样的 coding agent:第 1–5 章足以做出一个可用的 coding agent;第 7、9 章帮它建立评估集并从失败案例中持续改进;第 8 章介入模型本身;第 6、10 章为它增加语音、Computer Use 等交互方式和多 Agent 协作。评测、观测、可靠性这些工程环节,可以从第 7 章的评估实验入手:先为自己的 agent 建一个十几条任务的小评估集,再围绕失败用例做改进。

Q:哪里提问和讨论?

  • 书稿勘误、实验 bug、翻译问题:开 Issue,请注明章节、小节和原文句子。
  • 阅读疑问、思考题讨论、经验分享、资料推荐:请使用 GitHub Discussions。

Q:发现错误想修改怎么做? 欢迎直接提 PR。中文版 book/ 是正本,其余语言由中文同步:修改正文时只需改中文版并在 PR 里说明,翻译会在合并后统一同步。详见贡献。

💎 赞助商

感谢 Krill AI 赞助本项目!Krill 提供 GPT / Claude / Gemini / 多款国产模型的官方稳定极速 API 中转服务,支持企业级定制、报销开票、7×16h 专属技术支持,更有独家适配的 WebSocket 连接方式,畅享极速首字速度。

Krill 为本书读者提供特别优惠:使用此链接注册并在充值时填写优惠码「ai-agent-book」,首次购买 Codex 套餐可享 77 折优惠!

🧪 配套实验的执行状态、证据与未完成门禁单独记录在 docs/EXPERIMENT_STATUS.md;克隆或安装源码不代表实验完成。

📦 附录 · 外部仓库获取

本附录列出第 6、7、8、10 章与实验直接映射的 22 个外部仓库,另含 1 个辅助训练 cookbook;它们不作为本书源码内置依赖(出于体积与版权),需要自行克隆到对应目录。部分训练项目还会按各自 README 拉取模型、数据集和模拟器依赖,不计入这 22 个直接映射。以下版本来自 2026-07-30 工作区 checkout 或同日只读上游审计;固定源码只建立复现起点,不代表训练、硬件、浏览器或多 Agent 实验已经执行。

一键克隆脚本

🔧 展开克隆命令(共 23 个 checkout:22 个实验映射 + 1 个辅助 cookbook)
# 第 6 章 · GUI 与机器人外部复现轨道
git clone https://github.com/anthropics/claude-quickstarts.git chapter6/claude-quickstarts && git -C chapter6/claude-quickstarts checkout --detach 9bcc95e316e5ef6542b4c9d0469f4078829eead5  # 实验 6-8 使用 computer-use-demo/
git clone https://github.com/browser-use/browser-use.git chapter6/browser-use && git -C chapter6/browser-use checkout --detach ec9277c5001f2cb78ee419c927775a3cfc227ff8  # 实验 6-9
git clone https://github.com/Vector-Wangel/XLeRobot.git chapter6/XLeRobot && git -C chapter6/XLeRobot fetch origin 3d14695e40c9c68229c0aacffca6053c75cd3eb6 && git -C chapter6/XLeRobot checkout --detach 3d14695e40c9c68229c0aacffca6053c75cd3eb6 && test "$(git -C chapter6/XLeRobot rev-parse HEAD)" = "3d14695e40c9c68229c0aacffca6053c75cd3eb6"  # 实验 6-10、6-12 共用
git clone https://github.com/Grigorij-Dudnik/RoboCrew.git chapter6/RoboCrew && git -C chapter6/RoboCrew fetch origin c749148f29bd14e61347f9fc3530c343fff0d994 && git -C chapter6/RoboCrew checkout --detach c749148f29bd14e61347f9fc3530c343fff0d994 && test "$(git -C chapter6/RoboCrew rev-parse HEAD)" = "c749148f29bd14e61347f9fc3530c343fff0d994"  # 实验 6-11、6-12;RoboCrew v0.3.1
git clone https://github.com/StoneT2000/lerobot-sim2real.git chapter6/lerobot-sim2real && git -C chapter6/lerobot-sim2real fetch origin 87d6c1d969f6e0ca4dc5697940804e231118a63a && git -C chapter6/lerobot-sim2real checkout --detach 87d6c1d969f6e0ca4dc5697940804e231118a63a && test "$(git -C chapter6/lerobot-sim2real rev-parse HEAD)" = "87d6c1d969f6e0ca4dc5697940804e231118a63a"  # 实验 6-14

# 第 7 章 · 评测基准
git clone https://github.com/google-research/android_world.git chapter7/android_world && git -C chapter7/android_world checkout --detach 0e95d641e244504c22087cc29b013f3b2428a261
git clone https://huggingface.co/datasets/gaia-benchmark/GAIA chapter7/GAIA && git -C chapter7/GAIA checkout --detach 682dd723ee1e1697e00360edccf2366dc8418dd9
git clone https://github.com/xlang-ai/OSWorld.git chapter7/OSWorld && git -C chapter7/OSWorld checkout --detach 8365edc975efd0477a0d62444a5beed562ab5a7b
git clone https://github.com/SWE-bench/SWE-bench.git chapter7/SWE-bench && git -C chapter7/SWE-bench checkout --detach 5cd4be9fb23971679cbbafe5a0ecade27cef99be
git clone https://github.com/sierra-research/tau2-bench.git chapter7/tau2-bench && git -C chapter7/tau2-bench checkout --detach 8d005b0e5b9e4af0bc055886fa7f95fc86d1710e
git clone https://github.com/laude-institute/terminal-bench.git chapter7/terminal-bench && git -C chapter7/terminal-bench checkout --detach 8384a179b1b8688f6ea5233a4d9d51218df1ac96

# 第 8 章 · 训练框架(bojieli/* 为本书适配的分支)
git clone https://github.com/bojieli/minimind.git chapter8/MiniMind-pretrain/minimind && git -C chapter8/MiniMind-pretrain/minimind fetch origin 8bdc5d97d5845a8c1ac2ed56a5b8b4c0d0fb0795 && git -C chapter8/MiniMind-pretrain/minimind checkout --detach 8bdc5d97d5845a8c1ac2ed56a5b8b4c0d0fb0795 && test "$(git -C chapter8/MiniMind-pretrain/minimind rev-parse HEAD)" = "8bdc5d97d5845a8c1ac2ed56a5b8b4c0d0fb0795"  # 实验 8-3
git clone https://github.com/bojieli/minimind-v.git chapter8/MiniMind-pretrain/minimind-v && git -C chapter8/MiniMind-pretrain/minimind-v fetch origin ead791c530fa5f9a3549dbfe9e11ec732d18d2e5 && git -C chapter8/MiniMind-pretrain/minimind-v checkout --detach ead791c530fa5f9a3549dbfe9e11ec732d18d2e5 && test "$(git -C chapter8/MiniMind-pretrain/minimind-v rev-parse HEAD)" = "ead791c530fa5f9a3549dbfe9e11ec732d18d2e5"  # 实验 8-4
git clone https://github.com/bojieli/AdaptThink.git chapter8/AdaptThink-original && git -C chapter8/AdaptThink-original checkout --detach 0033ad172dd53ac64004b763477407014f21b838  # 实验 8-10
git clone https://github.com/bojieli/SFTvsRL.git chapter8/SFTvsRL && git -C chapter8/SFTvsRL checkout --detach fef0a4a3367260a0934be1e40b01e4021698e023  # 实验 8-11、8-12
git clone https://github.com/bojieli/AWorld.git chapter8/AWorld && git -C chapter8/AWorld checkout --detach a52d61d6d483e66b22ef16970eae5bbf4f4ab2ec  # 实验 8-15
git clone https://github.com/bojieli/verl.git chapter8/verl && git -C chapter8/verl checkout --detach 1593fc3a8cf894debdc3dece2a23ed739c282789  # 实验 8-14 ReTool 配方;8-15 训练后端
git clone https://github.com/bojieli/SandboxFusion.git chapter8/SandboxFusion && git -C chapter8/SandboxFusion fetch origin 4a0d573ebd64c98234c190a9d1d49e4276199a0c && git -C chapter8/SandboxFusion checkout --detach 4a0d573ebd64c98234c190a9d1d49e4276199a0c && test "$(git -C chapter8/SandboxFusion rev-parse HEAD)" = "4a0d573ebd64c98234c190a9d1d49e4276199a0c"  # 实验 8-14 代码沙箱
git clone https://github.com/thinking-machines-lab/tinker-cookbook.git chapter8/tinker-cookbook && git -C chapter8/tinker-cookbook checkout --detach fc8449187041cf102905f3f751e6d2eac7f9f754
git clone https://github.com/19PINE-AI/rlvp.git chapter8/RLVP/rlvp && git -C chapter8/RLVP/rlvp fetch origin 1ad30bc7e338911fb733739393d92c420f4d8bee && git -C chapter8/RLVP/rlvp checkout --detach 1ad30bc7e338911fb733739393d92c420f4d8bee && test "$(git -C chapter8/RLVP/rlvp rev-parse HEAD)" = "1ad30bc7e338911fb733739393d92c420f4d8bee"  # 实验 8-16
git clone https://github.com/PRIME-RL/SimpleVLA-RL.git chapter8/SimpleVLA-RL/SimpleVLA-RL && git -C chapter8/SimpleVLA-RL/SimpleVLA-RL checkout --detach 7c51662df27b586f9e8a1ab35fcf849f2b8852f9  # 实验 8-13

# 第 10 章 · 双 Agent 架构(已独立为 TalkAct 项目)+ 斯坦福 AI 小镇
git clone https://github.com/19PINE-AI/TalkAct.git chapter10/use-computer-while-calling && git -C chapter10/use-computer-while-calling fetch origin 7d70007f72d45ddfc1a14e8e229b6d444e4919a2 && git -C chapter10/use-computer-while-calling checkout --detach 7d70007f72d45ddfc1a14e8e229b6d444e4919a2 && test "$(git -C chapter10/use-computer-while-calling rev-parse HEAD)" = "7d70007f72d45ddfc1a14e8e229b6d444e4919a2"  # 实验 10-3
git clone https://github.com/joonspk-research/generative_agents.git chapter10/generative_agents && git -C chapter10/generative_agents fetch origin fe05a71d3e4ed7d10bf68aa4eda6dd995ec070f4 && git -C chapter10/generative_agents checkout --detach fe05a71d3e4ed7d10bf68aa4eda6dd995ec070f4 && test "$(git -C chapter10/generative_agents rev-parse HEAD)" = "fe05a71d3e4ed7d10bf68aa4eda6dd995ec070f4"  # 实验 10-5

上述九个当前缺失的 checkout(8-3、8-4、8-16、8-14 的 SandboxFusion、6-10/6-12 共用的 XLeRobot、6-11/6-12 的 RoboCrew、6-14 的 lerobot-sim2real、第 10 章固定并发基线、10-5)也已固定到不可变 SHA;命令会 detached checkout 并用 rev-parse HEAD 做相等性校验。第 10 章 use-computer-while-calling 已发展为独立维护的 19PINE-AI/TalkAct。源码存在或安装成功都不是实验完成声明。

 from  https://github.com/bojieli/ai-agent-book