@maxiaochao/pi-toolkit 0.5.3 → 0.6.1
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 +8 -0
- package/README.md +4 -0
- package/package.json +1 -1
- package/skills/pdlog/SKILL.md +28 -0
- package/skills/pdlog/tools/ppmd +0 -0
- package/skills/show-me/LICENSE +21 -0
- package/skills/show-me/NOTICE +2 -0
- package/skills/show-me/SKILL.md +133 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 2026-09-22 - v0.6.1
|
|
2
|
+
|
|
3
|
+
- bundle the pdlog skill for decompressing Pudu .pdlog logs (with bundled ppmd binary)
|
|
4
|
+
|
|
5
|
+
## 2026-09-22 - v0.6.0
|
|
6
|
+
|
|
7
|
+
- bundle the show-me skill for visual explanations (derived from humanlayer/skills, MIT), invoked explicitly with /skill:show-me
|
|
8
|
+
|
|
1
9
|
## 2026-09-15 - v0.5.3
|
|
2
10
|
|
|
3
11
|
- fix pi-worktree remove: worktrees with initialized submodules now remove via forced retry; dirty worktrees confirm the discard explicitly before removal; worktrees whose directory is already gone now prune their stale registration and clean up the branch
|
package/README.md
CHANGED
|
@@ -79,6 +79,10 @@ node skills/chrome-cdp/scripts/cdp.mjs eval <target> 'document.title'
|
|
|
79
79
|
|
|
80
80
|
Note: Chrome does not always write the `DevToolsActivePort` file (e.g. `--remote-debugging-port` launches on Chrome 152); in that case synthesize one from `GET http://127.0.0.1:<port>/json/version` — first line the port, second line the path of `webSocketDebuggerUrl`. WSL auto-discovery of Windows Chrome profiles is not built in; set `CDP_PORT_FILE` as above.
|
|
81
81
|
|
|
82
|
+
The bundled `show-me` skill (derived from [humanlayer/skills](https://github.com/humanlayer/skills), MIT) explains the current topic with the smallest visual that makes the point — pseudocode, call trees, component or file trees, diffs, Mermaid, or one focused HTML artifact. It is hidden from automatic skill selection, so invoke it explicitly with `/skill:show-me`.
|
|
83
|
+
|
|
84
|
+
The bundled `pdlog` skill decompresses and reads Pudu `.pdlog` proprietary log files, which are binary gibberish when opened directly. It ships a self-contained `ppmd` decompressor (`skills/pdlog/tools/ppmd`, Linux x86-64) and triggers automatically on `.pdlog` files, Pudu logs, ppmd decompression, or logs that open as binary gibberish.
|
|
85
|
+
|
|
82
86
|
## Tiny Subagent
|
|
83
87
|
|
|
84
88
|
The tiny subagent is a separate npm package. Install it independently when you want the `tiny_subagents` tool:
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pdlog
|
|
3
|
+
description: 解压和查看 .pdlog 日志文件。触发:.pdlog 文件、普渡日志/Pudu 日志、日志打开是乱码或二进制、ppmd 解压
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# pdlog
|
|
7
|
+
|
|
8
|
+
`.pdlog` 是普渡专有压缩日志格式:`cat`/`head`/编辑器直接打开是二进制乱码——这是格式本身,不是文件损坏。先解压成纯文本再读。
|
|
9
|
+
|
|
10
|
+
## 解压
|
|
11
|
+
|
|
12
|
+
使用本 skill 目录的 `tools/ppmd`:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
tools/ppmd -d input.pdlog output.log
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- 只想预览不落盘:`tools/ppmd -d input.pdlog /dev/stdout | head -50`
|
|
19
|
+
- 完成判据:`file output.log` 显示 text,`head` 能读到可读行。输出是二进制说明输入不是 pdlog,回到格式分叉。
|
|
20
|
+
|
|
21
|
+
## 格式分叉
|
|
22
|
+
|
|
23
|
+
- `.gz` 结尾:普通 gzip,用 `zcat`/`gunzip`,不经过 ppmd。
|
|
24
|
+
- 拿不准:先 `file` 看类型。
|
|
25
|
+
|
|
26
|
+
## 远端文件
|
|
27
|
+
|
|
28
|
+
pdlog 在远端设备或机器上时,先取回本地(`adb pull` / `scp`),解压始终在本地跑。
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 HumanLayer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: show-me
|
|
3
|
+
description: Help the user understand the current topic visually with concise diagrams, code-shape sketches, and focused HTML artifacts.
|
|
4
|
+
license: MIT
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Help the user understand the current topic of conversation visually. Skip the preamble and keep prose brief. Pick the smallest view that makes the key point clear.
|
|
9
|
+
|
|
10
|
+
- Show logic or an algorithm as pseudocode:
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
on(save)
|
|
14
|
+
if content is unchanged
|
|
15
|
+
return cached result
|
|
16
|
+
write new content
|
|
17
|
+
return fresh result
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- Show runtime control flow as a call tree:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
submitForm
|
|
24
|
+
createSession
|
|
25
|
+
persistPrompt
|
|
26
|
+
launchAgent
|
|
27
|
+
navigateToSession
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- Show UI structure as a component tree, including state and module boundaries that matter:
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<SessionPage> (apps/example/src/routes/session.tsx)
|
|
34
|
+
useSessionEvents()
|
|
35
|
+
<SessionToolbar>
|
|
36
|
+
<RunSkillButton> (packages/ui)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- Show file responsibility or a broad refactor as a shallow file tree:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
src/
|
|
43
|
+
├── commands/ # parses user actions
|
|
44
|
+
├── sessions/ # owns session state
|
|
45
|
+
└── transport/ # sends API requests
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- Show component interaction, control flow, or data flow with Mermaid:
|
|
49
|
+
|
|
50
|
+
```mermaid
|
|
51
|
+
sequenceDiagram
|
|
52
|
+
participant User
|
|
53
|
+
participant UI
|
|
54
|
+
participant Daemon
|
|
55
|
+
User->>UI: choose command
|
|
56
|
+
UI->>Daemon: send expanded prompt
|
|
57
|
+
Daemon-->>UI: stream result
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- Use `diff` when the point is what changes and the surrounding shape already exists. Match the diff shape to the topic.
|
|
61
|
+
|
|
62
|
+
For a component change:
|
|
63
|
+
|
|
64
|
+
```diff
|
|
65
|
+
<SessionPage>
|
|
66
|
+
useSessionEvents()
|
|
67
|
+
<SessionToolbar>
|
|
68
|
+
+ <RunSkillButton />
|
|
69
|
+
<SessionTimeline>
|
|
70
|
+
+ <SkillResultCard />
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For a file-layout change:
|
|
74
|
+
|
|
75
|
+
```diff
|
|
76
|
+
src/
|
|
77
|
+
├── commands/
|
|
78
|
+
+│ └── show-me.ts # expands the slash command
|
|
79
|
+
├── sessions/
|
|
80
|
+
-└── transport.ts
|
|
81
|
+
+└── transport/
|
|
82
|
+
+ ├── client.ts
|
|
83
|
+
+ └── stream.ts
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
For a call-tree or call-stack change:
|
|
87
|
+
|
|
88
|
+
```diff
|
|
89
|
+
submitForm
|
|
90
|
+
createSession
|
|
91
|
+
persistPrompt
|
|
92
|
+
+ expandSkillMention
|
|
93
|
+
launchAgent
|
|
94
|
+
- navigateToSession
|
|
95
|
+
+ navigateToSession
|
|
96
|
+
+ subscribeToEvents
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For a state or control-flow change:
|
|
100
|
+
|
|
101
|
+
```diff
|
|
102
|
+
on(save)
|
|
103
|
+
- write content
|
|
104
|
+
+ if content is unchanged
|
|
105
|
+
+ return cached result
|
|
106
|
+
+ write new content
|
|
107
|
+
+ invalidate cache
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- Show the whole block when most of it is new, when omitted context would hide ownership or order, or when the user needs a copyable target shape:
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
function expandSkill(command: string): string {
|
|
114
|
+
const skillName = command.slice(1)
|
|
115
|
+
return `use the ${skillName} skill`
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
- For a visual UI, layout, state comparison, or concept too dense for Mermaid, write one focused HTML file — a diagram, an infographic, or a short slide deck, whichever fits the point. Match the product's colors, type, spacing, and components; use real labels and data; support desktop and mobile. Follow the project's HTML output convention, or write to `.cache/html/show-me-<description>.html` when none exists. Then open it for the user:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
open path/to/show-me-<description>.html # macOS
|
|
123
|
+
xdg-open path/to/show-me-<description>.html # Linux
|
|
124
|
+
cmd.exe /c start "" "$(wslpath -w <abs path>)" # WSL
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
For a heavier standalone artifact, the `html-artifact` skill applies.
|
|
128
|
+
|
|
129
|
+
### guidance
|
|
130
|
+
|
|
131
|
+
Place each visual next to the short text it supports. Keep only the calls, files, props, states, and boundaries needed to answer the user's current question or the options to resolve the current discussion point.
|
|
132
|
+
|
|
133
|
+
You may use one of these, you may use several, it is unlikely you will use all of them. Use your judgement and don't overwhelm the user.
|