@jx-grxf/patchpilot 1.0.0 → 1.2.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/README.md +51 -16
- package/dist/cli.js +46 -3
- package/dist/cli.js.map +1 -1
- package/dist/core/agent.d.ts +44 -1
- package/dist/core/agent.js +617 -70
- package/dist/core/agent.js.map +1 -1
- package/dist/core/clipboard.d.ts +14 -0
- package/dist/core/clipboard.js +134 -0
- package/dist/core/clipboard.js.map +1 -0
- package/dist/core/codex.d.ts +8 -0
- package/dist/core/codex.js +28 -2
- package/dist/core/codex.js.map +1 -1
- package/dist/core/compaction.d.ts +23 -0
- package/dist/core/compaction.js +145 -0
- package/dist/core/compaction.js.map +1 -0
- package/dist/core/contextFormat.d.ts +21 -0
- package/dist/core/contextFormat.js +87 -0
- package/dist/core/contextFormat.js.map +1 -0
- package/dist/core/contextItem.d.ts +41 -0
- package/dist/core/contextItem.js +93 -0
- package/dist/core/contextItem.js.map +1 -0
- package/dist/core/contextStore.d.ts +48 -0
- package/dist/core/contextStore.js +306 -0
- package/dist/core/contextStore.js.map +1 -0
- package/dist/core/doctor.js +9 -8
- package/dist/core/doctor.js.map +1 -1
- package/dist/core/gemini.js +10 -4
- package/dist/core/gemini.js.map +1 -1
- package/dist/core/geminiWrapper.d.ts +43 -2
- package/dist/core/geminiWrapper.js +582 -42
- package/dist/core/geminiWrapper.js.map +1 -1
- package/dist/core/http.js +70 -6
- package/dist/core/http.js.map +1 -1
- package/dist/core/json.d.ts +1 -1
- package/dist/core/json.js +18 -20
- package/dist/core/json.js.map +1 -1
- package/dist/core/nvidia.d.ts +1 -1
- package/dist/core/nvidia.js +13 -4
- package/dist/core/nvidia.js.map +1 -1
- package/dist/core/ollama.js +13 -3
- package/dist/core/ollama.js.map +1 -1
- package/dist/core/openrouter.js +15 -6
- package/dist/core/openrouter.js.map +1 -1
- package/dist/core/reasoning.js +3 -0
- package/dist/core/reasoning.js.map +1 -1
- package/dist/core/session.js +9 -3
- package/dist/core/session.js.map +1 -1
- package/dist/core/tokenAccounting.d.ts +4 -0
- package/dist/core/tokenAccounting.js +75 -13
- package/dist/core/tokenAccounting.js.map +1 -1
- package/dist/core/types.d.ts +58 -3
- package/dist/core/types.js +30 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/updateCheck.d.ts +19 -0
- package/dist/core/updateCheck.js +103 -0
- package/dist/core/updateCheck.js.map +1 -0
- package/dist/core/workspace.d.ts +29 -0
- package/dist/core/workspace.js +1271 -92
- package/dist/core/workspace.js.map +1 -1
- package/dist/tui/App.d.ts +1 -0
- package/dist/tui/App.js +1346 -112
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/commands.js +109 -6
- package/dist/tui/commands.js.map +1 -1
- package/dist/tui/components/ApprovalPanel.js +16 -1
- package/dist/tui/components/ApprovalPanel.js.map +1 -1
- package/dist/tui/components/CommandSuggestions.js +26 -3
- package/dist/tui/components/CommandSuggestions.js.map +1 -1
- package/dist/tui/components/Composer.d.ts +3 -0
- package/dist/tui/components/Composer.js +57 -5
- package/dist/tui/components/Composer.js.map +1 -1
- package/dist/tui/components/ExperimentalPanel.d.ts +1 -1
- package/dist/tui/components/ExperimentalPanel.js +5 -0
- package/dist/tui/components/ExperimentalPanel.js.map +1 -1
- package/dist/tui/components/OnboardingPanel.d.ts +12 -0
- package/dist/tui/components/OnboardingPanel.js +69 -21
- package/dist/tui/components/OnboardingPanel.js.map +1 -1
- package/dist/tui/components/StartupBanner.d.ts +4 -0
- package/dist/tui/components/StartupBanner.js +9 -0
- package/dist/tui/components/StartupBanner.js.map +1 -0
- package/dist/tui/components/Transcript.d.ts +7 -0
- package/dist/tui/components/Transcript.js +86 -16
- package/dist/tui/components/Transcript.js.map +1 -1
- package/dist/tui/contextCommands.d.ts +8 -0
- package/dist/tui/contextCommands.js +205 -0
- package/dist/tui/contextCommands.js.map +1 -0
- package/dist/tui/experimental/AnimatedText.d.ts +38 -0
- package/dist/tui/experimental/AnimatedText.js +55 -0
- package/dist/tui/experimental/AnimatedText.js.map +1 -0
- package/dist/tui/experimental/Banner.d.ts +10 -0
- package/dist/tui/experimental/Banner.js +33 -0
- package/dist/tui/experimental/Banner.js.map +1 -0
- package/dist/tui/experimental/CommandPalette.d.ts +11 -0
- package/dist/tui/experimental/CommandPalette.js +25 -0
- package/dist/tui/experimental/CommandPalette.js.map +1 -0
- package/dist/tui/experimental/ExperimentalShell.d.ts +58 -0
- package/dist/tui/experimental/ExperimentalShell.js +366 -0
- package/dist/tui/experimental/ExperimentalShell.js.map +1 -0
- package/dist/tui/experimental/ThemePicker.d.ts +13 -0
- package/dist/tui/experimental/ThemePicker.js +12 -0
- package/dist/tui/experimental/ThemePicker.js.map +1 -0
- package/dist/tui/experimental/attachments.d.ts +35 -0
- package/dist/tui/experimental/attachments.js +244 -0
- package/dist/tui/experimental/attachments.js.map +1 -0
- package/dist/tui/experimental/composer.d.ts +24 -0
- package/dist/tui/experimental/composer.js +84 -0
- package/dist/tui/experimental/composer.js.map +1 -0
- package/dist/tui/experimental/geminiPricing.d.ts +16 -0
- package/dist/tui/experimental/geminiPricing.js +39 -0
- package/dist/tui/experimental/geminiPricing.js.map +1 -0
- package/dist/tui/experimental/layout.d.ts +46 -0
- package/dist/tui/experimental/layout.js +112 -0
- package/dist/tui/experimental/layout.js.map +1 -0
- package/dist/tui/experimental/theme.d.ts +35 -0
- package/dist/tui/experimental/theme.js +86 -0
- package/dist/tui/experimental/theme.js.map +1 -0
- package/dist/tui/experimental/transcriptRows.d.ts +20 -0
- package/dist/tui/experimental/transcriptRows.js +169 -0
- package/dist/tui/experimental/transcriptRows.js.map +1 -0
- package/dist/tui/experimental/ultraModes.d.ts +46 -0
- package/dist/tui/experimental/ultraModes.js +95 -0
- package/dist/tui/experimental/ultraModes.js.map +1 -0
- package/dist/tui/experimental/ultramaxx.d.ts +19 -0
- package/dist/tui/experimental/ultramaxx.js +43 -0
- package/dist/tui/experimental/ultramaxx.js.map +1 -0
- package/dist/tui/format.d.ts +4 -2
- package/dist/tui/format.js +14 -0
- package/dist/tui/format.js.map +1 -1
- package/dist/tui/hosts.js +7 -1
- package/dist/tui/hosts.js.map +1 -1
- package/dist/tui/layout.d.ts +26 -0
- package/dist/tui/layout.js +66 -0
- package/dist/tui/layout.js.map +1 -0
- package/dist/tui/modelSelection.d.ts +1 -1
- package/dist/tui/modelSelection.js +8 -6
- package/dist/tui/modelSelection.js.map +1 -1
- package/dist/tui/modes.d.ts +7 -0
- package/dist/tui/modes.js +12 -0
- package/dist/tui/modes.js.map +1 -1
- package/dist/tui/onboardingPreferences.d.ts +37 -0
- package/dist/tui/onboardingPreferences.js +118 -0
- package/dist/tui/onboardingPreferences.js.map +1 -0
- package/dist/tui/runStatus.d.ts +50 -0
- package/dist/tui/runStatus.js +164 -0
- package/dist/tui/runStatus.js.map +1 -0
- package/dist/tui/types.d.ts +8 -0
- package/dist/tui/types.js.map +1 -1
- package/docs/architecture.md +115 -0
- package/docs/gemini-wrapper.md +23 -0
- package/docs/product-context.md +43 -0
- package/docs/releases/v1.0.1.md +25 -0
- package/docs/releases/v1.1.0.md +30 -0
- package/docs/releases/v1.2.0.md +28 -0
- package/package.json +4 -2
package/dist/tui/types.d.ts
CHANGED
|
@@ -23,4 +23,12 @@ export type AdvisorNote = {
|
|
|
23
23
|
role: SubagentRole;
|
|
24
24
|
message: string;
|
|
25
25
|
};
|
|
26
|
+
export type ToolTelemetry = {
|
|
27
|
+
total: number;
|
|
28
|
+
succeeded: number;
|
|
29
|
+
failed: number;
|
|
30
|
+
approvals: number;
|
|
31
|
+
denied: number;
|
|
32
|
+
byTool: Partial<Record<AgentToolName | "subagent", number>>;
|
|
33
|
+
};
|
|
26
34
|
export declare const maxTranscriptLines = 300;
|
package/dist/tui/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tui/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tui/types.ts"],"names":[],"mappings":"AA0CA,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
PatchPilot is split into a small agent core and an Ink terminal interface.
|
|
4
|
+
|
|
5
|
+
## Components
|
|
6
|
+
|
|
7
|
+
| Component | Responsibility |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `OllamaClient` | Sends chat requests to the selected Ollama HTTP API and reads host model state |
|
|
10
|
+
| `compute` | Classifies the selected Ollama endpoint as local or remote compute |
|
|
11
|
+
| `subagents` | Runs small planner/reviewer advisor calls before the primary agent loop |
|
|
12
|
+
| `AgentRunner` | Maintains the model loop, work-state transitions, session events, and typed tool calls |
|
|
13
|
+
| `WorkspaceTools` | Provides bounded file, search, patch, Git, test, and shell actions |
|
|
14
|
+
| `SessionStore` | Persists append-only JSONL session events and updates the global session index |
|
|
15
|
+
| `App` | Renders the TUI transcript, approval prompts, status, and prompt input |
|
|
16
|
+
| `systemStats` | Samples CPU and memory usage for the live header telemetry |
|
|
17
|
+
|
|
18
|
+
## Compute Model
|
|
19
|
+
|
|
20
|
+
PatchPilot separates the client machine from the compute machine:
|
|
21
|
+
|
|
22
|
+
- The client machine runs the TUI, reads and writes workspace files, runs Git, and executes tests.
|
|
23
|
+
- The compute machine runs Ollama inference.
|
|
24
|
+
- `/connect` changes only the Ollama compute endpoint. It does not move workspace tools to the remote host.
|
|
25
|
+
- Host discovery checks both the local LAN and reachable Tailscale peers, then verifies each candidate against Ollama's `GET /api/version`.
|
|
26
|
+
- A localhost endpoint is classified as local compute. A LAN endpoint such as `http://192.168.1.50:11434` is classified as remote compute.
|
|
27
|
+
|
|
28
|
+
This keeps the Windows-desktop-GPU plus MacBook-editing workflow simple: expose Ollama on the Windows machine, connect from the Mac, and keep all file operations local to the Mac workspace.
|
|
29
|
+
|
|
30
|
+
## Subagents
|
|
31
|
+
|
|
32
|
+
The first subagent layer is advisory and intentionally small:
|
|
33
|
+
|
|
34
|
+
| Subagent | Purpose | Tool Access |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| Planner | Suggests likely files, order of work, and verification steps | None |
|
|
37
|
+
| Reviewer | Calls out risk, missing tests, and platform concerns | None |
|
|
38
|
+
|
|
39
|
+
Both subagents run as separate model calls before the primary agent starts. Their output is injected as advisory context only; the primary agent must still verify with workspace tools before changing code. This follows the useful part of the opencode `primary` vs `subagent` model without granting background agents write or shell permissions.
|
|
40
|
+
|
|
41
|
+
## Native App Direction
|
|
42
|
+
|
|
43
|
+
The target native structure is:
|
|
44
|
+
|
|
45
|
+
| Layer | Direction |
|
|
46
|
+
|---|---|
|
|
47
|
+
| Core CLI | Keep the TypeScript/Node agent as the sidecar because it already owns tools, Ollama, and safety boundaries |
|
|
48
|
+
| Desktop shell | Use Tauri for macOS and Windows instead of maintaining both Electron and Tauri |
|
|
49
|
+
| Connect | Reuse the same Ollama compute endpoint model in CLI and desktop |
|
|
50
|
+
| Security | Bind any local control server to loopback only and keep remote model traffic explicit |
|
|
51
|
+
|
|
52
|
+
## Agent Protocol
|
|
53
|
+
|
|
54
|
+
The first version uses a JSON command envelope instead of provider-specific tool calling. That keeps behavior portable across local models, including models that do not reliably emit native tool calls.
|
|
55
|
+
|
|
56
|
+
Tool request:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"action": "tools",
|
|
61
|
+
"message": "I need to inspect the project files.",
|
|
62
|
+
"tool_calls": [
|
|
63
|
+
{
|
|
64
|
+
"name": "list_files",
|
|
65
|
+
"arguments": {
|
|
66
|
+
"path": "."
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
PatchPilot exposes a `ToolSpec` registry for each tool. Specs describe risk, side effects, permission class, and transcript category. Tool calls execute sequentially so approval-gated reads, writes, and shell actions cannot overwrite each other's pending approval state.
|
|
74
|
+
|
|
75
|
+
Longer runs can also call `update_todo` with a compact task snapshot. The runner stores that state separately from the transcript and the TUI renders it in the lower transcript area, with `in_progress` items animated and `completed` items checked.
|
|
76
|
+
|
|
77
|
+
Final answer:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"action": "final",
|
|
82
|
+
"message": "The repository is a TypeScript TUI agent..."
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Sessions
|
|
87
|
+
|
|
88
|
+
Each TUI launch creates a session id. Events are appended to `.patchpilot/sessions/<session-id>.jsonl` in the workspace:
|
|
89
|
+
|
|
90
|
+
- `session.created`
|
|
91
|
+
- `run.started`
|
|
92
|
+
- `model.request`
|
|
93
|
+
- `tool.requested`
|
|
94
|
+
- `approval.requested`
|
|
95
|
+
- `tool.completed`
|
|
96
|
+
- `run.completed`
|
|
97
|
+
- `run.failed`
|
|
98
|
+
|
|
99
|
+
The workspace `.patchpilot/` folder is ignored by Git. A global index at `~/.patchpilot/session-index.json` keeps recent sessions discoverable for `patchpilot sessions`, `patchpilot resume`, `/sessions`, and `/resume`.
|
|
100
|
+
|
|
101
|
+
## Release Publishing
|
|
102
|
+
|
|
103
|
+
Tagged releases use `.github/workflows/release.yml`. The workflow verifies that `package.json` matches the tag, installs with `npm ci`, runs tests, builds, packs the CLI, publishes `@jx-grxf/patchpilot` to npm, and then creates or updates the GitHub Release with the `.tgz` artifact. Publishing uses the `NPM_TOKEN` repository secret when present and can fall back to npm trusted publishing if the package is configured for GitHub Actions OIDC on npm.
|
|
104
|
+
|
|
105
|
+
## Safety
|
|
106
|
+
|
|
107
|
+
The workspace root is resolved once at startup. Every file path is resolved against that root and rejected if it escapes the workspace. Writes and shell commands are blocked by default. In the TUI, risky tools request approval with allow-once, allow-session, or deny decisions. `--apply` and `--allow-shell` remain explicit compatibility switches for users who want global write or shell permission.
|
|
108
|
+
|
|
109
|
+
## Telemetry
|
|
110
|
+
|
|
111
|
+
PatchPilot reads Ollama's non-streaming chat metadata for prompt tokens, response tokens, total duration, and generation speed. Gemini reads API `usageMetadata`. Codex OAuth runs `codex exec --json` and parses the `turn.completed.usage` event, including `cached_input_tokens`, so the TUI can show real Codex CLI usage instead of only character-based estimates.
|
|
112
|
+
|
|
113
|
+
Model discovery is cached in the current TUI session. Prompt execution reuses the known model list when the selected model is already present, avoiding repeated Gemini model-list calls and keeping Codex/Ollama discovery off the hot path.
|
|
114
|
+
|
|
115
|
+
The TUI also keeps session-level accounting: request count, prompt tokens, cached prompt tokens, output tokens, total tokens, and estimated cost where public API token pricing is known. Local Ollama cost is reported as zero; Codex OAuth cost is shown as an API-price estimate because actual ChatGPT-plan quota handling is external to PatchPilot.
|
package/docs/gemini-wrapper.md
CHANGED
|
@@ -29,6 +29,9 @@ Do not paste these values into issues, logs, chats, or commits. `__Secure-1PSID`
|
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
patchpilot --provider gemini-wrapper
|
|
32
|
+
patchpilot --provider gemini-wrapper --model flash
|
|
33
|
+
patchpilot --provider gemini-wrapper --model flash-lite
|
|
34
|
+
patchpilot --provider gemini-wrapper --model pro
|
|
32
35
|
```
|
|
33
36
|
|
|
34
37
|
Choose `Gemini-Wrapper` in setup. PatchPilot asks for:
|
|
@@ -61,6 +64,26 @@ If a pasted `__Secure-1PSIDTS` expires, PatchPilot retries the bridge request on
|
|
|
61
64
|
|
|
62
65
|
The default bridge timeout is 180 seconds. `gemini-3-pro` can take longer through the unofficial WebAPI bridge, so PatchPilot gives Pro models at least 240 seconds. For fast local test loops, use `auto`; PatchPilot omits the model parameter and lets Gemini Web pick its current default.
|
|
63
66
|
|
|
67
|
+
PatchPilot exposes current Gemini Web shortcuts through live bridge discovery:
|
|
68
|
+
|
|
69
|
+
| PatchPilot model | Bridge behavior |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| `auto` | omit model and let Gemini Web choose |
|
|
72
|
+
| `flash-lite` | resolve the live Flash-Lite model from `client.list_models()` and pass its `model_id` |
|
|
73
|
+
| `flash` | prefer a live 3.5 Flash descriptor when the bridge exposes it; otherwise fall back to the current Flash descriptor or `gemini-3-flash` |
|
|
74
|
+
| `pro` | resolve the live Pro descriptor when available; otherwise fall back to `gemini-3-pro` |
|
|
75
|
+
| `thinking` | legacy compatibility alias for `gemini-3-flash-thinking` when available |
|
|
76
|
+
|
|
77
|
+
Gemini Web now presents Denkaufwand/Thinking-Level controls rather than a recommended standalone `thinking` model. The unofficial `gemini_webapi` bridge does not expose that control as a stable PatchPilot option yet, so `/reasoning` reports the limitation instead of pretending to change Web Denkaufwand.
|
|
78
|
+
|
|
79
|
+
## File Analysis
|
|
80
|
+
|
|
81
|
+
Gemini-Wrapper file analysis uses the same `gemini_webapi` file pipeline documented by the upstream project: PatchPilot passes the approved file path as `files=[...]` to `GeminiClient.generate_content`. This is used by `inspect_document` for screenshots and images when the managed Python bridge is active, and as a fallback for PDFs/DOCX files when local text extraction cannot produce useful text.
|
|
82
|
+
|
|
83
|
+
Supported direct file inputs include PNG, JPEG, WebP, GIF, HEIC/HEIF, PDF, and DOCX. PatchPilot still applies its own safety checks first: external absolute paths require file-analysis approval, sensitive paths are blocked, and browser cookie stores are never auto-scanned.
|
|
84
|
+
|
|
85
|
+
By default, Gemini-Wrapper is tried first for images. PDFs use `pdftotext` first and DOCX is parsed from `word/document.xml` first; provider file analysis is used only when local document extraction fails or returns no useful text. Text/code files are read directly. Images can use local `tesseract` OCR when the user asks for `mode:"local"`/`mode:"ocr"`.
|
|
86
|
+
|
|
64
87
|
The Python wrapper stores refreshed Google cookies in a PatchPilot-owned cache:
|
|
65
88
|
|
|
66
89
|
```text
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# PatchPilot Product Context
|
|
2
|
+
|
|
3
|
+
PatchPilot is a local-first, permissioned terminal coding agent. It is designed for repository work where the user wants every risky operation to be visible, reviewable, and easy to approve or deny.
|
|
4
|
+
|
|
5
|
+
## Core Workflow
|
|
6
|
+
|
|
7
|
+
1. Inspect the workspace with read-only tools.
|
|
8
|
+
2. Keep a visible todo list for multi-step work.
|
|
9
|
+
3. Propose or apply focused edits in build mode.
|
|
10
|
+
4. Request scoped approvals for writes, package scripts, tests, and shell commands.
|
|
11
|
+
5. Show Git diff, run checks, and leave commits or pull requests under the user's control.
|
|
12
|
+
|
|
13
|
+
## Safety Model
|
|
14
|
+
|
|
15
|
+
- `plan` mode is read-only.
|
|
16
|
+
- `build` mode can request approvals for writes and shell actions.
|
|
17
|
+
- `bypass` mode removes per-tool approval prompts only after an explicit trusted-workspace confirmation.
|
|
18
|
+
- Session approvals are scoped to a concrete target such as a path, script body, patch hash, or normalized shell command.
|
|
19
|
+
- Secrets, browser profiles, cookies, and credential files are denied by default.
|
|
20
|
+
|
|
21
|
+
## TUI Surface
|
|
22
|
+
|
|
23
|
+
- Header: current provider, model, route, mode, and high-level run state.
|
|
24
|
+
- Sidebar: workspace, permissions, machine stats, session telemetry, and advisors.
|
|
25
|
+
- Transcript: compact run log, tool results, todos, and live status.
|
|
26
|
+
- Composer: bounded multiline prompt editor with visible newest input.
|
|
27
|
+
- Command palette: `/models`, `/sessions`, `/connect`, `/doctor`, `/experimental`, and related commands.
|
|
28
|
+
|
|
29
|
+
## Provider Matrix
|
|
30
|
+
|
|
31
|
+
- Ollama: local or remote LAN/Tailscale inference.
|
|
32
|
+
- Gemini: official Google Gemini API key.
|
|
33
|
+
- Gemini-Wrapper: opt-in Gemini Web bridge through pinned `gemini_webapi`; Python bridge supports file analysis, HTTP wrapper mode does not.
|
|
34
|
+
- OpenRouter: broad cloud model routing, including free variants.
|
|
35
|
+
- NVIDIA: OpenAI-compatible NVIDIA NIM endpoints.
|
|
36
|
+
- Codex: ChatGPT login through Codex CLI.
|
|
37
|
+
|
|
38
|
+
## Useful First Questions
|
|
39
|
+
|
|
40
|
+
- "What can PatchPilot do in this repo?"
|
|
41
|
+
- "Summarize this project and list the safest next fixes."
|
|
42
|
+
- "Find the test commands and explain the release process."
|
|
43
|
+
- "Review the current diff for risky changes."
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# PatchPilot v1.0.1
|
|
2
|
+
|
|
3
|
+
## Highlights
|
|
4
|
+
|
|
5
|
+
- Adds real Gemini-Wrapper file analysis for screenshots, images, PDFs, and DOCX files through the managed `gemini_webapi` Python bridge.
|
|
6
|
+
- Adds `create_pdf` and `create_docx` tools so PatchPilot can generate simple text documents from agent output.
|
|
7
|
+
- Adds a live provider-neutral todo panel in the TUI so longer agent runs show pending, active, and completed work.
|
|
8
|
+
|
|
9
|
+
## Fixed
|
|
10
|
+
|
|
11
|
+
- Fixed image inspection only returning metadata. With Gemini-Wrapper enabled, `inspect_document` now sends approved image files to Gemini Web as file inputs and returns visual analysis plus extracted visible text.
|
|
12
|
+
- Fixed escaped multiline file writes. `write_file` and line-range `edit_file` now normalize likely double-escaped code/HTML payloads before writing, preventing `\n` and `\"` from landing as literal one-line source.
|
|
13
|
+
- Fixed scanned/image-based PDF handling by falling back to Gemini-Wrapper file analysis when local `pdftotext` cannot extract text.
|
|
14
|
+
- Fixed false-positive image inspection results. If provider analysis fails and no OCR mode was requested, PatchPilot now reports metadata-only analysis as degraded instead of claiming the image was understood.
|
|
15
|
+
- Fixed approval-gated tools appearing stuck after approval by updating the visible run state immediately and executing tool calls sequentially.
|
|
16
|
+
|
|
17
|
+
## Improved
|
|
18
|
+
|
|
19
|
+
- Local document analysis is faster by default: PDFs use `pdftotext` and DOCX files are parsed directly before PatchPilot spends provider time. Images still use provider vision in `auto`, while `mode:"ocr"` keeps local OCR explicit.
|
|
20
|
+
- Gemini-Wrapper docs now explain the upstream `files=[...]` pipeline and the supported file formats.
|
|
21
|
+
- Providers can update visible run tasks through `update_todo`, with the active item animated in the transcript panel.
|
|
22
|
+
|
|
23
|
+
## Pull Requests
|
|
24
|
+
|
|
25
|
+
- #21 Improve file-edit reliability and Gemini-Wrapper document analysis.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# PatchPilot v1.1.0
|
|
2
|
+
|
|
3
|
+
## Highlights
|
|
4
|
+
|
|
5
|
+
- Adds Gemini-Wrapper document analysis for screenshots, images, PDFs, and DOCX files through the managed `gemini_webapi` bridge.
|
|
6
|
+
- Adds approval-aware file generation tools for simple PDF and DOCX output.
|
|
7
|
+
- Adds visible provider-neutral run todos so longer agent tasks expose pending, active, and completed work in the TUI.
|
|
8
|
+
- Imports Gemini browser-cookie onboarding and model discovery improvements into the stable CLI line.
|
|
9
|
+
|
|
10
|
+
## Fixed
|
|
11
|
+
|
|
12
|
+
- Fixed escaped multiline file writes by normalizing likely double-escaped payloads before writing or line-range editing files.
|
|
13
|
+
- Fixed image inspection that only returned metadata by routing approved image inputs through Gemini-Wrapper file analysis when available.
|
|
14
|
+
- Fixed scanned PDF analysis by falling back to provider file analysis when local `pdftotext` cannot extract text.
|
|
15
|
+
- Fixed approval-gated tools appearing stuck after approval by updating visible run state immediately and executing tool calls sequentially.
|
|
16
|
+
- Fixed Gemini-Wrapper transport resets by retrying recoverable network failures.
|
|
17
|
+
- Fixed local agent artifacts and game experiments leaking toward GitHub by ignoring them and removing generated `PATCHPILOT.md` from the tracked tree.
|
|
18
|
+
|
|
19
|
+
## Improved
|
|
20
|
+
|
|
21
|
+
- Updated runtime and development dependencies, including Ink, Zod, React, tsx, Vitest, Node types, and TypeScript 6.
|
|
22
|
+
- Updated GitHub Actions to `actions/setup-node@v6` and `actions/github-script@v9`.
|
|
23
|
+
- Added release workflow automation that triggers the website refresh after a GitHub release completes.
|
|
24
|
+
- Kept generated local notes and browser-game experiments local-only via `.gitignore`.
|
|
25
|
+
|
|
26
|
+
## Pull Requests
|
|
27
|
+
|
|
28
|
+
- #21 Improve file-edit reliability and Gemini-Wrapper document analysis.
|
|
29
|
+
- #19 Trigger website rebuild after releases.
|
|
30
|
+
- #10, #11, #12, #13, #14, #15, #16 Dependency and workflow updates.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# PatchPilot v1.2.0
|
|
2
|
+
|
|
3
|
+
## Highlights
|
|
4
|
+
|
|
5
|
+
- Makes the fullscreen shell the stable default, with a compact header, command palette, animated run status, artifacts bar, saved-cost counter, cursor-aware composer, and a `/theme` switch back to the legacy layout.
|
|
6
|
+
- Adds context storage and compaction primitives plus `/context` and `/compact` commands so long sessions can preserve useful workspace state without replaying noisy transcripts.
|
|
7
|
+
- Adds composable ultra modes: `ultramaxx`, `ultrafast`, `ultracheap`, `ultrafocus:<path>`, and `ultraloop`, with conflict checks and visible keyword styling.
|
|
8
|
+
- Adds first-run preferences for default mode, reasoning, thinking budget, and subagents, plus a use-at-your-own-risk acceptance step before onboarding continues.
|
|
9
|
+
- Adds Windows hardening for clipboard image paste, path/attachment parsing, Codex CLI launcher resolution, and Gemini-Wrapper bootstrap commands.
|
|
10
|
+
|
|
11
|
+
## Fixed
|
|
12
|
+
|
|
13
|
+
- Hardened shell approvals so pipes remain supported, `&&` and `;` are available only through `/experimental shell-metacharacters`, and redirects, expansion, background jobs, OR chains, multiline commands, and glob expansion require explicit approval even in build+bypass.
|
|
14
|
+
- Fixed `/write on` and `/shell on` so they no longer bypass the trusted-workspace confirmation panel.
|
|
15
|
+
- Fixed fake success for unknown `/experimental` flags by validating supported flags before persisting settings.
|
|
16
|
+
- Fixed external-file approval bypass behavior, shell path guards, attachment context handling, and secret/path checks around workspace tools.
|
|
17
|
+
- Fixed Gemini-Wrapper re-auth flows so expired cookies can trigger an approval-style refresh panel and failed prompts can retry after refresh.
|
|
18
|
+
- Fixed provider retry behavior, todo-only/fake final handling, TUI prompt handling, composer cursor behavior, run-status randomization, and overlay layout clipping.
|
|
19
|
+
|
|
20
|
+
## Improved
|
|
21
|
+
|
|
22
|
+
- Refreshes README guidance for the default shell, ultra modes, context commands, shell-metacharacter controls, onboarding disclaimer, remote host setup, and the current safety model.
|
|
23
|
+
- Refreshes the npm lockfile with `npm update` and keeps the package verification surface aligned with the current dependency graph.
|
|
24
|
+
- Adds broader Vitest coverage for context storage, compaction, shell guards, command help, layout math, clipboard, attachments, provider retry helpers, ultra modes, and Windows-oriented path behavior.
|
|
25
|
+
|
|
26
|
+
## Pull Requests
|
|
27
|
+
|
|
28
|
+
- #23 PatchPilot deep-dive hardening and context system.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx-grxf/patchpilot",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Local-first coding agent TUI for visible, permissioned repo changes.",
|
|
6
6
|
"type": "module",
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
".env.example",
|
|
13
|
+
"docs/architecture.md",
|
|
13
14
|
"docs/gemini-wrapper.md",
|
|
15
|
+
"docs/product-context.md",
|
|
14
16
|
"docs/releases",
|
|
15
17
|
"docs/showcase/patchpilot-banner.png",
|
|
16
18
|
"docs/showcase/patchpilot-logo.png",
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
"@types/node": "^24.10.0",
|
|
61
63
|
"@types/react": "^19.2.6",
|
|
62
64
|
"tsx": "^4.21.0",
|
|
63
|
-
"typescript": "
|
|
65
|
+
"typescript": "6.0.3",
|
|
64
66
|
"vitest": "^4.1.5"
|
|
65
67
|
},
|
|
66
68
|
"engines": {
|