@f5-sales-demo/pi-ai 21.12.0 → 21.12.2

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
@@ -10,6 +10,11 @@
10
10
 
11
11
  ### Fixed
12
12
 
13
+ - Exported the canonical provider credential-shape matcher so xcsh can protect otherwise
14
+ unconfigured tokens reversibly before provider submission, preserving exact-match local edits.
15
+ Semantically ported from
16
+ [can1357/oh-my-pi#7067](https://github.com/can1357/oh-my-pi/pull/7067)
17
+ ([#3706](https://github.com/f5-sales-demo/xcsh/issues/3706)).
13
18
  - Omit an empty OpenAI-compatible `tools` field unless prior tool-call history requires the explicit empty array, and suppress the internal no-auth credential sentinel from keyless request headers ([#2942](https://github.com/f5-sales-demo/xcsh/issues/2942), [#3361](https://github.com/f5-sales-demo/xcsh/issues/3361)).
14
19
 
15
20
  ## [20.3.0] - 2026-08-04
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5-sales-demo/pi-ai",
4
- "version": "21.12.0",
4
+ "version": "21.12.2",
5
5
  "description": "Unified LLM API with automatic model discovery and provider configuration",
6
6
  "homepage": "https://github.com/f5-sales-demo/xcsh",
7
7
  "author": "Can Boluk",
@@ -46,7 +46,7 @@
46
46
  "@anthropic-ai/sdk": "^0.115",
47
47
  "@aws-sdk/client-bedrock-runtime": "^3",
48
48
  "@bufbuild/protobuf": "^2.11",
49
- "@f5-sales-demo/pi-utils": "21.12.0",
49
+ "@f5-sales-demo/pi-utils": "21.12.2",
50
50
  "@google/genai": "^2.15",
51
51
  "@sinclair/typebox": "^0.34",
52
52
  "@smithy/node-http-handler": "^4.4",
@@ -1,6 +1,14 @@
1
1
  import turnAbortedGuidance from "../prompts/turn-aborted-guidance.md" with { type: "text" };
2
2
  import type { Api, AssistantMessage, DeveloperMessage, Message, Model, ToolCall, ToolResultMessage } from "../types";
3
3
 
4
+ /**
5
+ * Credential-shaped tokens protected by the coding-agent's reversible secret
6
+ * layer. Keep the pattern in pi-ai so every provider boundary shares one
7
+ * definition when additional transport-level defenses are added.
8
+ */
9
+ export const SENSITIVE_TOKEN_RE =
10
+ /(?<![a-zA-Z0-9_*-])(gh[opusr]_[a-zA-Z0-9_*]{36,}|github_pat_[a-zA-Z0-9_*]{36,}|glpat-[a-zA-Z0-9_*-]{20,}|sk-proj-[a-zA-Z0-9_*-]{36,}|sk-ant-[a-zA-Z0-9_*-]{36,}|sk-[a-zA-Z0-9_*-]{48,})(?![a-zA-Z0-9_*-])/gi;
11
+
4
12
  const enum ToolCallStatus {
5
13
  /** Tool call has received a result (real or synthetic for orphan) */
6
14
  Resolved = 1,