@diegopetrucci/pi-extensions 0.1.74 → 0.1.78

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 (108) hide show
  1. package/LICENSE +2 -0
  2. package/README.md +17 -12
  3. package/extensions/agent-workflow-audit/README.md +1 -1
  4. package/extensions/agent-workflow-audit/index.ts +1631 -1009
  5. package/extensions/agent-workflow-audit/package.json +1 -1
  6. package/extensions/annotate-git-diff/README.md +3 -1
  7. package/extensions/annotate-git-diff/clipboard.ts +109 -100
  8. package/extensions/annotate-git-diff/git.ts +846 -768
  9. package/extensions/annotate-git-diff/glimpseui.d.ts +87 -78
  10. package/extensions/annotate-git-diff/index.ts +712 -671
  11. package/extensions/annotate-git-diff/package.json +1 -1
  12. package/extensions/annotate-git-diff/prompt.ts +45 -45
  13. package/extensions/annotate-git-diff/quiet-glimpse.ts +161 -155
  14. package/extensions/annotate-git-diff/review-server.ts +337 -311
  15. package/extensions/annotate-git-diff/types.ts +132 -132
  16. package/extensions/annotate-git-diff/ui.ts +27 -27
  17. package/extensions/annotate-git-diff/watch.ts +74 -74
  18. package/extensions/annotate-git-diff/web/app.js +1947 -1884
  19. package/extensions/annotate-git-diff/web/index.html +5 -6
  20. package/extensions/annotate-last-message/README.md +1 -1
  21. package/extensions/annotate-last-message/glimpseui.d.ts +87 -78
  22. package/extensions/annotate-last-message/index.ts +210 -206
  23. package/extensions/annotate-last-message/package.json +1 -1
  24. package/extensions/annotate-last-message/prompt.ts +87 -66
  25. package/extensions/annotate-last-message/quiet-glimpse.ts +161 -155
  26. package/extensions/annotate-last-message/session.ts +94 -89
  27. package/extensions/annotate-last-message/theme.ts +199 -193
  28. package/extensions/annotate-last-message/types.ts +23 -23
  29. package/extensions/annotate-last-message/ui.ts +27 -25
  30. package/extensions/annotate-last-message/web/app.js +4 -7
  31. package/extensions/annotate-last-message/web/index.html +3 -3
  32. package/extensions/annotate-last-message/web/md-renderer.js +1 -1
  33. package/extensions/brrr/README.md +1 -1
  34. package/extensions/brrr/index.ts +213 -191
  35. package/extensions/brrr/package.json +1 -1
  36. package/extensions/claude-fast/README.md +5 -79
  37. package/extensions/claude-fast/index.ts +31 -289
  38. package/extensions/claude-fast/package.json +2 -3
  39. package/extensions/code-reviewer/README.md +6 -6
  40. package/extensions/code-reviewer/index.ts +1825 -1373
  41. package/extensions/code-reviewer/package.json +1 -1
  42. package/extensions/confirm-destructive/README.md +1 -1
  43. package/extensions/confirm-destructive/index.ts +50 -52
  44. package/extensions/confirm-destructive/package.json +1 -1
  45. package/extensions/context-cap/README.md +9 -9
  46. package/extensions/context-cap/index.ts +313 -305
  47. package/extensions/context-cap/package.json +2 -2
  48. package/extensions/context-inspector/index.ts +1211 -1064
  49. package/extensions/context-inspector/package.json +1 -1
  50. package/extensions/contrarian/README.md +4 -3
  51. package/extensions/contrarian/index.ts +1863 -1737
  52. package/extensions/contrarian/package.json +1 -1
  53. package/extensions/dirty-repo-guard/index.ts +37 -41
  54. package/extensions/dirty-repo-guard/package.json +1 -1
  55. package/extensions/dynamic-context-pruning/README.md +11 -43
  56. package/extensions/dynamic-context-pruning/index.ts +2131 -2105
  57. package/extensions/dynamic-context-pruning/package.json +1 -1
  58. package/extensions/fast/README.md +52 -14
  59. package/extensions/fast/index.ts +513 -317
  60. package/extensions/fast/package.json +1 -1
  61. package/extensions/git-footer/README.md +1 -1
  62. package/extensions/git-footer/index.ts +458 -411
  63. package/extensions/git-footer/package.json +2 -3
  64. package/extensions/gnosis/index.ts +180 -130
  65. package/extensions/gnosis/package.json +1 -1
  66. package/extensions/inline-bash/index.ts +87 -103
  67. package/extensions/inline-bash/package.json +1 -1
  68. package/extensions/librarian/README.md +1 -1
  69. package/extensions/librarian/index.ts +1877 -1419
  70. package/extensions/librarian/package.json +1 -1
  71. package/extensions/minimal-footer/README.md +5 -5
  72. package/extensions/minimal-footer/index.ts +987 -1012
  73. package/extensions/minimal-footer/minimal-footer.example.json +1 -1
  74. package/extensions/minimal-footer/openai-usage.ts +195 -190
  75. package/extensions/minimal-footer/package.json +1 -1
  76. package/extensions/notify/index.ts +222 -230
  77. package/extensions/notify/package.json +1 -1
  78. package/extensions/openai-fast/README.md +5 -73
  79. package/extensions/openai-fast/index.ts +32 -272
  80. package/extensions/openai-fast/package.json +2 -3
  81. package/extensions/oracle/README.md +4 -3
  82. package/extensions/oracle/index.ts +1740 -1627
  83. package/extensions/oracle/package.json +1 -1
  84. package/extensions/permission-gate/README.md +3 -0
  85. package/extensions/permission-gate/index.ts +785 -612
  86. package/extensions/permission-gate/package.json +1 -1
  87. package/extensions/permission-gate/powershell-safety.ts +840 -793
  88. package/extensions/project-mcp-json/.pi-fleet-tested-version +1 -0
  89. package/extensions/project-mcp-json/README.md +199 -0
  90. package/extensions/project-mcp-json/config.ts +564 -0
  91. package/extensions/project-mcp-json/index.ts +119 -0
  92. package/extensions/project-mcp-json/package.json +38 -0
  93. package/extensions/quiet-tools/.pi-fleet-tested-version +1 -1
  94. package/extensions/quiet-tools/README.md +30 -19
  95. package/extensions/quiet-tools/index.ts +376 -291
  96. package/extensions/quiet-tools/package.json +2 -2
  97. package/extensions/review/README.md +2 -2
  98. package/extensions/review/index.ts +1745 -1872
  99. package/extensions/review/package.json +1 -1
  100. package/extensions/todo/index.ts +280 -280
  101. package/extensions/todo/package.json +1 -1
  102. package/extensions/triage-comments/README.md +6 -4
  103. package/extensions/triage-comments/index.ts +2620 -1888
  104. package/extensions/triage-comments/package.json +1 -1
  105. package/package.json +9 -6
  106. package/assets/social-preview.png +0 -0
  107. package/extensions/claude-fast/claude-fast.example.json +0 -4
  108. package/extensions/openai-fast/openai-fast.example.json +0 -4
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-dynamic-context-pruning",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "type": "module",
5
5
  "description": "A pi extension that dynamically prunes stale context to keep sessions lean.",
