@jx-grxf/patchpilot 0.3.1-beta → 1.0.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.
Files changed (81) hide show
  1. package/.env.example +17 -1
  2. package/README.md +80 -22
  3. package/SECURITY.md +10 -2
  4. package/dist/cli.js +59 -13
  5. package/dist/cli.js.map +1 -1
  6. package/dist/core/agent.d.ts +3 -0
  7. package/dist/core/agent.js +56 -12
  8. package/dist/core/agent.js.map +1 -1
  9. package/dist/core/cleanup.d.ts +3 -0
  10. package/dist/core/cleanup.js +29 -0
  11. package/dist/core/cleanup.js.map +1 -0
  12. package/dist/core/doctor.d.ts +4 -1
  13. package/dist/core/doctor.js +119 -1
  14. package/dist/core/doctor.js.map +1 -1
  15. package/dist/core/gemini.js +27 -14
  16. package/dist/core/gemini.js.map +1 -1
  17. package/dist/core/geminiWrapper.d.ts +51 -0
  18. package/dist/core/geminiWrapper.js +718 -0
  19. package/dist/core/geminiWrapper.js.map +1 -0
  20. package/dist/core/json.js +65 -1
  21. package/dist/core/json.js.map +1 -1
  22. package/dist/core/memory.d.ts +16 -0
  23. package/dist/core/memory.js +108 -0
  24. package/dist/core/memory.js.map +1 -0
  25. package/dist/core/modelClient.js +7 -0
  26. package/dist/core/modelClient.js.map +1 -1
  27. package/dist/core/nvidia.js +20 -2
  28. package/dist/core/nvidia.js.map +1 -1
  29. package/dist/core/openrouter.d.ts +2 -0
  30. package/dist/core/openrouter.js +51 -7
  31. package/dist/core/openrouter.js.map +1 -1
  32. package/dist/core/projectInit.d.ts +6 -0
  33. package/dist/core/projectInit.js +44 -0
  34. package/dist/core/projectInit.js.map +1 -0
  35. package/dist/core/reasoning.js +3 -0
  36. package/dist/core/reasoning.js.map +1 -1
  37. package/dist/core/session.d.ts +1 -0
  38. package/dist/core/session.js +46 -0
  39. package/dist/core/session.js.map +1 -1
  40. package/dist/core/types.d.ts +9 -4
  41. package/dist/core/workspace.d.ts +8 -0
  42. package/dist/core/workspace.js +314 -21
  43. package/dist/core/workspace.js.map +1 -1
  44. package/dist/tui/App.js +571 -81
  45. package/dist/tui/App.js.map +1 -1
  46. package/dist/tui/commands.js +35 -6
  47. package/dist/tui/commands.js.map +1 -1
  48. package/dist/tui/components/ApprovalPanel.d.ts +6 -0
  49. package/dist/tui/components/ApprovalPanel.js +16 -0
  50. package/dist/tui/components/ApprovalPanel.js.map +1 -0
  51. package/dist/tui/components/CommandSuggestions.js +8 -3
  52. package/dist/tui/components/CommandSuggestions.js.map +1 -1
  53. package/dist/tui/components/Composer.d.ts +1 -0
  54. package/dist/tui/components/Composer.js +1 -1
  55. package/dist/tui/components/Composer.js.map +1 -1
  56. package/dist/tui/components/ExperimentalPanel.d.ts +10 -0
  57. package/dist/tui/components/ExperimentalPanel.js +33 -0
  58. package/dist/tui/components/ExperimentalPanel.js.map +1 -0
  59. package/dist/tui/components/Header.js +3 -3
  60. package/dist/tui/components/Header.js.map +1 -1
  61. package/dist/tui/components/OnboardingPanel.d.ts +13 -1
  62. package/dist/tui/components/OnboardingPanel.js +23 -9
  63. package/dist/tui/components/OnboardingPanel.js.map +1 -1
  64. package/dist/tui/components/Sidebar.js +32 -26
  65. package/dist/tui/components/Sidebar.js.map +1 -1
  66. package/dist/tui/components/Transcript.js +4 -3
  67. package/dist/tui/components/Transcript.js.map +1 -1
  68. package/dist/tui/format.js +7 -7
  69. package/dist/tui/format.js.map +1 -1
  70. package/dist/tui/modes.d.ts +1 -1
  71. package/dist/tui/modes.js +8 -2
  72. package/dist/tui/modes.js.map +1 -1
  73. package/docs/gemini-wrapper.md +87 -0
  74. package/docs/releases/v0.1.1-beta.md +18 -0
  75. package/docs/releases/v0.2.1.md +1 -1
  76. package/docs/releases/v0.3.1-beta.md +4 -0
  77. package/docs/releases/v0.4.0.md +27 -0
  78. package/docs/releases/v1.0.0.md +28 -0
  79. package/docs/showcase/patchpilot-banner.png +0 -0
  80. package/docs/showcase/patchpilot-logo.png +0 -0
  81. package/package.json +5 -2
