@hienlh/ppm 0.12.12 → 0.13.2
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 +31 -1
- package/README.md +11 -0
- package/assets/skills/ppm/SKILL.md +74 -0
- package/assets/skills/ppm/references/cli-reference.md +728 -0
- package/assets/skills/ppm/references/common-tasks.md +139 -0
- package/assets/skills/ppm/references/http-api.md +204 -0
- package/dist/web/assets/ai-settings-section-QE6nBNgN.js +1 -0
- package/dist/web/assets/{api-settings-C3T95dWg.js → api-settings-DAk7D-NP.js} +1 -1
- package/dist/web/assets/architecture-PBZL5I3N-DvZbltvY.js +1 -0
- package/dist/web/assets/{audio-preview-BkbgGtDH.js → audio-preview--hRMnXRZ.js} +1 -1
- package/dist/web/assets/chat-tab-4kL3DNxf.js +12 -0
- package/dist/web/assets/{code-editor-BtspASkW.js → code-editor-Caq5_BaF.js} +4 -4
- package/dist/web/assets/{conflict-editor-Dgsu6fmj.js → conflict-editor-Dlo25nmt.js} +1 -1
- package/dist/web/assets/{csv-preview-DcWCjQkZ.js → csv-preview-HMSavgBb.js} +1 -1
- package/dist/web/assets/{database-viewer-C85RxdMV.js → database-viewer-DcBl6OkV.js} +2 -2
- package/dist/web/assets/{diff-viewer-2pPy97Tl.js → diff-viewer-CCzPq1o-.js} +1 -1
- package/dist/web/assets/{esm-_CLpyLJ_.js → esm-K1XIK4vc.js} +1 -1
- package/dist/web/assets/{extension-store-BZDZ9QRc.js → extension-store-3yZYn07W.js} +1 -1
- package/dist/web/assets/{extension-webview-U1lMYZ0p.js → extension-webview-D7bGVSEd.js} +1 -1
- package/dist/web/assets/{file-store-4BpOJthN.js → file-store-BrbCNyLm.js} +1 -1
- package/dist/web/assets/gitGraph-HDMCJU4V-BxhdxFgj.js +1 -0
- package/dist/web/assets/{image-preview-BcT1SbY2.js → image-preview-CfkqnhXJ.js} +1 -1
- package/dist/web/assets/index-BGFG66Gh.js +27 -0
- package/dist/web/assets/index-Bce0weeW.css +2 -0
- package/dist/web/assets/info-3K5VOQVL-BwAZ2zd8.js +1 -0
- package/dist/web/assets/{input-2eDVjcRZ.js → input-Dk49gO8E.js} +1 -1
- package/dist/web/assets/{keybindings-store-BOG1yviy.js → keybindings-store-B-zET-0o.js} +1 -1
- package/dist/web/assets/keybindings-store-DaBV6qhz.js +1 -0
- package/dist/web/assets/{markdown-renderer-Dbam_-04.js → markdown-renderer-DyAm7zuA.js} +3 -3
- package/dist/web/assets/packet-RMMSAZCW-tx2n5Qry.js +1 -0
- package/dist/web/assets/{pdf-preview-BmHVGx32.js → pdf-preview-CZPcuy5c.js} +1 -1
- package/dist/web/assets/pie-UPGHQEXC-D6S2MqVT.js +1 -0
- package/dist/web/assets/plus-51UQ45rf.js +1 -0
- package/dist/web/assets/{port-forwarding-tab-Dkq1upWC.js → port-forwarding-tab-3RNozlZ5.js} +1 -1
- package/dist/web/assets/{postgres-viewer-BgBJAJ9q.js → postgres-viewer-CXJv4TXc.js} +3 -3
- package/dist/web/assets/radar-KQ55EAFF-BviZcL-b.js +1 -0
- package/dist/web/assets/{scroll-area-CdxNNnN-.js → scroll-area-BEllam7_.js} +1 -1
- package/dist/web/assets/{settings-store-CMAssqyb.js → settings-store-BLLR7ed8.js} +2 -2
- package/dist/web/assets/settings-tab-Cnav4g2u.js +1 -0
- package/dist/web/assets/{sql-query-editor-b7zJ8XPp.js → sql-query-editor-CVAnRFbi.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-4lLAz1es.js → sqlite-viewer-C8WUEFhA.js} +1 -1
- package/dist/web/assets/{tab-store-DNBsLdPn.js → tab-store-B3M9hjho.js} +1 -1
- package/dist/web/assets/{terminal-tab-BtnqkN1H.js → terminal-tab-CaEsMxp8.js} +1 -1
- package/dist/web/assets/treemap-KZPCXAKY-CM54VdaB.js +1 -0
- package/dist/web/assets/{use-blob-url-QX-XajU8.js → use-blob-url-e9uTXjv5.js} +1 -1
- package/dist/web/assets/{use-monaco-theme-D68oX3XU.js → use-monaco-theme-BkZDwoVd.js} +1 -1
- package/dist/web/assets/{vendor-mermaid-sQS4C_iL.js → vendor-mermaid-Dx86tuVP.js} +2 -2
- package/dist/web/assets/{video-preview-CkOKvVLt.js → video-preview-Dfz71RGb.js} +1 -1
- package/dist/web/index.html +18 -18
- package/dist/web/sw.js +1 -1
- package/docs/project-changelog.md +15 -1
- package/package.json +3 -3
- package/scripts/generate-ppm-skill.ts +23 -0
- package/scripts/lib/generate-cli-reference.ts +81 -0
- package/scripts/lib/generate-common-tasks.ts +14 -0
- package/scripts/lib/generate-http-api.ts +145 -0
- package/scripts/lib/generate-skill-md.ts +28 -0
- package/scripts/lib/write-output.ts +17 -0
- package/src/cli/commands/export-cmd.ts +85 -0
- package/src/index.ts +167 -153
- package/src/server/index.ts +12 -4
- package/src/services/autostart-generator.ts +3 -1
- package/src/services/autostart-register.ts +17 -0
- package/src/services/sd-notify.ts +27 -0
- package/src/services/skill-export/backup-existing.ts +33 -0
- package/src/services/skill-export/copy-bundled-skill.ts +36 -0
- package/src/services/skill-export/generate-db-schema.ts +66 -0
- package/src/services/skill-export/index.ts +6 -0
- package/src/services/skill-export/resolve-assets-dir.ts +31 -0
- package/src/services/skill-export/resolve-target-dir.ts +17 -0
- package/src/services/supervisor.ts +31 -5
- package/src/web/components/chat/chat-history-bar.tsx +2 -9
- package/src/web/components/chat/chat-history-panel.tsx +2 -9
- package/src/web/components/chat/chat-tab.tsx +6 -1
- package/src/web/components/chat/chat-welcome.tsx +1 -18
- package/src/web/components/chat/message-list.tsx +96 -43
- package/src/web/components/layout/draggable-tab.tsx +12 -5
- package/src/web/hooks/use-chat.ts +37 -1
- package/src/web/hooks/use-notification-badge.ts +7 -7
- package/src/web/lib/favicon.ts +37 -15
- package/src/web/lib/flatten-expansions.ts +36 -0
- package/src/web/lib/format-date.ts +21 -0
- package/src/web/styles/globals.css +12 -0
- package/templates/skill/SKILL.md.tmpl +74 -0
- package/templates/skill/common-tasks.md +139 -0
- package/assets/skills/ppm-guide/SKILL.md +0 -61
- package/bun.lock +0 -2062
- package/bunfig.toml +0 -2
- package/dist/web/assets/ai-settings-section-NNWp6nw7.js +0 -1
- package/dist/web/assets/architecture-PBZL5I3N-DDuzYaUV.js +0 -1
- package/dist/web/assets/chat-tab-BZlP1qjX.js +0 -12
- package/dist/web/assets/chevron-up-BWBvMZkp.js +0 -1
- package/dist/web/assets/gitGraph-HDMCJU4V-BURAevTc.js +0 -1
- package/dist/web/assets/index-BWSRKVZn.js +0 -23
- package/dist/web/assets/index-b6tIZImC.css +0 -2
- package/dist/web/assets/info-3K5VOQVL-tSD4Fpi3.js +0 -1
- package/dist/web/assets/keybindings-store-BvdUoEC7.js +0 -1
- package/dist/web/assets/packet-RMMSAZCW-DmDLZUrV.js +0 -1
- package/dist/web/assets/pie-UPGHQEXC-w03Pc9ZR.js +0 -1
- package/dist/web/assets/pre-compact-button-Dp7Hs49L.js +0 -1
- package/dist/web/assets/pre-compact-section-DnM5fGSR.js +0 -1
- package/dist/web/assets/radar-KQ55EAFF-C9XQvoey.js +0 -1
- package/dist/web/assets/settings-tab-zYWKTq5z.js +0 -1
- package/dist/web/assets/treemap-KZPCXAKY-lmftxSky.js +0 -1
- package/scripts/generate-ppm-guide.ts +0 -92
- package/src/web/components/chat/pre-compact-section.tsx +0 -69
- /package/dist/web/assets/{api-client-DIhJ5qVW.js → api-client-Dvzcc_EO.js} +0 -0
- /package/dist/web/assets/{csv-parser-B5QW8pZ6.js → csv-parser--2WJNgS7.js} +0 -0
- /package/dist/web/assets/{dist-GtkSekuX.js → dist-im4ynINo.js} +0 -0
- /package/dist/web/assets/{katex-C3cZrCvP.js → katex-CKoArbIw.js} +0 -0
- /package/dist/web/assets/{lib-Bu71-TFS.js → lib-DQHnkzGy.js} +0 -0
- /package/dist/web/assets/{react-DMIOAtcX.js → react-GqWghJ-L.js} +0 -0
- /package/dist/web/assets/{refresh-cw-BjrAbUJe.js → refresh-cw-LlbZDJpO.js} +0 -0
- /package/dist/web/assets/{sql-completion-provider-CULTsCqR.js → sql-completion-provider-C3cq9j99.js} +0 -0
- /package/dist/web/assets/{table-tf7pRkME.js → table-Dq575bPF.js} +0 -0
- /package/dist/web/assets/{text-wrap-BV-R4Vvy.js → text-wrap-Cn6BNQfq.js} +0 -0
- /package/dist/web/assets/{trash-2-DjQOpgUV.js → trash-2-CJYoLw7Q.js} +0 -0
- /package/dist/web/assets/{utils-CQux7CsO.js → utils-CTg5uAYR.js} +0 -0
- /package/dist/web/assets/{vendor-xterm-K3_Xwigj.js → vendor-xterm-CU2c3f0A.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.13.2] - 2026-04-21
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- **Chat tab badges redesign** — reduced visual noise from 3 separate indicators to integrated icon states:
|
|
7
|
+
- **Tag**: removed left-side color dot, now colors the chat icon itself. Untagged tabs force neutral gray (`text-text-secondary`) regardless of active state, so they don't get confused with blue-tagged tabs when active (`text-primary` was leaking into icon)
|
|
8
|
+
- **Streaming**: replaced top-right pulsing green dot with **Messenger-style typing dots** bouncing inside the chat bubble icon (3× `size-[2px]` circles using `bg-current` + staggered `animationDelay`). Added `tabTypingBounce` keyframe (1.5px translate, 1s loop) to `globals.css` with `prefers-reduced-motion` fallback
|
|
9
|
+
- **Notification**: unchanged — still top-right colored dot when unread and tab inactive
|
|
10
|
+
- **Favicon streaming indicator** — replaced blue/amber flash with **typing dots animation** on amber background (`#f59e0b`, high-attention) for better peripheral visibility. Pre-encodes 4 frames (3 active positions + 1 rest frame — rest frame makes cycle boundary perceptible so all 3 dots appear to bounce equally) cycled every 300ms. `setFavicon()` signature changed: second arg is now `streamingFrame: number | null` (null = idle) instead of `isStreamingAlt: boolean`. Exports `STREAM_FRAME_COUNT` for DRY cycling in `useNotificationBadge`
|
|
11
|
+
|
|
12
|
+
## [0.13.1] - 2026-04-21
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- **WSL/Linux upgrade killed entire PPM stack (100% repro)**: Under `systemd` with `Type=simple`, the old supervisor's `process.exit(0)` at the end of `selfReplace()` triggered `KillMode=mixed` cgroup cleanup that SIGKILLed the freshly-spawned new supervisor along with server + cloudflared. Root cause: `Bun.spawn + unref()` does not escape the unit cgroup. Fix combines two changes:
|
|
16
|
+
- **Type=notify + MAINPID handoff**: Generated systemd unit now uses `Type=notify` / `NotifyAccess=all`. New supervisor sends `READY=1` via `sd_notify` on startup; during `selfReplace()`, old supervisor sends `MAINPID=<new_pid>` so systemd re-tracks the new supervisor as MainPID *before* the old one exits — cgroup is preserved instead of torn down
|
|
17
|
+
- **Tunnel in transient systemd scope**: `spawnTunnel()` now wraps `cloudflared` in `systemd-run --user --scope --quiet --collect` when running under systemd, hoisting the tunnel into its own cgroup so the trycloudflare URL survives ppm.service restarts (even the worst-case one). Preserves `adoptTunnel()` domain continuity across upgrades
|
|
18
|
+
- **Auto-migration**: `ppm start` detects stale unit files missing `Type=notify` and regenerates them silently; user runs one `systemctl --user restart ppm.service` after first upgrade to pick up the new unit
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- **`src/services/sd-notify.ts`**: Thin wrapper around `systemd-notify` binary for `READY=1` / `MAINPID=` messages. No-op when `NOTIFY_SOCKET` is unset (non-systemd)
|
|
22
|
+
- **`isAutoStartUnitStale()` helper**: Detects outdated systemd unit files so `ppm start` can regenerate them inline
|
|
23
|
+
|
|
24
|
+
## [0.13.0] - 2026-04-21
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- **`ppm export skill`**: Install a Claude Code skill at `~/.claude/skills/ppm/` so external AI agents can control PPM via its CLI, HTTP API, and SQLite config DB. Flags: `--install`, `--scope user|project`, `--output <dir>`, `--format claude-code`. Generates `SKILL.md` + `references/{cli-reference,http-api,db-schema,common-tasks}.md`. CLI/HTTP references are auto-generated at build time by walking the Commander tree and scanning Hono route files. DB schema is generated at install time from the user's `~/.ppm/ppm.db` (opened readonly). Re-install is safe: existing files are renamed to `<name>.bak-<YYYYMMDDHHmm>` before overwrite. Preview mode (no `--install`/`--output`) writes the merged `SKILL.md` to stdout.
|
|
28
|
+
- **`buildProgram()` export in `src/index.ts`**: Module now exports the assembled Commander tree without parsing argv, enabling build-time introspection for auto-generated docs. Runtime behavior preserved via `import.meta.main` guard.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- **Generator rename**: `scripts/generate-ppm-guide.ts` → `scripts/generate-ppm-skill.ts` (plus `scripts/lib/` modules). Output moved from `assets/skills/ppm-guide/` → `assets/skills/ppm/`. `npm` scripts: `generate:guide` → `generate:skill`; `prepublishOnly` updated.
|
|
32
|
+
|
|
3
33
|
## [0.12.12] - 2026-04-21
|
|
4
34
|
|
|
5
35
|
### Fixed
|
|
6
36
|
- **Login broken when using `--share` without profile**: The `--share` flag was positionally parsed as a DB profile name in both supervisor and server child, causing them to read `ppm.--share.db` (with a random auto-generated token) instead of `ppm.db`. Users saw perpetual "Unauthorized" on login despite entering the correct token
|
|
7
37
|
|
|
8
38
|
### Added
|
|
9
|
-
- **Expand compacted conversation**: When Claude compacts context and references a JSONL transcript (`read the full transcript at: ...`), the chat now shows a "Load previous conversation" button. Clicking fetches
|
|
39
|
+
- **Expand compacted conversation**: When Claude compacts context and references a JSONL transcript (`read the full transcript at: ...`), the chat now shows a "Load previous conversation" button. Clicking fetches pre-compact messages via `GET /chat/pre-compact-messages?jsonlPath=...` and **prepends them into the main message list above the compact card** (natural Messenger-style UX) — scroll up to view history, and nested compact summaries in loaded history show their own button for recursive expansion. Expansions are ephemeral (reset on session switch). Extracted shared JSONL parsing into `src/services/jsonl-transcript-parser.ts`. Path validated strictly under `~/.claude/` (symlink-resolved realpath) with a 50MB size guard
|
|
10
40
|
- **Full-content diff endpoint**: `GET /git/file-full-diff?file=&ref=` returns original (ref) and modified (working tree) file contents for Monaco DiffEditor
|
|
11
41
|
|
|
12
42
|
## [0.12.11] - 2026-04-21
|
package/README.md
CHANGED
|
@@ -128,6 +128,17 @@ bunx @hienlh/ppm init -y \
|
|
|
128
128
|
|
|
129
129
|
Once running, the Cloudflare public URL is printed to stdout — parse it to share with users.
|
|
130
130
|
|
|
131
|
+
## Use with Claude Code
|
|
132
|
+
|
|
133
|
+
Install the PPM skill so Claude Code (and other compatible AI agents) can control PPM via its CLI, HTTP API, and SQLite config DB:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
ppm export skill --install
|
|
137
|
+
# Installs to ~/.claude/skills/ppm/ (use --scope project for per-project install).
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Then in Claude Code: `/ppm list my projects` → Claude invokes `ppm projects list` automatically. Re-run any time to refresh (existing files are backed up with a `.bak-<timestamp>` suffix). Requires PPM v0.13.0+.
|
|
141
|
+
|
|
131
142
|
## Requirements
|
|
132
143
|
|
|
133
144
|
- **Bun** v1.3.6+ ([install](https://bun.sh))
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ppm
|
|
3
|
+
description: Control PPM (Project & Process Manager) via its CLI, HTTP API, and SQLite config database. Use when the user wants to manage PPM projects, query database connections, start/stop the PPM server, view logs, or read/write PPM config.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PPM Skill
|
|
7
|
+
|
|
8
|
+
PPM is a local-first web IDE + project manager. This skill describes how to control PPM from the terminal, over HTTP, and by inspecting its SQLite config database.
|
|
9
|
+
|
|
10
|
+
## Quick Reference
|
|
11
|
+
|
|
12
|
+
| What | Where |
|
|
13
|
+
|---|---|
|
|
14
|
+
| CLI binary | `ppm` |
|
|
15
|
+
| Default server | `http://localhost:8080` |
|
|
16
|
+
| Config DB (prod) | `~/.ppm/ppm.db` (SQLite) |
|
|
17
|
+
| Config DB (dev) | `~/.ppm/ppm.dev.db` (port 8081) |
|
|
18
|
+
| Skill root (user) | `~/.claude/skills/` |
|
|
19
|
+
| Skill root (project) | `<project>/.claude/skills/` |
|
|
20
|
+
|
|
21
|
+
## When to Use This Skill
|
|
22
|
+
|
|
23
|
+
Invoke when the user asks to:
|
|
24
|
+
- Start, stop, restart, or check the PPM server
|
|
25
|
+
- Manage registered projects (`projects list/add/remove`)
|
|
26
|
+
- Manage database connections stored in PPM config (`db list/add/test/query`)
|
|
27
|
+
- Get or set PPM config values (`config get/set`)
|
|
28
|
+
- View PPM logs, status, or report a bug
|
|
29
|
+
- Install, upgrade, or inspect bundled skills / extensions
|
|
30
|
+
- Control the PPM daemon autostart registration
|
|
31
|
+
|
|
32
|
+
## Top Tasks
|
|
33
|
+
|
|
34
|
+
1. **Check if PPM is running** → `ppm status`
|
|
35
|
+
2. **Start server** → `ppm start` (use `--port <n>` to override, `--profile dev` for dev DB)
|
|
36
|
+
3. **List projects** → `ppm projects list`
|
|
37
|
+
4. **Add project** → `ppm projects add <path>`
|
|
38
|
+
5. **List DB connections** → `ppm db list`
|
|
39
|
+
6. **Query a saved DB connection** → `ppm db query <connection-name> "<sql>"`
|
|
40
|
+
7. **Read config** → `ppm config get <key>` (e.g. `port`, `auth.enabled`)
|
|
41
|
+
8. **Tail logs** → `ppm logs --tail 100` or `ppm logs -f` to follow
|
|
42
|
+
9. **Upgrade PPM** → `ppm upgrade` (or `--check` to only check)
|
|
43
|
+
10. **Open in browser** → `ppm open`
|
|
44
|
+
|
|
45
|
+
## Rules of Thumb
|
|
46
|
+
|
|
47
|
+
- Always run `ppm status` before assuming the server is up.
|
|
48
|
+
- Commands exit non-zero on failure and print to stderr. Capture both streams.
|
|
49
|
+
- Listing commands accept `--json` for structured output; prefer JSON when parsing.
|
|
50
|
+
- The config DB is **SQLite**. You may open `~/.ppm/ppm.db` read-only for inspection — see [references/db-schema.md](references/db-schema.md).
|
|
51
|
+
- Do NOT edit the config DB directly while the server is running; use `ppm config set` or the HTTP API.
|
|
52
|
+
|
|
53
|
+
## Links
|
|
54
|
+
|
|
55
|
+
- Complete CLI options, every subcommand → [references/cli-reference.md](references/cli-reference.md)
|
|
56
|
+
- HTTP API routes (25+) → [references/http-api.md](references/http-api.md)
|
|
57
|
+
- Config DB schema (runtime-generated from user's DB) → [references/db-schema.md](references/db-schema.md)
|
|
58
|
+
- Worked recipes for common tasks → [references/common-tasks.md](references/common-tasks.md)
|
|
59
|
+
|
|
60
|
+
## Error Handling
|
|
61
|
+
|
|
62
|
+
- Server not running → `ppm status` exits non-zero; start with `ppm start`.
|
|
63
|
+
- Port conflict → `ppm config set port <n>` then `ppm restart`.
|
|
64
|
+
- Missing config DB → `ppm init` creates defaults.
|
|
65
|
+
- Upgrade failure → re-run `ppm upgrade` or `npm i -g @hienlh/ppm@latest`.
|
|
66
|
+
|
|
67
|
+
## Scope Boundaries
|
|
68
|
+
|
|
69
|
+
This skill covers the `ppm` CLI, its HTTP API, and its config DB. It does **not** cover:
|
|
70
|
+
- Projects managed by PPM (those are user code, outside skill scope).
|
|
71
|
+
- Third-party extensions (inspect via `ppm ext list`).
|
|
72
|
+
- The Claude Agent SDK internals (separate skill).
|
|
73
|
+
|
|
74
|
+
<!-- Generated for PPM v0.13.2 at build time. Re-run `ppm export skill --install` to refresh. -->
|