原始内容
pi-leetcode-tools
Standalone source and release workspace for pi-leetcode-tools, an unofficial
set of native Pi tool calls for LeetCode Global and LeetCode CN.
The package source lives in packages/pi-leetcode-tools. This repository
contains the package, its tests, and its release infrastructure.
Installation
pi install npm:pi-leetcode-tools@latest
pi list
Usage
Start a new interactive Pi session after installing or updating the package:
pi
The extension loads automatically. Ask Pi in natural language, or name a tool when you want deterministic selection. For example:
Use lc_daily to show today's LeetCode CN challenge.
Use lc_search to find medium array problems on LeetCode Global.
Use lc_problem to read two-sum on CN and show the C++ snippet.
Use lc_progress to summarize my CN account progress.
Public problem, profile, contest, and solution reads do not require a login.
Account progress, submission history, code execution, and submission do. See
the package usage and authentication guide
for login commands, profile switching, and Pi-managed CLI paths. lc_submit
works only in an interactive Pi session and always requires a fresh UI
confirmation.
If the extension is installed but disabled, use pi config to enable its
resources and then start a new Pi session.
Requirements
- Node.js 22.19.0 or newer
- npm
Development
npm install
npm run typecheck
npm test
npm run build
Useful release checks include:
npm run verify:tools:release-workflow
npm run verify:tools:release:no-record
Run npm run pack:tools to create and verify the publishable package artifact.
Release model
The release workflow is fail-closed. Publishing requires reviewed policy data,
an immutable version tag, the configured npm trusted publisher, and successful
registry verification. A successful tagged release publishes the same semantic
version to npm latest and then creates the matching latest GitHub Release from
the verified evidence bundle. See release/TOOLS-BOOTSTRAP.md and
release/tools-release-policy.json for the complete process.
Package-specific usage, tool inventory, and security behavior are documented
in packages/pi-leetcode-tools/README.md.
License
MIT. See LICENSE and NOTICE.