fix(issue-69): repair package docs and CRLF folding - #231
Conversation
ca6df58 to
0ab91e0
Compare
|
Updated this PR onto upstream main at fc4ab47. The file-search diagnostics fix is already present upstream (#230) and was removed from this branch; the PR now contains only the remaining Issue #69 documentation/package-layout and CRLF-folding changes. Validation after the update: user-input-fold 21/21, lint passed, typecheck passed, npm pack preview passed, and diff check passed. |
agnitum2009
left a comment
There was a problem hiding this comment.
Verified all claims in this PR against a local checkout of the PR branch (0ab91e0):
- Package layout: confirmed
package.jsonexcludesextensions/*/docswhile publishingskills, soextensions/subagents/docs/agent-types.mdwas indeed absent from the npm package. The move toskills/subagents/REFERENCE.mdmatches the existing workflows skill pattern (SKILL.md+REFERENCE.md). Both doc-facing references (SKILL.md and theextensions/subagents/index.tsheader comment) are updated; all remainingagent-typesmatches are source-module imports. - README links:
docs/design/is also not packaged, so pointing at the GitHub repo fixes dead links in the published README. /handoffremoval: confirmed no/handoffskill or command exists anywhere on main — SETUP.md and the context-pivot error message/tool description referenced a nonexistent command. The/sessions+pi-intercomreplacement is a real fix. No tests assert the old message; README "handoff" mentions are the unrelatedhuman_handofftool.- CRLF folding: reverse-verified the regression test — reverting the one-line
FENCE_CLOSEfix makes the new test fail; restoring it passes. The fix is minimal and correct (open-fence regex is an unanchored prefix match, unaffected).
Validation run locally on the PR branch: bun test (user-input-fold 21/21, plus context-pivot and subagents prompt tests — 36/36 total), bun run typecheck, and bun run lint all pass.
No new model-facing tools (no child-session classification needed), no package-owned configuration changes, SETUP.md change is consistent with README. LGTM.
|
代码有效性审计结论:在当前 |
0ab91e0 to
424bc34
Compare
| Workflow 在清理隔离 checkout 前原子保存有界 Handoff Manifest:tracked binary patch、stat、branch/HEAD、untracked/ignored 清单与 cleanup receipt。状态不明就保留现场,不自动 merge、apply 或强删。 | ||
|
|
||
| 设计细节见 [`docs/design/WORKFLOW_INVOCATION_GRAPH.md`](docs/design/WORKFLOW_INVOCATION_GRAPH.md)。 | ||
| 设计细节见 [Workflow invocation graph](https://github.com/tt-a1i/openpi/blob/main/docs/design/WORKFLOW_INVOCATION_GRAPH.md)。 |
There was a problem hiding this comment.
[P2] 请改为 canonical repository 链接。这里指向个人 fork tt-a1i/openpi,发布到 npm/GitHub 后文档可用性会依赖该 fork;本 PR 对应 issue #69 的目标正是让发布包中的链接稳定可解析。应指向 openpi-dev/openpi/blob/main/docs/design/WORKFLOW_INVOCATION_GRAPH.md。
| if (tokens < MIN_CONTEXT_PIVOT_TOKENS) { | ||
| throw new Error( | ||
| `Context is only ${Math.round(tokens).toLocaleString()} tokens; use context_pivot once context reaches at least ${MIN_CONTEXT_PIVOT_TOKENS.toLocaleString()} tokens, or /handoff for a genuinely new session.`, | ||
| `Context is only ${Math.round(tokens).toLocaleString()} tokens; use context_pivot once context reaches at least ${MIN_CONTEXT_PIVOT_TOKENS.toLocaleString()} tokens, or /sessions to browse or switch to a genuinely new session.`, |
There was a problem hiding this comment.
[P2] 这里把 /sessions 描述成“新建 session”的入口,但它实际只搜索、预览和切换已有 Session。当前 main 已明确区分这两个动作;合并后这段提示会让用户把“切换已有会话”误当成“创建干净会话”。请保留 /sessions 的已有会话语义,并把新建动作写成在 Pi 中启动新的 Session;同类表述在下方另一处也要同步。
tt-a1i
left a comment
There was a problem hiding this comment.
已按精确 head 593f815 复核。这个 PR 的方向和主要实现成立:修复发布文档路径、把 subagent reference 纳入包,并让 fenced content folding 同时兼容 LF/CRLF;本地 merge-state focused tests 38/38、bun run check、npm pack dry-run 均通过,精确 head CI 也全绿。当前有两处需要修正后再合并:README 中 Workflow 设计文档仍指向个人 fork;context-pivot 将 /sessions 误写成可新建 Session。另请注意该分支已落后于当前 main,更新后需重新跑 CI 并复核新 head。
Problem
Issue #69 tracks package-facing documentation links, CRLF fenced messages, and related release-quality follow-ups. The file-search Effect diagnostics portion is already fixed on the current upstream main branch, so this PR is limited to the remaining package documentation and CRLF issues.
Value
The npm package keeps its published documentation links usable, package-facing references point to files included in the package, fenced-message folding behaves consistently for LF and CRLF input, and setup/context-pivot guidance names supported session workflows.
Approach
skills/subagents/REFERENCE.mdand update package-facing references./handoffguidance with/sessionsand the optional pi-intercom path.Validation
bun test tests/extensions/user-input-fold/index.test.ts— 21/21 passed.bun run lint— passed.bun run typecheck— passed.npm pack --dry-run --json— confirmedskills/subagents/REFERENCE.mdis included.git diff --check upstream/main...HEAD— passed.Impact
No acceptance, delivery, or model-context semantics were changed. Runtime changes are limited to CRLF display folding; the other changes are documentation and package-layout corrections.
Related to #69