fix(cli): protect Go install credentials

This commit is contained in:
ZacharyZhang-NY committed 2026-07-19 17:33:34 -04:00
1 parent 3488ab778c
commit 996672a6a7
16 files changed
+1128 -79

No files matched your search

+4 -1
View File
@@ -72,10 +72,13 @@ elydora install \
--agent claudecode \
--org-id org-123 \
--agent-id agent-456 \
--private-key <key> \
--private-key-file /secure/path/private.key \
--token-file /secure/path/api.token \
--kid agent-456-key-v1
```
Credential options may be omitted in an interactive terminal; the CLI then reads the private key and optional API token without terminal echo. Credential files must contain one UTF-8 line of at most 64 KiB. Unix credential files require owner-only permissions such as `chmod 600`. Installation commits `config.json`, `private.key`, and `hook.js` as one rollback-capable runtime transaction, and the generated scripts validate those protected files at execution time.
Codex performs a one-time trust review for user hooks. Run `/hooks` in Codex after installation and trust the Elydora `PreToolUse` and `PostToolUse` definitions.
Cline installation writes `PreToolUse.mjs` and `PostToolUse.mjs` to `$CLINE_DIR/hooks` (default `~/.cline/hooks`). Elydora leaves the Documents and workspace hook roots unchanged. The wrappers preserve Cline's official payload and translate a frozen guard into JSON stdout cancellation control.