@singularity-layer/cli 0.4.0 → 0.5.1

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 CHANGED
@@ -7,14 +7,15 @@ npm i -g @singularity-layer/cli
7
7
  singularity --help
8
8
  ```
9
9
 
10
- Requires Node 20+ and either a Solana keypair (`solana-keygen new`) or a compute API key. No
10
+ Requires Node 20+ (22+ for `sandbox connect`) and either a Solana keypair (`solana-keygen new`) or a compute API key. No
11
11
  account and no dashboard login — your wallet *is* the account.
12
12
 
13
13
  ## Processors
14
14
 
15
15
  A Processor is a loop you write; we host it, run it on demand, and buyers pay **you** directly per
16
16
  call. There is no platform cut and we never custody your money: an x402 payment is a USDC transfer
17
- from the buyer's wallet to yours.
17
+ from the buyer's wallet to yours. Buyers pay with the x402 `X-Payment` header (v1) or, where the 402
18
+ also carries a `PAYMENT-REQUIRED` header, `PAYMENT-SIGNATURE` (v2); it is the same transfer either way.
18
19
 
19
20
  ```bash
20
21
  mkdir my-loop && cd my-loop
@@ -104,6 +105,37 @@ hard-coding the secret in their source, which is worse in every way.
104
105
 
105
106
  `singularity processors env list` shows which of yours is which.
106
107
 
108
+ ## Coding sandbox
109
+
110
+ Use your Coding sandbox (Claude Code, Codex, OpenCode or Pi on its own private computer) from your
111
+ own terminal. It is the same secure path the browser terminal uses: a single-use, 60-second ticket
112
+ and a WebSocket relayed through the sandbox's own outbound connection. No SSH, no open port.
113
+
114
+ ```bash
115
+ export SGL_API_KEY=x402c_... # see Permissions below
116
+ singularity sandbox list
117
+ singularity sandbox connect # a full shell, here. Type ~. on a new line to leave
118
+ singularity sandbox exec -- npm test # one command; exits with its exit code
119
+ singularity sandbox files # list the workspace
120
+ singularity sandbox get src/app.ts # print a file (or: get src/app.ts ./app.ts)
121
+ singularity sandbox put ./notes.md # upload a text file (up to 100 KB)
122
+ singularity sandbox key # an OpenAI-compatible key for the sandbox's agent
123
+ ```
124
+
125
+ A sleeping sandbox wakes by itself when you connect or run something. `connect` needs Node 22 or
126
+ newer (it uses the built-in WebSocket). With more than one sandbox, name it: its id, the first few
127
+ characters of the id, or its name (`singularity sandbox connect 99a7`).
128
+
129
+ **OpenAI-compatible address.** `singularity sandbox key` prints a key and a base URL like
130
+ `https://compute.x402layer.cc/pods/<id>/v1`. Point any OpenAI client at it with model `agent-pod`;
131
+ each request is one turn of the sandbox's coding agent (streaming works). The agent can run commands
132
+ on the sandbox, so treat the key like a password. `keys` lists them, `revoke-key` turns one off.
133
+
134
+ Permissions: the terminal, exec, files and keys all need a compute API key (Settings > API keys)
135
+ with the Agent Pods permission "Read and write pod files, install skills, create and restore
136
+ backups" (`pods:control:write`), or a keypair. Keys from a Google, GitHub or X login can use `connect`, `key`
137
+ and `keys`; `exec`, `files`, `get` and `put` need a key from a wallet login.
138
+
107
139
  ## Processor state
108
140
 
109
141
  A processor is a fresh isolate every run, so anything you want to keep has to go somewhere:
package/dist/cli.js CHANGED
@@ -27,9 +27,9 @@ function bs58(bytes) {
27
27
  carry = carry / 58 | 0;
28
28
  }
29
29
  }
30
- let out = "1".repeat(zeros);
31
- for (let i = digits.length - 1; i >= 0; i--) out += B58[digits[i]];
32
- return out;
30
+ let out2 = "1".repeat(zeros);
31
+ for (let i = digits.length - 1; i >= 0; i--) out2 += B58[digits[i]];
32
+ return out2;
33
33
  }
