agental 0.25.2 → 0.26.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/dist/cli.js +23 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7411,7 +7411,7 @@ import { parseArgs } from "node:util";
|
|
|
7411
7411
|
|
|
7412
7412
|
// ../src/cli-build.ts
|
|
7413
7413
|
var PUBLISHED = true;
|
|
7414
|
-
var CLI_VERSION = true ? "0.
|
|
7414
|
+
var CLI_VERSION = true ? "0.26.0" : "dev";
|
|
7415
7415
|
var DEFAULT_API_URL = true ? "https://agental.io" : "http://127.0.0.1:8741";
|
|
7416
7416
|
var PACKAGE_NAME = "agental";
|
|
7417
7417
|
var USER_AGENT = `agental-cli/${CLI_VERSION}`;
|
|
@@ -7739,9 +7739,10 @@ var FILES_USAGE = [
|
|
|
7739
7739
|
"agental files <sandbox-id> get <path> [<local-file>]",
|
|
7740
7740
|
"agental files <sandbox-id> mkdir <folder>",
|
|
7741
7741
|
"agental files <sandbox-id> mv <from> <to>",
|
|
7742
|
-
"agental files <sandbox-id> rm <path> [--recursive]"
|
|
7742
|
+
"agental files <sandbox-id> rm <path> [--recursive]",
|
|
7743
|
+
"agental files <sandbox-id> link put|get <path> [--json]"
|
|
7743
7744
|
];
|
|
7744
|
-
var USAGE2 = `files takes a sandbox's id and one of ls, cat, put, get, mkdir, mv and
|
|
7745
|
+
var USAGE2 = `files takes a sandbox's id and one of ls, cat, put, get, mkdir, mv, rm and link:
|
|
7745
7746
|
${FILES_USAGE.join("\n ")}`;
|
|
7746
7747
|
var LIMIT = 1e7;
|
|
7747
7748
|
async function readObject2(response) {
|
|
@@ -7855,6 +7856,25 @@ ${USAGE2}`);
|
|
|
7855
7856
|
await ask2(client, "DELETE", `${base}/files?path=${encodeURIComponent(path5)}${options.recursive ? "&recursive=true" : ""}`);
|
|
7856
7857
|
return;
|
|
7857
7858
|
}
|
|
7859
|
+
case "link": {
|
|
7860
|
+
const way = need(first, "put or get, and a path");
|
|
7861
|
+
if (way !== "put" && way !== "get") {
|
|
7862
|
+
throw new Error(`files link takes put or get, not ${way}.
|
|
7863
|
+
${USAGE2}`);
|
|
7864
|
+
}
|
|
7865
|
+
const body = await ask2(client, "POST", `${base}/files/${way === "put" ? "upload" : "download"}-link`, { path: need(second, "a path in the sandbox") });
|
|
7866
|
+
if (options.json) {
|
|
7867
|
+
process.stdout.write(`${JSON.stringify(body, null, 2)}
|
|
7868
|
+
`);
|
|
7869
|
+
return;
|
|
7870
|
+
}
|
|
7871
|
+
process.stdout.write(`${String(body["url"])}
|
|
7872
|
+
`);
|
|
7873
|
+
const example = way === "put" ? `curl -fsS -T <local-file> "<url>"` : `curl -fsS -o <local-file> "<url>"`;
|
|
7874
|
+
process.stderr.write(`${way === "put" ? "Writes" : "Reads"} ${String(body["path"])}, with no key, until ${String(body["expiresAt"])}: ${example}
|
|
7875
|
+
`);
|
|
7876
|
+
return;
|
|
7877
|
+
}
|
|
7858
7878
|
default:
|
|
7859
7879
|
throw new Error(`files does not ${verb}.
|
|
7860
7880
|
${USAGE2}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agental",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "The agental command: Linux sandboxes for your agents, from the terminal. npx agental@latest signs you in and installs the agent skills.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "VERTIXER LTD",
|