6
6
  "keywords": [
@@ -1,6 +1,6 @@
1
1
  # fast
2
2
 
3
- A pi extension that provides one `/fast` toggle for supported direct OpenAI API, OpenAI Codex, and Anthropic Claude models. It selects the provider-specific Fast-mode request shape from the currently selected model.
3
+ A pi extension that provides `/fast` and `/ultrafast` toggles for supported direct OpenAI API, OpenAI Codex, and Anthropic Claude models. It selects the provider-specific Fast-mode request shape from the currently selected model.
4
4
 
5
5
  For eligible direct OpenAI API models it injects:
6
6
 
@@ -44,12 +44,35 @@ Direct OpenAI API Fast mode requires all of the following:
44
44
 
45
45
  The direct OpenAI route stays on OpenAI's direct API contract for both API-key
46
46
  auth and Pi's `openai` ChatGPT OAuth. Acceptance of `service_tier: "fast"` by
47
- Pi's `openai` ChatGPT OAuth sign-in endpoint has not been live-verified and
48
- remains deferred to manual gate `pel-71t6`. This direct route is never forwarded
49
- to legacy `openai-codex` or its subscription-usage endpoint. The documented
50
- request shape is support evidence, not live certification; this change was
51
- validated only with mocked eligibility and request payloads, not live or paid
52
- provider calls.
47
+ Pi's `openai` ChatGPT OAuth sign-in endpoint has not been live-verified.
48
+ This direct route is never forwarded to legacy `openai-codex` or its
49
+ subscription-usage endpoint. The documented request shape is support evidence,
50
+ not live certification; this change was validated only with mocked eligibility
51
+ and request payloads, not live or paid provider calls.
52
+
53
+ ### Ultrafast support (initial, fail-closed)
54
+
55
+ Ultrafast is intentionally narrower than ordinary Fast mode. It requires all of
56
+ the following on every activation and provider request:
57
+
58
+ - Provider `openai`.
59
+ - API `openai-responses`.
60
+ - Model `gpt-6-astra`.
61
+ - Direct API-key auth, not Codex OAuth or direct OpenAI OAuth.
62
+ - Base URL exactly `https://api.openai.com/v1` (a single trailing slash is also accepted).
63
+
64
+ It does not support Chat Completions, preview models, regional or proxy endpoints,
65
+ or Anthropic Ultrafast. Eligible payloads receive the requested
66
+ `service_tier: "ultrafast"` only when they do not already contain a
67
+ `service_tier` field. Existing values and mismatched/malformed payloads are left
68
+ untouched. The extension reports a requested tier; it does not claim that OpenAI
69
+ accepted or applied it, and it never silently falls back to ordinary Fast.
70
+
71
+ OpenAI documents this request shape in the [Ultrafast API guide](https://developers.openai.com/api/docs/guides/ultrafast-mode)
72
+ and lists the account/model pricing in its [API pricing](https://developers.openai.com/api/docs/pricing).
73
+ Actual Ultrafast API pricing is **6x Standard**, while Pi's current cost display
74
+ omits that premium. Treat the activation warning as a deliberate paid-usage
75
+ warning.
53
76
 
54
77
  OpenAI Codex Fast mode requires all of the following:
55
78
 
@@ -91,11 +114,26 @@ Anthropic Fast mode supports both API-key and Claude Code OAuth access when the
91
114
 
92
115
  ```text
93
116
  /fast
117
+ /ultrafast
118
+ /fast ultrafast
94
119
  ```
95
120
 
96
- Run `/fast` to toggle Fast mode for the current session/runtime. The enabled state follows model changes: switching between eligible OpenAI and Anthropic models automatically changes the request format without resetting the toggle. The footer shows `fast` only while the selected model is eligible and Fast mode is enabled.
121
+ Run `/fast` to toggle ordinary Fast mode for the current session/runtime. The
122
+ enabled state follows model changes: switching between eligible OpenAI and
123
+ Anthropic models automatically changes the request format without resetting the
124
+ toggle. The footer shows `fast` only while the selected model is eligible and
125
+ Fast mode is enabled.
126
+
127
+ `/ultrafast` and `/fast ultrafast` are equivalent toggles for the session-only
128
+ Ultrafast override. Ultrafast defaults off, is never enabled by global or project
129
+ configuration, and can be undone with either command. Running ordinary `/fast`
130
+ while Ultrafast is selected turns Ultrafast off rather than silently switching to
131
+ another paid tier. Switching to an unsupported model or endpoint disables
132
+ Ultrafast and does not re-enable it when `gpt-6-astra` is selected again. The
133
+ footer uses `ultrafast` while an eligible request is selected; status text says
134
+ that the tier is requested, not remotely applied.
97
135
 
98
- The extension defaults to off so installing the full collection does not accidentally spend Fast-mode credits.
136
+ The extension defaults to off so installing the full collection does not accidentally spend Fast-mode credits. Ultrafast verification is mocked-only: tests use local eligibility checks, fake payloads, and a fake fetch through Pi's `openai-responses` `streamSimple`; they make no live or paid provider requests.
99
137
 
100
138
  ## Config
101
139
 
@@ -105,13 +143,13 @@ Optional global config:
105
143
  ~/<pi-config-dir>/agent/extensions/fast.json
106
144
  ```
107
145
 
108
- Optional project config:
146
+ Optional project config, from the nearest ancestor of the working directory (the working directory itself counts):
109
147
 
110
148
  ```text
111
149
  <project>/<pi-config-dir>/fast.json
112
150
  ```
113
151
 
114
- Here `<pi-config-dir>` is Pi's runtime config directory name (`CONFIG_DIR_NAME`; `.pi` by default). Project config overrides global config after Pi reports that the project is trusted.
152
+ Here `<pi-config-dir>` is Pi's runtime config directory name (`CONFIG_DIR_NAME`; `.pi` by default). The loader uses that nearest ancestor `fast.json`, which overrides global config after Pi reports that the project is trusted.
115
153
 
116
154
  ```json
117
155
  {
@@ -123,7 +161,7 @@ Here `<pi-config-dir>` is Pi's runtime config directory name (`CONFIG_DIR_NAME`;
123
161
  - `enabled`: default Fast-mode state when there is no session override.
124
162
  - `showStatus`: show a compact `fast` status when Fast mode is active for the selected model.
125
163
 
126
- The unified extension intentionally does not read `openai-fast.json` or `claude-fast.json`; those files belong to the provider-specific standalone packages and may contain conflicting defaults.
164
+ The unified extension reads only `fast.json`. It does not read `openai-fast.json` or `claude-fast.json`.
127
165
 
128
166
  ## Install
129
167
 
@@ -153,7 +191,7 @@ Then reload pi:
153
191
 
154
192
  ## Legacy provider-specific packages
155
193
 
156
- The collection package loads this unified extension instead of `openai-fast` and `claude-fast`. Both provider-specific packages remain available as standalone alternatives. Do not load them together with this extension: independent Fast-mode state and duplicate `/fast` registrations can produce conflicting behavior.
194
+ The collection package loads this unified extension only (`extensions/fast/index.ts`). `openai-fast` and `claude-fast` remain published as deprecated standalone leftovers. On session start they warn, clear their leftover footer status, and remove `fast-mode-2026-02-01` from the current model header. They do not read config, register commands, or inject Fast fields into requests.
157
195
 
158
196
  ## Notes
159
197
 
@@ -163,6 +201,6 @@ The collection package loads this unified extension instead of `openai-fast` and
163
201
  - Codex Fast availability depends on plan, client, workspace settings, and rollout. Local eligibility is not live-provider certification.
164
202
  - Pi's provider catalog remains the source of reported model pricing, including any tiered pricing; this extension does not apply guessed discounts or rewrite cost metadata.
165
203
  - OpenAI Codex Fast mode intentionally does not affect API-key models.
166
- - The retired `openai-fast` and `claude-fast` packages remain legacy standalone boundaries; new provider/auth behavior belongs only to this unified extension.
204
+ - Deprecated `openai-fast` and `claude-fast` packages no longer implement Fast mode. New provider/auth behavior belongs only to this unified extension.
167
205
  - Existing `speed` and `service_tier` fields are never overwritten.
168
206
  - Pi's model catalog may not include a Fast-mode premium. Cost accounting depends on the provider reporting the effective tier in its streamed response, and this extension does not patch usage totals.