@gi4nks/ph 1.7.0 → 1.8.0

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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [1.8.0](https://github.com/gi4nks/ph/compare/v1.7.0...v1.8.0) (2026-10-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * harden PH capture, recall, and synchronization ([0e65743](https://github.com/gi4nks/ph/commit/0e657438bc2e59f2dcf14dd73e02882c29bfa390))
7
+
8
+
9
+ ### Features
10
+
11
+ * add operational memory and consolidate architecture ([39aeae5](https://github.com/gi4nks/ph/commit/39aeae507a6bab93c8d1ff49555b82fb7fc9fc37))
12
+ * make PH capture setup automatic ([35aad32](https://github.com/gi4nks/ph/commit/35aad321730dd8f1b04665af890e60e8c75a56e9))
13
+ * simplify PH command-line workflow ([05b5ea7](https://github.com/gi4nks/ph/commit/05b5ea7202d55a05c277eafc6e2b51b1913f5063))
14
+
1
15
  # [1.7.0](https://github.com/gi4nks/ph/compare/v1.6.0...v1.7.0) (2026-10-18)
2
16
 
3
17
 
@@ -55,7 +69,7 @@ All notable changes to this project will be documented in this file. See [standa
55
69
  * **config:** `remote-url`, `remote-api-key` config keys + `PH_REMOTE_URL` env var support
56
70
  * **opencode:** native importer (`ph import opencode`) + real-time plugin hook
57
71
 
58
- ### (prima di continuare con il commit fammi vedere se ti piace la situazione ) vabene?
72
+ ### Before continuing with the commit, show me the current state and check that it looks good.
59
73
 
60
74
 
61
75
  ## [1.3.0](https://github.com/gi4nks/ph/compare/v1.2.0...v1.3.0) (2026-04-12)
package/README.md CHANGED
@@ -5,13 +5,9 @@
5
5
  ## What it does
6
6
 
7
7
  - Captures conversations through a transparent command wrapper, native hooks, direct logging, or history import.
8
- - Searches prompts and responses with SQLite FTS5, or searches by semantic similarity with Ollama embeddings and sqlite-vec.
9
- - Groups records by project, tool, language, role, tags, time, and quality metadata.
10
- - Builds project summaries and an append-only analysis history with Ollama, Gemini, OpenRouter, or MLX-Serve through `@gi4nks/wise`.
11
- - Exposes prompt history and project knowledge through an MCP server over stdio.
12
- - Provides an interactive terminal browser for filtering, reviewing, editing metadata, starring, exporting, and rerunning prompts.
13
- - The TUI `p` action sends the selected prompt to a configured Wise analysis provider; `r` reruns it with its original CLI tool.
14
- - Supports optional HTTP sync between a local database and a remote `ph` server.
8
+ - Searches prompts and responses, then retrieves task-relevant project context through one command.
9
+ - Reviews recent work and saves durable project decisions only after explicit approval.
10
+ - Keeps data local by default; hooks and MCP are available for automatic capture and agent access.
15
11
 
16
12
  ## Install
17
13
 
@@ -36,20 +32,28 @@ Requires Node.js 22 or later (the Wise/AI SDK provider stack requires Node 22).
36
32
  ## Quick start
37
33
 
38
34
  ```bash
39
- # Capture a prompt by wrapping an installed AI CLI tool
40
- ph claude "explain goroutines"
35
+ # Connect PH once to the AI CLIs you use
36
+ ph setup
37
+
38
+ # Then use Claude Code, Codex, or Gemini CLI normally. Completed exchanges
39
+ # are captured in the background by each tool's native hook.
40
+ claude
41
+ codex
41
42
 
42
43
  # Search prompt history
43
44
  ph search "goroutines"
44
- ph search --semantic "concurrency patterns"
45
-
46
- # Open the interactive browser
47
- ph browse
45
+ ph show 42 # Full prompt, response, and available analysis
46
+ # Search all projects when needed
47
+ ph search --all "goroutines"
48
48
 
49
49
  # Add a record directly
50
50
  ph log --tool claude --prompt "Explain this function" --response "It parses..."
51
51
  ```
52
52
 
53
+ `ph setup` detects installed Claude Code, Codex CLI, Gemini CLI, and OpenCode integrations, then installs capture hooks while preserving existing settings. Pass tool names to select explicitly (`ph setup codex claude`). It is safe to run again. Use `ph <tool>` as a wrapper if you prefer not to install hooks.
54
+
55
+ `ph search "query"` searches the current project and shows five matches, ranked by text relevance. Use `--limit <n>` for more results or `--all` to search across projects. Codex hook captures use the active CLI working directory so new conversations get associated with the project where Codex was launched.
56
+
53
57
  ## Capture history
54
58
 
55
59
  ### Wrapper
@@ -86,7 +90,7 @@ ph import opencode
86
90
  ph import codex --dry-run
87
91
  ```
88
92
 
89
- Codex is also available through wrapper and context-injected modes: `ph codex exec "prompt"` and `ph chat codex exec "prompt"`. See [Codex hook setup](hooks/codex/README.md).
93
+ Codex is also available through wrapper mode: `ph codex exec "prompt"`. See [Codex hook setup](hooks/codex/README.md).
90
94
 
91
95
  ## Search and project context
92
96
 
@@ -94,15 +98,27 @@ Codex is also available through wrapper and context-injected modes: `ph codex ex
94
98
  ph search --tool claude --role debug --since 2026-01-01
95
99
  ph search --semantic "How did I configure SQLite migrations?"
96
100
  ph search --archive "database migration"
101
+ ph show 42 --json # Machine-readable interaction detail
102
+ ph show 42 # full prompt, response, and available analysis
103
+ ph show 42 --json # machine-readable detail
97
104
 
98
105
  # Retrieve project knowledge and related prompts for the current directory
99
106
  ph context "How are database migrations handled?"
100
107
 
101
108
  # Limit the output to project summaries and memories
102
109
  ph context --memories-only --project ph
110
+
111
+ # Retrieve a task brief with relevant history (read-only)
112
+ ph context "add Wise provider" --limit 5 --budget 3500
113
+
114
+ # Review recent work and explicitly promote useful knowledge (defaults to 3h)
115
+ ph close
116
+ ph close --from 1670 --to 1682 --dry-run
103
117
  ```
104
118
 
105
- `ph context`, `ph chat`, and MCP project-context tools use shared retrieval and formatting. Semantic results are scoped to the requested project before the result limit is applied.
119
+ `ph context "task"` retrieves task-specific history when you want to supply it explicitly. `ph close` is an optional review workflow for promoting durable knowledge; it is not required for capture or search. `ph prepare` remains a compatibility alias for `ph context`.
120
+
121
+ Running `ph` prints the short setup-first workflow; it does not open a TUI. `ph browse` remains as a compatibility alias for listing recent interactions. `ph help --all` lists maintenance and integration commands.
106
122
 
107
123
  ## Project memory and analysis
108
124
 
@@ -156,7 +172,7 @@ authentication, set `MLX_SERVE_API_KEY` or run `ph config set mlx-serve-api-key`
156
172
  for a hidden prompt. `ph config show` redacts credentials. The model catalog
157
173
  marks installed models as `[loaded]` or `[unloaded]`.
158
174
 
159
- Project summaries merge deduplicated insights and technical decisions. Individual analysis results remain in an append-only memory timeline. Analysis and embeddings require the corresponding provider to be available; basic capture and full-text search do not.
175
+ Automatic analysis enriches each interaction with classification, summary, insights, and decisions; these derived fields are searchable and visible with `ph show`. Analysis does not modify active project memories or summaries. Only approved `ph close` proposals and MCP `save_decision` promote knowledge. Existing memories remain available. Task context retrieval is shared by `ph context`, `ph chat`, and MCP knowledge checks, with a labeled recent-history fallback.
160
176
 
161
177
  ## MCP integration
162
178
 
@@ -186,7 +202,7 @@ ph remote pull
186
202
  ph remote status
187
203
  ```
188
204
 
189
- `PH_REMOTE_URL` overrides the configured remote URL. If `remote-api-key` is set on the server, clients must also provide that key. Use a private network or a TLS-terminating proxy when connecting across machines. Each `ph log` performs a non-blocking push when a remote is configured.
205
+ `PH_REMOTE_URL` overrides the configured remote URL. The server refuses to start until `remote-api-key` is configured, and every client must provide the same key. It listens on loopback by default; use an explicit `--host` only for a protected network interface and use TLS when traffic crosses an untrusted network. `/health` is public and returns status only. Resumable ID cursors are scoped to both the remote target and local database, and byte-bounded subpages stay below the server's 32 MiB request cap. A bulk push pauses before a live wrapper interaction until its response is saved. `ph log` and both wrapper modes push after capture when a remote is configured; the request is bounded to five seconds so an unavailable server cannot hang the command indefinitely. An invalid remote URL does not prevent local capture or launching the wrapped tool. Current limitation: a remote database replacement behind the same URL is not detected, and last-push/pull status timestamps are shared across targets.
190
206
 
191
207
  ## Configuration and storage
192
208
 
@@ -207,7 +223,7 @@ Configuration is stored in `~/.ph_config.json`; the database defaults to `~/.pro
207
223
  | `filter-min-length` | `15` | Minimum prompt length accepted by filtering |
208
224
  | `filter-min-relevance` | `3` | Relevance threshold for filtered imports/analysis workflows |
209
225
  | `remote-url` | unset | Remote `ph` server; `PH_REMOTE_URL` takes precedence |
210
- | `remote-api-key` | unset | Optional server authentication key |
226
+ | `remote-api-key` | unset | Required to start the HTTP server; sent by remote clients |
211
227
 
212
228
  Provider credentials can be stored in `~/.ph_config.json` through the hidden
213
229
  `ph config set <provider>-api-key` prompts or supplied through environment