@302ai/media-studio-cli 0.1.0-beta.1 → 0.1.0-beta.3

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 +63 -0
  2. package/dist/index.js +9274 -35830
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -10,6 +10,19 @@ npm install -g @302ai/media-studio-cli
10
10
  # requires Node.js >= 22
11
11
  ```
12
12
 
13
+ Newer, less tested prerelease builds:
14
+
15
+ ```bash
16
+ npm install -g @302ai/media-studio-cli@beta
17
+ ```
18
+
19
+ > **No stable release exists yet.** `latest` points at a prerelease, so both
20
+ > commands above currently install the same build. Staging-server visibility is
21
+ > gated on the package *version* carrying a prerelease tag — not on the
22
+ > dist-tag — so it is on for both: **Staging** appears in `msc login` and in
23
+ > `--region` whichever way you install. A future stable release will hide it
24
+ > from both channels.
25
+
13
26
  > If you installed via **bun** and get `command not found`: bun's global bin
14
27
  > dir is not on PATH by default. Run once:
15
28
  >
@@ -68,6 +81,56 @@ Point at a different server via `MEDIA_STUDIO_API_URL` env var, or
68
81
  `msc login --region local|cn|default` (the server you log into is saved and
69
82
  reused).
70
83
 
84
+ ### Staging server (expired TLS certificate)
85
+
86
+ The staging server's certificate is expired (ops declines renewal), so the
87
+ CLI skips TLS certificate verification **only while pointed at the staging
88
+ host**; the server choice itself is the opt-in, and the default / CN hosts
89
+ always verify. The interactive `msc login` region list shows each server's
90
+ URL and marks Staging with the auto-off behavior; `msc login --region
91
+ staging` and `MEDIA_STUDIO_API_URL=https://media.tool302.com` behave the
92
+ same.
93
+
94
+ Stable (production) builds hide Staging from the `msc login` region menu, but
95
+ a persisted staging `auth.json` still auto-bypasses TLS verification — this is
96
+ intentional (the login persists across upgrades), not an oversight.
97
+
98
+ The whitelist is the only way the bypass turns on — no environment variable can
99
+ extend it to another server, so production can never skip verification. To
100
+ force verification back **on** while pointed at staging (once ops renews the
101
+ certificate, or to debug its chain):
102
+
103
+ ```bash
104
+ MEDIA_STUDIO_INSECURE_TLS=0 msc chat "hi" # also accepts "false"
105
+ ```
106
+
107
+ Plain-`http://` servers skip the bypass entirely (nothing to verify). The
108
+ bypass prints nothing: the staging choice is already stated in the `msc login`
109
+ menu and here, so no warning repeats on every command (`--help` and `--version`
110
+ included, whose output scripts and agents parse).
111
+
112
+ ### TLS-intercepting proxies
113
+
114
+ If browser SSO login works but every API call fails with `fetch failed`, a
115
+ TLS-intercepting proxy (Clash/FlClash TUN mode, corporate MITM) is breaking
116
+ certificate verification (`unable to verify the first certificate`).
117
+ Node/Bun do not use the OS keychain, so a proxy CA trusted by your browser
118
+ is not trusted by the CLI. Either trust the proxy CA explicitly:
119
+
120
+ ```bash
121
+ export NODE_EXTRA_CA_CERTS=/path/to/proxy-ca.crt
122
+ ```
123
+
124
+ or skip verification for the CLI only (no certificate checks). The staging host
125
+ already does this automatically, so this is only needed for other servers — and
126
+ it is now the only way to bypass a non-staging host, since no `msc` flag or env
127
+ var does so. Note it is process-global: every host the CLI talks to stops being
128
+ verified.
129
+
130
+ ```bash
131
+ NODE_TLS_REJECT_UNAUTHORIZED=0 msc sessions
132
+ ```
133
+
71
134
  ## Development
72
135
 
73
136
  ```bash