You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li>Improve rules with frontmatter filters, condition variables, path-scoped loading, enforcement support, and clearer documentation. #222</li>
4189
4189
<li><code>preToolCall</code> hooks now receive <code>approval: "ask"</code> for the native <code>ask_user</code> tool so notification hooks (e.g. matching <code>.approval == "ask"</code>) also fire when the chat is blocked waiting for a user answer, regardless of trust mode.</li>
4190
+
<li>New <code>${cmd:some command}</code> dynamic string backend that resolves to the trimmed stdout of a shell command, useful for password managers like <code>pass</code> or <code>op</code>. On macOS the user's interactive shell <code>$PATH</code> is queried once so GUI-launched ECA picks up Homebrew, <code>mise</code>/<code>asdf</code> shims, etc. #430</li>
Copy file name to clipboardExpand all lines: config.json
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -482,17 +482,17 @@
482
482
},
483
483
"url": {
484
484
"type": "string",
485
-
"description": "Base URL for the provider's API. Supports dynamic strings like ${env:VAR}.",
486
-
"markdownDescription": "Base URL for the provider's API. Supports dynamic strings like ${env:VAR}.",
485
+
"description": "Base URL for the provider's API. Supports dynamic strings like ${env:VAR} or ${cmd:command}.",
486
+
"markdownDescription": "Base URL for the provider's API. Supports dynamic strings like `${env:VAR}` or `${cmd:command}`.",
487
487
"format": "uri"
488
488
},
489
489
"key": {
490
490
"type": [
491
491
"string",
492
492
"null"
493
493
],
494
-
"description": "API key for authentication. Supports dynamic strings like ${env:MY_API_KEY}.",
495
-
"markdownDescription": "API key for authentication. Supports dynamic strings like ${env:MY_API_KEY}."
494
+
"description": "API key for authentication. Supports dynamic strings like ${env:MY_API_KEY}, ${netrc:host} or ${cmd:pass show eca/api-key}.",
495
+
"markdownDescription": "API key for authentication. Supports dynamic strings like `${env:MY_API_KEY}`, `${netrc:host}` or `${cmd:pass show eca/api-key}`."
<li><code>env</code>: <code>${env:MY_ENV}</code> to get a system env value with support for default values: <code>${env:MY_ENV:foo}</code></li>
1456
1456
<li><code>classpath</code>: <code>${classpath:path/to/eca/file}</code> to get a file content from <ahref="https://github.com/editor-code-assistant/eca/tree/master/resources">ECA's classpath</a></li>
1457
1457
<li><code>netrc</code>: Support Unix RC <ahref="../models/#credential-file-authentication">credential files</a></li>
1458
+
<li><code>cmd</code>: <code>${cmd:some command}</code> to run a command via the platform shell (<code>bash -c</code> on POSIX, PowerShell on Windows) and use its trimmed stdout — useful for password managers like <code>${cmd:pass show eca/api-key}</code> or <code>${cmd:op read op://vault/Item/credential}</code>. On non-zero exit/timeout the value falls back to an empty string and a warning is logged. The command itself cannot contain <code>}</code> (the closing brace ends the placeholder); for commands like <code>awk '{print $1}' …</code>, wrap them in a small script or shell function.</li>
1458
1459
</ul>
1460
+
<divclass="admonition info">
1461
+
<pclass="admonition-title">macOS GUI launches</p>
1462
+
<p>When ECA runs from Finder/Dock (e.g. via ECA Desktop) the inherited <code>PATH</code> is minimal and Homebrew, <code>mise</code>/<code>asdf</code> shims, etc. are not visible. To fix this, on macOS the <code>cmd</code> backend spawns the user's interactive login shell once (<code>$SHELL -ilc '…'</code>) and reuses the captured <code>$PATH</code> for subsequent <code>${cmd:...}</code> resolutions — so anything sourced from <code>.zshrc</code>/<code>.zprofile</code>/<code>.bash_profile</code> is picked up automatically. If the shell query fails or your shell isn't bash/zsh/sh/dash/ksh, ECA falls back to prepending <code>/opt/homebrew/bin</code>, <code>/usr/local/bin</code> and <code>~/.local/bin</code>. As a last resort, use an absolute path (e.g. <code>${cmd:/opt/custom/bin/my-tool ...}</code>).</p>
1463
+
<p>Linux GUI launches can have a similar (less severe) <code>PATH</code> gap, but shell-<code>PATH</code> discovery is currently macOS-only — Linux users with the same problem should use absolute paths in <code>${cmd:...}</code> for now.</p>
1464
+
</div>
1459
1465
<divclass="admonition info markdown support">
1460
1466
<pclass="admonition-title">Info</p>
1461
1467
<p>This is supported in markdown configurations of agents and skills as well, giving flexibility to template it.</p>
0 commit comments