@siftable/cli
Advanced tools
+22
-10
@@ -750,12 +750,24 @@ /** | ||
| const override = process.env.EXECUTERM_OPENFUNCTION_PATH; | ||
| const envPath = override | ||
| ? override.replace(/\/src\/framework\/index\.(ts|js)$/, '/.env') | ||
| : join(process.env.SIFT_INTERACTIVE_TUI_DIR || process.cwd(), '.env'); | ||
| const text = await fs.readFile(envPath, 'utf8'); | ||
| for (const line of text.split('\n')) { | ||
| const m = line.match(/^\s*([A-Z0-9_]+)\s*=\s*(.*)\s*$/); | ||
| if (!m) continue; | ||
| const key = m[1]; | ||
| const val = m[2].trim().replace(/^["']|["']$/g, ''); | ||
| if (key && val && process.env[key] === undefined) process.env[key] = val; | ||
| const envPaths = [ | ||
| ...(override ? [override.replace(/\/src\/framework\/index\.(ts|js)$/, '/.env')] : []), | ||
| join(process.env.SIFT_INTERACTIVE_TUI_DIR || process.cwd(), '.env'), | ||
| join(process.env.HOME || '', 'projects', 'OpenFunction', '.env'), | ||
| ]; | ||
| const seen = new Set<string>(); | ||
| for (const envPath of envPaths) { | ||
| if (!envPath || seen.has(envPath)) continue; | ||
| seen.add(envPath); | ||
| let text = ''; | ||
| try { | ||
| text = await fs.readFile(envPath, 'utf8'); | ||
| } catch { | ||
| continue; | ||
| } | ||
| for (const line of text.split('\n')) { | ||
| const m = line.match(/^\s*([A-Z0-9_]+)\s*=\s*(.*)\s*$/); | ||
| if (!m) continue; | ||
| const key = m[1]; | ||
| const val = m[2].trim().replace(/^["']|["']$/g, ''); | ||
| if (key && val && process.env[key] === undefined) process.env[key] = val; | ||
| } | ||
| } | ||
@@ -762,0 +774,0 @@ } catch { |
@@ -605,2 +605,3 @@ /** | ||
| } else if (e.type === "error") { | ||
| got = true; | ||
| setMessages(ensureAssistant(), "text", (t) => `${t}\n\n[error: ${e.error ?? "unknown"}]`); | ||
@@ -607,0 +608,0 @@ } else if (e.type === "done") { |
+1
-1
| { | ||
| "name": "@siftable/cli", | ||
| "version": "0.5.21", | ||
| "version": "0.5.22", | ||
| "description": "Siftable CLI — human planning tasks, executable agent work queues, knowledge, and automation tools", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
2506035
0.01%48527
0.03%168
0.6%