@runtypelabs/cli 2.59.0 → 2.59.2
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/dist/chunk-0-T9NWjH.js +3899 -0
- package/dist/chunk-0x7UKC1U.js +17 -0
- package/dist/chunk-2ySxXtcg.js +418 -0
- package/dist/chunk-3An_BRHv.js +501 -0
- package/dist/chunk-6uTxgdiY.js +16218 -0
- package/dist/chunk-87nRnNRG.js +1363 -0
- package/dist/chunk-B3wo8uRx.js +322 -0
- package/dist/chunk-BGp3ZdBy.js +560 -0
- package/dist/chunk-BJQv9Elp.js +107 -0
- package/dist/chunk-BOpO6xE-.js +6053 -0
- package/dist/chunk-BQXXCL8B.js +102 -0
- package/dist/chunk-BV-8isOd.js +34 -0
- package/dist/chunk-BVMhjGVe.js +826 -0
- package/dist/chunk-BW2fg46T.js +141 -0
- package/dist/chunk-BWJdY5Ag.js +36 -0
- package/dist/chunk-BYJOrLhh.js +302 -0
- package/dist/chunk-BYab8EVL.js +127 -0
- package/dist/chunk-BfEKvp7h.js +82 -0
- package/dist/chunk-BhgLSfH6.js +1123 -0
- package/dist/chunk-BirUxTtH.js +296 -0
- package/dist/chunk-BmB6UVZ9.js +1559 -0
- package/dist/chunk-BnWhIqW1.js +109 -0
- package/dist/chunk-Bpfnfk0t.js +123 -0
- package/dist/chunk-BrhgdnM3.js +108 -0
- package/dist/chunk-Bt0XAgX5.js +327 -0
- package/dist/chunk-Bu0FJr6S.js +84 -0
- package/dist/chunk-BvEoKpN3.js +255 -0
- package/dist/chunk-BxNJgYbE.js +28 -0
- package/dist/chunk-C1OFhd7F.js +6131 -0
- package/dist/chunk-C7e7WwbU.js +331 -0
- package/dist/chunk-CDTYP6bN.js +558 -0
- package/dist/chunk-CGDQoqDC.js +24 -0
- package/dist/chunk-CJraEBVd.js +127 -0
- package/dist/chunk-CQrNhOtv.js +40 -0
- package/dist/chunk-CW6AzBH6.js +128 -0
- package/dist/chunk-CXgL4w-9.js +317 -0
- package/dist/chunk-CZrqoPyf.js +233 -0
- package/dist/chunk-CcFCyqbB.js +83 -0
- package/dist/chunk-CdaIvO-y.js +485 -0
- package/dist/chunk-CehSXtgK.js +624 -0
- package/dist/chunk-Ciqkop65.js +218 -0
- package/dist/chunk-CoAWdSiE.js +43 -0
- package/dist/chunk-Crb4y7t4.js +830 -0
- package/dist/chunk-CrlqIfmb.js +337 -0
- package/dist/chunk-Cs4pwCQ-.js +324 -0
- package/dist/chunk-CwM_9y01.js +519 -0
- package/dist/chunk-CyRbIJg8.js +440 -0
- package/dist/chunk-D0OHsyMy.js +212 -0
- package/dist/chunk-D3y2bURs.js +1347 -0
- package/dist/chunk-D4_mJk03.js +2338 -0
- package/dist/chunk-D6C8rned.js +578 -0
- package/dist/chunk-D9ZbUnks.js +11 -0
- package/dist/chunk-DEPmLshX.js +834 -0
- package/dist/chunk-DFj1UPB2.js +330 -0
- package/dist/chunk-DGdFdZVf.js +197 -0
- package/dist/chunk-DGv7X9S_.js +63 -0
- package/dist/chunk-DJQ47WYZ.js +664 -0
- package/dist/chunk-DJw3O61j.js +1974 -0
- package/dist/chunk-DK4FbWVK.js +100 -0
- package/dist/chunk-DSRYhUus.js +993 -0
- package/dist/chunk-DajZ9Eg4.js +299 -0
- package/dist/chunk-Df4dunvU.js +195 -0
- package/dist/chunk-DjNTPhfO.js +481 -0
- package/dist/chunk-Dn8eaJuu.js +1042 -0
- package/dist/chunk-DwDWqSxM.js +637 -0
- package/dist/chunk-Dz7cEtxl.js +84 -0
- package/dist/chunk-E_0bgjrS.js +359 -0
- package/dist/chunk-KPYN2vUp.js +776 -0
- package/dist/chunk-KcqPQJBi.js +86 -0
- package/dist/chunk-N9H0JnoG.js +349 -0
- package/dist/chunk-NONFcXkn.js +728 -0
- package/dist/chunk-PrFjcpmH.js +256 -0
- package/dist/chunk-QSfNYiw9.js +11 -0
- package/dist/chunk-R265bzj9.js +226 -0
- package/dist/chunk-X9V_r6jM.js +166 -0
- package/dist/chunk-ZBtPUtyA.js +55 -0
- package/dist/chunk-ZCTfmOs7.js +4939 -0
- package/dist/chunk-h6oavj0t.js +97 -0
- package/dist/chunk-i7DwkvvD.js +42 -0
- package/dist/chunk-mG-4eZ6S.js +203 -0
- package/dist/chunk-o0ygUbCf.js +313 -0
- package/dist/chunk-ucu5lrDZ.js +5715 -0
- package/dist/index.js +11367 -73764
- package/package.json +6 -6
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { b as string, f as literal, h as object, i as _enum, m as number, v as record } from "./chunk-BOpO6xE-.js";
|
|
3
|
+
// ../shared/dist/chunk-C6un8ZqB.mjs
|
|
4
|
+
const HARNESS_BINDING_HEADER = "X-Runtype-Harness-Binding";
|
|
5
|
+
const HARNESS_BINDING_METADATA_KEY = "runtypeHarnessBinding";
|
|
6
|
+
const HARNESS_TRACE_ARTIFACT = "runtype.harness";
|
|
7
|
+
const harnessCoverageSchema = record(string().min(1).max(80), object({
|
|
8
|
+
state: _enum([
|
|
9
|
+
"available",
|
|
10
|
+
"unavailable",
|
|
11
|
+
"disabled",
|
|
12
|
+
"partial",
|
|
13
|
+
"redacted",
|
|
14
|
+
"truncated"
|
|
15
|
+
]),
|
|
16
|
+
reason: string().max(240).optional()
|
|
17
|
+
})).refine((fields) => Object.keys(fields).length <= 64, "Capture coverage is limited to 64 fields");
|
|
18
|
+
/** A server-minted correlation capability; normal telemetry authentication is also required. */
|
|
19
|
+
const harnessTurnBindingSchema = object({
|
|
20
|
+
version: literal(1),
|
|
21
|
+
token: string().min(1).max(8192),
|
|
22
|
+
traceId: string().regex(/^[0-9a-f]{32}$/),
|
|
23
|
+
executionId: string().min(1).max(200),
|
|
24
|
+
expiresAt: number().int().positive(),
|
|
25
|
+
dataPolicy: _enum([
|
|
26
|
+
"metrics",
|
|
27
|
+
"redacted",
|
|
28
|
+
"full"
|
|
29
|
+
])
|
|
30
|
+
});
|
|
31
|
+
/** Producer-reported versions and profile, without local paths or configuration content. */
|
|
32
|
+
const harnessProvenanceSummarySchema = object({
|
|
33
|
+
cliVersion: string().max(128).optional(),
|
|
34
|
+
harness: _enum(["claude", "codex"]),
|
|
35
|
+
backend: _enum(["native", "acp"]),
|
|
36
|
+
harnessVersion: string().max(128),
|
|
37
|
+
adapterVersion: string().max(128).optional(),
|
|
38
|
+
sdkVersion: string().max(128).optional(),
|
|
39
|
+
protocolVersion: string().max(128),
|
|
40
|
+
profile: _enum(["controlled-mcp", "workspace"])
|
|
41
|
+
});
|
|
42
|
+
/** Bounded reference to canonical evidence; it is not an isolation or billing attestation. */
|
|
43
|
+
const harnessCaptureSummarySchema = object({
|
|
44
|
+
version: literal(1),
|
|
45
|
+
traceId: string().regex(/^[0-9a-f]{32}$/),
|
|
46
|
+
executionId: string().min(1).max(200),
|
|
47
|
+
delivery: _enum([
|
|
48
|
+
"accepted",
|
|
49
|
+
"partial",
|
|
50
|
+
"failed"
|
|
51
|
+
]),
|
|
52
|
+
dataPolicy: _enum([
|
|
53
|
+
"metrics",
|
|
54
|
+
"redacted",
|
|
55
|
+
"full"
|
|
56
|
+
]),
|
|
57
|
+
coverage: harnessCoverageSchema,
|
|
58
|
+
provenance: harnessProvenanceSummarySchema.optional(),
|
|
59
|
+
observedEvents: number().int().nonnegative(),
|
|
60
|
+
deliveredEvents: number().int().nonnegative(),
|
|
61
|
+
droppedEvents: number().int().nonnegative(),
|
|
62
|
+
unresolvedTools: number().int().nonnegative()
|
|
63
|
+
});
|
|
64
|
+
const HARNESS_ATTRIBUTES = {
|
|
65
|
+
version: "runtype.harness.version",
|
|
66
|
+
sessionId: "runtype.harness.session_id",
|
|
67
|
+
turnId: "runtype.harness.turn_id",
|
|
68
|
+
sequence: "runtype.harness.sequence",
|
|
69
|
+
eventId: "runtype.harness.event_id",
|
|
70
|
+
nativeId: "runtype.harness.native_id",
|
|
71
|
+
nativeSessionId: "runtype.harness.native_session_id",
|
|
72
|
+
nativeTurnId: "runtype.harness.native_turn_id",
|
|
73
|
+
parentId: "runtype.harness.parent_id",
|
|
74
|
+
toolOutcome: "runtype.harness.tool_outcome",
|
|
75
|
+
toolUpdate: "runtype.harness.tool_update",
|
|
76
|
+
durationKnown: "runtype.harness.duration_known",
|
|
77
|
+
provenance: "runtype.harness.provenance",
|
|
78
|
+
coverage: "runtype.harness.coverage",
|
|
79
|
+
summary: "runtype.harness.summary",
|
|
80
|
+
usage: "runtype.harness.usage",
|
|
81
|
+
nativeContent: "runtype.harness.native"
|
|
82
|
+
};
|
|
83
|
+
export { harnessCaptureSummarySchema as a, HARNESS_TRACE_ARTIFACT as i, HARNESS_BINDING_HEADER as n, harnessTurnBindingSchema as o, HARNESS_BINDING_METADATA_KEY as r, HARNESS_ATTRIBUTES as t };
|
|
84
|
+
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { t as isTTY } from "./index.js";
|
|
3
|
+
import { EntityCard, MutationResult, React, render, useEffect, useState } from "./chunk-CoAWdSiE.js";
|
|
4
|
+
import { r as createCliClient } from "./chunk-BW2fg46T.js";
|
|
5
|
+
import { n as ensureAuth } from "./chunk-CJraEBVd.js";
|
|
6
|
+
import { a as printJson, i as printDetail } from "./chunk-CcFCyqbB.js";
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
import chalk from "chalk";
|
|
9
|
+
import open from "open";
|
|
10
|
+
// src/commands/billing.ts
|
|
11
|
+
/**
|
|
12
|
+
* Render the execution count from `GET /v1/billing/status`.
|
|
13
|
+
* No plan bounds an account by execution count, so this is a plain number, never a fraction.
|
|
14
|
+
* `executionsToday` is the honest field; `executionsThisMonth` is its deprecated fallback alias.
|
|
15
|
+
* A failed read reports "unavailable" rather than a confident zero.
|
|
16
|
+
*/
|
|
17
|
+
function formatExecutionsToday(usage) {
|
|
18
|
+
if (usage.executionsThisMonthAvailable === false) return "unavailable";
|
|
19
|
+
const used = usage.executionsToday ?? usage.executionsThisMonth;
|
|
20
|
+
return typeof used === "number" ? used.toLocaleString() : "unavailable";
|
|
21
|
+
}
|
|
22
|
+
const billingCommand = new Command("billing").description("View billing and subscription info");
|
|
23
|
+
billingCommand.command("status").description("Show current plan and usage").option("--json", "Output as JSON").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
|
|
24
|
+
const apiKey = await ensureAuth();
|
|
25
|
+
if (!apiKey) return;
|
|
26
|
+
const client = createCliClient(apiKey);
|
|
27
|
+
if (!isTTY(options) || options.json) {
|
|
28
|
+
try {
|
|
29
|
+
const data = await client.get("/billing/status");
|
|
30
|
+
if (options.json) printJson(data);
|
|
31
|
+
else {
|
|
32
|
+
printDetail("Billing Status", [
|
|
33
|
+
{
|
|
34
|
+
label: "Plan",
|
|
35
|
+
value: data.planName || data.plan
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: "Status",
|
|
39
|
+
value: data.status
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "Period start",
|
|
43
|
+
value: data.currentPeriodStart
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: "Period end",
|
|
47
|
+
value: data.currentPeriodEnd
|
|
48
|
+
}
|
|
49
|
+
]);
|
|
50
|
+
if (data.usage) {
|
|
51
|
+
console.log();
|
|
52
|
+
printDetail("Usage", [{
|
|
53
|
+
label: "Executions today",
|
|
54
|
+
value: formatExecutionsToday(data.usage)
|
|
55
|
+
}]);
|
|
56
|
+
}
|
|
57
|
+
if (data.limits) {
|
|
58
|
+
console.log();
|
|
59
|
+
printDetail("Limits", [
|
|
60
|
+
{
|
|
61
|
+
label: "Daily",
|
|
62
|
+
value: data.limits.dailyLimit
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: "Monthly",
|
|
66
|
+
value: data.limits.monthlyLimit
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "Rate limit",
|
|
70
|
+
value: data.limits.rateLimit
|
|
71
|
+
}
|
|
72
|
+
]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
} catch (error) {
|
|
76
|
+
const message = error instanceof Error ? error.message : "Unknown error";
|
|
77
|
+
console.error(chalk.red("Failed to fetch billing status"));
|
|
78
|
+
console.error(chalk.red(message));
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const App = () => {
|
|
84
|
+
const [loading, setLoading] = useState(true);
|
|
85
|
+
const [success, setSuccess] = useState(null);
|
|
86
|
+
const [error, setError] = useState(null);
|
|
87
|
+
const [resultNode, setResultNode] = useState(void 0);
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
const run = async () => {
|
|
90
|
+
try {
|
|
91
|
+
const data = await client.get("/billing/status");
|
|
92
|
+
const fields = [
|
|
93
|
+
{
|
|
94
|
+
label: "Plan",
|
|
95
|
+
value: data.planName || data.plan
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
label: "Status",
|
|
99
|
+
value: data.status,
|
|
100
|
+
color: data.status === "active" ? "green" : void 0
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: "Period start",
|
|
104
|
+
value: data.currentPeriodStart
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: "Period end",
|
|
108
|
+
value: data.currentPeriodEnd
|
|
109
|
+
}
|
|
110
|
+
];
|
|
111
|
+
if (data.usage) fields.push({
|
|
112
|
+
label: "Executions today",
|
|
113
|
+
value: formatExecutionsToday(data.usage)
|
|
114
|
+
});
|
|
115
|
+
if (data.limits) {
|
|
116
|
+
if (data.limits.dailyLimit) fields.push({
|
|
117
|
+
label: "Daily limit",
|
|
118
|
+
value: data.limits.dailyLimit
|
|
119
|
+
});
|
|
120
|
+
if (data.limits.monthlyLimit) fields.push({
|
|
121
|
+
label: "Monthly limit",
|
|
122
|
+
value: data.limits.monthlyLimit
|
|
123
|
+
});
|
|
124
|
+
if (data.limits.rateLimit) fields.push({
|
|
125
|
+
label: "Rate limit",
|
|
126
|
+
value: data.limits.rateLimit
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
setResultNode(React.createElement(EntityCard, { fields }));
|
|
130
|
+
setSuccess(true);
|
|
131
|
+
setLoading(false);
|
|
132
|
+
} catch (err) {
|
|
133
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
134
|
+
setSuccess(false);
|
|
135
|
+
setLoading(false);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
run();
|
|
139
|
+
}, []);
|
|
140
|
+
return React.createElement(MutationResult, {
|
|
141
|
+
loading,
|
|
142
|
+
loadingLabel: "Fetching billing status...",
|
|
143
|
+
success,
|
|
144
|
+
successMessage: "Billing Status",
|
|
145
|
+
error,
|
|
146
|
+
result: resultNode
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
const { waitUntilExit } = render(React.createElement(App));
|
|
150
|
+
await waitUntilExit();
|
|
151
|
+
});
|
|
152
|
+
billingCommand.command("portal").description("Open the billing portal in your browser").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
|
|
153
|
+
const apiKey = await ensureAuth();
|
|
154
|
+
if (!apiKey) return;
|
|
155
|
+
const client = createCliClient(apiKey);
|
|
156
|
+
if (!isTTY(options)) {
|
|
157
|
+
try {
|
|
158
|
+
const data = await client.post("/billing/portal");
|
|
159
|
+
if (data.url) {
|
|
160
|
+
console.log("Opening billing portal...");
|
|
161
|
+
console.log(data.url);
|
|
162
|
+
await open(data.url);
|
|
163
|
+
} else console.log("No portal URL returned. You may need to set up billing first.");
|
|
164
|
+
} catch (error) {
|
|
165
|
+
const message = error instanceof Error ? error.message : "Unknown error";
|
|
166
|
+
console.error(chalk.red("Failed to open billing portal"));
|
|
167
|
+
console.error(chalk.red(message));
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
const App = () => {
|
|
173
|
+
const [loading, setLoading] = useState(true);
|
|
174
|
+
const [success, setSuccess] = useState(null);
|
|
175
|
+
const [error, setError] = useState(null);
|
|
176
|
+
const [msg, setMsg] = useState("Opening billing portal...");
|
|
177
|
+
useEffect(() => {
|
|
178
|
+
const run = async () => {
|
|
179
|
+
try {
|
|
180
|
+
const data = await client.post("/billing/portal");
|
|
181
|
+
if (data.url) {
|
|
182
|
+
await open(data.url);
|
|
183
|
+
setMsg("Billing portal opened in browser");
|
|
184
|
+
setSuccess(true);
|
|
185
|
+
} else {
|
|
186
|
+
setMsg("No portal URL returned. You may need to set up billing first.");
|
|
187
|
+
setSuccess(true);
|
|
188
|
+
}
|
|
189
|
+
setLoading(false);
|
|
190
|
+
} catch (err) {
|
|
191
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
192
|
+
setSuccess(false);
|
|
193
|
+
setLoading(false);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
run();
|
|
197
|
+
}, []);
|
|
198
|
+
return React.createElement(MutationResult, {
|
|
199
|
+
loading,
|
|
200
|
+
loadingLabel: "Generating portal link...",
|
|
201
|
+
success,
|
|
202
|
+
successMessage: msg,
|
|
203
|
+
error
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
const { waitUntilExit } = render(React.createElement(App));
|
|
207
|
+
await waitUntilExit();
|
|
208
|
+
});
|
|
209
|
+
billingCommand.command("refresh").description("Refresh plan data from billing provider").option("--tty", "Force TTY mode").option("--no-tty", "Force non-TTY mode").action(async (options) => {
|
|
210
|
+
const apiKey = await ensureAuth();
|
|
211
|
+
if (!apiKey) return;
|
|
212
|
+
const client = createCliClient(apiKey);
|
|
213
|
+
if (!isTTY(options)) {
|
|
214
|
+
try {
|
|
215
|
+
await client.post("/billing/refresh");
|
|
216
|
+
console.log(chalk.green("Plan data refreshed"));
|
|
217
|
+
} catch (error) {
|
|
218
|
+
const message = error instanceof Error ? error.message : "Unknown error";
|
|
219
|
+
console.error(chalk.red("Failed to refresh plan data"));
|
|
220
|
+
console.error(chalk.red(message));
|
|
221
|
+
process.exit(1);
|
|
222
|
+
}
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const App = () => {
|
|
226
|
+
const [loading, setLoading] = useState(true);
|
|
227
|
+
const [success, setSuccess] = useState(null);
|
|
228
|
+
const [error, setError] = useState(null);
|
|
229
|
+
useEffect(() => {
|
|
230
|
+
const run = async () => {
|
|
231
|
+
try {
|
|
232
|
+
await client.post("/billing/refresh");
|
|
233
|
+
setSuccess(true);
|
|
234
|
+
setLoading(false);
|
|
235
|
+
} catch (err) {
|
|
236
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
237
|
+
setSuccess(false);
|
|
238
|
+
setLoading(false);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
run();
|
|
242
|
+
}, []);
|
|
243
|
+
return React.createElement(MutationResult, {
|
|
244
|
+
loading,
|
|
245
|
+
loadingLabel: "Refreshing plan data...",
|
|
246
|
+
success,
|
|
247
|
+
successMessage: "Plan data refreshed",
|
|
248
|
+
error
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
const { waitUntilExit } = render(React.createElement(App));
|
|
252
|
+
await waitUntilExit();
|
|
253
|
+
});
|
|
254
|
+
export { billingCommand };
|
|
255
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// src/lib/agent-version-selector.ts
|
|
3
|
+
var AgentVersionSelectorConflictError = class extends Error {
|
|
4
|
+
name = "AgentVersionSelectorConflictError";
|
|
5
|
+
constructor() {
|
|
6
|
+
super("Provide at most one of --alias or --version-id.");
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
/** The selector the flags name, or nothing when neither was given. */
|
|
10
|
+
function buildAgentVersionSelector(flags) {
|
|
11
|
+
if (flags.alias && flags.versionId) throw new AgentVersionSelectorConflictError();
|
|
12
|
+
if (!flags.alias && !flags.versionId) return null;
|
|
13
|
+
return {
|
|
14
|
+
...flags.alias ? { alias: flags.alias } : {},
|
|
15
|
+
...flags.versionId ? { versionId: flags.versionId } : {}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The selector nested under `agent`, the shape `/eval/run`, `/eval/suites/:id/run`
|
|
20
|
+
* and `/dispatch` all read. Returns an empty object when no flag was given, so it
|
|
21
|
+
* spreads into a body without adding a key.
|
|
22
|
+
*/
|
|
23
|
+
function buildNestedAgentSelector(flags) {
|
|
24
|
+
const selector = buildAgentVersionSelector(flags);
|
|
25
|
+
return selector ? { agent: selector } : {};
|
|
26
|
+
}
|
|
27
|
+
export { buildNestedAgentSelector as n, buildAgentVersionSelector as t };
|
|
28
|
+
|