Skip to content

chore: promote development to main (pi support, v0.4.0) - #38

Merged
TecFancy merged 15 commits into
mainfrom
chore/promote-0.4.0
Nov 20, 2026
Merged

TecFancy merged 15 commits into
mainfrom
chore/promote-0.4.0

Conversation

@TecFancy

Copy link
Copy Markdown
Owner

Promotes development to main for the v0.4.0 release.

Contents: pi support (#36) and the version bump (#37). The merge had two conflicts, both of the same kind — main's earlier promote commits (LICENSE #33, npm README images #35) carried content that also reached development by other paths. Both were resolved in favour of development; the merge tree is byte-identical to origin/development.

Once merged, v0.4.0 gets tagged on the merge commit and release.yml publishes to npm via Trusted Publishing.

No functional change since v0.3.2: the only commits after it are the npm
Trusted Publishing migration (#25, #26), which touches the release workflow
and AGENTS.md and neither ships in the package. This release exists to
validate the new OIDC publisher before its two-day configuration window
expires.
… them

The raw-HTML branch passed `<details ...>` / `<summary ...>` lines and the
whole block body through verbatim, so `<details ontoggle=... open>`,
`<summary onclick=...>` or an `<img onerror=...>` inside the block reached
the generated page. deeptutor_run feeds model and web-search output into
this converter, so that content is untrusted.

The tags are now rebuilt: attributes are dropped (only a bare `open` is
kept), summary text goes through inline() so it is escaped first, and the
block body is parsed as Markdown, which escapes any HTML in it and also
renders fences, lists and bold that used to show as literal text.
fix: rebuild raw <details>/<summary> in md-to-html instead of echoing them
Ships the html-doc XSS fix (#29): md-to-html rebuilds raw <details>/<summary>
tags without attributes and parses the block body as Markdown instead of
echoing it into the generated page.
package.json has said "license": "MIT" since the first release, but the
repository carried no LICENSE file, so the npm tarball and the GitHub page
both left the terms unstated. Add the file, ship it in the package, and
point both READMEs at it.
npm does not resolve a README's relative image paths, so the two screenshots
worked on GitHub and were broken on npmjs.com. They are absolute
`raw.githubusercontent.com` URLs now, which both renderers can fetch.

The images also leave the package's `files`: the README fetches them from the
repository, so shipping a second copy only made the tarball bigger. 894 KB to
181 KB.
pi has neither dsh's bundle mechanism nor Claude Code's plugin marketplace, so
`pi install npm:dsh-deeptutor` used to install the package and load nothing:
pi looks for the convention directories skills/ and extensions/, and our skills
live in dot-prefixed .agents/skills.

- package.json: add a `pi` manifest naming .agents/skills and the new
  pi/deeptutor.ts, ship `pi` in files[], and add the pi-package keyword so the
  package is eligible for the pi gallery.
- pi/deeptutor.ts: a thin host adapter that registers the same MCP server the
  Claude Code plugin runs (scripts/mcp-launch.mjs), so the tools stay defined
  once in src/tools.ts. Registers with `deferred` exposure — the four schemas
  would otherwise sit in every request — and a 30-minute timeout, because one
  deep_solve turn outlives pi's 60-second default.
- The extension types pi's ExtensionAPI by hand: importing the host package
  would add ~24MB to devDependencies and a peer dependency on it would make
  npm auto-install pi for dsh users. The package stays dependency-free.
- tests: pi-extension.test.ts pins the manifest, the existing file paths, the
  tarball contents and the registration; mcp-launch.test.ts spawns the launcher
  and speaks MCP over stdio, which also catches non-protocol lines on stdout.
- Docs: README/README.zh/AGENTS/skill README now name pi as a host, and the
  deeptutor skill lists the tool names each host uses (dsh bare, pi
  mcp__deeptutor__*, Claude Code mcp__plugin_*).

Verified by installing into a scratch project and running pi 1.3.0 against it:
both skills load and deeptutor_kb returns the 11 knowledge bases. Local
checkout without lib/, npm-pack tarball and a fake npm node_modules layout all
load too; the dsh compat probe still passes.
# Conflicts:
#	README.zh.md
#	package.json
@TecFancy
TecFancy merged commit df6598b into main Nov 20, 2026
2 checks passed
@TecFancy
TecFancy deleted the chore/promote-0.4.0 branch November 20, 2026 09:29
TecFancy added a commit that referenced this pull request Nov 22, 2026
chore: promote development to main (pi support, v0.4.0)
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.

1 participant