oh-my-pi-plugin-grok-build 0.1.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 ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - Added the standalone xAI Grok Build provider extension.
6
+ - Added paste-first OAuth with browser PKCE fallback and token refresh.
7
+ - Added authoritative model discovery with curated Grok 4.5 and Grok Composer metadata.
8
+ - Added OpenAI Responses streaming with Grok Build request identity headers.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JRedeker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # oh-my-pi-plugin-grok-build
2
+
3
+ Standalone [oh-my-pi](https://github.com/can1357/oh-my-pi) extension for the xAI Grok Build subscription provider. It adds OAuth login, authoritative model discovery, and OpenAI Responses streaming with the request identity expected by Grok Build.
4
+
5
+ ## Install
6
+
7
+ Install the npm package:
8
+
9
+ ```sh
10
+ omp plugin install oh-my-pi-plugin-grok-build
11
+ ```
12
+
13
+ Link a local checkout:
14
+
15
+ ```sh
16
+ omp plugin link /path/to/oh-my-pi-plugin-grok-build
17
+ ```
18
+
19
+ Load the extension source for one invocation:
20
+
21
+ ```sh
22
+ omp -e /path/to/oh-my-pi-plugin-grok-build/src/index.ts
23
+ ```
24
+
25
+ ## Login
26
+
27
+ 1. Start `omp` with the extension installed or loaded.
28
+ 2. Run `/login`.
29
+ 3. Select **xAI Grok Build**.
30
+ 4. Paste a Grok Build OAuth refresh token, or leave the prompt blank to continue through browser PKCE login.
31
+
32
+ Credentials are stored and refreshed through omp's normal OAuth credential store.
33
+
34
+ ## Models
35
+
36
+ The offline seed contains:
37
+
38
+ - `grok-4.5`: text and image input, 500k context, reasoning effort support.
39
+ - `grok-composer-2.5-fast`: text input, 200k context, non-reasoning.
40
+
41
+ After login, the provider refreshes the model list from Grok Build. Server-advertised chat models remain authoritative; image, speech-to-text, and voice-only model IDs are excluded from the chat picker.
42
+
43
+ Select a model explicitly with:
44
+
45
+ ```sh
46
+ omp --model xai-grok-build/grok-4.5
47
+ ```
48
+
49
+ ## Limitations
50
+
51
+ - Paste input is not masked on omp versions whose `OAuthPrompt` does not support `secret`.
52
+ - A stock host cannot enforce OAuth-only credentials at the same core boundary as a built-in provider. A runtime `--api-key` override is therefore not blocked by this extension.
53
+ - Remote auth-broker callback-port forwarding is unavailable because `CALLBACK_PORTS` is core-owned. Browser login uses local callback port `8086`.
54
+ - The extension becomes inert when the host already provides `xai-grok-build`, avoiding duplicate provider registration.
55
+ - Marketplace installations do not load extension modules declared only through `package.json#omp.extensions`. Install from npm or use `omp plugin link` instead.
56
+
57
+ ## Development
58
+
59
+ ```sh
60
+ bun install
61
+ bun run typecheck
62
+ bun test ./test
63
+ ```
64
+
65
+ All automated tests use mocked network responses. A live xAI authorization attempt is an optional publication smoke check because account authorization may be unavailable.
66
+
67
+ ## License
68
+
69
+ MIT