pi-xai-oauth 1.0.26 → 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/.scaffold/progress.md +9 -0
- package/README.md +10 -0
- package/extensions/xai-oauth.ts +0 -10
- package/package.json +5 -1
package/.scaffold/progress.md
CHANGED
|
@@ -37,4 +37,13 @@ Update this file frequently during execution.
|
|
|
37
37
|
- [ ] Add reviewer step in workflow
|
|
38
38
|
- [ ] Test parallel/chain subagent delegation
|
|
39
39
|
|
|
40
|
+
## Phase 6: Provider Payload Hook Repair
|
|
41
|
+
- [x] Diagnosed pi 0.74 provider errors after skill install: `before_provider_request` returned `{ payload }` instead of the replacement payload directly.
|
|
42
|
+
- [x] Patched `extensions/xai-oauth.ts` so sanitized provider requests are returned in the shape pi expects.
|
|
43
|
+
- [x] Removed the redundant global provider request hook so xAI sanitation stays inside the xAI provider stream path and does not mutate DeepSeek/Codex payloads.
|
|
44
|
+
- [x] Reinstalled the local package, cleared pi's Jiti cache, and verified provider smoke tests:
|
|
45
|
+
- xAI now reaches the xAI API and returns an account/subscription 403 instead of `missing field input`.
|
|
46
|
+
- DeepSeek returns `OK` instead of `missing field messages`.
|
|
47
|
+
- OpenAI Codex returns `OK` instead of rejecting model `None`.
|
|
48
|
+
|
|
40
49
|
**Current branch:** feature/multi-agent-integration
|
package/README.md
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://coderabbit.ai)
|
|
4
4
|
[](https://www.npmjs.com/package/pi-xai-oauth)
|
|
5
|
+
[](https://www.npmjs.com/package/pi-xai-oauth)
|
|
5
6
|
[](https://opensource.org/licenses/MIT)
|
|
6
7
|
[](https://github.com/BlockedPath/pi-xai-oauth/stargazers)
|
|
8
|
+
[](https://github.com/BlockedPath/pi-xai-oauth/pulls)
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
[](https://pi.dev)
|
|
7
11
|
|
|
8
12
|
**xAI (Grok) OAuth provider for pi** — 1M context, reasoning, and custom xAI tools.
|
|
9
13
|
```bash
|
|
@@ -417,4 +421,10 @@ PRs welcome! If you find issues or want to improve the OAuth flow, feel free to
|
|
|
417
421
|
|
|
418
422
|
---
|
|
419
423
|
|
|
424
|
+
## Star History
|
|
425
|
+
|
|
426
|
+
[](https://star-history.com/#BlockedPath/pi-xai-oauth&Date)
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
420
430
|
*Powered by Grok 4.3 — 1M context, reasoning, and the full xAI API.*
|
package/extensions/xai-oauth.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { createServer, type Server } from "http";
|
|
|
7
7
|
import { homedir } from "os";
|
|
8
8
|
import { extname, isAbsolute, join, resolve } from "path";
|
|
9
9
|
import { fileURLToPath } from "url";
|
|
10
|
-
import { sanitizeXaiPayload } from "../sanitize";
|
|
11
10
|
|
|
12
11
|
const XAI_OAUTH_ISSUER = "https://auth.x.ai";
|
|
13
12
|
const XAI_OAUTH_DISCOVERY_URL = `${XAI_OAUTH_ISSUER}/.well-known/openid-configuration`;
|
|
@@ -1143,13 +1142,4 @@ Be specific and cite examples where helpful.`;
|
|
|
1143
1142
|
}
|
|
1144
1143
|
|
|
1145
1144
|
registerXaiTools();
|
|
1146
|
-
|
|
1147
|
-
// Payload sanitization hook (runs before every provider request)
|
|
1148
|
-
pi.on("before_provider_request", (event) => {
|
|
1149
|
-
const sanitized = sanitizeXaiPayload(event.payload, null as any);
|
|
1150
|
-
if (sanitized !== event.payload) {
|
|
1151
|
-
return { payload: sanitized };
|
|
1152
|
-
}
|
|
1153
|
-
});
|
|
1154
1145
|
}
|
|
1155
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-xai-oauth",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "One-command installer for xAI (Grok) OAuth provider + Grok 4.3 in pi",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"grok",
|
|
9
9
|
"oauth"
|
|
10
10
|
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/BlockedPath/pi-xai-oauth.git"
|
|
14
|
+
},
|
|
11
15
|
"license": "MIT",
|
|
12
16
|
"bin": {
|
|
13
17
|
"pi-xai-oauth": "bin/setup.js"
|