pi-commandcode-provider 0.4.0 → 0.4.1

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 CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.4.1 - 2026-06-16
6
+
7
+ - Use the explicit `$COMMANDCODE_API_KEY` provider registration syntax expected by newer pi versions, removing the startup deprecation warning while keeping legacy placeholder compatibility.
8
+ - Refresh development dependency lockfile entries to resolve npm audit findings for `tsx`/`esbuild` and `protobufjs`.
9
+
5
10
  ## 0.4.0 - 2026-06-02
6
11
 
7
12
  - Add retry mechanism for transient HTTP errors (429, 5xx) and stream-level errors, configurable via pi `settings.json` `retry.provider` fields (`timeoutMs`, `maxRetries`, `maxRetryDelayMs`). Supports exponential backoff with jitter and `Retry-After` header.
package/index.ts CHANGED
@@ -83,7 +83,7 @@ export default async function (pi: ExtensionAPI) {
83
83
  pi.registerProvider("commandcode", {
84
84
  name: "Command Code",
85
85
  baseUrl: API_BASE,
86
- apiKey: "COMMANDCODE_API_KEY",
86
+ apiKey: "$COMMANDCODE_API_KEY",
87
87
  authHeader: true,
88
88
  api: "commandcode-custom",
89
89
  streamSimple: streamCommandCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-commandcode-provider",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "pi custom provider for Command Code API (commandcode.ai)",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -50,7 +50,7 @@
50
50
  "devDependencies": {
51
51
  "@types/node": "25.6.0",
52
52
  "prettier": "^3.5.0",
53
- "tsx": "4.21.0",
53
+ "tsx": "4.22.4",
54
54
  "typescript": "6.0.3"
55
55
  },
56
56
  "dependencies": {
package/src/core.ts CHANGED
@@ -193,10 +193,17 @@ export function createStreamCommandCode(deps: CoreDependencies) {
193
193
  const stream = deps.createStream()
194
194
 
195
195
  async function run() {
196
- // OMP may pass the env-var name "COMMANDCODE_API_KEY" as the apiKey
197
- // value instead of resolving it. Filter out this specific string.
196
+ // OMP may pass the legacy env-var name "COMMANDCODE_API_KEY" (old pi)
197
+ // or "$COMMANDCODE_API_KEY" (new pi) as the apiKey value instead of
198
+ // resolving it. Filter out these specific strings.
199
+ const LEGACY_API_KEY_REF = "$COMMANDCODE_API_KEY"
200
+ const OLD_API_KEY_REF = "COMMANDCODE_API_KEY"
198
201
  const hostKey =
199
- options?.apiKey && options.apiKey !== "COMMANDCODE_API_KEY" ? options.apiKey : undefined
202
+ options?.apiKey &&
203
+ options.apiKey !== LEGACY_API_KEY_REF &&
204
+ options.apiKey !== OLD_API_KEY_REF
205
+ ? options.apiKey
206
+ : undefined
200
207
 
201
208
  const apiKey =
202
209
  hostKey ??