@yiyi_zhang/laoshi 0.2.0-beta.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +3 -2
- package/adapters/dsh/adapter.ts +22 -1
- package/adapters/dsh/dsh-runtime.ts +14 -3
- package/adapters/dsh/install.mjs +16 -4
- package/adapters/dsh/plugin/index.mjs +197 -18
- package/adapters/dsh/plugin/package.json +1 -1
- package/adapters/mogao/adapter.ts +10 -1
- package/adapters/mogao/mogao-runtime.ts +58 -23
- package/adapters/mogao/skill/setup.md +6 -0
- package/adapters/paseo/install.mjs +13 -4
- package/adapters/paseo/plugin/client/data.ts +13 -2
- package/adapters/paseo/plugin/client/detail.tsx +244 -4
- package/adapters/paseo/plugin/client/format.ts +25 -117
- package/adapters/paseo/plugin/client/overview.tsx +3 -3
- package/adapters/paseo/plugin/index.server.ts +2 -1
- package/adapters/paseo/plugin/package.json +1 -1
- package/adapters/paseo/plugin/paseo-plugin.json +1 -1
- package/adapters/paseo/plugin/server/handlers.ts +22 -4
- package/adapters/paseo/plugin/server/req.ts +17 -4
- package/adapters/paseo/plugin/shared/contracts.ts +28 -2
- package/adapters/paseo/plugin/shared/view-model.ts +425 -0
- package/bin/ensure-version.mjs +60 -0
- package/bin/req-doctor.mjs +5 -0
- package/bin/req.mjs +18 -0
- package/bin/start-pipeline.mjs +5 -0
- package/contracts/cli-json.md +3 -1
- package/docs/design/builtin-capabilities.md +2 -2
- package/docs/design/cli-adapter.md +1 -1
- package/docs/design/dsh-adapter.md +11 -11
- package/docs/design/shared-ui.md +43 -0
- package/docs/guide//345/234/250/346/221/270/351/253/230/344/270/212/344/275/277/347/224/250.md +2 -1
- package/docs/guide//345/256/211/350/243/205/344/270/216/345/215/207/347/272/247.md +13 -8
- package/docs/guide//347/234/237/345/256/236/347/216/257/345/242/203/350/265/260/346/237/245.md +78 -0
- package/docs/guide//347/273/264/346/212/244/350/200/205/346/214/207/345/215/227.md +36 -6
- package/engine/prompts/00-shared-context.md +7 -0
- package/engine/prompts/03-design.md +2 -0
- package/engine/prompts/04-design-review.md +5 -1
- package/engine/skill-fragments/defaults.md +5 -0
- package/engine/src/api.ts +11 -2
- package/engine/src/board.ts +435 -0
- package/engine/src/config.ts +23 -0
- package/engine/src/diagnose.ts +238 -0
- package/engine/src/doctor.ts +25 -0
- package/engine/src/estimate.ts +11 -0
- package/engine/src/extensions.ts +271 -0
- package/engine/src/handover-cmd.ts +47 -0
- package/engine/src/handover.ts +89 -0
- package/engine/src/history.ts +102 -0
- package/engine/src/joint.ts +49 -4
- package/engine/src/launch.ts +20 -5
- package/engine/src/main.ts +1 -1
- package/engine/src/messages.ts +58 -0
- package/engine/src/pipeline.ts +121 -5
- package/engine/src/platform.ts +6 -0
- package/engine/src/reply.ts +27 -6
- package/engine/src/semver.ts +21 -0
- package/engine/src/skills-render.ts +10 -1
- package/package.json +5 -2
- package/site-dist/404.html +2 -2
- package/site-dist/assets/{app.CXydUhZx.js → app.DZpVs0VH.js} +1 -1
- package/site-dist/assets/changelog.md.CdUYbro4.js +1 -0
- package/site-dist/assets/{changelog.md.BU-CvyJ1.lean.js → changelog.md.CdUYbro4.lean.js} +1 -1
- package/site-dist/assets/chunks/@localSearchIndexroot.CHr-ITwS.js +1 -0
- package/site-dist/assets/chunks/{VPLocalSearchBox.CIjDV0ax.js → VPLocalSearchBox.BHkmziy1.js} +1 -1
- package/site-dist/assets/chunks/{theme.CWtC1Kby.js → theme.BsPChbDE.js} +2 -2
- package/site-dist/assets/guide_dsh.md.D0XhcUHz.js +7 -0
- package/site-dist/assets/guide_dsh.md.D0XhcUHz.lean.js +7 -0
- package/site-dist/assets/{guide_getting-started.md.BxOxfic_.js → guide_getting-started.md.BDd3nU5n.js} +1 -1
- package/site-dist/assets/{guide_install.md.By4WxsJG.js → guide_install.md.SsIHMfUu.js} +7 -5
- package/site-dist/assets/{guide_install.md.By4WxsJG.lean.js → guide_install.md.SsIHMfUu.lean.js} +7 -5
- package/site-dist/assets/guide_maintainer.md.CvqvRle1.js +1 -0
- package/site-dist/assets/guide_maintainer.md.CvqvRle1.lean.js +1 -0
- package/site-dist/assets/{guide_mogao.md.S0eln1Pr.js → guide_mogao.md.TCu3lgE9.js} +2 -2
- package/site-dist/assets/{guide_mogao.md.S0eln1Pr.lean.js → guide_mogao.md.TCu3lgE9.lean.js} +2 -2
- package/site-dist/assets/guide_walkthrough.md.nj_PWP9Y.js +5 -0
- package/site-dist/assets/guide_walkthrough.md.nj_PWP9Y.lean.js +5 -0
- package/site-dist/assets/reference_contracts_cli-json.md.3iU9h4rw.js +1 -0
- package/site-dist/assets/reference_contracts_cli-json.md.3iU9h4rw.lean.js +1 -0
- package/site-dist/assets/{reference_design_builtin-capabilities.md.CZYtjo_v.js → reference_design_builtin-capabilities.md.k5NXkESv.js} +2 -2
- package/site-dist/assets/{reference_design_builtin-capabilities.md.CZYtjo_v.lean.js → reference_design_builtin-capabilities.md.k5NXkESv.lean.js} +2 -2
- package/site-dist/assets/{reference_design_cli-adapter.md.pJy3x6Un.js → reference_design_cli-adapter.md.C1lcDATP.js} +1 -1
- package/site-dist/assets/{reference_design_cli-adapter.md.pJy3x6Un.lean.js → reference_design_cli-adapter.md.C1lcDATP.lean.js} +1 -1
- package/site-dist/changelog.html +5 -5
- package/site-dist/guide/cli.html +4 -4
- package/site-dist/guide/dsh.html +8 -6
- package/site-dist/guide/getting-started.html +5 -5
- package/site-dist/guide/how-it-works.html +4 -4
- package/site-dist/guide/index.html +4 -4
- package/site-dist/guide/install.html +11 -9
- package/site-dist/guide/intranet.html +4 -4
- package/site-dist/guide/maintainer.html +5 -5
- package/site-dist/guide/mogao.html +7 -7
- package/site-dist/guide/phases.html +4 -4
- package/site-dist/guide/project.html +4 -4
- package/site-dist/guide/user.html +4 -4
- package/site-dist/guide/walkthrough.html +34 -0
- package/site-dist/hashmap.json +1 -1
- package/site-dist/index.html +4 -4
- package/site-dist/reference/adr/0001-new-repo-core-and-adapters.html +4 -4
- package/site-dist/reference/adr/0002-two-orchestration-modes.html +4 -4
- package/site-dist/reference/adr/0003-generate-once-then-lock.html +4 -4
- package/site-dist/reference/adr/0004-external-contracts-stay-stable.html +4 -4
- package/site-dist/reference/adr/0005-skill-names.html +4 -4
- package/site-dist/reference/adr/0006-deterministic-engine-platform-capabilities.html +4 -4
- package/site-dist/reference/adr/0007-one-install-many-repos.html +4 -4
- package/site-dist/reference/adr/0008-capability-sources-and-platform-plugin.html +4 -4
- package/site-dist/reference/adr/index.html +4 -4
- package/site-dist/reference/commands.html +4 -4
- package/site-dist/reference/config.html +4 -4
- package/site-dist/reference/contracts/agent-runtime.html +4 -4
- package/site-dist/reference/contracts/cli-json.html +5 -5
- package/site-dist/reference/contracts/feature-files.html +4 -4
- package/site-dist/reference/contracts/index.html +4 -4
- package/site-dist/reference/contracts/notifier-event.html +4 -4
- package/site-dist/reference/contracts/result-file.html +4 -4
- package/site-dist/reference/contracts/spec.html +4 -4
- package/site-dist/reference/contracts/state.html +4 -4
- package/site-dist/reference/contracts/usage-record.html +4 -4
- package/site-dist/reference/contracts/verify.html +4 -4
- package/site-dist/reference/design/adapter-guide.html +4 -4
- package/site-dist/reference/design/architecture.html +4 -4
- package/site-dist/reference/design/builtin-capabilities.html +6 -6
- package/site-dist/reference/design/cli-adapter.html +5 -5
- package/site-dist/reference/design/platform-vocabulary.html +4 -4
- package/site-dist/reference/scope.html +4 -4
- package/skills/laoshi/SKILL.md +1 -3
- package/skills/laoshi-setup/SKILL.md +1 -1
- package/ui/shared/view-model.ts +424 -0
- package/ui/web/board.ts +1126 -0
- package/site-dist/assets/changelog.md.BU-CvyJ1.js +0 -1
- package/site-dist/assets/chunks/@localSearchIndexroot.CfgJeQRO.js +0 -1
- package/site-dist/assets/guide_dsh.md.0X-eYB87.js +0 -5
- package/site-dist/assets/guide_dsh.md.0X-eYB87.lean.js +0 -5
- package/site-dist/assets/guide_maintainer.md.Da1ffqxm.js +0 -1
- package/site-dist/assets/guide_maintainer.md.Da1ffqxm.lean.js +0 -1
- package/site-dist/assets/reference_contracts_cli-json.md.D6vfWOD9.js +0 -1
- package/site-dist/assets/reference_contracts_cli-json.md.D6vfWOD9.lean.js +0 -1
- /package/site-dist/assets/{guide_getting-started.md.BxOxfic_.lean.js → guide_getting-started.md.BDd3nU5n.lean.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s,o as i,c as e,a2 as t}from"./chunks/framework.BetZR81g.js";const k=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md","lastUpdated":1793891960000}'),l={name:"guide/getting-started.md"};function d(o,a,p,n,h,c){return i(),e("div",null,[...a[0]||(a[0]=[t('<h1 id="快速开始" tabindex="-1">快速开始 <a class="header-anchor" href="#快速开始" aria-label="Permalink to "快速开始""></a></h1><p>从安装到第一个需求,大约 15 分钟。每台机器只需安装一次,装在运行 agent 平台(Paseo 或 DeepSeek Harness)的那台机器上。</p><h2 id="_1-安装" tabindex="-1">1. 安装 <a class="header-anchor" href="#_1-安装" aria-label="Permalink to "1. 安装""></a></h2><p>只需要 Node.js 22.19+ 和能访问的 npm 源:</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-
|
|
1
|
+
import{_ as s,o as i,c as e,a2 as t}from"./chunks/framework.BetZR81g.js";const k=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md","lastUpdated":1793891960000}'),l={name:"guide/getting-started.md"};function d(o,a,p,n,h,c){return i(),e("div",null,[...a[0]||(a[0]=[t('<h1 id="快速开始" tabindex="-1">快速开始 <a class="header-anchor" href="#快速开始" aria-label="Permalink to "快速开始""></a></h1><p>从安装到第一个需求,大约 15 分钟。每台机器只需安装一次,装在运行 agent 平台(Paseo 或 DeepSeek Harness)的那台机器上。</p><h2 id="_1-安装" tabindex="-1">1. 安装 <a class="header-anchor" href="#_1-安装" aria-label="Permalink to "1. 安装""></a></h2><p>只需要 Node.js 22.19+ 和能访问的 npm 源:</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-EPLs-" id="tab-vX_7wnd" checked><label data-title="DeepSeek Harness" for="tab-vX_7wnd">DeepSeek Harness</label><input type="radio" name="group-EPLs-" id="tab-qyNuC9S"><label data-title="Paseo" for="tab-qyNuC9S">Paseo</label><input type="radio" name="group-EPLs-" id="tab-nRR1fno"><label data-title="公司内网(npm 镜像)" for="tab-nRR1fno">公司内网(npm 镜像)</label></div><div class="blocks"><div class="language-sh vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npx</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -y</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @yiyi_zhang/laoshi@latest</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --platform</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dsh</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npx</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -y</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @yiyi_zhang/laoshi@latest</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --platform</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> paseo</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npx</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -y</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --registry=https://npm.example.internal/</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @yiyi_zhang/laoshi@latest</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --platform</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dsh</span></span></code></pre></div></div></div><p>Windows 上在 cmd 或 Git Bash 中运行即可,不需要 PowerShell,也不需要管理员权限。公司内网只有 npm 镜像时,用 <code>--registry</code> 写上镜像地址,它会保存为本机的 npm 源,以后 <code>laoshi upgrade</code> 也从镜像取。</p><p>安装会依次:</p><ol><li>检查 Node.js、npm 和 git,确定 npm 源;</li><li>从 npm 安装 <code>laoshi</code>(npm 全局目录不可写时装到 <code>~/.laoshi/npm</code>,不需要 sudo);</li><li>写好安装根 <code>~/.laoshi</code> 和安装级配置(平台、各角色用的模型);</li><li>把 <code>/laoshi</code> 等 skill 按平台渲染后装进平台的 skill 目录(不覆盖别人放的同名 skill);</li><li>做平台需要的设置:dsh 上安装并挂载 laoshi 的 dsh 插件;</li><li>在 <code>~/.laoshi/bin</code> 中放好 <code>laoshi</code> 命令。</li></ol><p>再次运行同一条命令即升级(或运行 <code>laoshi upgrade</code>)。装好后运行 <code>laoshi docs</code> 可以在本机打开这份文档(和装的版本一致,不需要外网)。</p><div class="tip custom-block"><p class="custom-block-title">没有 npm 源时</p><p>完全离线的机器用带依赖的离线安装包,见 <a href="./intranet">内网安装与验证</a>。各项选项见 <a href="./install">安装与升级</a>。</p></div><h2 id="_2-体检" tabindex="-1">2. 体检 <a class="header-anchor" href="#_2-体检" aria-label="Permalink to "2. 体检""></a></h2><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">laoshi</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-project</span></span></code></pre></div><p>它检查安装、配置、平台(Paseo daemon 或 dsh 插件)、各角色的模型。全部是 ✓ 或只有 ⚠ 即可继续;✗ 的项按提示处理。</p><details class="details custom-block"><summary><code>laoshi</code> 命令找不到?</summary><p>npm 的全局目录不在 PATH 中时,使用安装根中的命令:<code>~/.laoshi/bin/laoshi</code>(Windows 上是 <code>%USERPROFILE%\\.laoshi\\bin\\laoshi.cmd</code>),或把那个目录加进 PATH。</p></details><h2 id="_3-接入项目-每个项目一次" tabindex="-1">3. 接入项目(每个项目一次) <a class="header-anchor" href="#_3-接入项目-每个项目一次" aria-label="Permalink to "3. 接入项目(每个项目一次)""></a></h2><p>在平台中打开项目主目录(最好在主分支上),新开对话,输入:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>/laoshi-setup</span></span></code></pre></div><p>agent 会读项目、只问读不出来的事、把安装依赖/测试/启动服务的命令实际跑一遍,然后生成并请你确认这些文件:</p><table tabindex="0"><thead><tr><th>文件</th><th>作用</th></tr></thead><tbody><tr><td><code>.requirement-pipeline/project-notes.md</code></td><td>项目约定:包管理工具、不能改的目录、提交格式</td></tr><tr><td><code>.requirement-pipeline/verify.md</code></td><td>验证方法:实际跑通的安装、测试、启动命令</td></tr><tr><td><code>paseo.json</code>(Paseo)或 <code>.laoshi/services.json</code>(dsh 等)</td><td>新建工作区时自动准备环境;服务由平台或 laoshi 托管,每个工作区独立端口</td></tr></tbody></table><h2 id="_4-提第一个需求" tabindex="-1">4. 提第一个需求 <a class="header-anchor" href="#_4-提第一个需求" aria-label="Permalink to "4. 提第一个需求""></a></h2><p>在项目的对话中输入 <code>/laoshi</code> 和一句话:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>/laoshi 登录页增加短信验证码登录</span></span></code></pre></div><p>接下来:</p><ol><li>AI 复述理解,一次问一个问题;拿不准时说"你定"。</li><li>标准档会请另一个模型独立审阅需求说明,把发现的问题逐个问你。</li><li>确认需求说明后,选择现在开始或预约时间(例如今晚 10 点)。</li><li>开发在后台进行,每一步都出现在对话的子 agent 列表中;你会收到几句进展。</li><li>完成后收到结论和报告,说"我要验收",按验收标准逐条核对。</li></ol><div class="tip custom-block"><p class="custom-block-title">从一个小需求开始</p><p>第一次建议用一个范围很小的改动(例如改一段文案),走快速档,十几分钟就能看到完整的流程。</p></div><h2 id="下一步" tabindex="-1">下一步 <a class="header-anchor" href="#下一步" aria-label="Permalink to "下一步""></a></h2><ul><li><a href="./user">使用者指南</a>:过程中可以说什么、会收到哪些通知、怎么验收。</li><li><a href="./how-it-works">工作原理</a>:流水线的每一步做什么、产物在哪里。</li><li><a href="./project">项目定制与运行规则</a>:档位、评审小组、分阶段执行、通知等配置。</li></ul>',27)])])}const g=s(l,[["render",d]]);export{k as __pageData,g as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{_ as a,o as e,c as n,j as l,a as i}from"./chunks/framework.BetZR81g.js";const c=JSON.parse('{"title":"安装与升级","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"guide/install.md","filePath":"guide/install.md","lastUpdated":null}'),t={name:"guide/install.md"};function h(d,s,o,u,k,r){return e(),n("div",null,[...s[0]||(s[0]=[l("div",null,[l("h1",{id:"安装与升级",tabindex:"-1"},[i("安装与升级 "),l("a",{class:"header-anchor",href:"#安装与升级","aria-label":'Permalink to "安装与升级"'},"")]),l("p",null,[i("本文面向负责安装的人:通常是开发同事,有经验的测试或产品同事也可以按步骤完成。每台机器只装一次(装在运行 agent 平台的那台机器上),之后这台机器上所有项目的对话都能使用 "),l("code",null,"/laoshi"),i("。")]),l("p",null,"laoshi 目前支持三个 agent 平台,另外可以不用平台、直接用编码 agent 命令行:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"平台"),l("th",null,"说明")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("a",{href:"https://paseo.sh",target:"_blank",rel:"noreferrer"},"Paseo"),i(" 0.11"),l("br"),l("code",null,"--platform paseo")]),l("td",null,"步骤 agent、工作区、服务、定时消息都由 Paseo daemon
|
|
1
|
+
import{_ as a,o as e,c as n,j as l,a as i}from"./chunks/framework.BetZR81g.js";const c=JSON.parse('{"title":"安装与升级","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"guide/install.md","filePath":"guide/install.md","lastUpdated":null}'),t={name:"guide/install.md"};function h(d,s,o,u,k,r){return e(),n("div",null,[...s[0]||(s[0]=[l("div",null,[l("h1",{id:"安装与升级",tabindex:"-1"},[i("安装与升级 "),l("a",{class:"header-anchor",href:"#安装与升级","aria-label":'Permalink to "安装与升级"'},"")]),l("p",null,[i("本文面向负责安装的人:通常是开发同事,有经验的测试或产品同事也可以按步骤完成。每台机器只装一次(装在运行 agent 平台的那台机器上),之后这台机器上所有项目的对话都能使用 "),l("code",null,"/laoshi"),i("。")]),l("p",null,"laoshi 目前支持三个 agent 平台,另外可以不用平台、直接用编码 agent 命令行:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"平台"),l("th",null,"说明")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("a",{href:"https://paseo.sh",target:"_blank",rel:"noreferrer"},"Paseo"),i(" 0.11–0.17"),l("br"),l("code",null,"--platform paseo")]),l("td",null,"步骤 agent、工作区、服务、定时消息都由 Paseo daemon 提供(优先 Web 端)")]),l("tr",null,[l("td",null,[i("DeepSeek Harness(dsh)"),l("br"),l("code",null,"--platform dsh")]),l("td",null,[i("步骤 agent 和定时消息由 laoshi 的 dsh 插件提供;工作区和服务用 laoshi 的内置实现("),l("code",null,"git worktree"),i("、"),l("code",null,".laoshi/services.json"),i(")")])]),l("tr",null,[l("td",null,[i("命令行 agent"),l("br"),l("code",null,"--platform cli")]),l("td",null,[i("不需要平台:步骤 agent 是 "),l("code",null,"claude -p"),i(" / "),l("code",null,"codex exec"),i(" 的一次运行;工作区和服务用 laoshi 的内置实现;没有通知发回对话,进展用 "),l("code",null,"laoshi status"),i(" 查看。见 "),l("a",{href:"./cli"},"adapters/cli")])]),l("tr",null,[l("td",null,[i("摸高"),l("br"),l("code",null,"--platform mogao")]),l("td",null,[i("以专家的形式提交到平台,第一次使用时自动装到工作区,不按本文安装;见"),l("a",{href:"./mogao"},"在摸高上使用")])])])]),l("h2",{id:"_1-安装布局",tabindex:"-1"},[i("1. 安装布局 "),l("a",{class:"header-anchor",href:"#_1-安装布局","aria-label":'Permalink to "1. 安装布局"'},"")]),l("p",null,"程序和本机配置分开存放。升级只替换程序,配置不动。"),l("div",{class:"language-text vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"text"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",null,"<npm 全局目录>/laoshi/ 程序(全局目录不可写时在 ~/.laoshi/npm 下)")]),i(`
|
|
2
2
|
`),l("span",{class:"line"},[l("span",null,"~/.laoshi/ 安装根(LAOSHI_HOME 可以换位置)")]),i(`
|
|
3
3
|
`),l("span",{class:"line"},[l("span",null,"├── config.json 安装级配置:平台、各角色的模型")]),i(`
|
|
4
4
|
`),l("span",{class:"line"},[l("span",null,"├── install.json 安装记录(--check、--uninstall 用)")]),i(`
|
|
5
5
|
`),l("span",{class:"line"},[l("span",null,"├── bin/laoshi(.cmd) laoshi 命令(不在 PATH 时用)")]),i(`
|
|
6
6
|
`),l("span",{class:"line"},[l("span",null,"├── prompts.local/ 本机提示词覆盖(可选)")]),i(`
|
|
7
7
|
`),l("span",{class:"line"},[l("span",null,"└── notifiers/ 外部通知模块(可选,见第 10 节)")]),i(`
|
|
8
|
-
`),l("span",{class:"line"},[l("span",null,"<skill 目录>/laoshi*/ 按平台渲染的 skill,带 .laoshi-install.json")])])])]),l("p",null,"skill 装到哪里由平台决定:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"平台"),l("th",null,"skill 目录")])]),l("tbody",null,[l("tr",null,[l("td",null,"Paseo"),l("td",null,[l("code",null,"~/.agents/skills"),i("(Codex、Pi、OpenCode 等读取),"),l("code",null,"~/.claude"),i(" 存在时还有 "),l("code",null,"~/.claude/skills")])]),l("tr",null,[l("td",null,"命令行 agent"),l("td",null,"与 Paseo 相同")]),l("tr",null,[l("td",null,"dsh"),l("td",null,[l("code",null,"$DSH_HOME/skills"),i("(默认 "),l("code",null,"~/.dsh/skills"),i(");dsh 插件装在 "),l("code",null,"$DSH_HOME/profiles/<profile>/node_modules/laoshi-dsh-plugin"),i(" 并挂载到 "),l("code",null,"cordis.patch.yml")])])])]),l("p",null,[l("code",null,"--target <目录>"),i(" 可以另外指定 skill 目录(可以写多次)。Windows 上 "),l("code",null,"~"),i(" 即 "),l("code",null,"%USERPROFILE%"),i("。安装器不使用符号链接,不需要管理员权限;在 Windows 上它只启动 "),l("code",null,"node"),i(" 和 "),l("code",null,"cmd.exe"),i(",不会启动 PowerShell。")]),l("h2",{id:"_2-前置条件",tabindex:"-1"},[i("2. 前置条件 "),l("a",{class:"header-anchor",href:"#_2-前置条件","aria-label":'Permalink to "2. 前置条件"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"项目"),l("th",null,"要求"),l("th",null,"如何确认")])]),l("tbody",null,[l("tr",null,[l("td",null,"Node.js"),l("td",null,"22.19 或更新"),l("td",null,[l("code",null,"node -v")])]),l("tr",null,[l("td",null,"npm"),l("td",null,"Node.js 自带;公司网络用镜像(见第 3 节)"),l("td",null,[l("code",null,"npm -v")])]),l("tr",null,[l("td",null,"git"),l("td",null,"近期版本"),l("td",null,[l("code",null,"git --version")])]),l("tr",null,[l("td",null,"平台"),l("td",null,[i("Paseo 0.11 的 daemon 在运行;或已装好 dsh("),l("code",null,"dsh"),i(" 命令可用,或知道它的 "),l("code",null,"bin.js"),i(" 位置)")]),l("td",null,[i("Paseo
|
|
8
|
+
`),l("span",{class:"line"},[l("span",null,"<skill 目录>/laoshi*/ 按平台渲染的 skill,带 .laoshi-install.json")])])])]),l("p",null,"skill 装到哪里由平台决定:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"平台"),l("th",null,"skill 目录")])]),l("tbody",null,[l("tr",null,[l("td",null,"Paseo"),l("td",null,[l("code",null,"~/.agents/skills"),i("(Codex、Pi、OpenCode 等读取),"),l("code",null,"~/.claude"),i(" 存在时还有 "),l("code",null,"~/.claude/skills")])]),l("tr",null,[l("td",null,"命令行 agent"),l("td",null,"与 Paseo 相同")]),l("tr",null,[l("td",null,"dsh"),l("td",null,[l("code",null,"$DSH_HOME/skills"),i("(默认 "),l("code",null,"~/.dsh/skills"),i(");dsh 插件装在 "),l("code",null,"$DSH_HOME/profiles/<profile>/node_modules/laoshi-dsh-plugin"),i(" 并挂载到 "),l("code",null,"cordis.patch.yml")])])])]),l("p",null,[l("code",null,"--target <目录>"),i(" 可以另外指定 skill 目录(可以写多次)。Windows 上 "),l("code",null,"~"),i(" 即 "),l("code",null,"%USERPROFILE%"),i("。安装器不使用符号链接,不需要管理员权限;在 Windows 上它只启动 "),l("code",null,"node"),i(" 和 "),l("code",null,"cmd.exe"),i(",不会启动 PowerShell。")]),l("h2",{id:"_2-前置条件",tabindex:"-1"},[i("2. 前置条件 "),l("a",{class:"header-anchor",href:"#_2-前置条件","aria-label":'Permalink to "2. 前置条件"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"项目"),l("th",null,"要求"),l("th",null,"如何确认")])]),l("tbody",null,[l("tr",null,[l("td",null,"Node.js"),l("td",null,"22.19 或更新"),l("td",null,[l("code",null,"node -v")])]),l("tr",null,[l("td",null,"npm"),l("td",null,"Node.js 自带;公司网络用镜像(见第 3 节)"),l("td",null,[l("code",null,"npm -v")])]),l("tr",null,[l("td",null,"git"),l("td",null,"近期版本"),l("td",null,[l("code",null,"git --version")])]),l("tr",null,[l("td",null,"平台"),l("td",null,[i("Paseo 0.11–0.17 的 daemon 在运行;或已装好 dsh("),l("code",null,"dsh"),i(" 命令可用,或知道它的 "),l("code",null,"bin.js"),i(" 位置)")]),l("td",null,[i("Paseo:能在网页端("),l("code",null,"http://localhost:6767/"),i(",推荐)或桌面端对话;dsh:能在网页端对话")])]),l("tr",null,[l("td",null,"模型"),l("td",null,"Paseo:Claude Code、Codex、OpenCode、Pi 至少一种已在 Paseo 中登录;dsh:对话用的模型能正常回答"),l("td",null,"用它开一个对话")])])]),l("h2",{id:"_3-首次安装",tabindex:"-1"},[i("3. 首次安装 "),l("a",{class:"header-anchor",href:"#_3-首次安装","aria-label":'Permalink to "3. 首次安装"'},"")]),l("p",null,[l("strong",null,"一步安装(推荐)。"),i(" 只需要 Node.js 和能访问的 npm 源:")]),l("div",{class:"language-bash vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"bash"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"npx"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," -y"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," @yiyi_zhang/laoshi@latest"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --platform"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," dsh"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 或 --platform paseo")])])])]),l("p",null,[i("它依次:检查 Node.js、npm 和 git;确定 npm 源;"),l("code",null,"npm install -g"),i(" 这个版本(全局目录不可写时装到 "),l("code",null,"~/.laoshi/npm"),i(",不需要 sudo);然后运行装好的那份程序的 "),l("code",null,"laoshi install"),i(",完成安装级配置、skill 和平台的设置。npx 的临时目录会被清理,所以安装记录和 skill 都指向 npm 装好的那份。再次运行就是升级。")]),l("p",null,[i("指定版本:"),l("code",null,"npx -y @yiyi_zhang/laoshi@0.1.1 install --platform dsh"),i("。")]),l("p",null,[l("strong",null,"公司内网(只有 npm 镜像)。"),i(" 加上镜像地址:")]),l("div",{class:"language-bash vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"bash"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"npx"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," -y"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --registry=https://npm.example.internal/"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," @yiyi_zhang/laoshi@latest"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --platform"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," dsh")])])])]),l("ul",null,[l("li",null,[i("镜像地址会"),l("strong",null,"保存为本机的 npm 源"),i("(屏幕上会写出原来的值),以后 "),l("code",null,"laoshi upgrade"),i(" 也从镜像取。只想这一次用镜像时加 "),l("code",null,"--no-save-registry"),i("。本机原本就配好了镜像时不用写 "),l("code",null,"--registry"),i("。")]),l("li",null,[i("镜像上还没有这个版本(同步有延迟)时会直接说明,稍后再运行,或请管理镜像的同事同步 "),l("code",null,"laoshi"),i("。")]),l("li",null,[i("文档:装好后运行 "),l("code",null,"laoshi docs"),i(",在本机打开和这个版本一致的文档站点,不需要外网。")])]),l("p",null,[l("strong",null,"完全离线(连 npm 镜像也没有)。"),i(" 用带依赖的离线安装包,步骤见"),l("a",{href:"./intranet"},"内网安装与验证"),i("。")]),l("p",null,[l("strong",null,"已经有程序目录时"),i("(git 克隆、解压的安装包):在程序目录中 "),l("code",null,"npm ci --omit=dev"),i(",再运行 "),l("code",null,"node bin/req.mjs install --platform <平台>"),i("。")]),l("h3",{id:"安装选项",tabindex:"-1"},[i("安装选项 "),l("a",{class:"header-anchor",href:"#安装选项","aria-label":'Permalink to "安装选项"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"选项"),l("th",null,"含义")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"--platform <paseo|dsh|cli|mogao>")]),l("td",null,"装到哪个平台。第一次安装时要写,之后沿用安装记录;和已装的平台不一致时会停下")]),l("tr",null,[l("td",null,[l("code",null,"--home <目录>")]),l("td",null,[i("安装根,默认 "),l("code",null,"LAOSHI_HOME"),i(" 或 "),l("code",null,"~/.laoshi")])]),l("tr",null,[l("td",null,[l("code",null,"--target <目录>")]),l("td",null,"另外把 skill 装到这个目录")]),l("tr",null,[l("td",null,[l("code",null,"--force")]),l("td",null,"覆盖同名的、不是 laoshi 装的 skill(默认跳过并列出)")]),l("tr",null,[l("td",null,[l("code",null,"--check")]),l("td",null,[i("只检查,不改动(也可以用 "),l("code",null,"laoshi check"),i(")")])]),l("tr",null,[l("td",null,[l("code",null,"--dry-run")]),l("td",null,"演练:显示要做的事,不写文件")]),l("tr",null,[l("td",null,[l("code",null,"--uninstall")]),l("td",null,"卸载(见第 8 节)")]),l("tr",null,[l("td",null,[l("code",null,"--registry <地址>"),i("、"),l("code",null,"--no-save-registry")]),l("td",null,[i("只用于一步安装和 "),l("code",null,"laoshi upgrade"),i(":这次用的 npm 源,是否保存")])]),l("tr",null,[l("td",null,[i("Paseo:"),l("code",null,"--with-plugin")]),l("td",null,"安装时顺便把 Paseo 需求插件部署并加载到 Paseo")]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--dsh-home <目录>")]),l("td",null,[i("dsh 的数据目录,默认 "),l("code",null,"DSH_HOME"),i(" 或 "),l("code",null,"~/.dsh")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--profile <名称>")]),l("td",null,[i("插件装进哪个 profile,默认 "),l("code",null,"web")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--dsh-bin <路径>")]),l("td",null,[i("dsh 的 "),l("code",null,"bin.js"),i(","),l("code",null,"dsh"),i(" 不在 PATH 中时写;"),l("code",null,"dsh plugin add"),i(" 失败时安装器直接复制插件")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--approvals ask|allow")]),l("td",null,[i("步骤 agent 的审批请求:"),l("code",null,"ask"),i(" 交给人(默认),"),l("code",null,"allow"),i(" 直接批准一次")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--no-board")]),l("td",null,[i("关闭安装后默认随 dsh 启动的托管 Web 需求看板(默认开启 "),l("code",null,"board: true"),i(")")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--board-port <端口>")]),l("td",null,"固定 dsh 托管需求看板监听的端口(默认自动分配空闲端口)")])])]),l("p",null,[i("同名 skill 的处理:带 "),l("code",null,".laoshi-install.json"),i(" 标记的是 laoshi 装的,会被更新;paseo-req-kit 装的(带 "),l("code",null,".req-kit-install.json"),i(")和别人放的都不覆盖,安装器会列出它们,确认后再用 "),l("code",null,"--force"),i("。")]),l("h2",{id:"_4-配置模型",tabindex:"-1"},[i("4. 配置模型 "),l("a",{class:"header-anchor",href:"#_4-配置模型","aria-label":'Permalink to "4. 配置模型"'},"")]),l("p",null,[i("各角色(builder 实现、reviewer 评审等)用的模型写在 "),l("code",null,"~/.laoshi/config.json"),i(" 的 "),l("code",null,"agents"),i(" 中,项目的 "),l("code",null,".laoshi.json"),i(" 可以覆盖。写法因平台而异。")]),l("h3",{id:"paseo",tabindex:"-1"},[i("Paseo "),l("a",{class:"header-anchor",href:"#paseo","aria-label":'Permalink to "Paseo"'},"")]),l("p",null,[i("运行 "),l("code",null,"laoshi configure"),i("(逐项选择)或 "),l("code",null,"laoshi configure --auto"),i("(按推荐选好:两个不同厂商的模型分别做 builder 和 reviewer,都用免确认模式)。")]),l("p",null,[l("strong",null,"推荐引用 Paseo 的 agent profile。"),i(' 在 Paseo 的 设置 → 本机 → Agents → Agent profiles 中建好"实现""评审"等 profile,配置中只写名称,之后换模型只需在 Paseo 中改 profile:')]),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"agents"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": {")]),i(`
|
|
9
9
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "builder"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"platformProfile"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"实现"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," },")]),i(`
|
|
10
10
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "reviewer"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"platformProfile"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"评审"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," }")]),i(`
|
|
11
11
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"}")])])])]),l("p",null,"也可以直接写各项设置:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"字段"),l("th",null,"含义")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"provider")]),l("td",null,[l("code",null,"<Paseo 中的 provider ID>/<模型 ID>"),i(",只在第一个 "),l("code",null,"/"),i(" 处拆分")])]),l("tr",null,[l("td",null,[l("code",null,"modeId")]),l("td",null,"agent 的模式。必须选不会停下来等待批准的模式;没有模式的 agent 不写")]),l("tr",null,[l("td",null,[l("code",null,"featureValues")]),l("td",null,"agent 的功能开关,目前只有 OpenCode 需要")]),l("tr",null,[l("td",null,[l("code",null,"thinkingOptionId")]),l("td",null,"可选,思考强度")])])]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"agent"),l("th",null,[l("code",null,"provider"),i(" 写法")]),l("th",null,"无人值守的设置")])]),l("tbody",null,[l("tr",null,[l("td",null,"Claude Code"),l("td",null,[l("code",null,"claude/<模型 ID>")]),l("td",null,[l("code",null,'"modeId": "bypassPermissions"')])]),l("tr",null,[l("td",null,"Codex"),l("td",null,[l("code",null,"codex/<模型 ID>")]),l("td",null,[l("code",null,'"modeId": "full-access"')])]),l("tr",null,[l("td",null,"OpenCode"),l("td",null,[l("code",null,"opencode/<上游>/<模型 ID>")]),l("td",null,[l("code",null,'"modeId": "build"'),i(" 加 "),l("code",null,'"featureValues": { "auto_accept": true }')])]),l("tr",null,[l("td",null,"Pi"),l("td",null,[l("code",null,"pi/<上游>/<模型 ID>")]),l("td",null,[i("不写 "),l("code",null,"modeId")])])])]),l("p",null,"聊天 agent(使用者对话的那一个)的用法:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"agent"),l("th",null,"如何触发")])]),l("tbody",null,[l("tr",null,[l("td",null,"Claude Code、OpenCode"),l("td",null,[l("code",null,"/laoshi 我想……")])]),l("tr",null,[l("td",null,"Pi"),l("td",null,[l("code",null,"/skill:laoshi 我想……")])]),l("tr",null,[l("td",null,"Codex"),l("td",null,'直接说"用 laoshi 帮我……"')])])]),l("p",null,"聊天 agent 需要能执行命令和访问本机网络(流水线要连接 daemon)。"),l("h3",{id:"dsh",tabindex:"-1"},[i("dsh "),l("a",{class:"header-anchor",href:"#dsh","aria-label":'Permalink to "dsh"'},"")]),l("p",null,[l("code",null,"provider"),i(" 写成 "),l("code",null,"<dsh 的提供方>/<模型>"),i(",这个角色的步骤就用它;"),l("code",null,"thinkingOptionId"),i(" 作为推理强度。"),l("code",null,"dsh/chat-model"),i(" 表示用对话的模型(安装器的默认值):")]),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"agents"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": {")]),i(`
|
|
@@ -19,6 +19,8 @@ import{_ as a,o as e,c as n,j as l,a as i}from"./chunks/framework.BetZR81g.js";c
|
|
|
19
19
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," migrate"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --rollback"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 回滚:恢复状态文件、删除迁移写入的文件,接着用 paseo-req-kit")]),i(`
|
|
20
20
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --platform"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," paseo"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 迁移后安装 /laoshi* skill")])])])]),l("ul",null,[l("li",null,[i("旧目录 "),l("code",null,"~/.req-kit"),i(" 不改、不删,回滚后 paseo-req-kit 照常可用。")]),l("li",null,[i("配置里的 daemon 地址移到 "),l("code",null,"platform.paseo"),i(",旧的 profile、服务字段改为新名字。")]),l("li",null,[i("项目里的 "),l("code",null,".requirement-pipeline.json"),i(" 不改名(laoshi 照常读取),要改名请在仓库里改名后提交。")]),l("li",null,[i("设置过 "),l("code",null,"REQ_KIT_HOME"),i(" 的,迁移后改为设置 "),l("code",null,"LAOSHI_HOME"),i("。")])]),l("h2",{id:"_8-卸载",tabindex:"-1"},[i("8. 卸载 "),l("a",{class:"header-anchor",href:"#_8-卸载","aria-label":'Permalink to "8. 卸载"'},"")]),l("div",{class:"language-bash vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"bash"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --uninstall")])])])]),l("p",null,[i("删除 laoshi 装的 skill,dsh 上还会移除插件和 "),l("code",null,"cordis.patch.yml"),i(" 中的挂载。安装根("),l("code",null,"~/.laoshi"),i(")保留;确认不再使用后,"),l("code",null,"npm uninstall -g @yiyi_zhang/laoshi"),i(" 并手工删除 "),l("code",null,"~/.laoshi"),i("。各项目中的配置文件和功能目录保留,它们本身就是文档。")]),l("h2",{id:"_9-安全提示",tabindex:"-1"},[i("9. 安全提示 "),l("a",{class:"header-anchor",href:"#_9-安全提示","aria-label":'Permalink to "9. 安全提示"'},"")]),l("ul",null,[l("li",null,[i("步骤 agent 以免确认模式运行(dsh 上 "),l("code",null,"--approvals allow"),i(" 时同样),可以在本机执行命令。仓库和本机环境变量中不要放生产凭据;最好用专门的开发机或虚拟机。")]),l("li",null,"口令和密钥只放在环境变量中,不要写进配置文件。"),l("li",null,"流水线只做本地提交,合并和上线始终由人决定。")]),l("h2",{id:"_10-接入企业内部-im-可选",tabindex:"-1"},[i("10. 接入企业内部 IM(可选) "),l("a",{class:"header-anchor",href:"#_10-接入企业内部-im-可选","aria-label":'Permalink to "10. 接入企业内部 IM(可选)"'},"")]),l("p",null,'流水线默认只把消息发回发起的对话。希望"需要你决定""开发中断""已完成"等时刻在企业 IM 中也收到时,需要自己实现一个通知模块(laoshi 不内置任何 IM):'),l("ol",null,[l("li",null,[l("p",null,[i("把程序目录中的 "),l("code",null,"notifiers/im-template.mjs"),i(" 复制到 "),l("code",null,"~/.laoshi/notifiers/im.mjs"),i(",按其中的 TODO 实现发送(通常是向 IM 机器人的 webhook 发一个 HTTP 请求)。口令放在环境变量中。")])]),l("li",null,[l("p",null,[i("在 "),l("code",null,"~/.laoshi/config.json"),i("(或团队配置)中加上:")]),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"notifiers"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": [")]),i(`
|
|
21
21
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"module"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"~/.laoshi/notifiers/im.mjs"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"events"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": ["),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"blocked"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"failed"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"completed"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"], "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"options"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"webhook"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"https://…"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," } }")]),i(`
|
|
22
|
-
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"]")])])])])]),l("li",null,[l("p",null,[i("运行 "),l("code",null,"laoshi notify-test"),i("(可加 "),l("code",null,"--type blocked"),i(" 等)发一条测试消息。")])])]),l("p",null,[i("事件的类型和字段见 "),l("a",{href:"./../reference/contracts/notifier-event"},"contracts/notifier-event.md"),i("。通知失败只记日志,不影响流水线。项目配置("),l("code",null,".laoshi.json"),i(")中的 "),l("code",null,"notifiers"),i(" 会被忽略。")]),l("h2",{id:"_11-paseo
|
|
23
|
-
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},"
|
|
24
|
-
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},"
|
|
22
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"]")])])])])]),l("li",null,[l("p",null,[i("运行 "),l("code",null,"laoshi notify-test"),i("(可加 "),l("code",null,"--type blocked"),i(" 等)发一条测试消息。")])])]),l("p",null,[i("事件的类型和字段见 "),l("a",{href:"./../reference/contracts/notifier-event"},"contracts/notifier-event.md"),i("。通知失败只记日志,不影响流水线。项目配置("),l("code",null,".laoshi.json"),i(")中的 "),l("code",null,"notifiers"),i(" 会被忽略。")]),l("h2",{id:"_11-paseo-需求插件与共享-web-需求看板",tabindex:"-1"},[i("11. Paseo 需求插件与共享 Web 需求看板 "),l("a",{class:"header-anchor",href:"#_11-paseo-需求插件与共享-web-需求看板","aria-label":'Permalink to "11. Paseo 需求插件与共享 Web 需求看板"'},"")]),l("p",null,[i("在 Paseo Web 端界面(以及各平台通用的本地 Web 需求看板 "),l("code",null,"laoshi board"),i(")里查看需求总览、进度、文档、变更历史与负责人,确认方案、发起改需求、转交、停止、继续、一键试用、验收及选择模型的插件,随 laoshi 一起发布("),l("code",null,"adapters/paseo/plugin"),i(",适配 Paseo "),l("code",null,"0.11–0.17"),i("):")]),l("div",{class:"language-sh vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"sh"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --platform"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," paseo"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --with-plugin"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 安装 laoshi 时一步部署并加载插件")]),i(`
|
|
23
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," [--yes] "),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}},"# 单独安装或更新;Paseo 的插件总开关关着时会先问是否打开")]),i(`
|
|
24
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," status"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 是否在运行")]),i(`
|
|
25
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," remove"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 从 Paseo 移除")]),i(`
|
|
26
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," board"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 任意平台随时打开共享 Web 需求看板(dsh 默认随宿主启动)")])])])]),l("ul",null,[l("li",null,[i("插件文件复制到 "),l("code",null,"<安装根>/paseo-plugin"),i(",Paseo 从那里加载;"),l("code",null,"laoshi install"),i("、"),l("code",null,"laoshi upgrade"),i(" 时如果装过插件,会顺带更新文件并让 Paseo 重新加载,插件总是和程序同一个版本。")]),l("li",null,[i("插件只在本机运行 "),l("code",null,"laoshi api"),i("("),l("a",{href:"./../reference/contracts/cli-json"},"cli-json"),i('),不连接外部服务;插件设置里可以打开"只读",只看不改。')]),l("li",null,[i("插件默认读取 "),l("code",null,"LAOSHI_HOME"),i(" 或 "),l("code",null,"~/.laoshi"),i(";如果在安装时使用了非默认的 "),l("code",null,"--home"),i(" 目录(尤其在 Paseo 0.17 下,服务端插件经打包执行没有 "),l("code",null,"import.meta.url"),i("),需确保守护进程环境变量中有对应的 "),l("code",null,"LAOSHI_HOME"),i(",或在 Paseo「设置 → 插件 → laoshi → laoshi 的安装根」中填写实际安装根路径。")]),l("li",null,[i("装过 paseo-req-kit 的插件(id "),l("code",null,"req-kit"),i("):两个可以同时存在,迁移到 laoshi 后用 "),l("code",null,"req plugin remove"),i(" 移除旧的。")]),l("li",null,[i("没有 "),l("code",null,"paseo"),i(" 命令(桌面版 Paseo 管理的 daemon)时,按提示在 Paseo 的 设置 → Plugins 中手动填插件目录。")])])],-1),l("p",{class:"source-note"},[i("本页由仓库中的 "),l("a",{href:"https://github.com/yiyisf/laoshi/blob/main/docs/guide/安装与升级.md"},"docs/guide/安装与升级.md"),i(" 生成。"),l("a",{href:"https://github.com/yiyisf/laoshi/edit/main/docs/guide/安装与升级.md"},"在 GitHub 上编辑")],-1)])])}const g=a(t,[["render",h]]);export{c as __pageData,g as default};
|
package/site-dist/assets/{guide_install.md.By4WxsJG.lean.js → guide_install.md.SsIHMfUu.lean.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{_ as a,o as e,c as n,j as l,a as i}from"./chunks/framework.BetZR81g.js";const c=JSON.parse('{"title":"安装与升级","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"guide/install.md","filePath":"guide/install.md","lastUpdated":null}'),t={name:"guide/install.md"};function h(d,s,o,u,k,r){return e(),n("div",null,[...s[0]||(s[0]=[l("div",null,[l("h1",{id:"安装与升级",tabindex:"-1"},[i("安装与升级 "),l("a",{class:"header-anchor",href:"#安装与升级","aria-label":'Permalink to "安装与升级"'},"")]),l("p",null,[i("本文面向负责安装的人:通常是开发同事,有经验的测试或产品同事也可以按步骤完成。每台机器只装一次(装在运行 agent 平台的那台机器上),之后这台机器上所有项目的对话都能使用 "),l("code",null,"/laoshi"),i("。")]),l("p",null,"laoshi 目前支持三个 agent 平台,另外可以不用平台、直接用编码 agent 命令行:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"平台"),l("th",null,"说明")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("a",{href:"https://paseo.sh",target:"_blank",rel:"noreferrer"},"Paseo"),i(" 0.11"),l("br"),l("code",null,"--platform paseo")]),l("td",null,"步骤 agent、工作区、服务、定时消息都由 Paseo daemon
|
|
1
|
+
import{_ as a,o as e,c as n,j as l,a as i}from"./chunks/framework.BetZR81g.js";const c=JSON.parse('{"title":"安装与升级","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"guide/install.md","filePath":"guide/install.md","lastUpdated":null}'),t={name:"guide/install.md"};function h(d,s,o,u,k,r){return e(),n("div",null,[...s[0]||(s[0]=[l("div",null,[l("h1",{id:"安装与升级",tabindex:"-1"},[i("安装与升级 "),l("a",{class:"header-anchor",href:"#安装与升级","aria-label":'Permalink to "安装与升级"'},"")]),l("p",null,[i("本文面向负责安装的人:通常是开发同事,有经验的测试或产品同事也可以按步骤完成。每台机器只装一次(装在运行 agent 平台的那台机器上),之后这台机器上所有项目的对话都能使用 "),l("code",null,"/laoshi"),i("。")]),l("p",null,"laoshi 目前支持三个 agent 平台,另外可以不用平台、直接用编码 agent 命令行:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"平台"),l("th",null,"说明")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("a",{href:"https://paseo.sh",target:"_blank",rel:"noreferrer"},"Paseo"),i(" 0.11–0.17"),l("br"),l("code",null,"--platform paseo")]),l("td",null,"步骤 agent、工作区、服务、定时消息都由 Paseo daemon 提供(优先 Web 端)")]),l("tr",null,[l("td",null,[i("DeepSeek Harness(dsh)"),l("br"),l("code",null,"--platform dsh")]),l("td",null,[i("步骤 agent 和定时消息由 laoshi 的 dsh 插件提供;工作区和服务用 laoshi 的内置实现("),l("code",null,"git worktree"),i("、"),l("code",null,".laoshi/services.json"),i(")")])]),l("tr",null,[l("td",null,[i("命令行 agent"),l("br"),l("code",null,"--platform cli")]),l("td",null,[i("不需要平台:步骤 agent 是 "),l("code",null,"claude -p"),i(" / "),l("code",null,"codex exec"),i(" 的一次运行;工作区和服务用 laoshi 的内置实现;没有通知发回对话,进展用 "),l("code",null,"laoshi status"),i(" 查看。见 "),l("a",{href:"./cli"},"adapters/cli")])]),l("tr",null,[l("td",null,[i("摸高"),l("br"),l("code",null,"--platform mogao")]),l("td",null,[i("以专家的形式提交到平台,第一次使用时自动装到工作区,不按本文安装;见"),l("a",{href:"./mogao"},"在摸高上使用")])])])]),l("h2",{id:"_1-安装布局",tabindex:"-1"},[i("1. 安装布局 "),l("a",{class:"header-anchor",href:"#_1-安装布局","aria-label":'Permalink to "1. 安装布局"'},"")]),l("p",null,"程序和本机配置分开存放。升级只替换程序,配置不动。"),l("div",{class:"language-text vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"text"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",null,"<npm 全局目录>/laoshi/ 程序(全局目录不可写时在 ~/.laoshi/npm 下)")]),i(`
|
|
2
2
|
`),l("span",{class:"line"},[l("span",null,"~/.laoshi/ 安装根(LAOSHI_HOME 可以换位置)")]),i(`
|
|
3
3
|
`),l("span",{class:"line"},[l("span",null,"├── config.json 安装级配置:平台、各角色的模型")]),i(`
|
|
4
4
|
`),l("span",{class:"line"},[l("span",null,"├── install.json 安装记录(--check、--uninstall 用)")]),i(`
|
|
5
5
|
`),l("span",{class:"line"},[l("span",null,"├── bin/laoshi(.cmd) laoshi 命令(不在 PATH 时用)")]),i(`
|
|
6
6
|
`),l("span",{class:"line"},[l("span",null,"├── prompts.local/ 本机提示词覆盖(可选)")]),i(`
|
|
7
7
|
`),l("span",{class:"line"},[l("span",null,"└── notifiers/ 外部通知模块(可选,见第 10 节)")]),i(`
|
|
8
|
-
`),l("span",{class:"line"},[l("span",null,"<skill 目录>/laoshi*/ 按平台渲染的 skill,带 .laoshi-install.json")])])])]),l("p",null,"skill 装到哪里由平台决定:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"平台"),l("th",null,"skill 目录")])]),l("tbody",null,[l("tr",null,[l("td",null,"Paseo"),l("td",null,[l("code",null,"~/.agents/skills"),i("(Codex、Pi、OpenCode 等读取),"),l("code",null,"~/.claude"),i(" 存在时还有 "),l("code",null,"~/.claude/skills")])]),l("tr",null,[l("td",null,"命令行 agent"),l("td",null,"与 Paseo 相同")]),l("tr",null,[l("td",null,"dsh"),l("td",null,[l("code",null,"$DSH_HOME/skills"),i("(默认 "),l("code",null,"~/.dsh/skills"),i(");dsh 插件装在 "),l("code",null,"$DSH_HOME/profiles/<profile>/node_modules/laoshi-dsh-plugin"),i(" 并挂载到 "),l("code",null,"cordis.patch.yml")])])])]),l("p",null,[l("code",null,"--target <目录>"),i(" 可以另外指定 skill 目录(可以写多次)。Windows 上 "),l("code",null,"~"),i(" 即 "),l("code",null,"%USERPROFILE%"),i("。安装器不使用符号链接,不需要管理员权限;在 Windows 上它只启动 "),l("code",null,"node"),i(" 和 "),l("code",null,"cmd.exe"),i(",不会启动 PowerShell。")]),l("h2",{id:"_2-前置条件",tabindex:"-1"},[i("2. 前置条件 "),l("a",{class:"header-anchor",href:"#_2-前置条件","aria-label":'Permalink to "2. 前置条件"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"项目"),l("th",null,"要求"),l("th",null,"如何确认")])]),l("tbody",null,[l("tr",null,[l("td",null,"Node.js"),l("td",null,"22.19 或更新"),l("td",null,[l("code",null,"node -v")])]),l("tr",null,[l("td",null,"npm"),l("td",null,"Node.js 自带;公司网络用镜像(见第 3 节)"),l("td",null,[l("code",null,"npm -v")])]),l("tr",null,[l("td",null,"git"),l("td",null,"近期版本"),l("td",null,[l("code",null,"git --version")])]),l("tr",null,[l("td",null,"平台"),l("td",null,[i("Paseo 0.11 的 daemon 在运行;或已装好 dsh("),l("code",null,"dsh"),i(" 命令可用,或知道它的 "),l("code",null,"bin.js"),i(" 位置)")]),l("td",null,[i("Paseo
|
|
8
|
+
`),l("span",{class:"line"},[l("span",null,"<skill 目录>/laoshi*/ 按平台渲染的 skill,带 .laoshi-install.json")])])])]),l("p",null,"skill 装到哪里由平台决定:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"平台"),l("th",null,"skill 目录")])]),l("tbody",null,[l("tr",null,[l("td",null,"Paseo"),l("td",null,[l("code",null,"~/.agents/skills"),i("(Codex、Pi、OpenCode 等读取),"),l("code",null,"~/.claude"),i(" 存在时还有 "),l("code",null,"~/.claude/skills")])]),l("tr",null,[l("td",null,"命令行 agent"),l("td",null,"与 Paseo 相同")]),l("tr",null,[l("td",null,"dsh"),l("td",null,[l("code",null,"$DSH_HOME/skills"),i("(默认 "),l("code",null,"~/.dsh/skills"),i(");dsh 插件装在 "),l("code",null,"$DSH_HOME/profiles/<profile>/node_modules/laoshi-dsh-plugin"),i(" 并挂载到 "),l("code",null,"cordis.patch.yml")])])])]),l("p",null,[l("code",null,"--target <目录>"),i(" 可以另外指定 skill 目录(可以写多次)。Windows 上 "),l("code",null,"~"),i(" 即 "),l("code",null,"%USERPROFILE%"),i("。安装器不使用符号链接,不需要管理员权限;在 Windows 上它只启动 "),l("code",null,"node"),i(" 和 "),l("code",null,"cmd.exe"),i(",不会启动 PowerShell。")]),l("h2",{id:"_2-前置条件",tabindex:"-1"},[i("2. 前置条件 "),l("a",{class:"header-anchor",href:"#_2-前置条件","aria-label":'Permalink to "2. 前置条件"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"项目"),l("th",null,"要求"),l("th",null,"如何确认")])]),l("tbody",null,[l("tr",null,[l("td",null,"Node.js"),l("td",null,"22.19 或更新"),l("td",null,[l("code",null,"node -v")])]),l("tr",null,[l("td",null,"npm"),l("td",null,"Node.js 自带;公司网络用镜像(见第 3 节)"),l("td",null,[l("code",null,"npm -v")])]),l("tr",null,[l("td",null,"git"),l("td",null,"近期版本"),l("td",null,[l("code",null,"git --version")])]),l("tr",null,[l("td",null,"平台"),l("td",null,[i("Paseo 0.11–0.17 的 daemon 在运行;或已装好 dsh("),l("code",null,"dsh"),i(" 命令可用,或知道它的 "),l("code",null,"bin.js"),i(" 位置)")]),l("td",null,[i("Paseo:能在网页端("),l("code",null,"http://localhost:6767/"),i(",推荐)或桌面端对话;dsh:能在网页端对话")])]),l("tr",null,[l("td",null,"模型"),l("td",null,"Paseo:Claude Code、Codex、OpenCode、Pi 至少一种已在 Paseo 中登录;dsh:对话用的模型能正常回答"),l("td",null,"用它开一个对话")])])]),l("h2",{id:"_3-首次安装",tabindex:"-1"},[i("3. 首次安装 "),l("a",{class:"header-anchor",href:"#_3-首次安装","aria-label":'Permalink to "3. 首次安装"'},"")]),l("p",null,[l("strong",null,"一步安装(推荐)。"),i(" 只需要 Node.js 和能访问的 npm 源:")]),l("div",{class:"language-bash vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"bash"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"npx"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," -y"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," @yiyi_zhang/laoshi@latest"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --platform"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," dsh"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 或 --platform paseo")])])])]),l("p",null,[i("它依次:检查 Node.js、npm 和 git;确定 npm 源;"),l("code",null,"npm install -g"),i(" 这个版本(全局目录不可写时装到 "),l("code",null,"~/.laoshi/npm"),i(",不需要 sudo);然后运行装好的那份程序的 "),l("code",null,"laoshi install"),i(",完成安装级配置、skill 和平台的设置。npx 的临时目录会被清理,所以安装记录和 skill 都指向 npm 装好的那份。再次运行就是升级。")]),l("p",null,[i("指定版本:"),l("code",null,"npx -y @yiyi_zhang/laoshi@0.1.1 install --platform dsh"),i("。")]),l("p",null,[l("strong",null,"公司内网(只有 npm 镜像)。"),i(" 加上镜像地址:")]),l("div",{class:"language-bash vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"bash"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"npx"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," -y"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --registry=https://npm.example.internal/"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," @yiyi_zhang/laoshi@latest"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --platform"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," dsh")])])])]),l("ul",null,[l("li",null,[i("镜像地址会"),l("strong",null,"保存为本机的 npm 源"),i("(屏幕上会写出原来的值),以后 "),l("code",null,"laoshi upgrade"),i(" 也从镜像取。只想这一次用镜像时加 "),l("code",null,"--no-save-registry"),i("。本机原本就配好了镜像时不用写 "),l("code",null,"--registry"),i("。")]),l("li",null,[i("镜像上还没有这个版本(同步有延迟)时会直接说明,稍后再运行,或请管理镜像的同事同步 "),l("code",null,"laoshi"),i("。")]),l("li",null,[i("文档:装好后运行 "),l("code",null,"laoshi docs"),i(",在本机打开和这个版本一致的文档站点,不需要外网。")])]),l("p",null,[l("strong",null,"完全离线(连 npm 镜像也没有)。"),i(" 用带依赖的离线安装包,步骤见"),l("a",{href:"./intranet"},"内网安装与验证"),i("。")]),l("p",null,[l("strong",null,"已经有程序目录时"),i("(git 克隆、解压的安装包):在程序目录中 "),l("code",null,"npm ci --omit=dev"),i(",再运行 "),l("code",null,"node bin/req.mjs install --platform <平台>"),i("。")]),l("h3",{id:"安装选项",tabindex:"-1"},[i("安装选项 "),l("a",{class:"header-anchor",href:"#安装选项","aria-label":'Permalink to "安装选项"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"选项"),l("th",null,"含义")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"--platform <paseo|dsh|cli|mogao>")]),l("td",null,"装到哪个平台。第一次安装时要写,之后沿用安装记录;和已装的平台不一致时会停下")]),l("tr",null,[l("td",null,[l("code",null,"--home <目录>")]),l("td",null,[i("安装根,默认 "),l("code",null,"LAOSHI_HOME"),i(" 或 "),l("code",null,"~/.laoshi")])]),l("tr",null,[l("td",null,[l("code",null,"--target <目录>")]),l("td",null,"另外把 skill 装到这个目录")]),l("tr",null,[l("td",null,[l("code",null,"--force")]),l("td",null,"覆盖同名的、不是 laoshi 装的 skill(默认跳过并列出)")]),l("tr",null,[l("td",null,[l("code",null,"--check")]),l("td",null,[i("只检查,不改动(也可以用 "),l("code",null,"laoshi check"),i(")")])]),l("tr",null,[l("td",null,[l("code",null,"--dry-run")]),l("td",null,"演练:显示要做的事,不写文件")]),l("tr",null,[l("td",null,[l("code",null,"--uninstall")]),l("td",null,"卸载(见第 8 节)")]),l("tr",null,[l("td",null,[l("code",null,"--registry <地址>"),i("、"),l("code",null,"--no-save-registry")]),l("td",null,[i("只用于一步安装和 "),l("code",null,"laoshi upgrade"),i(":这次用的 npm 源,是否保存")])]),l("tr",null,[l("td",null,[i("Paseo:"),l("code",null,"--with-plugin")]),l("td",null,"安装时顺便把 Paseo 需求插件部署并加载到 Paseo")]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--dsh-home <目录>")]),l("td",null,[i("dsh 的数据目录,默认 "),l("code",null,"DSH_HOME"),i(" 或 "),l("code",null,"~/.dsh")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--profile <名称>")]),l("td",null,[i("插件装进哪个 profile,默认 "),l("code",null,"web")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--dsh-bin <路径>")]),l("td",null,[i("dsh 的 "),l("code",null,"bin.js"),i(","),l("code",null,"dsh"),i(" 不在 PATH 中时写;"),l("code",null,"dsh plugin add"),i(" 失败时安装器直接复制插件")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--approvals ask|allow")]),l("td",null,[i("步骤 agent 的审批请求:"),l("code",null,"ask"),i(" 交给人(默认),"),l("code",null,"allow"),i(" 直接批准一次")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--no-board")]),l("td",null,[i("关闭安装后默认随 dsh 启动的托管 Web 需求看板(默认开启 "),l("code",null,"board: true"),i(")")])]),l("tr",null,[l("td",null,[i("dsh:"),l("code",null,"--board-port <端口>")]),l("td",null,"固定 dsh 托管需求看板监听的端口(默认自动分配空闲端口)")])])]),l("p",null,[i("同名 skill 的处理:带 "),l("code",null,".laoshi-install.json"),i(" 标记的是 laoshi 装的,会被更新;paseo-req-kit 装的(带 "),l("code",null,".req-kit-install.json"),i(")和别人放的都不覆盖,安装器会列出它们,确认后再用 "),l("code",null,"--force"),i("。")]),l("h2",{id:"_4-配置模型",tabindex:"-1"},[i("4. 配置模型 "),l("a",{class:"header-anchor",href:"#_4-配置模型","aria-label":'Permalink to "4. 配置模型"'},"")]),l("p",null,[i("各角色(builder 实现、reviewer 评审等)用的模型写在 "),l("code",null,"~/.laoshi/config.json"),i(" 的 "),l("code",null,"agents"),i(" 中,项目的 "),l("code",null,".laoshi.json"),i(" 可以覆盖。写法因平台而异。")]),l("h3",{id:"paseo",tabindex:"-1"},[i("Paseo "),l("a",{class:"header-anchor",href:"#paseo","aria-label":'Permalink to "Paseo"'},"")]),l("p",null,[i("运行 "),l("code",null,"laoshi configure"),i("(逐项选择)或 "),l("code",null,"laoshi configure --auto"),i("(按推荐选好:两个不同厂商的模型分别做 builder 和 reviewer,都用免确认模式)。")]),l("p",null,[l("strong",null,"推荐引用 Paseo 的 agent profile。"),i(' 在 Paseo 的 设置 → 本机 → Agents → Agent profiles 中建好"实现""评审"等 profile,配置中只写名称,之后换模型只需在 Paseo 中改 profile:')]),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"agents"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": {")]),i(`
|
|
9
9
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "builder"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"platformProfile"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"实现"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," },")]),i(`
|
|
10
10
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "reviewer"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"platformProfile"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"评审"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," }")]),i(`
|
|
11
11
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"}")])])])]),l("p",null,"也可以直接写各项设置:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"字段"),l("th",null,"含义")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"provider")]),l("td",null,[l("code",null,"<Paseo 中的 provider ID>/<模型 ID>"),i(",只在第一个 "),l("code",null,"/"),i(" 处拆分")])]),l("tr",null,[l("td",null,[l("code",null,"modeId")]),l("td",null,"agent 的模式。必须选不会停下来等待批准的模式;没有模式的 agent 不写")]),l("tr",null,[l("td",null,[l("code",null,"featureValues")]),l("td",null,"agent 的功能开关,目前只有 OpenCode 需要")]),l("tr",null,[l("td",null,[l("code",null,"thinkingOptionId")]),l("td",null,"可选,思考强度")])])]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"agent"),l("th",null,[l("code",null,"provider"),i(" 写法")]),l("th",null,"无人值守的设置")])]),l("tbody",null,[l("tr",null,[l("td",null,"Claude Code"),l("td",null,[l("code",null,"claude/<模型 ID>")]),l("td",null,[l("code",null,'"modeId": "bypassPermissions"')])]),l("tr",null,[l("td",null,"Codex"),l("td",null,[l("code",null,"codex/<模型 ID>")]),l("td",null,[l("code",null,'"modeId": "full-access"')])]),l("tr",null,[l("td",null,"OpenCode"),l("td",null,[l("code",null,"opencode/<上游>/<模型 ID>")]),l("td",null,[l("code",null,'"modeId": "build"'),i(" 加 "),l("code",null,'"featureValues": { "auto_accept": true }')])]),l("tr",null,[l("td",null,"Pi"),l("td",null,[l("code",null,"pi/<上游>/<模型 ID>")]),l("td",null,[i("不写 "),l("code",null,"modeId")])])])]),l("p",null,"聊天 agent(使用者对话的那一个)的用法:"),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"agent"),l("th",null,"如何触发")])]),l("tbody",null,[l("tr",null,[l("td",null,"Claude Code、OpenCode"),l("td",null,[l("code",null,"/laoshi 我想……")])]),l("tr",null,[l("td",null,"Pi"),l("td",null,[l("code",null,"/skill:laoshi 我想……")])]),l("tr",null,[l("td",null,"Codex"),l("td",null,'直接说"用 laoshi 帮我……"')])])]),l("p",null,"聊天 agent 需要能执行命令和访问本机网络(流水线要连接 daemon)。"),l("h3",{id:"dsh",tabindex:"-1"},[i("dsh "),l("a",{class:"header-anchor",href:"#dsh","aria-label":'Permalink to "dsh"'},"")]),l("p",null,[l("code",null,"provider"),i(" 写成 "),l("code",null,"<dsh 的提供方>/<模型>"),i(",这个角色的步骤就用它;"),l("code",null,"thinkingOptionId"),i(" 作为推理强度。"),l("code",null,"dsh/chat-model"),i(" 表示用对话的模型(安装器的默认值):")]),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"agents"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": {")]),i(`
|
|
@@ -19,6 +19,8 @@ import{_ as a,o as e,c as n,j as l,a as i}from"./chunks/framework.BetZR81g.js";c
|
|
|
19
19
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," migrate"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --rollback"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 回滚:恢复状态文件、删除迁移写入的文件,接着用 paseo-req-kit")]),i(`
|
|
20
20
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --platform"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," paseo"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 迁移后安装 /laoshi* skill")])])])]),l("ul",null,[l("li",null,[i("旧目录 "),l("code",null,"~/.req-kit"),i(" 不改、不删,回滚后 paseo-req-kit 照常可用。")]),l("li",null,[i("配置里的 daemon 地址移到 "),l("code",null,"platform.paseo"),i(",旧的 profile、服务字段改为新名字。")]),l("li",null,[i("项目里的 "),l("code",null,".requirement-pipeline.json"),i(" 不改名(laoshi 照常读取),要改名请在仓库里改名后提交。")]),l("li",null,[i("设置过 "),l("code",null,"REQ_KIT_HOME"),i(" 的,迁移后改为设置 "),l("code",null,"LAOSHI_HOME"),i("。")])]),l("h2",{id:"_8-卸载",tabindex:"-1"},[i("8. 卸载 "),l("a",{class:"header-anchor",href:"#_8-卸载","aria-label":'Permalink to "8. 卸载"'},"")]),l("div",{class:"language-bash vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"bash"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --uninstall")])])])]),l("p",null,[i("删除 laoshi 装的 skill,dsh 上还会移除插件和 "),l("code",null,"cordis.patch.yml"),i(" 中的挂载。安装根("),l("code",null,"~/.laoshi"),i(")保留;确认不再使用后,"),l("code",null,"npm uninstall -g @yiyi_zhang/laoshi"),i(" 并手工删除 "),l("code",null,"~/.laoshi"),i("。各项目中的配置文件和功能目录保留,它们本身就是文档。")]),l("h2",{id:"_9-安全提示",tabindex:"-1"},[i("9. 安全提示 "),l("a",{class:"header-anchor",href:"#_9-安全提示","aria-label":'Permalink to "9. 安全提示"'},"")]),l("ul",null,[l("li",null,[i("步骤 agent 以免确认模式运行(dsh 上 "),l("code",null,"--approvals allow"),i(" 时同样),可以在本机执行命令。仓库和本机环境变量中不要放生产凭据;最好用专门的开发机或虚拟机。")]),l("li",null,"口令和密钥只放在环境变量中,不要写进配置文件。"),l("li",null,"流水线只做本地提交,合并和上线始终由人决定。")]),l("h2",{id:"_10-接入企业内部-im-可选",tabindex:"-1"},[i("10. 接入企业内部 IM(可选) "),l("a",{class:"header-anchor",href:"#_10-接入企业内部-im-可选","aria-label":'Permalink to "10. 接入企业内部 IM(可选)"'},"")]),l("p",null,'流水线默认只把消息发回发起的对话。希望"需要你决定""开发中断""已完成"等时刻在企业 IM 中也收到时,需要自己实现一个通知模块(laoshi 不内置任何 IM):'),l("ol",null,[l("li",null,[l("p",null,[i("把程序目录中的 "),l("code",null,"notifiers/im-template.mjs"),i(" 复制到 "),l("code",null,"~/.laoshi/notifiers/im.mjs"),i(",按其中的 TODO 实现发送(通常是向 IM 机器人的 webhook 发一个 HTTP 请求)。口令放在环境变量中。")])]),l("li",null,[l("p",null,[i("在 "),l("code",null,"~/.laoshi/config.json"),i("(或团队配置)中加上:")]),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"notifiers"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": [")]),i(`
|
|
21
21
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"module"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"~/.laoshi/notifiers/im.mjs"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"events"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": ["),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"blocked"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"failed"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"completed"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"], "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"options"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"webhook"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"https://…"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," } }")]),i(`
|
|
22
|
-
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"]")])])])])]),l("li",null,[l("p",null,[i("运行 "),l("code",null,"laoshi notify-test"),i("(可加 "),l("code",null,"--type blocked"),i(" 等)发一条测试消息。")])])]),l("p",null,[i("事件的类型和字段见 "),l("a",{href:"./../reference/contracts/notifier-event"},"contracts/notifier-event.md"),i("。通知失败只记日志,不影响流水线。项目配置("),l("code",null,".laoshi.json"),i(")中的 "),l("code",null,"notifiers"),i(" 会被忽略。")]),l("h2",{id:"_11-paseo
|
|
23
|
-
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},"
|
|
24
|
-
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},"
|
|
22
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"]")])])])])]),l("li",null,[l("p",null,[i("运行 "),l("code",null,"laoshi notify-test"),i("(可加 "),l("code",null,"--type blocked"),i(" 等)发一条测试消息。")])])]),l("p",null,[i("事件的类型和字段见 "),l("a",{href:"./../reference/contracts/notifier-event"},"contracts/notifier-event.md"),i("。通知失败只记日志,不影响流水线。项目配置("),l("code",null,".laoshi.json"),i(")中的 "),l("code",null,"notifiers"),i(" 会被忽略。")]),l("h2",{id:"_11-paseo-需求插件与共享-web-需求看板",tabindex:"-1"},[i("11. Paseo 需求插件与共享 Web 需求看板 "),l("a",{class:"header-anchor",href:"#_11-paseo-需求插件与共享-web-需求看板","aria-label":'Permalink to "11. Paseo 需求插件与共享 Web 需求看板"'},"")]),l("p",null,[i("在 Paseo Web 端界面(以及各平台通用的本地 Web 需求看板 "),l("code",null,"laoshi board"),i(")里查看需求总览、进度、文档、变更历史与负责人,确认方案、发起改需求、转交、停止、继续、一键试用、验收及选择模型的插件,随 laoshi 一起发布("),l("code",null,"adapters/paseo/plugin"),i(",适配 Paseo "),l("code",null,"0.11–0.17"),i("):")]),l("div",{class:"language-sh vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"sh"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --platform"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," paseo"),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}}," --with-plugin"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 安装 laoshi 时一步部署并加载插件")]),i(`
|
|
23
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," install"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," [--yes] "),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}},"# 单独安装或更新;Paseo 的插件总开关关着时会先问是否打开")]),i(`
|
|
24
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," status"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 是否在运行")]),i(`
|
|
25
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," plugin"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," remove"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 从 Paseo 移除")]),i(`
|
|
26
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"}},"laoshi"),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}}," board"),l("span",{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"}}," # 任意平台随时打开共享 Web 需求看板(dsh 默认随宿主启动)")])])])]),l("ul",null,[l("li",null,[i("插件文件复制到 "),l("code",null,"<安装根>/paseo-plugin"),i(",Paseo 从那里加载;"),l("code",null,"laoshi install"),i("、"),l("code",null,"laoshi upgrade"),i(" 时如果装过插件,会顺带更新文件并让 Paseo 重新加载,插件总是和程序同一个版本。")]),l("li",null,[i("插件只在本机运行 "),l("code",null,"laoshi api"),i("("),l("a",{href:"./../reference/contracts/cli-json"},"cli-json"),i('),不连接外部服务;插件设置里可以打开"只读",只看不改。')]),l("li",null,[i("插件默认读取 "),l("code",null,"LAOSHI_HOME"),i(" 或 "),l("code",null,"~/.laoshi"),i(";如果在安装时使用了非默认的 "),l("code",null,"--home"),i(" 目录(尤其在 Paseo 0.17 下,服务端插件经打包执行没有 "),l("code",null,"import.meta.url"),i("),需确保守护进程环境变量中有对应的 "),l("code",null,"LAOSHI_HOME"),i(",或在 Paseo「设置 → 插件 → laoshi → laoshi 的安装根」中填写实际安装根路径。")]),l("li",null,[i("装过 paseo-req-kit 的插件(id "),l("code",null,"req-kit"),i("):两个可以同时存在,迁移到 laoshi 后用 "),l("code",null,"req plugin remove"),i(" 移除旧的。")]),l("li",null,[i("没有 "),l("code",null,"paseo"),i(" 命令(桌面版 Paseo 管理的 daemon)时,按提示在 Paseo 的 设置 → Plugins 中手动填插件目录。")])])],-1),l("p",{class:"source-note"},[i("本页由仓库中的 "),l("a",{href:"https://github.com/yiyisf/laoshi/blob/main/docs/guide/安装与升级.md"},"docs/guide/安装与升级.md"),i(" 生成。"),l("a",{href:"https://github.com/yiyisf/laoshi/edit/main/docs/guide/安装与升级.md"},"在 GitHub 上编辑")],-1)])])}const g=a(t,[["render",h]]);export{c as __pageData,g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as o,o as d,c as t,a2 as c}from"./chunks/framework.BetZR81g.js";const g=JSON.parse('{"title":"维护者指南","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"guide/maintainer.md","filePath":"guide/maintainer.md","lastUpdated":null}'),s={name:"guide/maintainer.md"};function a(i,e,r,l,n,p){return d(),t("div",null,[...e[0]||(e[0]=[c('<div><h1 id="维护者指南" tabindex="-1">维护者指南 <a class="header-anchor" href="#维护者指南" aria-label="Permalink to "维护者指南""></a></h1><p>面向维护 laoshi 本身的人:改提示词和 skill、发布新版本、处理复盘提交的问题。</p><h2 id="_1-改动之前" tabindex="-1">1. 改动之前 <a class="header-anchor" href="#_1-改动之前" aria-label="Permalink to "1. 改动之前""></a></h2><ul><li>先看 <a href="./../reference/scope">SCOPE.md</a>:新提议须服务于"帮助非专职开发的同事把一个需求从对齐做到可验收",至少有两个真实场景,并且无法通过项目配置或项目说明解决。</li><li>改动已有的设计决定(<a href="./../reference/adr/">docs/adr/</a>)时,新增一条 ADR 说明理由,并在旧的一条中注明被哪条取代。</li><li>界面的颜色、字体、组件按 <code>design/</code>(设计规范,见其中的 README)来;改了 <code>design/tokens.json</code>、<code>design/reference/components.css</code> 或 <code>design/examples/icons.js</code>,运行 <code>node scripts/tokens-build.mjs</code> 更新审查网页里的副本。</li><li>改动文件格式(spec、状态文件、结果文件、决策记录等)时,同时更新 <a href="./../reference/contracts/">contracts/</a>、代码和测试;状态文件的格式变化要加迁移(见 <code>contracts/state.md</code>)。</li></ul><h2 id="_2-改-skill-和提示词的规则" tabindex="-1">2. 改 skill 和提示词的规则 <a class="header-anchor" href="#_2-改-skill-和提示词的规则" aria-label="Permalink to "2. 改 skill 和提示词的规则""></a></h2><ul><li><strong>入口不调用入口</strong>。<code>/laoshi</code>、<code>/laoshi-setup</code>、<code>/laoshi-doctor</code>、<code>/laoshi-retro</code> 之间只能"告诉用户去运行",不能互相加载。</li><li><strong>路径用占位符</strong>:skill 中引用安装目录内的文件写 <code>{{REQ_KIT_ROOT}}/...</code>,启动命令写 <code>{{PIPELINE_LAUNCHER}}</code>,版本号写 <code>{{REQ_KIT_VERSION}}</code>。安装器会替换它们;<code>npm test</code> 会检查引用的文件都存在。</li><li><strong>不写平台的名字</strong>:引擎、提示词和 skill 中和平台有关的说法写成 <code>{{platform.<词>}}</code>(见 <a href="./../reference/design/platform-vocabulary">platform-vocabulary</a>),整段不同的写成 <code>{{fragment.<名称>}}</code>,各平台的片段放在适配器里(如 <code>adapters/paseo/skill/setup.md</code>)。<code>npm test</code> 会检查这些目录中没有平台的名字;确实需要时在那一行写 <code>platform-name:</code> 说明理由。</li><li><strong>frontmatter</strong> 只用 <code>name</code>、<code>description</code>,agent 专属的放在 <code>metadata</code> 下;<code>description</code> 中不要出现半角的 <code>: </code>。</li><li><strong>手册</strong>(<code>skills/laoshi/playbooks/*.md</code>)开头必须有"## 步骤"编号列表,<code>/laoshi</code> 会把它原样放进待办列表;新增手册要加进 <code>/laoshi</code> 的路由表。</li><li><strong>原则</strong>:增加一条原则需要至少两次真实失误作为依据,并且无法用 CI 或配置解决;总数不超过 10 条。原则的一句话版本写进 <code>principles/INDEX.md</code>,它同时被聊天和每个步骤的提示词使用。</li><li><strong>措辞</strong>:读者是有技术背景、但不读代码的使用者(测试、产品、项目经理)。讲需求和结果,不讲代码实现。</li></ul><h2 id="_3-验证改动" tabindex="-1">3. 验证改动 <a class="header-anchor" href="#_3-验证改动" aria-label="Permalink to "3. 验证改动""></a></h2><table tabindex="0"><thead><tr><th>改了什么</th><th>至少要做</th></tr></thead><tbody><tr><td>引擎代码</td><td><code>npm test</code>、<code>npm run typecheck</code></td></tr><tr><td>步骤提示词</td><td>上面两项 + <code>npm run eval</code>(至少跑受影响的用例),与上一次的结果对比</td></tr><tr><td>入口、手册、方法 skill、原则</td><td><code>npm test</code> + 对话评估中受影响的剧本(<code>evals/conversation/</code>)</td></tr><tr><td>安装器</td><td><code>npm test</code>(在临时 HOME 中测试),并在 Windows 上实际装一次(只用 cmd 或 Git Bash)</td></tr><tr><td>评估用例</td><td><code>npm run eval:self-check</code>(参考实现必须通过隐藏验收)</td></tr><tr><td>平台适配器</td><td><code>npm test</code>;dsh 另跑端到端检查 <code>node adapters/dsh/e2e/run-e2e.mjs --worktree</code>(见 <a href="./dsh">adapters/dsh/README.md</a>);Paseo 另跑 <code>npm run smoke -- check</code></td></tr><tr><td>文档站点</td><td><code>cd site && npm ci && npm run build</code>(会检查站内链接)</td></tr></tbody></table><p>提示词改动以评估结果为准:如实率(不夸大)不能下降;隐藏验收通过率、用时、轮次与上一次对比,变差时说明原因。</p><h2 id="_4-分支、提交与-pr-规范" tabindex="-1">4. 分支、提交与 PR 规范 <a class="header-anchor" href="#_4-分支、提交与-pr-规范" aria-label="Permalink to "4. 分支、提交与 PR 规范""></a></h2><h3 id="分支管理" tabindex="-1">分支管理 <a class="header-anchor" href="#分支管理" aria-label="Permalink to "分支管理""></a></h3><ul><li><strong><code>main</code> 是唯一主干</strong>,始终保持可测试、可发布状态;不直接向 <code>main</code> 推送大改动,统一通过 PR 合入。</li><li><strong>按主题切短生命周期分支</strong>:每次新任务从最新 <code>main</code> 切出独立分支,命名采用 <code><类型>/<简短主题></code>: <ul><li><code>feat/<主题></code>:新功能或里程碑实现(如 <code>feat/dsh-ui-plugin</code>)</li><li><code>fix/<主题></code>:缺陷修复(如 <code>fix/mogao-ensure-version</code>)</li><li><code>docs/<主题></code>:文档、规划、指南更新(如 <code>docs/roadmap</code>)</li><li><code>design/<主题></code>:设计文档与 ADR(如 <code>design/adr-0009-audit</code>)</li><li><code>release/<版本></code>:发版准备(改版本号与 CHANGELOG)</li></ul></li><li><strong>避免长期复用同一开发分支</strong>:历史中长期分支反复 Squash merge 容易带入大量旧提交或产生严重冲突;PR 合入后及时删除已合并的分支,下一次任务从最新 <code>main</code> 重切。</li></ul><h3 id="提交与-pr-规范" tabindex="-1">提交与 PR 规范 <a class="header-anchor" href="#提交与-pr-规范" aria-label="Permalink to "提交与 PR 规范""></a></h3><ul><li><strong>PR 标题</strong>:使用简洁的中文说明本次目标,合并后会直接作为 <code>main</code> 上的提交标题;可带里程碑或模块前缀(例如 <code>M3:…</code>、<code>摸高:…</code>、<code>dsh:…</code>、<code>文档:…</code>、<code>发布 0.2.0</code>)。</li><li><strong>PR 正文</strong>:按 <code>.github/PULL_REQUEST_TEMPLATE.md</code> 写明<strong>背景、改动、验证</strong>三节;破坏性变化或待决风险在正文显式标出。</li><li><strong>改动粒度</strong>:一个 PR 聚焦一个主题;若需求拆成"先基础设施、后业务功能"两步,优先拆成两个独立 PR,避免单次评审过大。</li><li><strong>合并方式</strong>:统一使用 <strong>Squash merge</strong> 合入 <code>main</code>,保持主干历史线性清晰。</li></ul><h3 id="合入前门禁-ci" tabindex="-1">合入前门禁(CI) <a class="header-anchor" href="#合入前门禁-ci" aria-label="Permalink to "合入前门禁(CI)""></a></h3><p>PR 合入前须通过 <code>.github/workflows/ci.yml</code> 的全部检查:</p><ol><li><strong>公网锁文件检查</strong>:<code>package-lock.json</code> 中所有 <code>resolved</code> 地址必须来自 <code>https://registry.npmjs.org/</code>(切勿把公司内网镜像地址提交进仓库)。</li><li><strong>双平台测试与类型检查</strong>:Linux 与 Windows 上的 <code>npm test</code>、<code>npm run typecheck</code>、<code>npm run eval:self-check</code>。</li><li><strong>打包与安装验证</strong>:<code>node scripts/check-package.mjs</code> 与 Windows 基础命令启动检查。</li><li><strong>文档链接检查</strong>:改动 <code>docs/guide/</code>、<code>contracts/</code>、<code>docs/adr/</code> 等站点源文档时,本地运行 <code>node site/scripts/sync-docs.mjs --check</code> 确保站内与仓库链接均有效。</li></ol><h2 id="_5-发布" tabindex="-1">5. 发布 <a class="header-anchor" href="#_5-发布" aria-label="Permalink to "5. 发布""></a></h2><p>版本号遵循语义化版本,从 <code>0.1.0</code> 开始,标签<strong>不带 <code>v</code> 前缀</strong>(例如 <code>0.1.0</code>、<code>0.2.0-beta.1</code>)。laoshi 和 paseo-req-kit 一样通过 npm 分发:使用者用 <code>npx -y @yiyi_zhang/laoshi@latest install</code> 安装,用 <code>laoshi upgrade</code> 升级,内网通过公司的 npm 镜像取得。</p><p>开发中的版本号带 <code>-dev</code>(如 <code>0.2.0-dev</code>),不会被发布。发布一个版本:</p><ol><li>在 <code>CHANGELOG.md</code> 中把这一版写成 <code>## <版本> - <日期></code> 一节:使用者会看到的变化在前,升级须知单独列出。发布流程用这一节作为 GitHub Release 的正文,没有这一节时停下。</li><li>运行 <code>node scripts/set-version.mjs <版本></code> 统一更新全部 5 处版本号(<code>package.json</code>、<code>package-lock.json</code>、dsh 插件的 <code>package.json</code> 和 <code>index.mjs</code>、Paseo 插件的 <code>package.json</code>);平台支持范围有变化时同时更新 <code>reqKit.paseo</code>。</li><li>跑完第 3 节中受影响的验证,并在 Windows 上实际装一次(<code>node scripts/check-package.mjs</code> 检查装出来的包)。</li><li>合并到 <code>main</code>。<code>.github/workflows/release.yml</code> 发现这个版本号还没有标签,就在这个提交上跑测试(Linux 和 Windows)、类型检查、评估自检,把文档站点构建进包里(<code>site-dist/</code>,<code>laoshi docs</code> 离线可用),<code>npm pack</code> 后用 <code>scripts/check-package.mjs</code> 按使用者的方式安装检查,并生成 Windows 离线安装包和摸高专家包(<code>laoshi-expert-<版本>.zip</code>)。全部通过后才打上同名标签(不带 <code>v</code>),发布到 npm(预发布版用 <code>beta</code> 标签,正式版用 <code>latest</code>),并建 GitHub Release,附上 <code>.tgz</code>、离线安装包和摸高专家包。测试没通过时不会留下标签,把修复合到 <code>main</code> 就会用同一个版本号重新发布。</li><li>发布后运行 <code>node scripts/set-version.mjs <下一版本>-dev</code>(如 <code>0.2.1-dev</code>)改回开发版本。</li></ol><p>也可以自己推送标签(<code>git push origin 0.1.0</code>)触发;重新发布已有的标签:GitHub → Actions → release → Run workflow,填版本号。npm 上发布错的版本用 <code>npm deprecate</code> 标注(npm 不允许重新发布同一版本号)。</p><p><strong>npm 发布的一次性设置</strong>:</p><ol><li>包名是带作用域的 <code>@yiyi_zhang/laoshi</code>(<code>laoshi</code> 在 npm 上不能使用),作用域 <code>yiyi_zhang</code> 就是发布者的 npm 用户名。在 npmjs.com 上用这个账号建一个 Granular Access Token:权限 Read and write,Packages 选 All packages,并勾选 <strong>Bypass two-factor authentication</strong>(CI 里没法输入一次性验证码)。在 GitHub 仓库的 Settings → Secrets and variables → Actions 中新建 secret <code>NPM_TOKEN</code>,值为这个 token。不要把 token 写进任何文件或发给别人。</li><li>第一次发布成功后,在 npmjs.com 的 <code>@yiyi_zhang/laoshi</code> 包设置 → Trusted Publisher 中添加 GitHub Actions:仓库 <code>yiyisf/laoshi</code>,工作流 <code>release.yml</code>。之后发布不再需要 token,可以删除 <code>NPM_TOKEN</code>。</li></ol><p><strong>发布到 npm 失败时</strong>:GitHub Release 和其中的 <code>.tgz</code> 照常生成,只有 npm 那一步失败。日志里是 <code>E401</code>、<code>E403</code>、<code>ENEEDAUTH</code>、<code>E404</code> 的,检查 token 或 Trusted Publisher 设置;是 <code>TLOG_CREATE_ENTRY_ERROR ... (500)</code> 的,是 sigstore 写入来源证明时出错,与设置无关,过一段时间在 Actions → release → Run workflow 填同一个版本重跑。一直失败、又急着发布时,重跑时取消勾选 <code>provenance</code>,这一次不带来源证明发布(npm 上这个版本不显示来源证明)。 3. 文档站点:Settings → Pages → Source 选 "Deploy from a branch",分支 <code>gh-pages</code>,目录 <code>/</code>(<code>.github/workflows/site.yml</code> 在 main 更新时发布)。</p><p><strong>企业私有仓库</strong>:只代理 npmjs 的不用做什么。需要单独发布到内网仓库时,从 GitHub Release 下载 <code>laoshi-<版本>.tgz</code>(或 <code>npm pack</code> 得到 <code>yiyi_zhang-laoshi-<版本>.tgz</code>),执行 <code>npm publish <这个文件> --registry <内网地址> --tag <同名标签></code>。完全没有 npm 镜像的环境用 GitHub Release 上的离线安装包(<code>laoshi-<版本>-<提交>-win32-x64.zip</code>,也可以自己运行 <code>node scripts/pack-intranet.mjs</code>),见<a href="./intranet">内网安装与验证</a>。</p><p><strong>对外约定</strong>:通知事件(<code>contracts/notifier-event.md</code>)由各团队自己的 IM 模块读取,同一 <code>schema</code> 内只增加字段;<code>laoshi</code> 的子命令和参数会被写进各团队的使用说明,改名时保留旧名一个主版本(<code>req</code> 是 <code>laoshi</code> 的别名)。<code>laoshi api</code> 的输出(<code>contracts/cli-json.md</code>)是插件和脚本读取的格式,同一 <code>schema</code> 内只增加字段。</p><h2 id="_6-处理复盘提交的问题" tabindex="-1">6. 处理复盘提交的问题 <a class="header-anchor" href="#_6-处理复盘提交的问题" aria-label="Permalink to "6. 处理复盘提交的问题""></a></h2><p><code>/laoshi-retro</code> 会把 laoshi 本身的问题写成报告草稿交给用户。收到后:</p><ol><li>能复现的,先加一个评估用例或对话剧本,确认它在当前版本失败。</li><li>修改后跑同一个评估,确认修好,并且其他用例没有变差。</li><li>在 CHANGELOG 中记录。</li></ol><h2 id="_7-目录速查" tabindex="-1">7. 目录速查 <a class="header-anchor" href="#_7-目录速查" aria-label="Permalink to "7. 目录速查""></a></h2><table tabindex="0"><thead><tr><th>目录</th><th>内容</th></tr></thead><tbody><tr><td><code>skills/</code></td><td>安装到各平台的 skill(安装时按平台渲染):入口、手册、方法、原则</td></tr><tr><td><code>principles/INDEX.md</code></td><td>原则索引</td></tr><tr><td><code>engine/src/</code></td><td>引擎:启动器、主流程、配置、状态与迁移、体检、评估运行器</td></tr><tr><td><code>engine/prompts/</code></td><td>步骤提示词(含 <code>00-shared-context.md</code> 和评审小组成员的 <code>panel-member.md</code>)</td></tr><tr><td><code>engine/test/</code></td><td>引擎测试,<code>fake-runtime.ts</code> 是模拟的平台</td></tr><tr><td><code>engine/src/builtin/</code></td><td>内置能力:<code>git worktree</code> 工作区、服务管理(平台不提供时使用)</td></tr><tr><td><code>engine/skill-fragments/</code></td><td>skill 中各平台共用的内置片段</td></tr><tr><td><code>adapters/<平台>/</code></td><td>平台适配器:<code>adapter.ts</code>(能力和用词)、运行时、<code>install.mjs</code>(安装器的平台部分);dsh 另有插件 <code>plugin/</code> 和端到端检查 <code>e2e/</code>;Paseo 另有需求插件 <code>plugin/</code>(<code>laoshi plugin</code>)和迁移 <code>migrate.ts</code></td></tr><tr><td><code>bin/</code></td><td><code>laoshi</code> 命令、安装器(<code>install.mjs</code>)、一步安装(<code>bootstrap.mjs</code>)、<code>laoshi docs</code></td></tr><tr><td><code>site/</code></td><td>文档站点(VitePress);<code>site/scripts/sync-docs.mjs</code> 把 <code>docs/guide</code>、<code>contracts</code> 等复制进站点</td></tr><tr><td><code>test/</code></td><td>安装器、体检、skill 的测试</td></tr><tr><td><code>evals/</code></td><td>评估:样例仓库、用例、对话剧本</td></tr><tr><td><code>contracts/</code></td><td>文件格式约定</td></tr><tr><td><code>docs/roadmap.md</code></td><td>后续阶段规划(未完成项、角色扩展点、分阶段路线与决策记录)</td></tr><tr><td><code>docs/adr/</code></td><td>设计决定</td></tr><tr><td><code>design/</code></td><td>界面设计规范:tokens、品牌手册、各界面规范、组件、效果图</td></tr></tbody></table></div><p class="source-note">本页由仓库中的 <a href="https://github.com/yiyisf/laoshi/blob/main/docs/guide/维护者指南.md">docs/guide/维护者指南.md</a> 生成。<a href="https://github.com/yiyisf/laoshi/edit/main/docs/guide/维护者指南.md">在 GitHub 上编辑</a></p>',2)])])}const m=o(s,[["render",a]]);export{g as __pageData,m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as o,o as d,c as t,a2 as c}from"./chunks/framework.BetZR81g.js";const g=JSON.parse('{"title":"维护者指南","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"guide/maintainer.md","filePath":"guide/maintainer.md","lastUpdated":null}'),s={name:"guide/maintainer.md"};function a(i,e,r,l,n,p){return d(),t("div",null,[...e[0]||(e[0]=[c("",2)])])}const m=o(s,[["render",a]]);export{g as __pageData,m as default};
|