34
34
  function loadKeypair(flags = {}) {
35
35
  const path = String(
@@ -148,6 +148,11 @@ function parseArgs(argv) {
148
148
  const words = [];
149
149
  for (let i = 0; i < argv.length; i++) {
150
150
  const tok = argv[i];
151
+ if (tok === "--") {
152
+ flags["--"] = String(words.length);
153
+ for (const rest of argv.slice(i + 1)) words.push(rest);
154
+ break;
155
+ }
151
156
  if (tok.startsWith("--")) {
152
157
  const name = tok.slice(2);
153
158
  const next = argv[i + 1];
@@ -263,7 +268,7 @@ function guardBuiltins() {
263
268
  };
264
269
  }
265
270
  function collectSources(dir, inputs) {
266
- const out = {};
271
+ const out2 = {};
267
272
  const root = realpathSync(dir);
268
273
  for (const rel of inputs) {
269
274
  if (rel.split("/").includes("node_modules")) continue;
@@ -278,9 +283,9 @@ function collectSources(dir, inputs) {
278
283
  const real = realpathSync(full);
279
284
  if (real !== root && !real.startsWith(root + sep)) continue;
280
285
  if (st.size > 256 * 1024) continue;
281
- out[relative(root, real)] = readFileSync2(real, "utf8");
286
+ out2[relative(root, real)] = readFileSync2(real, "utf8");
282
287
  }
283
- return out;
288
+ return out2;
284
289
  }
285
290
  async function bundleProcessor(opts) {
286
291
  const { entry, cwd } = opts;
@@ -427,6 +432,8 @@ to processor.json:
427
432
  }
428
433
 
429
434
  One price_usd covers all three (every asset is 6-decimal), and buyers pick a chain from the 402.
435
+ Buyers pay with x402: X-Payment (v1) or, when the 402 also carries a PAYMENT-REQUIRED header,
436
+ PAYMENT-SIGNATURE (v2). The signed payment is the same USDC transfer either way.
430
437
  Name only the chains you want: a chain you leave out is never offered. Check each address twice \u2014
431
438
  a payment cannot be reversed.`;
432
439
  var PAYOUT_CHAINS = ["solana", "base", "robinhood"];
@@ -582,7 +589,7 @@ async function promptForSchema(schema) {
582
589
  }
583
590
  }
584
591
  const required = new Set(schema?.required ?? []);
585
- const out = {};
592
+ const out2 = {};
586
593
  ok("");
587
594
  for (const [name, spec] of Object.entries(props)) {
588
595
  const label = [
@@ -600,32 +607,32 @@ async function promptForSchema(schema) {
600
607
  }
601
608
  continue;
602
609
  }
603
- out[name] = coerce(raw, spec.type);
610
+ out2[name] = coerce(raw, spec.type);
604
611
  }
605
612
  ok("");
606
- return out;
613
+ return out2;
607
614
  }
608
615
  function toQuery(input) {
609
616
  if (input === void 0 || input === null) return {};
610
617
  if (typeof input !== "object" || Array.isArray(input)) {
611
618
  return die("--get needs a JSON object of scalar fields");
612
619
  }
613
- const out = {};
620
+ const out2 = {};
614
621
  for (const [k, v] of Object.entries(input)) {
615
622
  if (v === void 0 || v === null) continue;
616
623
  if (Array.isArray(v)) {
617
624
  if (v.some((x) => x !== null && typeof x === "object")) {
618
625
  return die(`--get cannot send nested objects (field "${k}") \u2014 drop --get to POST it`);
619
626
  }
620
- out[k] = v.map((x) => typeof x === "number" ? x : String(x));
627
+ out2[k] = v.map((x) => typeof x === "number" ? x : String(x));
621
628
  continue;
622
629
  }
623
630
  if (typeof v === "object") {
624
631
  return die(`--get cannot send nested objects (field "${k}") \u2014 drop --get to POST it`);
625
632
  }
626
- out[k] = typeof v === "number" ? v : String(v);
633
+ out2[k] = typeof v === "number" ? v : String(v);
627
634
  }
628
- return out;
635
+ return out2;
629
636
  }
630
637
  async function invokeAndWait(base, slug, input, creds, token, quiet, asGet = false) {
631
638
  let res = asGet ? await api(base, "GET", `/processors/${slug}/run`, {
@@ -1081,14 +1088,544 @@ async function followLogs(base, slug, creds, limit) {
1081
1088
  }
1082
1089
  }
1083
1090
 
1091
+ // src/sandbox.ts
1092
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync2, existsSync as existsSync4, statSync } from "node:fs";
1093
+ import { createHash as createHash2, randomBytes } from "node:crypto";
1094
+ import nacl2 from "tweetnacl";
1095
+ var DEFAULT_COMPUTE = "https://compute.x402layer.cc";
1096
+ var MAX_PUT_BYTES = 100 * 1024;
1097
+ var HELP2 = `singularity sandbox: use your Coding sandbox from your own terminal
1098
+
1099
+ usage: singularity sandbox <subcommand> [sandbox] [options]
1100
+
1101
+ list your Coding sandboxes
1102
+ status [sandbox] state, harness, awake hours this month
1103
+ connect [sandbox] open the sandbox's terminal here (a full shell)
1104
+ type ~. at the start of a line to disconnect
1105
+ exec [sandbox] -- <command> run one command, print its output, exit with its code
1106
+ --timeout <seconds> 1 to 300 (default 60)
1107
+ files [sandbox] list the files in the workspace
1108
+ get [sandbox] <path> [local] print a workspace file, or save it to <local>
1109
+ put [sandbox] <local> [path] upload a text file (up to 100 KB) into the workspace
1110
+ wake [sandbox] | sleep [sandbox]
1111
+ key [sandbox] [--name <n>] create an OpenAI-compatible key for the sandbox's coding agent
1112
+ keys [sandbox] list those keys
1113
+ revoke-key [sandbox] <key-id>
1114
+
1115
+ [sandbox] is the sandbox id, the start of it, or its name (or pass --sandbox <it>).
1116
+ Leave it out if you have only one.
1117
+
1118
+ auth: SGL_API_KEY=x402c_... a compute API key from Settings > API keys. connect, exec, files
1119
+ and key need the Agent Pods permission "Read and write pod
1120
+ files, install skills, create and restore backups"
1121
+ (pods:control:write).
1122
+ --keypair <path> or sign with a Solana keypair (default ~/.config/solana/id.json)
1123
+ --compute-url <url> another API base (default ${DEFAULT_COMPUTE})
1124
+ --json machine-readable output
1125
+
1126
+ OpenAI-compatible address: after 'key', point any OpenAI client at the printed base URL with
1127
+ model "agent-pod". Each request is one turn of the sandbox's coding agent.`;
1128
+ function computeBase(flags) {
1129
+ const override = typeof flags["compute-url"] === "string" && flags["compute-url"] || process.env.SINGULARITY_COMPUTE_URL;
1130
+ if (override) {
1131
+ let u;
1132
+ try {
1133
+ u = new URL(String(override));
1134
+ } catch {
1135
+ return die(`--compute-url is not a URL: ${override}`);
1136
+ }
1137
+ const local = ["localhost", "127.0.0.1", "[::1]"].includes(u.hostname);
1138
+ if (u.protocol !== "https:" && !(local && u.protocol === "http:")) die("--compute-url must be https (http only for localhost)");
1139
+ process.stderr.write(`(using ${override})
1140
+ `);
1141
+ return String(override).replace(/\/+$/, "");
1142
+ }
1143
+ return DEFAULT_COMPUTE;
1144
+ }
1145
+ var sha256Hex2 = (s) => createHash2("sha256").update(s, "utf8").digest("hex");
1146
+ function computeAuthHeaders(creds, method, pathAndQuery, bodyText, now = Date.now(), nonce = randomBytes(16).toString("hex")) {
1147
+ if (creds.apiKey) return { "X-API-Key": creds.apiKey };
1148
+ const kp = creds.kp;
1149
+ if (!kp) return die("no credential");
1150
+ const message = ["X402-COMPUTE-AUTH", "v1", "solana", kp.address, method.toUpperCase(), pathAndQuery, sha256Hex2(bodyText), String(now), nonce].join("\n");
1151
+ const sig = nacl2.sign.detached(new TextEncoder().encode(message), kp.secretKey);
1152
+ return {
1153
+ "X-Auth-Address": kp.address,
1154
+ "X-Auth-Chain": "solana",
1155
+ "X-Auth-Signature": Buffer.from(sig).toString("base64"),
1156
+ "X-Auth-Sig-Encoding": "base64",
1157
+ "X-Auth-Timestamp": String(now),
1158
+ "X-Auth-Nonce": nonce
1159
+ };
1160
+ }
1161
+ var ApiError = class extends Error {
1162
+ constructor(status, message, code, details) {
1163
+ super(message);
1164
+ this.status = status;
1165
+ this.code = code;
1166
+ this.details = details;
1167
+ }
1168
+ get retryAfter() {
1169
+ return Number(this.details.retry_after_seconds) || 0;
1170
+ }
1171
+ };
1172
+ function parseApiError(status, text) {
1173
+ let p;
1174
+ try {
1175
+ p = JSON.parse(text);
1176
+ } catch {
1177
+ p = null;
1178
+ }
1179
+ if (p && typeof p.error === "object" && p.error) {
1180
+ const details = p.error.details && typeof p.error.details === "object" ? p.error.details : {};
1181
+ return new ApiError(status, String(p.error.message || p.error.code || `HTTP ${status}`), String(details.code || details.reason || p.error.code || ""), details);
1182
+ }
1183
+ if (p && typeof p === "object") {
1184
+ const details = p.details && typeof p.details === "object" ? { ...p, ...p.details } : p;
1185
+ return new ApiError(status, String(p.error || p.message || `HTTP ${status}`), String(p.code || details.code || ""), details);
1186
+ }
1187
+ return new ApiError(status, text.slice(0, 300) || `HTTP ${status}`, "", {});
1188
+ }
1189
+ async function call(ctx, method, path, body) {
1190
+ const bodyText = body === void 0 ? "" : JSON.stringify(body);
1191
+ const headers = computeAuthHeaders(ctx.creds, method, path, bodyText);
1192
+ if (body !== void 0) headers["content-type"] = "application/json";
1193
+ let res;
1194
+ try {
1195
+ res = await fetch(ctx.base + path, { method, headers, body: body === void 0 ? void 0 : bodyText });
1196
+ } catch (e) {
1197
+ throw new ApiError(0, `could not reach ${ctx.base}: ${e instanceof Error ? e.message : String(e)}`, "network", {});
1198
+ }
1199
+ const text = await res.text();
1200
+ if (!res.ok) throw parseApiError(res.status, text);
1201
+ try {
1202
+ return text ? JSON.parse(text) : {};
1203
+ } catch {
1204
+ return {};
1205
+ }
1206
+ }
1207
+ var sleepMs = (ms) => new Promise((r) => setTimeout(r, ms));
1208
+ function explain(e) {
1209
+ if (!(e instanceof ApiError)) return e instanceof Error ? e.message : String(e);
1210
+ if (e.status === 401) return `${e.message}. Check SGL_API_KEY (or your keypair).`;
1211
+ if (e.status === 403 && /pods:control:write/.test(e.message + JSON.stringify(e.details))) {
1212
+ return `${e.message}
1213
+ Create a key in Settings > API keys and tick, under Agent Pods, "Read and write pod files,
1214
+ install skills, create and restore backups" (pods:control:write). Use it as SGL_API_KEY.`;
1215
+ }
1216
+ if (e.status === 403 && (e.code === "wallet_required" || /needs a wallet/i.test(e.message))) {
1217
+ return `${e.message}
1218
+ exec, files and keys go through the pod API, which needs a key from a wallet login. 'singularity sandbox connect' works with any key.`;
1219
+ }
1220
+ return e.message;
1221
+ }
1222
+ function fail(e) {
1223
+ return die(explain(e));
1224
+ }
1225
+ async function listSandboxes(ctx) {
1226
+ const r = await call(ctx, "GET", "/pods");
1227
+ return (r.pods || []).filter((p) => p && p.agent_id === "coding" && !["destroyed", "deleted", "failed"].includes(String(p.status))).map((p) => ({ id: String(p.id), name: p.name ?? null, status: String(p.status), model: p.model ?? null, ai_mode: p.ai_mode }));
1228
+ }
1229
+ var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
1230
+ function pickSandbox(rows, ref) {
1231
+ if (!ref) {
1232
+ if (rows.length === 1) return { id: rows[0].id };
1233
+ if (!rows.length) return { error: "you have no Coding sandbox. Create one in Studio or Cloud first." };
1234
+ return { error: `you have ${rows.length} sandboxes; name one:
1235
+ ` + rows.map((r) => ` ${r.id} ${r.name || ""}`).join("\n") };
1236
+ }
1237
+ const exact = rows.filter((r) => r.id === ref.toLowerCase() || r.name === ref);
1238
+ if (exact.length === 1) return { id: exact[0].id };
1239
+ const pre = rows.filter((r) => r.id.startsWith(ref.toLowerCase()));
1240
+ if (pre.length === 1) return { id: pre[0].id };
1241
+ if (exact.length + pre.length > 1) return { error: `"${ref}" matches more than one sandbox; use more of the id` };
1242
+ return { error: `no Coding sandbox matches "${ref}"` };
1243
+ }
1244
+ async function resolveId(ctx, ref) {
1245
+ if (ref && UUID.test(ref)) return ref.toLowerCase();
1246
+ const rows = await listSandboxes(ctx).catch(fail);
1247
+ const p = pickSandbox(rows, ref);
1248
+ if ("error" in p) return die(p.error);
1249
+ return p.id;
1250
+ }
1251
+ var isAsleepError = (e) => e instanceof ApiError && (e.code === "waking" || e.details.reason === "waking" || e.status === 409 && /offline|waking|start it/i.test(e.message));
1252
+ async function withWake(ctx, id, fn) {
1253
+ let asked = false;
1254
+ for (let i = 0; ; i++) {
1255
+ try {
1256
+ return await fn();
1257
+ } catch (e) {
1258
+ if (!isAsleepError(e) || i >= 15) throw e;
1259
+ if (i === 0) process.stderr.write("Waking your sandbox...\n");
1260
+ if (!asked) {
1261
+ asked = true;
1262
+ await call(ctx, "POST", `/pods/${id}/coding/wake`).catch(() => void 0);
1263
+ }
1264
+ await sleepMs(Math.max(2, e.retryAfter || 4) * 1e3);
1265
+ }
1266
+ }
1267
+ }
1268
+ async function openTerminalUrl(ctx, id) {
1269
+ for (let i = 0; ; i++) {
1270
+ try {
1271
+ const r = await call(ctx, "POST", `/pods/${id}/coding/terminal`);
1272
+ const path = r.path || (r.ticket ? `/pods/screen/${encodeURIComponent(r.ticket)}` : "");
1273
+ if (!path.startsWith("/pods/screen/")) throw new ApiError(502, "the server did not return a terminal link", "", {});
1274
+ return ctx.base.replace(/^http/, "ws") + path;
1275
+ } catch (e) {
1276
+ if (!(e instanceof ApiError && e.code === "waking") || i >= 15) throw e;
1277
+ if (i === 0) process.stderr.write("Waking your sandbox...\n");
1278
+ await sleepMs(Math.max(2, e.retryAfter || 4) * 1e3);
1279
+ }
1280
+ }
1281
+ }
1282
+ function makeEscapeFilter() {
1283
+ let lineStart = true;
1284
+ let held = false;
1285
+ return (chunk) => {
1286
+ const out2 = [];
1287
+ for (const b of chunk) {
1288
+ if (held) {
1289
+ held = false;
1290
+ if (b === 46) return { send: Uint8Array.from(out2), disconnect: true };
1291
+ if (b === 126) {
1292
+ out2.push(126);
1293
+ lineStart = false;
1294
+ continue;
1295
+ }
1296
+ out2.push(126);
1297
+ } else if (lineStart && b === 126) {
1298
+ held = true;
1299
+ continue;
1300
+ }
1301
+ out2.push(b);
1302
+ lineStart = b === 13 || b === 10;
1303
+ }
1304
+ return { send: Uint8Array.from(out2), disconnect: false };
1305
+ };
1306
+ }
1307
+ function closeMessage(code, reason) {
1308
+ if (code === 1e3 || code === 1005) return { text: "Connection closed.", exit: 0 };
1309
+ if (code === 4006) return { text: "Closed after 10 idle minutes.", exit: 0 };
1310
+ if (code === 1006) return { text: "The terminal connection dropped.", exit: 1 };
1311
+ return { text: `The terminal closed${reason ? ": " + reason : ""} (${code}).`, exit: 1 };
1312
+ }
1313
+ async function connect(ctx, id) {
1314
+ const WS = globalThis.WebSocket;
1315
+ if (!WS) die("connect needs Node.js 22 or newer (it uses the built-in WebSocket). Run: node --version");
1316
+ const url = await openTerminalUrl(ctx, id).catch(fail);
1317
+ const stdin = process.stdin;
1318
+ const tty = !!stdin.isTTY;
1319
+ const ws = new WS(url);
1320
+ ws.binaryType = "arraybuffer";
1321
+ const filter = makeEscapeFilter();
1322
+ let opened = false;
1323
+ let restored = false;
1324
+ const restore = () => {
1325
+ if (restored) return;
1326
+ restored = true;
1327
+ if (tty) {
1328
+ try {
1329
+ stdin.setRawMode(false);
1330
+ } catch {
1331
+ }
1332
+ }
1333
+ stdin.pause();
1334
+ stdin.unref();
1335
+ };
1336
+ process.on("exit", restore);
1337
+ const sendSize = () => {
1338
+ if (ws.readyState === 1) ws.send(JSON.stringify({ cols: process.stdout.columns || 80, rows: process.stdout.rows || 24 }));
1339
+ };
1340
+ const onData = (buf) => {
1341
+ const { send, disconnect } = tty ? filter(buf) : { send: new Uint8Array(buf), disconnect: false };
1342
+ if (send.length && ws.readyState === 1) ws.send(send);
1343
+ if (disconnect) {
1344
+ process.stderr.write("\r\nDisconnected.\r\n");
1345
+ try {
1346
+ ws.close(1e3);
1347
+ } catch {
1348
+ }
1349
+ }
1350
+ };
1351
+ const onEnd = () => {
1352
+ if (!tty && ws.readyState === 1) ws.send(new Uint8Array([4]));
1353
+ };
1354
+ const done = new Promise((resolve2) => {
1355
+ ws.onopen = () => {
1356
+ opened = true;
1357
+ if (tty) {
1358
+ stdin.setRawMode(true);
1359
+ process.stderr.write("Connected. Type ~. at the start of a line to disconnect.\r\n");
1360
+ }
1361
+ stdin.on("data", onData);
1362
+ stdin.on("end", onEnd);
1363
+ stdin.resume();
1364
+ sendSize();
1365
+ if (process.stdout.isTTY) process.stdout.on("resize", sendSize);
1366
+ };
1367
+ ws.onmessage = (e) => {
1368
+ if (e.data instanceof ArrayBuffer) process.stdout.write(Buffer.from(e.data));
1369
+ };
1370
+ ws.onerror = () => {
1371
+ };
1372
+ ws.onclose = (e) => {
1373
+ restore();
1374
+ process.stdout.off("resize", sendSize);
1375
+ stdin.off("data", onData);
1376
+ stdin.off("end", onEnd);
1377
+ if (!opened) {
1378
+ process.stderr.write("Could not open the terminal (the link is single use and lasts 60 seconds). Try again.\n");
1379
+ process.exitCode = 1;
1380
+ } else {
1381
+ const m = closeMessage(e.code, e.reason);
1382
+ process.stderr.write(`\r
1383
+ ${m.text}
1384
+ `);
1385
+ process.exitCode = m.exit;
1386
+ }
1387
+ resolve2();
1388
+ };
1389
+ });
1390
+ const bye = () => {
1391
+ try {
1392
+ ws.close(1e3);
1393
+ } catch {
1394
+ }
1395
+ };
1396
+ for (const sig of ["SIGTERM", "SIGHUP", "SIGINT", "SIGQUIT"]) process.once(sig, bye);
1397
+ await done;
1398
+ }
1399
+ async function mintKey(ctx, id, name) {
1400
+ try {
1401
+ const r = await call(ctx, "POST", `/pods/v1/pods/${id}/keys`, { name });
1402
+ return { id: r.key.id, secret: r.key.secret, base_url: r.endpoint.base_url, model: r.endpoint.model || "agent-pod" };
1403
+ } catch (e) {
1404
+ if (!(e instanceof ApiError && e.status === 403 && (e.code === "wallet_required" || /needs a wallet/i.test(e.message)))) throw e;
1405
+ const r = await call(ctx, "POST", `/pods/${id}/api-keys`, { name });
1406
+ return { id: r.row?.id, secret: r.key, base_url: r.base_url, model: "agent-pod" };
1407
+ }
1408
+ }
1409
+ async function listKeys(ctx, id) {
1410
+ try {
1411
+ return (await call(ctx, "GET", `/pods/v1/pods/${id}/keys`)).keys || [];
1412
+ } catch (e) {
1413
+ if (!(e instanceof ApiError && e.status === 403 && (e.code === "wallet_required" || /needs a wallet/i.test(e.message)))) throw e;
1414
+ return ((await call(ctx, "GET", `/pods/${id}/api-keys`)).keys || []).map((k) => ({ ...k, revoked: Boolean(k.revoked_at) }));
1415
+ }
1416
+ }
1417
+ async function revokeKey(ctx, id, keyId) {
1418
+ try {
1419
+ await call(ctx, "DELETE", `/pods/v1/pods/${id}/keys/${keyId}`);
1420
+ } catch (e) {
1421
+ if (!(e instanceof ApiError && e.status === 403 && (e.code === "wallet_required" || /needs a wallet/i.test(e.message)))) throw e;
1422
+ await call(ctx, "DELETE", `/pods/${id}/api-keys/${keyId}`);
1423
+ }
1424
+ }
1425
+ function checkUpload(buf) {
1426
+ if (buf.length > MAX_PUT_BYTES) return `that file is ${Math.ceil(buf.length / 1024)} KB; put takes text files up to ${MAX_PUT_BYTES / 1024} KB. Use git or the terminal for bigger files.`;
1427
+ if (buf.includes(0)) return "that looks like a binary file; put takes text files. Use git or the terminal for binaries.";
1428
+ if (Buffer.from(buf.toString("utf8"), "utf8").compare(buf) !== 0) return "that file is not UTF-8 text; put takes text files.";
1429
+ return null;
1430
+ }
1431
+ var out = (ctx, human, data) => ok(ctx.json ? JSON.stringify(data) : human);
1432
+ async function run2(words, flags) {
1433
+ const sub = words[0];
1434
+ if (!sub || flags.help) {
1435
+ ok(HELP2);
1436
+ if (!sub) process.exit(1);
1437
+ return;
1438
+ }
1439
+ const ctx = { base: computeBase(flags), creds: loadCreds(flags), json: !!flags.json };
1440
+ const args = words.slice(1);
1441
+ const sref = typeof flags.sandbox === "string" ? flags.sandbox : void 0;
1442
+ switch (sub) {
1443
+ case "list":
1444
+ case "ls": {
1445
+ const rows = await listSandboxes(ctx).catch(fail);
1446
+ if (ctx.json) {
1447
+ ok(JSON.stringify(rows));
1448
+ break;
1449
+ }
1450
+ if (!rows.length) {
1451
+ ok("No Coding sandboxes yet. Create one in Studio or Cloud.");
1452
+ break;
1453
+ }
1454
+ for (const r of rows) ok(`${r.id} ${(r.name || "").padEnd(20)} ${r.status}`);
1455
+ break;
1456
+ }
1457
+ case "status": {
1458
+ const id = await resolveId(ctx, sref || args[0]);
1459
+ const r = await call(ctx, "GET", `/pods/${id}/coding`).catch(fail);
1460
+ const c = r.coding || r;
1461
+ out(ctx, [
1462
+ `${id} ${c.harness_name || c.harness || ""}`,
1463
+ `state ${c.state}${c.busy ? " (working)" : ""}`,
1464
+ `awake hours ${c.awake_hours} of ${c.included_hours} included this month`,
1465
+ `sleeps after ${c.idle_sleep_minutes} idle minutes`
1466
+ ].join("\n"), c);
1467
+ break;
1468
+ }
1469
+ case "connect":
1470
+ case "shell":
1471
+ case "ssh": {
1472
+ const id = await resolveId(ctx, sref || args[0]);
1473
+ await connect(ctx, id);
1474
+ break;
1475
+ }
1476
+ case "exec": {
1477
+ const sep2 = typeof flags["--"] === "string" ? Number(flags["--"]) - 2 : -1;
1478
+ let ref;
1479
+ let rest;
1480
+ if (sep2 >= 0) {
1481
+ ref = sref || (sep2 > 0 ? args[0] : void 0);
1482
+ rest = args.slice(sep2);
1483
+ } else {
1484
+ [ref, rest] = splitRef(args, Infinity, sref);
1485
+ }
1486
+ const command = rest.join(" ").trim();
1487
+ if (!command) die("usage: singularity sandbox exec [sandbox] -- <command>");
1488
+ const id = await resolveId(ctx, ref);
1489
+ const timeout = flags.timeout ? Number(flags.timeout) : 60;
1490
+ if (!Number.isFinite(timeout) || timeout < 1 || timeout > 300) die("--timeout must be 1 to 300 seconds");
1491
+ const r = await withWake(ctx, id, () => call(ctx, "POST", `/pods/v1/pods/${id}/exec`, { command, timeout_seconds: timeout })).catch(fail);
1492
+ const x = r.exec || {};
1493
+ if (ctx.json) {
1494
+ ok(JSON.stringify(x));
1495
+ break;
1496
+ }
1497
+ if (x.stdout) process.stdout.write(x.stdout);
1498
+ if (x.stderr) process.stderr.write(x.stderr);
1499
+ if (x.truncated) process.stderr.write("\n(output was cut short)\n");
1500
+ if (x.timed_out) {
1501
+ process.stderr.write(`
1502
+ (timed out after ${timeout}s)
1503
+ `);
1504
+ process.exitCode = 124;
1505
+ break;
1506
+ }
1507
+ process.exitCode = typeof x.exit_code === "number" ? x.exit_code : 1;
1508
+ break;
1509
+ }
1510
+ case "files": {
1511
+ const id = await resolveId(ctx, sref || args[0]);
1512
+ const r = await withWake(ctx, id, () => call(ctx, "GET", `/pods/v1/pods/${id}/files`)).catch(fail);
1513
+ if (ctx.json) {
1514
+ ok(JSON.stringify(r));
1515
+ break;
1516
+ }
1517
+ const files = r.files || [];
1518
+ if (!files.length) {
1519
+ ok("(the workspace is empty)");
1520
+ break;
1521
+ }
1522
+ for (const f of files) ok(`${String(f.size).padStart(9)} ${f.path}`);
1523
+ break;
1524
+ }
1525
+ case "get":
1526
+ case "cat": {
1527
+ const [ref, rest] = splitRef(args, 2, sref);
1528
+ const [remote, local] = rest;
1529
+ if (!remote) die("usage: singularity sandbox get [sandbox] <path> [local-file]");
1530
+ const id = await resolveId(ctx, ref);
1531
+ const r = await withWake(ctx, id, () => call(ctx, "GET", `/pods/v1/pods/${id}/files?path=${encodeURIComponent(remote)}`)).catch(fail);
1532
+ const content = String(r.file?.content ?? "");
1533
+ if (local && local !== "-") {
1534
+ writeFileSync2(local, content);
1535
+ out(ctx, `saved ${local}`, { path: r.file?.path, saved: local });
1536
+ } else process.stdout.write(content);
1537
+ break;
1538
+ }
1539
+ case "put": {
1540
+ const [ref, rest] = splitRef(args, 2, sref);
1541
+ const [local, remote] = rest;
1542
+ if (!local) die("usage: singularity sandbox put [sandbox] <local-file> [path]");
1543
+ if (!existsSync4(local) || !statSync(local).isFile()) die(`no file at ${local}`);
1544
+ const buf = readFileSync4(local);
1545
+ const bad = checkUpload(buf);
1546
+ if (bad) die(bad);
1547
+ const path = remote || local.split(/[\\/]/).pop();
1548
+ const id = await resolveId(ctx, ref);
1549
+ const r = await withWake(ctx, id, () => call(ctx, "PUT", `/pods/v1/pods/${id}/files`, { path, content: buf.toString("utf8") })).catch(fail);
1550
+ out(ctx, `uploaded ${r.file?.path ?? path} (${r.file?.size ?? buf.length} bytes)`, r.file);
1551
+ break;
1552
+ }
1553
+ case "wake":
1554
+ case "sleep": {
1555
+ const id = await resolveId(ctx, sref || args[0]);
1556
+ await call(ctx, "POST", `/pods/${id}/coding/${sub}`).catch(fail);
1557
+ out(ctx, sub === "wake" ? "Awake." : "Asleep. It wakes again when you connect or send it work.", { ok: true });
1558
+ break;
1559
+ }
1560
+ case "key": {
1561
+ const id = await resolveId(ctx, sref || args[0]);
1562
+ const name = typeof flags.name === "string" ? flags.name : "CLI key";
1563
+ const k = await mintKey(ctx, id, name).catch(fail);
1564
+ if (ctx.json) {
1565
+ ok(JSON.stringify(k));
1566
+ break;
1567
+ }
1568
+ ok(`key ${k.secret}`);
1569
+ ok(`base URL ${k.base_url}`);
1570
+ ok(`model ${k.model}`);
1571
+ ok("");
1572
+ ok("Shown once: store it now. Anyone with it can give your sandbox's coding agent work,");
1573
+ ok(`and the agent can run commands there. Revoke it with: singularity sandbox revoke-key ${id.slice(0, 8)} ${k.id}`);
1574
+ ok("");
1575
+ ok(`curl ${k.base_url}/chat/completions \\`);
1576
+ ok(' -H "Authorization: Bearer $KEY" -H "content-type: application/json" \\');
1577
+ ok(` -d '{"model":"${k.model}","stream":true,"messages":[{"role":"user","content":"hello"}]}'`);
1578
+ break;
1579
+ }
1580
+ case "keys": {
1581
+ const id = await resolveId(ctx, sref || args[0]);
1582
+ const keys = await listKeys(ctx, id).catch(fail);
1583
+ if (ctx.json) {
1584
+ ok(JSON.stringify(keys));
1585
+ break;
1586
+ }
1587
+ if (!keys.length) {
1588
+ ok("No keys. Create one with: singularity sandbox key");
1589
+ break;
1590
+ }
1591
+ for (const k of keys) ok(`${k.id} ${k.prefix || ""}...${k.last4 || ""} ${(k.name || "").padEnd(16)} ${k.revoked ? "revoked" : "active"}`);
1592
+ break;
1593
+ }
1594
+ case "revoke-key": {
1595
+ const [ref, rest] = splitRef(args, 1, sref);
1596
+ const keyId = rest[0];
1597
+ if (!keyId || !UUID.test(keyId)) die("usage: singularity sandbox revoke-key [sandbox] <key-id>");
1598
+ const id = await resolveId(ctx, ref);
1599
+ await revokeKey(ctx, id, keyId).catch(fail);
1600
+ out(ctx, "Revoked.", { ok: true });
1601
+ break;
1602
+ }
1603
+ default:
1604
+ console.error(`error: unknown sandbox subcommand "${sub}"
1605
+ `);
1606
+ ok(HELP2);
1607
+ process.exit(1);
1608
+ }
1609
+ }
1610
+ function splitRef(args, maxOwn, flagRef) {
1611
+ if (flagRef) return [flagRef, args];
1612
+ if (args.length > maxOwn) return [args[0], args.slice(1)];
1613
+ if (args.length > 1 && (UUID.test(args[0]) || looksLikeRef(args[0]))) return [args[0], args.slice(1)];
1614
+ return [void 0, args];
1615
+ }
1616
+ function looksLikeRef(s) {
1617
+ return /^[0-9a-f]{4,}(-[0-9a-f-]*)?$/i.test(s) && !s.includes(".") && !s.includes("/");
1618
+ }
1619
+
1084
1620
  // src/version.ts
1085
- var VERSION = "0.4.0";
1621
+ var VERSION = "0.5.1";
1086
1622
 
1087
1623
  // src/cli.ts
1088
1624
  var COMMANDS = {
1089
- processors: { run, blurb: "deploy loops we host and run on demand" }
1625
+ processors: { run, blurb: "deploy loops we host and run on demand" },
1626
+ sandbox: { run: run2, blurb: "use your Coding sandbox: terminal, exec, files, OpenAI-compatible key" }
1090
1627
  };
1091
- var HELP2 = `singularity ${VERSION} \u2014 build on the Singularity Cloud Network
1628
+ var HELP3 = `singularity ${VERSION} \u2014 build on the Singularity Cloud Network
1092
1629
 
1093
1630
  usage: singularity <command> [subcommand] [options]
1094
1631
 
@@ -1121,7 +1658,7 @@ async function main() {
1121
1658
  return;
1122
1659
  }
1123
1660
  if (!cmd || flags.help || cmd === "help") {
1124
- ok(HELP2);
1661
+ ok(HELP3);
1125
1662
  process.exit(cmd && cmd !== "help" ? 1 : 0);
1126
1663
  }
1127
1664
  if (cmd === "whoami") {
@@ -1142,7 +1679,7 @@ async function main() {
1142
1679
  if (!entry) {
1143
1680
  console.error(`error: unknown command "${cmd}"
1144
1681
  `);
1145
- ok(HELP2);
1682
+ ok(HELP3);
1146
1683
  process.exit(1);
1147
1684
  }
1148
1685
  await entry.run(words.slice(1), flags);
package/dist/index.js CHANGED
@@ -121,6 +121,11 @@ function parseArgs(argv) {
121
121
  const words = [];
122
122
  for (let i = 0; i < argv.length; i++) {
123
123
  const tok = argv[i];
124
+ if (tok === "--") {
125
+ flags["--"] = String(words.length);
126
+ for (const rest of argv.slice(i + 1)) words.push(rest);
127
+ break;
128
+ }
124
129
  if (tok.startsWith("--")) {
125
130
  const name = tok.slice(2);
126
131
  const next = argv[i + 1];
@@ -301,7 +306,7 @@ function coerce(raw, type) {
301
306
  }
302
307
 
303
308
  // src/version.ts
304
- var VERSION = "0.4.0";
309
+ var VERSION = "0.5.1";
305
310
  export {
306
311
  MAX_BUNDLE_BYTES,
307
312
  VERSION,
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { type Flags } from './auth.js';
9
9
  export declare function resolveBase(flags: Flags): string;
10
- export declare const HELP = "singularity processors \u2014 deploy loops we host and run\n\n init [slug] scaffold processor.json + processor.js here\n configure interactive setup: keypair, defaults\n deploy create it (prints the invoke token ONCE)\n update push new code or manifest\n run '{\"n\":10}' invoke and print the output\n run --get '{\"n\":10}' invoke over GET (for methods: [\"GET\"] processors)\n call -i invoke interactively, prompted per input field\n schema [slug] the input/output schema buyers and agents see\n list your processors\n search [query] the public catalogue\n logs [slug] recent runs and failure rate\n logs --follow stream new runs as they happen\n revenue sales and compute spend across everything you own\n earnings [slug] the same, for one processor\n env list | unset KEY which secrets are set; clear one\n secrets KEY=value ... set secret values (KEY= also clears)\n pause | resume stop or restart traffic, keeping the slug\n publish | unpublish list or unlist publicly (instant, no review)\n rotate new invoke token, the old one stops working\n delete --yes soft delete (the slug is never reusable)\n\n --keypair <path> defaults to ~/.config/solana/id.json\n --slug <slug> when not run from a processor directory\n --json machine-readable output, for scripts and agents\n --bundle bundle with esbuild: imports and npm packages\n --entry <file> bundle entry (default: the manifest's $code)\n\nGetting paid. Buyers pay YOU directly \u2014 we never hold the money and take no cut. By default that\nis USDC on Solana at your signing wallet. To be paid on more than one chain, add a \"payout\" block\nto processor.json:\n\n \"payout\": {\n \"solana\": \"<base58 wallet>\", USDC\n \"base\": \"0x\u2026\", USDC\n \"robinhood\": \"0x\u2026\" USDG on Robinhood Chain\n }\n\nOne price_usd covers all three (every asset is 6-decimal), and buyers pick a chain from the 402.\nName only the chains you want: a chain you leave out is never offered. Check each address twice \u2014\na payment cannot be reversed.";
10
+ export declare const HELP = "singularity processors \u2014 deploy loops we host and run\n\n init [slug] scaffold processor.json + processor.js here\n configure interactive setup: keypair, defaults\n deploy create it (prints the invoke token ONCE)\n update push new code or manifest\n run '{\"n\":10}' invoke and print the output\n run --get '{\"n\":10}' invoke over GET (for methods: [\"GET\"] processors)\n call -i invoke interactively, prompted per input field\n schema [slug] the input/output schema buyers and agents see\n list your processors\n search [query] the public catalogue\n logs [slug] recent runs and failure rate\n logs --follow stream new runs as they happen\n revenue sales and compute spend across everything you own\n earnings [slug] the same, for one processor\n env list | unset KEY which secrets are set; clear one\n secrets KEY=value ... set secret values (KEY= also clears)\n pause | resume stop or restart traffic, keeping the slug\n publish | unpublish list or unlist publicly (instant, no review)\n rotate new invoke token, the old one stops working\n delete --yes soft delete (the slug is never reusable)\n\n --keypair <path> defaults to ~/.config/solana/id.json\n --slug <slug> when not run from a processor directory\n --json machine-readable output, for scripts and agents\n --bundle bundle with esbuild: imports and npm packages\n --entry <file> bundle entry (default: the manifest's $code)\n\nGetting paid. Buyers pay YOU directly \u2014 we never hold the money and take no cut. By default that\nis USDC on Solana at your signing wallet. To be paid on more than one chain, add a \"payout\" block\nto processor.json:\n\n \"payout\": {\n \"solana\": \"<base58 wallet>\", USDC\n \"base\": \"0x\u2026\", USDC\n \"robinhood\": \"0x\u2026\" USDG on Robinhood Chain\n }\n\nOne price_usd covers all three (every asset is 6-decimal), and buyers pick a chain from the 402.\nBuyers pay with x402: X-Payment (v1) or, when the 402 also carries a PAYMENT-REQUIRED header,\nPAYMENT-SIGNATURE (v2). The signed payment is the same USDC transfer either way.\nName only the chains you want: a chain you leave out is never offered. Check each address twice \u2014\na payment cannot be reversed.";
11
11
  /**
12
12
  * The chains a buyer can pay on. USDC on Solana and Base, USDG on Robinhood Chain — all three are
13
13
  * 6-decimal stablecoins, so ONE `price_usd` is the price everywhere with no conversion.
@@ -0,0 +1,87 @@
1
+ /**
2
+ * `singularity sandbox`: use a Coding sandbox from your own terminal.
3
+ *
4
+ * Every command here is the SAME API the browser uses, nothing new is exposed:
5
+ * connect POST /pods/<id>/coding/terminal gives a single-use, 60-second ticket; the terminal is
6
+ * a WebSocket to /pods/screen/<ticket>, relayed by the sandbox's own outbound tunnel.
7
+ * No SSH, no open port. Text frame {cols, rows} = resize, binary = keystrokes/output.
8
+ * exec POST /pods/v1/pods/<id>/exec
9
+ * files GET/PUT /pods/v1/pods/<id>/files
10
+ * key an OpenAI-compatible key for https://compute.x402layer.cc/pods/<id>/v1
11
+ *
12
+ * Auth: a compute API key (SGL_API_KEY) or a Solana keypair, signed per request with the compute
13
+ * scheme (not the processors one: the two services verify different messages). The terminal, exec
14
+ * and files need a key with the pods:control:write permission, because each one is a shell.
15
+ */
16
+ import { type Flags, type Creds } from './auth.js';
17
+ /** The sandbox file API takes text up to this size (the request body cap is 128 KiB, JSON-escaped). */
18
+ export declare const MAX_PUT_BYTES: number;
19
+ export declare const HELP = "singularity sandbox: use your Coding sandbox from your own terminal\n\nusage: singularity sandbox <subcommand> [sandbox] [options]\n\n list your Coding sandboxes\n status [sandbox] state, harness, awake hours this month\n connect [sandbox] open the sandbox's terminal here (a full shell)\n type ~. at the start of a line to disconnect\n exec [sandbox] -- <command> run one command, print its output, exit with its code\n --timeout <seconds> 1 to 300 (default 60)\n files [sandbox] list the files in the workspace\n get [sandbox] <path> [local] print a workspace file, or save it to <local>\n put [sandbox] <local> [path] upload a text file (up to 100 KB) into the workspace\n wake [sandbox] | sleep [sandbox]\n key [sandbox] [--name <n>] create an OpenAI-compatible key for the sandbox's coding agent\n keys [sandbox] list those keys\n revoke-key [sandbox] <key-id>\n\n[sandbox] is the sandbox id, the start of it, or its name (or pass --sandbox <it>).\nLeave it out if you have only one.\n\nauth: SGL_API_KEY=x402c_... a compute API key from Settings > API keys. connect, exec, files\n and key need the Agent Pods permission \"Read and write pod\n files, install skills, create and restore backups\"\n (pods:control:write).\n --keypair <path> or sign with a Solana keypair (default ~/.config/solana/id.json)\n --compute-url <url> another API base (default https://compute.x402layer.cc)\n --json machine-readable output\n\nOpenAI-compatible address: after 'key', point any OpenAI client at the printed base URL with\nmodel \"agent-pod\". Each request is one turn of the sandbox's coding agent.";
20
+ export declare function computeBase(flags: Flags): string;
21
+ /**
22
+ * Auth headers for one compute request.
23
+ *
24
+ * A key is sent as X-API-Key. A keypair signs the compute message: prefix, version, chain, address,
25
+ * METHOD, path WITH its query string, sha256 of the exact body text, timestamp in ms, nonce. Any
26
+ * byte off gives a bare 401, so the body string signed here is the one sent.
27
+ */
28
+ export declare function computeAuthHeaders(creds: Creds, method: string, pathAndQuery: string, bodyText: string, now?: number, nonce?: string): Record<string, string>;
29
+ export declare class ApiError extends Error {
30
+ status: number;
31
+ code: string;
32
+ details: Record<string, unknown>;
33
+ constructor(status: number, message: string, code: string, details: Record<string, unknown>);
34
+ get retryAfter(): number;
35
+ }
36
+ /**
37
+ * The compute API answers errors in two shapes: `{ error: "text", code }` (dashboard routes) and
38
+ * `{ error: { code, message, details } }` (the /pods/v1 partner API). Both become one ApiError.
39
+ */
40
+ export declare function parseApiError(status: number, text: string): ApiError;
41
+ export interface Ctx {
42
+ base: string;
43
+ creds: Creds;
44
+ json: boolean;
45
+ }
46
+ export declare function call<T = any>(ctx: Ctx, method: string, path: string, body?: unknown): Promise<T>;
47
+ /** Say what to do about the common refusals instead of echoing a status code. */
48
+ export declare function explain(e: unknown): string;
49
+ export interface SandboxRow {
50
+ id: string;
51
+ name: string | null;
52
+ status: string;
53
+ model?: string | null;
54
+ ai_mode?: string;
55
+ }
56
+ export declare function listSandboxes(ctx: Ctx): Promise<SandboxRow[]>;
57
+ /** Pick one sandbox from an id, an id prefix or a name. Pure, so the ambiguity rules are tested. */
58
+ export declare function pickSandbox(rows: SandboxRow[], ref: string | undefined): {
59
+ id: string;
60
+ } | {
61
+ error: string;
62
+ };
63
+ /** A single-use terminal socket URL (60 s). Waits while the sandbox wakes. */
64
+ export declare function openTerminalUrl(ctx: Ctx, id: string): Promise<string>;
65
+ /**
66
+ * ssh-style escape: "~." at the start of a line disconnects, "~~" sends one "~". Anything else after a
67
+ * held "~" sends both. Pure and stateful per session, so it is tested without a socket.
68
+ */
69
+ export declare function makeEscapeFilter(): (chunk: Uint8Array) => {
70
+ send: Uint8Array;
71
+ disconnect: boolean;
72
+ };
73
+ export declare function closeMessage(code: number, reason: string): {
74
+ text: string;
75
+ exit: number;
76
+ };
77
+ /** Upload content must be text the file API can carry: valid UTF-8, no NUL bytes, under the cap. */
78
+ export declare function checkUpload(buf: Buffer): string | null;
79
+ export declare function run(words: string[], flags: Flags): Promise<void>;
80
+ /**
81
+ * Split an optional leading sandbox reference from a command's own arguments. `--sandbox <ref>`
82
+ * always wins. Otherwise the first word is the sandbox when there are more words than the command
83
+ * takes, or when it plainly is one (a full id, or a hex id prefix of 4+ characters that is not a
84
+ * path). With one sandbox on the account it can always be left out.
85
+ */
86
+ export declare function splitRef(args: string[], maxOwn: number, flagRef?: string): [string | undefined, string[]];
87
+ export declare function looksLikeRef(s: string): boolean;
package/dist/version.d.ts CHANGED
@@ -8,4 +8,4 @@
8
8
  *
9
9
  * Kept in sync with package.json by the release workflow, which is the only thing that bumps either.
10
10
  */
11
- export declare const VERSION = "0.4.0";
11
+ export declare const VERSION = "0.5.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singularity-layer/cli",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "Singularity developer CLI \u2014 deploy paid endpoints (Processors) on the Singularity Cloud Network",
5
5
  "type": "module",
6
6
  "bin": {