@@ -0,0 +1,87 @@
1
+ # Gemini-Wrapper Setup
2
+
3
+ PatchPilot can use `gemini_webapi` through the `gemini-wrapper` provider. This is an advanced, unofficial Gemini Web bridge. PatchPilot creates a managed Python venv only when you explicitly run `/doctor fix` or `patchpilot doctor --fix`, installs the pinned wrapper there, and starts the bridge command itself. It does not scan browser profiles or read cookies automatically.
4
+
5
+ ## 1. Let PatchPilot install the wrapper
6
+
7
+ Do not run `python3 -m pip install -U gemini_webapi` against Homebrew Python. Homebrew blocks that with PEP 668.
8
+
9
+ PatchPilot uses this managed venv instead:
10
+
11
+ ```sh
12
+ ~/.patchpilot/gemini-wrapper-venv
13
+ ```
14
+
15
+ It creates the venv and installs the pinned `gemini_webapi` version when you explicitly approve `patchpilot doctor --fix` or `/doctor fix`. Normal chat startup does not install Python packages.
16
+
17
+ ## 2. Get the cookie values manually
18
+
19
+ 1. Open `https://gemini.google.com`.
20
+ 2. Open DevTools.
21
+ 3. Go to Application or Storage.
22
+ 4. Open Cookies for `https://gemini.google.com`.
23
+ 5. Copy `__Secure-1PSID`.
24
+ 6. Copy `__Secure-1PSIDTS` if it exists.
25
+
26
+ Do not paste these values into issues, logs, chats, or commits. `__Secure-1PSID` acts like a Google session token.
27
+
28
+ ## 3. Run PatchPilot onboarding
29
+
30
+ ```sh
31
+ patchpilot --provider gemini-wrapper
32
+ ```
33
+
34
+ Choose `Gemini-Wrapper` in setup. PatchPilot asks for:
35
+
36
+ ```text
37
+ psid > ********
38
+ ts > ********
39
+ ```
40
+
41
+ `psid` is required. `ts` is optional; press Enter to skip it.
42
+
43
+ PatchPilot writes:
44
+
45
+ ```text
46
+ ~/.patchpilot/gemini-cookies.json
47
+ ```
48
+
49
+ with owner-only file permissions (`0600`) and stores this config:
50
+
51
+ ```sh
52
+ PATCHPILOT_PROVIDER=gemini-wrapper
53
+ PATCHPILOT_MODEL=auto
54
+ PATCHPILOT_GEMINI_WRAPPER_MODE=python
55
+ PATCHPILOT_GEMINI_WRAPPER_COOKIES_JSON=/Users/you/.patchpilot/gemini-cookies.json
56
+ PATCHPILOT_GEMINI_WRAPPER_MIN_INTERVAL_MS=1500
57
+ PATCHPILOT_GEMINI_WRAPPER_TIMEOUT_MS=180000
58
+ ```
59
+
60
+ If a pasted `__Secure-1PSIDTS` expires, PatchPilot retries the bridge request once without that optional timestamp. Transient WebAPI network timeouts are retried inside the bridge. Bridge calls are also serialized with a small default delay so advisor or agent requests do not hit the wrapper at the same instant. Set `PATCHPILOT_GEMINI_WRAPPER_MIN_INTERVAL_MS=0` only for debugging.
61
+
62
+ 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
+
64
+ The Python wrapper stores refreshed Google cookies in a PatchPilot-owned cache:
65
+
66
+ ```text
67
+ ~/.patchpilot/gemini-webapi-cache
68
+ ```
69
+
70
+ PatchPilot creates that directory with owner-only permissions (`0700`) and passes it to `gemini_webapi` as `GEMINI_COOKIE_PATH`.
71
+
72
+ ## 4. Verify
73
+
74
+ ```sh
75
+ patchpilot doctor --provider gemini-wrapper --check-model auto
76
+ ```
77
+
78
+ Expected checks:
79
+
80
+ - Node and Git are available.
81
+ - `gemini_webapi` imports through `~/.patchpilot/gemini-wrapper-venv/bin/python`.
82
+ - explicit cookie auth is configured.
83
+ - the bridge lists Gemini models.
84
+
85
+ ## Security Boundary
86
+
87
+ PatchPilot never scans Chrome, Safari, Firefox, Arc, Edge, Brave, Keychain, or browser cookie stores. The only supported auth sources are the masked paste onboarding flow, an explicit cookie JSON path, or explicit `GEMINI_SECURE_1PSID` environment variables.
@@ -0,0 +1,18 @@
1
+ # PatchPilot v0.1.1-beta
2
+
3
+ ## Highlights
4
+
5
+ - Beta packaging pass for the early PatchPilot CLI.
6
+ - Kept the project positioned as an experimental local-first coding-agent TUI.
7
+
8
+ ## Fixed
9
+
10
+ - Tightened the first public install surface after the initial v0.1.0 release.
11
+
12
+ ## Improved
13
+
14
+ - Clarified the beta release path before the later v0.2 and v0.3 hardening work.
15
+
16
+ ## Pull Requests
17
+
18
+ - Early beta release maintenance.
@@ -23,4 +23,4 @@
23
23
 
