@lazyingart/agintiflow 0.20.138 → 0.20.139
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.139",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgInTiFlow is a project-aware agent workspace for hybrid wet-dry R&D, hardware-aware intelligence, software automation, and industrial workflows.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -1038,7 +1038,9 @@ try {
|
|
|
1038
1038
|
content: [
|
|
1039
1039
|
"import os",
|
|
1040
1040
|
"from openai import OpenAI",
|
|
1041
|
-
|
|
1041
|
+
"def load_api_key():",
|
|
1042
|
+
' return os.environ.get("DEEPSEEK_API_KEY")',
|
|
1043
|
+
"api_key = load_api_key()",
|
|
1042
1044
|
'client = OpenAI(api_key=api_key, base_url="https://api.deepseek.com")',
|
|
1043
1045
|
"print(client)",
|
|
1044
1046
|
"",
|
package/src/workspace-tools.js
CHANGED
|
@@ -210,6 +210,8 @@ function secretContentPolicy(content) {
|
|
|
210
210
|
function stripSafeCredentialReferences(content) {
|
|
211
211
|
let text = String(content ?? "");
|
|
212
212
|
const keyName = String.raw`(?:api[_-]?key|token|secret|password|passwd|npm_token|_authToken|grsai|venice_api_key)`;
|
|
213
|
+
const codeKeyName = String.raw`(?:api[_-]?key|apiKey|token|secret|password|passwd|npmToken|authToken|grsai|veniceApiKey|venice_api_key)`;
|
|
214
|
+
const codeExpression = String.raw`[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\([^"'\n]*\))?`;
|
|
213
215
|
const envName = String.raw`[A-Z][A-Z0-9_]*(?:API[_-]?KEY|TOKEN|SECRET|PASSWORD|PASSWD|GRSAI|VENICE)[A-Z0-9_]*`;
|
|
214
216
|
|
|
215
217
|
text = text.replace(
|
|
@@ -228,6 +230,10 @@ function stripSafeCredentialReferences(content) {
|
|
|
228
230
|
new RegExp(String.raw`([,(]\s*)${keyName}\s*=\s*[A-Za-z_$][\w$]*(?=\s*[,)\n])`, "gi"),
|
|
229
231
|
"$1safe_credential_ref=[VAR_REF]"
|
|
230
232
|
);
|
|
233
|
+
text = text.replace(
|
|
234
|
+
new RegExp(String.raw`\b${codeKeyName}\s*=\s*${codeExpression}(?=\s*[,;)\n])`, "g"),
|
|
235
|
+
"safe_credential_ref=[EXPR_REF]"
|
|
236
|
+
);
|
|
231
237
|
text = text.replace(
|
|
232
238
|
new RegExp(String.raw`([,{]\s*)${keyName}\s*:\s*[A-Za-z_$][\w$]*(?=\s*[,}\n])`, "gi"),
|
|
233
239
|
"$1safe_credential_ref=[VAR_REF]"
|