@moonmath-ai/zro 0.2.5 → 0.4.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.
- package/README.md +116 -91
- package/dist/args.js +29 -4
- package/dist/args.js.map +1 -1
- package/dist/cli.js +0 -0
- package/dist/endpoints.d.ts +9 -0
- package/dist/endpoints.js +40 -0
- package/dist/endpoints.js.map +1 -0
- package/dist/engine/constants.d.ts +5 -202
- package/dist/engine/constants.js +5 -188
- package/dist/engine/constants.js.map +1 -1
- package/dist/engine/tools/claude.d.ts +1 -0
- package/dist/engine/tools/claude.js +44 -25
- package/dist/engine/tools/claude.js.map +1 -1
- package/dist/engine/tools/codex.d.ts +4 -1
- package/dist/engine/tools/codex.js +28 -8
- package/dist/engine/tools/codex.js.map +1 -1
- package/dist/engine/tools/grok.js +11 -9
- package/dist/engine/tools/grok.js.map +1 -1
- package/dist/engine/tools/hermes.js +34 -21
- package/dist/engine/tools/hermes.js.map +1 -1
- package/dist/engine/tools/kilo.d.ts +1 -1
- package/dist/engine/tools/kilo.js +15 -13
- package/dist/engine/tools/kilo.js.map +1 -1
- package/dist/engine/tools/omp.d.ts +2 -2
- package/dist/engine/tools/omp.js +12 -12
- package/dist/engine/tools/omp.js.map +1 -1
- package/dist/engine/tools/openclaw.js +27 -19
- package/dist/engine/tools/openclaw.js.map +1 -1
- package/dist/engine/tools/opencode.d.ts +5 -1
- package/dist/engine/tools/opencode.js +26 -15
- package/dist/engine/tools/opencode.js.map +1 -1
- package/dist/engine/tools/pi.js +17 -17
- package/dist/engine/tools/pi.js.map +1 -1
- package/dist/engine/tools/prime.js +17 -19
- package/dist/engine/tools/prime.js.map +1 -1
- package/dist/engine/types.d.ts +7 -1
- package/dist/install.d.ts +1 -1
- package/dist/install.js +29 -10
- package/dist/install.js.map +1 -1
- package/dist/model-catalog.d.ts +7 -2
- package/dist/model-catalog.js +113 -11
- package/dist/model-catalog.js.map +1 -1
- package/dist/process.d.ts +8 -0
- package/dist/process.js +51 -0
- package/dist/process.js.map +1 -0
- package/dist/run.js +277 -114
- package/dist/run.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/ui.d.ts +3 -2
- package/dist/ui.js +24 -3
- package/dist/ui.js.map +1 -1
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -5,15 +5,24 @@
|
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<div align="center">
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
Zro-owned configuration that never touches your normal agent setup.
|
|
10
|
+
# Private, fast inference for coding agents
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
**Open-weight models. Zero data retention. Zero training. Long-context, multi-region speed.**
|
|
13
|
+
|
|
14
|
+
[zro.moonmath.ai](https://zro.moonmath.ai) · [Pricing](https://zro.moonmath.ai/pricing) · [Integrations](https://zro.moonmath.ai/integrations)
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
`zro` is the CLI that connects your coding agent to the [Zro](https://zro.moonmath.ai)
|
|
19
|
+
inference endpoint. It launches the agent of your choice with isolated, Zro-owned
|
|
20
|
+
configuration — so it never touches your everyday agent setup, credentials, or session
|
|
21
|
+
history.
|
|
22
|
+
|
|
23
|
+
> No training on your prompts or completions. Zero request retention. Runs on
|
|
24
|
+
> privacy-forward, multi-region infrastructure. Optimized for the long-context,
|
|
25
|
+
> tool-heavy workloads coding agents depend on.
|
|
17
26
|
|
|
18
27
|
```bash
|
|
19
28
|
npm install --global @moonmath-ai/zro
|
|
@@ -21,75 +30,108 @@ zro login
|
|
|
21
30
|
zro claude
|
|
22
31
|
```
|
|
23
32
|
|
|
33
|
+
Run `zro models` for the models available to your key, or see
|
|
34
|
+
[zro.moonmath.ai/pricing](https://zro.moonmath.ai/pricing). Region availability is shown when you
|
|
35
|
+
create an API key.
|
|
36
|
+
|
|
24
37
|
---
|
|
25
38
|
|
|
26
|
-
##
|
|
39
|
+
## Quick start
|
|
27
40
|
|
|
28
|
-
|
|
41
|
+
```bash
|
|
42
|
+
zro login # website or API key login
|
|
43
|
+
zro claude # open Claude Code on the default model
|
|
44
|
+
zro codex -m <model> # pick a model for this session
|
|
45
|
+
zro models # browse the model catalog
|
|
46
|
+
zro status # connection, installed tools, last session, usage
|
|
47
|
+
```
|
|
29
48
|
|
|
30
|
-
|
|
31
|
-
- **macOS** or **Linux** (on Windows, use [WSL](https://learn.microsoft.com/en-us/windows/wsl/))
|
|
49
|
+
`zro <tool> --install` installs a missing agent and opens it in one step.
|
|
32
50
|
|
|
33
|
-
|
|
51
|
+
---
|
|
34
52
|
|
|
35
|
-
|
|
36
|
-
npm install --global @moonmath-ai/zro
|
|
37
|
-
```
|
|
53
|
+
## Installation
|
|
38
54
|
|
|
39
|
-
|
|
55
|
+
- **Requirements:** Node.js 22 or later on macOS, Linux, or Windows.
|
|
56
|
+
- **Install:** `npm install --global @moonmath-ai/zro` (also `pnpm add --global @moonmath-ai/zro`).
|
|
57
|
+
- **Upgrade:** `zro install --upgrade` (upgrade zro); `zro install <tool> --upgrade`
|
|
58
|
+
or `zro install claude@2.1.105` / `zro install claude --version 2.1.105` for an agent.
|
|
59
|
+
- **Agent-assisted setup:** [SETUP_PROMPT.md](SETUP_PROMPT.md) has copy-paste prompts for end-user
|
|
60
|
+
installs and local development checkouts.
|
|
61
|
+
|
|
62
|
+
### Authentication
|
|
63
|
+
|
|
64
|
+
Sign in once, then launch any supported agent:
|
|
40
65
|
|
|
41
66
|
```bash
|
|
42
|
-
|
|
67
|
+
zro login # website or API key login
|
|
68
|
+
zro login --manual # enter an API key directly
|
|
69
|
+
zro login --no-browser # print an approval URL (e.g. remote box)
|
|
70
|
+
zro logout # remove the stored login
|
|
43
71
|
```
|
|
44
72
|
|
|
45
|
-
|
|
73
|
+
- Website login creates a revocable API key after approval, encrypted to an ephemeral
|
|
74
|
+
CLI-held public key. Set `ZRO_DEVICE_NAME` to label the device.
|
|
75
|
+
- `ZRO_API_KEY` takes precedence over the stored key at `~/.config/zro/credentials.json`;
|
|
76
|
+
Codex App keeps its own copy under `~/.config/zro/codex-app/.env`; `zro logout` removes both.
|
|
77
|
+
- The credential is verified against the inference API before any launch.
|
|
46
78
|
|
|
47
|
-
|
|
48
|
-
- `zro install <tool> --upgrade` upgrades one installed agent.
|
|
49
|
-
- `zro install claude@2.1.105` or `zro install claude --version 2.1.105` pins an npm-distributed
|
|
50
|
-
agent version.
|
|
79
|
+
### Alternate inference URL and no-auth mode
|
|
51
80
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
81
|
+
Point inference at another OpenAI-compatible gateway with `--inference-url` or
|
|
82
|
+
`ZRO_INFERENCE_URL`. A root URL or one ending in `/v1` both work; trailing slashes are
|
|
83
|
+
normalized.
|
|
55
84
|
|
|
56
|
-
|
|
57
|
-
|
|
85
|
+
```bash
|
|
86
|
+
zro claude --inference-url https://gateway.example
|
|
87
|
+
ZRO_INFERENCE_URL=https://gateway.example zro codex
|
|
88
|
+
```
|
|
58
89
|
|
|
59
|
-
|
|
90
|
+
Precedence is `--inference-url` > `ZRO_INFERENCE_URL` > `ZRO_ENDPOINT_ROOT` >
|
|
91
|
+
`https://zro.moonmath.ai`. The override only changes inference traffic; login, the
|
|
92
|
+
authenticated catalog, feedback, and MCP stay on `ZRO_AUTH_URL` / `ZRO_ENDPOINT_ROOT`.
|
|
60
93
|
|
|
61
|
-
|
|
94
|
+
For an inference endpoint with no authentication and no Zro account, add `--no-auth` or
|
|
95
|
+
set `ZRO_NO_AUTH=1`. No-auth mode requires an explicit `--inference-url` or
|
|
96
|
+
`ZRO_INFERENCE_URL`.
|
|
62
97
|
|
|
63
98
|
```bash
|
|
64
|
-
zro
|
|
65
|
-
zro
|
|
66
|
-
|
|
67
|
-
zro logout # remove the stored login
|
|
99
|
+
zro claude --no-auth --inference-url https://gateway.example
|
|
100
|
+
zro models --no-auth --inference-url https://gateway.example
|
|
101
|
+
ZRO_NO_AUTH=1 ZRO_INFERENCE_URL=https://gateway.example zro status
|
|
68
102
|
```
|
|
69
103
|
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- Before launching, `zro` verifies the credential with the inference API. Rejected keys and
|
|
79
|
-
unavailable validation endpoints stop the launch rather than passing the failure to the child
|
|
80
|
-
agent.
|
|
104
|
+
In no-auth mode the CLI skips login and API-key checks, sends no `Authorization`
|
|
105
|
+
headers, and uses a fixed non-secret placeholder key only where an agent requires a
|
|
106
|
+
non-empty value. Public model metadata comes from the main webapp
|
|
107
|
+
(`/api/cli/models/public`) and is intersected with the gateway's live `/v1/models`
|
|
108
|
+
list, so `zro models` only shows models the gateway can serve. That metadata is cached
|
|
109
|
+
separately at `~/.cache/zro/model-catalog-public.json`. The Zro MCP server is omitted
|
|
110
|
+
from every agent config because it requires an account, and `zro feedback` is
|
|
111
|
+
unavailable in this mode.
|
|
81
112
|
|
|
82
113
|
---
|
|
83
114
|
|
|
84
|
-
##
|
|
115
|
+
## Supported coding agents
|
|
85
116
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
117
|
+
| Agent | Install | Notes |
|
|
118
|
+
| --- | --- | --- |
|
|
119
|
+
| [Claude Code](https://www.anthropic.com/claude-code) | `zro install claude` | Anthropic's coding agent |
|
|
120
|
+
| [Codex CLI](https://developers.openai.com/codex/) | `zro install codex` | OpenAI's terminal agent |
|
|
121
|
+
| [Codex App](https://developers.openai.com/codex/) | `zro install codex-app` | OpenAI's desktop app |
|
|
122
|
+
| [Kilo Code](https://kilocode.ai/) | `zro install kilo` | Kilo's terminal coding agent |
|
|
123
|
+
| [Oh My Pi](https://ohmy.ai) | `zro install omp` | Power-user terminal agent |
|
|
124
|
+
| [OpenCode](https://opencode.ai) | `zro install opencode` | Open-source coding agent |
|
|
125
|
+
| [Grok Build](https://x.ai) | `zro install grok` | xAI's coding agent |
|
|
126
|
+
| [Hermes](https://hermes-agent.nousresearch.com) | `zro install hermes` | Nous Research's agent |
|
|
127
|
+
| [OpenClaw](https://github.com/openclaw/openclaw) | `zro install openclaw` | Personal AI assistant |
|
|
128
|
+
| [Pi](https://github.com/earendil-works/pi) | `zro install pi` | Minimal coding agent |
|
|
129
|
+
| [Prime Agent](https://primeintellect.ai) | `zro install prime` | Prime Intellect's self-improving RLM agent |
|
|
91
130
|
|
|
92
|
-
|
|
131
|
+
Each adapter launches the installed tool as a child process with isolated, Zro-owned
|
|
132
|
+
configuration. Session files are temporary; Codex App uses a persistent Zro-owned home.
|
|
133
|
+
Pass native tool arguments after `--` (for example `zro oc -- --help`). The last
|
|
134
|
+
tool/model pair is remembered and reopened with `zro again`.
|
|
93
135
|
|
|
94
136
|
---
|
|
95
137
|
|
|
@@ -98,50 +140,35 @@ zro codex -m glm-5.3 # pick a model for this session
|
|
|
98
140
|
```bash
|
|
99
141
|
zro # interactive agent picker
|
|
100
142
|
zro claude # open directly on the default model
|
|
101
|
-
zro codex -m
|
|
102
|
-
zro
|
|
103
|
-
zro
|
|
143
|
+
zro codex -m <model> # choose a model for this session
|
|
144
|
+
zro omp -m <model> # launch Oh My Pi through Zro
|
|
145
|
+
zro kilo -m <model> # launch Kilo Code through Zro
|
|
104
146
|
zro oc -- --help # short aliases + native tool arguments
|
|
105
147
|
zro again # reopen the last tool/model pair
|
|
106
|
-
zro login # choose website or API key login
|
|
107
|
-
zro login --no-browser # print an approval URL for a remote machine
|
|
108
|
-
zro login --manual # enter an API key manually
|
|
109
|
-
zro logout # remove the stored login
|
|
110
|
-
zro status # connection, installed tools, last session, usage
|
|
111
148
|
zro models # readable model catalog
|
|
112
|
-
zro install claude
|
|
113
|
-
zro claude --install # install if missing, then open
|
|
114
|
-
zro install claude@2.1.105 # install a pinned agent version
|
|
115
|
-
zro install --upgrade # upgrade zro itself
|
|
149
|
+
zro install claude@2.1.105 # pin an agent version
|
|
116
150
|
zro feedback # send feedback to the Zro team
|
|
117
151
|
zro claude --dry-run # secret-safe session preview
|
|
118
152
|
zro codex --json # machine-readable preview
|
|
153
|
+
zro claude --no-auth --inference-url https://gateway.example
|
|
154
|
+
# launch against a no-auth inference endpoint
|
|
119
155
|
```
|
|
120
156
|
|
|
121
|
-
Pass native tool arguments after `--` (for example `zro oc -- --help`). The last
|
|
122
|
-
tool/model pair is remembered and reopened with `zro again`.
|
|
123
|
-
|
|
124
157
|
---
|
|
125
158
|
|
|
126
|
-
##
|
|
159
|
+
## Pricing
|
|
127
160
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
| [OpenCode](https://opencode.ai) | `zro install opencode` | Open-source coding agent |
|
|
136
|
-
| [Grok Build](https://x.ai) | `zro install grok` | xAI's coding agent |
|
|
137
|
-
| [Hermes](https://hermes-agent.nousresearch.com) | `zro install hermes` | Nous Research's agent |
|
|
138
|
-
| [OpenClaw](https://github.com/openclaw/openclaw) | `zro install openclaw` | Personal AI assistant |
|
|
139
|
-
| [Pi](https://github.com/earendil-works/pi) | `zro install pi` | Minimal coding agent |
|
|
140
|
-
| [Prime Agent](https://primeintellect.ai) | `zro install prime` | Prime Intellect's self-improving RLM agent |
|
|
161
|
+
Plans are spend-based with expected usage, so actual totals vary by model mix, prompt
|
|
162
|
+
shape, output length, and cache reads. [See the live pricing page](https://zro.moonmath.ai/pricing).
|
|
163
|
+
|
|
164
|
+
| Plan | Per month | Yearly | Expected usage |
|
|
165
|
+
| --- | --- | --- | --- |
|
|
166
|
+
| **Pro** | $20 | $16/mo | ~1B tokens |
|
|
167
|
+
| **Max** | $60 | $48/mo | ~5B tokens |
|
|
141
168
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
169
|
+
- Usage packs are available with or without a subscription and expire after 90 days.
|
|
170
|
+
- Monthly spend resets on the same calendar cadence for monthly and yearly subscribers.
|
|
171
|
+
- There are no prorated refunds on cancellation; access stays active to the end of the period.
|
|
145
172
|
|
|
146
173
|
---
|
|
147
174
|
|
|
@@ -149,13 +176,13 @@ reopen. Pass native tool arguments after `--`.
|
|
|
149
176
|
|
|
150
177
|
- Normal agent configs are never edited.
|
|
151
178
|
- Temporary session files live under `~/.cache/zro/sessions` and are removed when the agent exits.
|
|
152
|
-
- Kilo Code and Oh My Pi run with a temporary home and XDG profile
|
|
153
|
-
safe assets are copied in
|
|
154
|
-
dependency trees, and secret files stay outside the profile.
|
|
179
|
+
- Kilo Code and Oh My Pi run with a temporary home and XDG profile; only sanitized
|
|
180
|
+
preferences and safe assets are copied in. Provider credentials, MCP definitions, sessions,
|
|
181
|
+
databases, dependency trees, and secret files stay outside the profile.
|
|
155
182
|
- Kilo and Oh My Pi telemetry, OTLP export, automatic updates, sharing, and remote control are
|
|
156
183
|
disabled; model and MCP requests still go to the configured Zro endpoints.
|
|
157
184
|
- API keys are masked in human and JSON previews. `--dry-run` writes nothing and starts nothing.
|
|
158
|
-
- macOS and
|
|
185
|
+
- macOS, Linux, and Windows are supported.
|
|
159
186
|
|
|
160
187
|
See [SECURITY.md](SECURITY.md) for the security model and private vulnerability reporting.
|
|
161
188
|
|
|
@@ -163,10 +190,8 @@ See [SECURITY.md](SECURITY.md) for the security model and private vulnerability
|
|
|
163
190
|
|
|
164
191
|
## Contributing
|
|
165
192
|
|
|
166
|
-
Zro is a small, dependency-light TypeScript CLI (runtime deps: `json5` and `yaml`). Bug
|
|
167
|
-
feature requests, and pull requests
|
|
168
|
-
are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, checks, and contribution
|
|
169
|
-
guidelines.
|
|
193
|
+
Zro is a small, dependency-light TypeScript CLI (runtime deps: `json5` and `yaml`). Bug
|
|
194
|
+
reports, feature requests, and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
170
195
|
|
|
171
196
|
---
|
|
172
197
|
|
package/dist/args.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolveTool, TOOLS } from "./catalog.js";
|
|
2
|
+
import { normalizeInferenceRoot } from "./endpoints.js";
|
|
2
3
|
const HELP = new Set(["help", "-h", "--help"]);
|
|
3
4
|
const VERSION = new Set(["version", "-v", "--version"]);
|
|
4
5
|
export function parseArgs(argv) {
|
|
@@ -36,24 +37,30 @@ export function parseArgs(argv) {
|
|
|
36
37
|
const rest = command === "auth" && argv[1] === "status" ? argv.slice(2) : argv.slice(1);
|
|
37
38
|
const parsed = parseOptions(rest, false);
|
|
38
39
|
assertNoExtraArgs(parsed.extraArgs, command);
|
|
39
|
-
return { command: "status", output: parsed.output };
|
|
40
|
+
return { command: "status", output: parsed.output, ...endpointOptions(parsed) };
|
|
40
41
|
}
|
|
41
42
|
if (command === "models") {
|
|
42
43
|
const parsed = parseOptions(argv.slice(1), false);
|
|
43
44
|
assertNoExtraArgs(parsed.extraArgs, command);
|
|
44
|
-
return { command: "models", output: parsed.output };
|
|
45
|
+
return { command: "models", output: parsed.output, ...endpointOptions(parsed) };
|
|
45
46
|
}
|
|
46
47
|
if (command === "install")
|
|
47
48
|
return parseInstallArgs(argv.slice(1));
|
|
48
49
|
if (command === "again") {
|
|
49
50
|
const parsed = parseOptions(argv.slice(1), false);
|
|
50
51
|
assertNoExtraArgs(parsed.extraArgs, command);
|
|
51
|
-
return {
|
|
52
|
+
return {
|
|
53
|
+
command: "again",
|
|
54
|
+
dryRun: parsed.dryRun,
|
|
55
|
+
output: parsed.output,
|
|
56
|
+
aliases: parsed.aliases,
|
|
57
|
+
...endpointOptions(parsed),
|
|
58
|
+
};
|
|
52
59
|
}
|
|
53
60
|
if (command === "feedback") {
|
|
54
61
|
const parsed = parseOptions(argv.slice(1), false);
|
|
55
62
|
const message = parsed.extraArgs.join(" ").trim() || undefined;
|
|
56
|
-
return { command: "feedback", message, output: parsed.output };
|
|
63
|
+
return { command: "feedback", message, output: parsed.output, ...endpointOptions(parsed) };
|
|
57
64
|
}
|
|
58
65
|
if (command === "launch" || command === "run") {
|
|
59
66
|
const value = argv[1];
|
|
@@ -112,6 +119,18 @@ function parseOptions(argv, allowPassthrough) {
|
|
|
112
119
|
result.apiKey = value.slice("--api-key=".length);
|
|
113
120
|
continue;
|
|
114
121
|
}
|
|
122
|
+
if (value === "--inference-url") {
|
|
123
|
+
result.inferenceUrl = normalizeInferenceRoot(requiredValue(argv, ++index, value), "--inference-url");
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
if (value.startsWith("--inference-url=")) {
|
|
127
|
+
result.inferenceUrl = normalizeInferenceRoot(value.slice("--inference-url=".length), "--inference-url");
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (value === "--no-auth") {
|
|
131
|
+
result.noAuth = true;
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
115
134
|
if (value === "--dry-run" || value === "-n") {
|
|
116
135
|
result.dryRun = true;
|
|
117
136
|
continue;
|
|
@@ -195,6 +214,12 @@ function requiredValue(argv, index, option) {
|
|
|
195
214
|
throw new Error(`${option} needs a value.`);
|
|
196
215
|
return value;
|
|
197
216
|
}
|
|
217
|
+
function endpointOptions(options) {
|
|
218
|
+
return {
|
|
219
|
+
...(options.inferenceUrl ? { inferenceUrl: options.inferenceUrl } : {}),
|
|
220
|
+
...(options.noAuth ? { noAuth: true } : {}),
|
|
221
|
+
};
|
|
222
|
+
}
|
|
198
223
|
function outputMode(argv) {
|
|
199
224
|
return argv.includes("--json") ? "json" : "human";
|
|
200
225
|
}
|
package/dist/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO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B,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,iBAAiB,CAAC,CAAC;IAC1E,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,eAAe,CAAC,OAAsB;IAC7C,OAAO;QACL,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,IAAc;IAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;AACpD,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAc,EAAE,OAAe;IACxD,IAAI,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACrF,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/cli.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ResolvedInference {
|
|
2
|
+
root: string;
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function normalizeInferenceRoot(value: string, label?: string): string;
|
|
6
|
+
export declare function resolveInference(env: NodeJS.ProcessEnv, flagValue?: string, requireExplicit?: boolean): ResolvedInference;
|
|
7
|
+
export declare function resolveControlPlaneRoot(env: NodeJS.ProcessEnv): string;
|
|
8
|
+
export declare function resolveMcpUrl(env: NodeJS.ProcessEnv): string;
|
|
9
|
+
export declare function isNoAuth(requestValue: boolean | undefined, env: NodeJS.ProcessEnv): boolean;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DEFAULT_ENDPOINT_ROOT } from "./engine/constants.js";
|
|
2
|
+
export function normalizeInferenceRoot(value, label = "inference URL") {
|
|
3
|
+
let url;
|
|
4
|
+
try {
|
|
5
|
+
url = new URL(value);
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
throw new Error(`Invalid ${label}: ${value}. Use an http(s) URL.`);
|
|
9
|
+
}
|
|
10
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
11
|
+
throw new Error(`Invalid ${label}: ${value}. Use an http(s) URL.`);
|
|
12
|
+
}
|
|
13
|
+
if (url.search || url.hash) {
|
|
14
|
+
throw new Error(`Invalid ${label}: ${value}. Remove the query string and fragment.`);
|
|
15
|
+
}
|
|
16
|
+
let pathname = url.pathname.replace(/\/+$/, "");
|
|
17
|
+
if (/\/v1$/i.test(pathname))
|
|
18
|
+
pathname = pathname.slice(0, -3);
|
|
19
|
+
pathname = pathname.replace(/\/+$/, "");
|
|
20
|
+
return `${url.origin}${pathname}`;
|
|
21
|
+
}
|
|
22
|
+
export function resolveInference(env, flagValue, requireExplicit = false) {
|
|
23
|
+
const explicit = flagValue ?? env.ZRO_INFERENCE_URL;
|
|
24
|
+
if (requireExplicit && !explicit) {
|
|
25
|
+
throw new Error("No-auth mode needs an inference URL. Pass --inference-url or set ZRO_INFERENCE_URL.");
|
|
26
|
+
}
|
|
27
|
+
const raw = explicit ?? env.ZRO_ENDPOINT_ROOT ?? DEFAULT_ENDPOINT_ROOT;
|
|
28
|
+
const root = normalizeInferenceRoot(raw);
|
|
29
|
+
return { root, baseUrl: `${root}/v1` };
|
|
30
|
+
}
|
|
31
|
+
export function resolveControlPlaneRoot(env) {
|
|
32
|
+
return normalizeInferenceRoot(env.ZRO_AUTH_URL || env.ZRO_ENDPOINT_ROOT || DEFAULT_ENDPOINT_ROOT, "control-plane URL");
|
|
33
|
+
}
|
|
34
|
+
export function resolveMcpUrl(env) {
|
|
35
|
+
return env.ZRO_MCP_URL || `${resolveControlPlaneRoot(env)}/mcp/zro`;
|
|
36
|
+
}
|
|
37
|
+
export function isNoAuth(requestValue, env) {
|
|
38
|
+
return requestValue === true || env.ZRO_NO_AUTH === "1";
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../src/endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAO9D,MAAM,UAAU,sBAAsB,CAAC,KAAa,EAAE,KAAK,GAAG,eAAe;IAC3E,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,WAAW,KAAK,KAAK,KAAK,uBAAuB,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,WAAW,KAAK,KAAK,KAAK,uBAAuB,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,WAAW,KAAK,KAAK,KAAK,yCAAyC,CAAC,CAAC;IACvF,CAAC;IAED,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAChD,IAAI,QAAQ,CAAC,IAAI,CAAC,QAA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