24
24
  ## Pull Requests
25
25
 
26
- - Pending PR from `feat/deep-dive-fixes`.
26
+ - #7 Fix provider loops, onboarding safety, and public docs.
@@ -17,3 +17,7 @@
17
17
  - Header and sidebar now show `off`, `approval`, or `on` permissions based on the active mode instead of mixing mode and permission state.
18
18
  - Slash commands document `/mode bypass` and `/bypass` as explicit advanced controls.
19
19
  - Website-facing install flow can point users to the npm package instead of only GitHub assets.
20
+
21
+ ## Pull Requests
22
+
23
+ - #17 Prepare v0.3.1 beta mode safety.
@@ -0,0 +1,27 @@
1
+ # PatchPilot v0.4.0
2
+
3
+ ## Highlights
4
+
5
+ - Adds a sticky approval box for write, script, test, shell, and trusted-bypass decisions so critical prompts are no longer buried in the transcript.
6
+ - Tightens provider model discovery for Gemini, OpenRouter, and NVIDIA so model pickers prefer agent-compatible chat models instead of every catalog entry.
7
+ - Keeps the release honest as a v0.4 preview instead of claiming v1 readiness before real context resume and richer review workflows are finished.
8
+
9
+ ## Fixed
10
+
11
+ - Fixed model setup Enter behavior: pressing Enter in the filtered model picker now selects the highlighted model instead of submitting the search text and failing with “Unknown model selection.”
12
+ - Fixed repeated bypass confirmation spam when Tab was pressed in build mode; bypass now stays in one sticky confirmation box and can be cancelled with Tab, `n`, or Escape.
13
+ - Fixed unreadable approval detail text by rendering action prompts in high-contrast bold text and keeping the composer usable for `/approve` and `/deny` while a run waits.
14
+ - Fixed Gemini token accounting fallback so thinking tokens are included when the provider does not report a total.
15
+ - Fixed Windows shell execution flags by using non-interactive PowerShell with profile loading disabled.
16
+
17
+ ## Improved
18
+
19
+ - OpenRouter now uses model metadata to avoid sending `reasoning` to models that do not advertise support, filters out models that explicitly lack JSON response support, and surfaces auth, credit, and rate-limit errors clearly.
20
+ - NVIDIA model discovery now deduplicates the catalog and filters out embedding, rerank, safety, audio, OCR, and vision-only entries before showing model choices.
21
+ - Gemini model discovery now follows paginated model lists and filters obvious non-agent routes such as embedding, Imagen, Veo, TTS, audio, and live models.
22
+ - Package-script approvals now show the actual script body and mark scripts risky when the underlying command would be blocked by the shell guard.
23
+ - Secret-path blocking now covers `.envrc`, credential files, key/certificate bundles, and common private-key names in addition to the existing `.env`, `.npmrc`, `.netrc`, and SSH-key checks.
24
+
25
+ ## Pull Requests
26
+
27
+ - #18 Prepare PatchPilot v0.4.0 hardening.
@@ -0,0 +1,28 @@
1
+ # PatchPilot v1.0.0
2
+
3
+ ## Highlights
4
+
5
+ - Promotes PatchPilot to the first stable CLI release for visible, permissioned coding-agent runs across local, remote, and cloud model routes.
6
+ - Finishes the Gemini-Wrapper provider path with explicit cookie onboarding, manual/auto model modes, pinned managed bridge installation, and clearer failure messages.
7
+ - Adds real session resume context injection, model-driven `/init`, `/cleanup`, `/doctor fix`, and opt-in `/experimental` controls for subagents, file analysis, and memory.
8
+ - Improves the TUI with readable transcript text, scrollable command and session panes, bottom-aligned transcript rendering, approval key isolation, and clearer token/cost/cache labels.
9
+
10
+ ## Fixed
11
+
12
+ - Fixed a permission escalation bug where `--apply`, `/write on`, or `/shell on` could collapse into full build+bypass mode. Partial permissions now stay partial; bypass only applies to explicitly enabled permission groups.
13
+ - Fixed shell confinement by blocking absolute shell path arguments outside the workspace and by detecting dangerous `git`/`npm` subcommands even after global options such as `git -C .` or `npm --prefix .`.
14
+ - Fixed stale `/experimental` toggles by making agent runs observe the latest file-analysis and memory settings.
15
+ - Fixed Gemini-Wrapper bridge timeout conversion so Python receives the configured seconds budget instead of a shortened fraction.
16
+ - Fixed Gemini-Wrapper startup so normal chat runs no longer install unpinned Python packages at runtime.
17
+
18
+ ## Improved
19
+
20
+ - External file analysis now requires per-path approval and still rejects sensitive paths after resolution.
21
+ - `memory_remember` is treated as a durable write and requires write approval before persisting notes in SQLite.
22
+ - `/init` now asks the selected model to inspect the repository and write project-specific `PATCHPILOT.md` guidance instead of emitting generic boilerplate.
23
+ - Gemini-Wrapper documentation and README copy now label the route as advanced, unofficial, and explicit about session-cookie risk.
24
+ - npm metadata now points to the public PatchPilot project page.
25
+
26
+ ## Pull Requests
27
+
28
+ - #20 Harden Gemini-Wrapper, TUI sessions, experimental tools, and v1 release posture.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx-grxf/patchpilot",
3
- "version": "0.3.1-beta",
3
+ "version": "1.0.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,10 @@
10
10
  "files": [
11
11
  "dist",
12
12
  ".env.example",
13
+ "docs/gemini-wrapper.md",
13
14
  "docs/releases",
15
+ "docs/showcase/patchpilot-banner.png",
16
+ "docs/showcase/patchpilot-logo.png",
14
17
  "docs/showcase/patchpilot-showcase.svg",
15
18
  "README.md",
16
19
  "SECURITY.md",
@@ -26,7 +29,7 @@
26
29
  "bugs": {
27
30
  "url": "https://github.com/jx-grxf/PatchPilot/issues"
28
31
  },
29
- "homepage": "https://github.com/jx-grxf/PatchPilot#readme",
32
+ "homepage": "https://johannesgrof.me/projects/patchpilot/",
30
33
  "scripts": {
31
34
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
32
35
  "dev": "tsx src/cli.tsx",