rudel 0.1.16 → 0.2.0

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.
Files changed (3) hide show
  1. package/README.md +34 -0
  2. package/dist/cli.js +3521 -2645
  3. package/package.json +8 -2
package/README.md CHANGED
@@ -30,6 +30,18 @@ rudel enable
30
30
 
31
31
  Authenticate with Rudel. Opens your browser to [app.rudel.ai](https://app.rudel.ai) where you sign in, then the CLI receives a token automatically.
32
32
 
33
+ Flags:
34
+
35
+ | Flag | Description |
36
+ |---|---|
37
+ | `--api-base <url>` | API server to authenticate against. Defaults to `RUDEL_API_BASE`, else `https://app.rudel.ai`. Must be `https://`, or `http://` on a loopback host. |
38
+ | `--allow-insecure-api-base` | Permit plaintext `http://` on a non-loopback host, for **both** the API base and the browser verification URL it returns. Your access token and ingest API key are then sent unencrypted, so only use this on a trusted network. Also settable as `RUDEL_ALLOW_INSECURE_API_BASE=1`. |
39
+ | `--no-browser` | Print the verification URL instead of opening a browser. |
40
+
41
+ The API base must not carry a query string or fragment — `https://host?tenant=acme` is rejected, because the CLI appends paths such as `/api/auth/device/code` to it.
42
+
43
+ Self-hosting over plain HTTP therefore needs `--allow-insecure-api-base` on every `rudel login`. The server also logs a warning at startup when its own verification origin is plaintext. Serving your deployment over HTTPS is strongly preferred; plaintext exposes the login token, the ingest API key, and every uploaded transcript to anyone on the network path.
44
+
33
45
  ### `rudel enable`
34
46
 
35
47
  Registers the available Claude Code / Codex hooks so your session transcript uploads automatically when a session ends. This is the recommended way to use Rudel -- set it and forget it.
@@ -59,6 +71,22 @@ rudel upload --dry-run
59
71
  rudel upload --classify
60
72
  ```
61
73
 
74
+ Upload endpoints must use HTTPS, except that loopback HTTP endpoints such as
75
+ `http://localhost:4010/rpc` are allowed for local development. Plaintext HTTP
76
+ to any other host is refused unless the upload-specific
77
+ `--allow-insecure-endpoint` flag is passed or
78
+ `RUDEL_ALLOW_INSECURE_ENDPOINT=1` is set. This opt-in is intentionally separate
79
+ from `--allow-insecure-api-base`: it permits the ingest API key and full
80
+ transcript to cross the network unencrypted and should only be used on a
81
+ trusted network. Non-HTTP URLs, malformed URLs, and URLs with embedded
82
+ credentials are always refused.
83
+
84
+ Automatic Claude Code and Codex uploads use the environment form because hooks
85
+ run unattended. If `RUDEL_API_BASE` names an unsafe destination, the hook
86
+ refuses the upload, reports the reason in stderr and
87
+ `~/.rudel/logs/hook-upload.log`, and adds the session to the failed-upload queue
88
+ for `rudel upload --retry`; it does not fall back to the saved API base.
89
+
62
90
  When run without arguments, `rudel upload` scans `~/.claude/projects/` for all projects with session transcripts and presents an interactive picker. The current project (matched from your working directory) and its subfolders are pre-selected. Use arrow keys to navigate, space to toggle, and enter to confirm.
63
91
 
64
92
  ### `rudel whoami`
@@ -80,6 +108,12 @@ Each uploaded session includes:
80
108
  - Session transcript (full prompt & response content)
81
109
  - Sub-agent usage
82
110
 
111
+ ## Known-secret Redaction
112
+
113
+ Before upload, the CLI redacts known secret patterns in both the main transcript and every sub-agent transcript. The Rudel API reapplies the same deterministic filter before storage and reports counts by pattern; matched values are removed in full and never included in the summary. Uploads are stopped if known-pattern redaction exceeds 20% of the transcript or the bounded filter cannot establish a stable result.
114
+
115
+ This substantially reduces exposure, but it does not catch `DB_PASSWORD=hunter2`, bare custom tokens without a distinguishing prefix, secrets split across lines, base64-encoded or paraphrased secrets, credentials in screenshots, or double-escaped JSON embedded inside another JSON string. Seven of the 18 selected rules also require a restricted trailing delimiter, so ordinary punctuation immediately after a secret can prevent a match. Keep secrets out of coding-agent sessions whenever possible.
116
+
83
117
  ## Links
84
118
 
85
119
  - **Web App**: [app.rudel.ai](https://app.rudel.ai)