@raytrace-cli/cli 0.17.8 → 0.17.9
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/package.json +1 -1
- package/src/local-sandbox.mjs +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raytrace-cli/cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.9",
|
|
4
4
|
"mcpName": "io.github.Godcreatebugs/raytrace",
|
|
5
5
|
"description": "See what your coding agent did: traces, tool calls, cost and step-by-step evidence for Claude Code and Codex.",
|
|
6
6
|
"license": "MIT",
|
package/src/local-sandbox.mjs
CHANGED
|
@@ -180,17 +180,20 @@ export async function preflight(flags, { confirm, interactive }) {
|
|
|
180
180
|
lima = (await downloadLima(say)).binary;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
export const missingLocalSandboxMessage = (ref) => `No local sandbox named "${ref}". List them with: raytrace sandbox list --local`;
|
|
184
|
+
export const ambiguousLocalSandboxMessage = () => 'More than one local sandbox. Name one with: raytrace sandbox list --local';
|
|
185
|
+
|
|
183
186
|
/** A local sandbox's id, from its id or name; with neither, the only one there is. */
|
|
184
187
|
function pickId(ref) {
|
|
185
188
|
const boxes = registry();
|
|
186
189
|
if (ref) {
|
|
187
190
|
const id = boxes[ref] ? ref : byName(boxes, ref);
|
|
188
|
-
if (!id) throw new Error(
|
|
191
|
+
if (!id) throw new Error(missingLocalSandboxMessage(ref));
|
|
189
192
|
return id;
|
|
190
193
|
}
|
|
191
194
|
const ids = Object.keys(boxes);
|
|
192
195
|
if (ids.length === 1) return ids[0];
|
|
193
|
-
throw new Error(ids.length ?
|
|
196
|
+
throw new Error(ids.length ? ambiguousLocalSandboxMessage()
|
|
194
197
|
: 'No local sandboxes yet: raytrace sandbox create --local');
|
|
195
198
|
}
|
|
196
199
|
|