Skip to content

fix(issue-69): repair package docs and CRLF folding - #231

Open
627150795 wants to merge 2 commits into
openpi-dev:mainfrom
627150795:fix/issue-69-package-ui
Open

fix(issue-69): repair package docs and CRLF folding#231
627150795 wants to merge 2 commits into
openpi-dev:mainfrom
627150795:fix/issue-69-package-ui

Conversation

@627150795

@627150795 627150795 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

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

  • Point README design links at the official GitHub repository.
  • Move the published agent-type reference under skills/subagents/REFERENCE.md and update package-facing references.
  • Accept an optional carriage return when recognizing closing Markdown fences, with regression coverage.
  • Replace /handoff guidance with /sessions and 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 — confirmed skills/subagents/REFERENCE.md is 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

@627150795
627150795 force-pushed the fix/issue-69-package-ui branch from ca6df58 to 0ab91e0 Compare August 28, 2026 19:29
@627150795 627150795 changed the title fix(issue-69): repair package docs, CRLF folding, and Effect diagnostics fix(issue-69): repair package docs and CRLF folding Aug 28, 2026
@627150795

Copy link
Copy Markdown
Contributor Author

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
agnitum2009 previously approved these changes Aug 29, 2026

@agnitum2009 agnitum2009 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified all claims in this PR against a local checkout of the PR branch (0ab91e0):

  • Package layout: confirmed package.json excludes extensions/*/docs while publishing skills, so extensions/subagents/docs/agent-types.md was indeed absent from the npm package. The move to skills/subagents/REFERENCE.md matches the existing workflows skill pattern (SKILL.md + REFERENCE.md). Both doc-facing references (SKILL.md and the extensions/subagents/index.ts header comment) are updated; all remaining agent-types matches 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.
  • /handoff removal: confirmed no /handoff skill or command exists anywhere on main — SETUP.md and the context-pivot error message/tool description referenced a nonexistent command. The /sessions + pi-intercom replacement is a real fix. No tests assert the old message; README "handoff" mentions are the unrelated human_handoff tool.
  • CRLF folding: reverse-verified the regression test — reverting the one-line FENCE_CLOSE fix 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.

@627150795

Copy link
Copy Markdown
Contributor Author

代码有效性审计结论:在当前 openpi-dev/openpi/main@d08bb6b 基线下,PR #231 的实际远程提交 0ab91e0 在声明范围内有效。CRLF fenced-message folding、安装包内 REFERENCE.md 路径和 /sessions 引导均沿真实调用/发布路径检查;相关定向测试 20/20 通过,未发现需要追加的生产代码修复。bare-CR 和极限阈值计数仍是既有边界,不是本 PR 引入的回归。

Comment thread README.md
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)。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.`,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 这里把 /sessions 描述成“新建 session”的入口,但它实际只搜索、预览和切换已有 Session。当前 main 已明确区分这两个动作;合并后这段提示会让用户把“切换已有会话”误当成“创建干净会话”。请保留 /sessions 的已有会话语义,并把新建动作写成在 Pi 中启动新的 Session;同类表述在下方另一处也要同步。

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已按精确 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。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants