@cabane/cli 0.1.2 → 0.1.3
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 +6 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -189,7 +189,7 @@ import { homedir as homedir2 } from "os";
|
|
|
189
189
|
// src/config.ts
|
|
190
190
|
import { mkdirSync, readFileSync as readFileSync3, writeFileSync } from "fs";
|
|
191
191
|
import { dirname } from "path";
|
|
192
|
-
var DEFAULT_DIST_BASE = "https://
|
|
192
|
+
var DEFAULT_DIST_BASE = "https://dist.cabane.ai";
|
|
193
193
|
var DEFAULT_PORT = 3e3;
|
|
194
194
|
var DEFAULT_PG_PORT = 55432;
|
|
195
195
|
function defaultConfig() {
|
|
@@ -953,7 +953,7 @@ import { pipeline } from "stream/promises";
|
|
|
953
953
|
var bearer = (token) => ({ authorization: `Bearer ${token}` });
|
|
954
954
|
async function fetchManifest(distBase, token, version) {
|
|
955
955
|
const q = version && version.length > 0 ? `?version=${encodeURIComponent(version)}` : "";
|
|
956
|
-
const res = await fetch(`${distBase.replace(/\/$/, "")}/
|
|
956
|
+
const res = await fetch(`${distBase.replace(/\/$/, "")}/manifest${q}`, {
|
|
957
957
|
headers: bearer(token)
|
|
958
958
|
});
|
|
959
959
|
if (res.status === 404) return null;
|
|
@@ -963,13 +963,13 @@ async function fetchManifest(distBase, token, version) {
|
|
|
963
963
|
);
|
|
964
964
|
}
|
|
965
965
|
if (!res.ok) {
|
|
966
|
-
throw new Error(`GET /
|
|
966
|
+
throw new Error(`GET /manifest \u2192 ${res.status}: ${(await res.text()).slice(0, 200)}`);
|
|
967
967
|
}
|
|
968
968
|
return await res.json();
|
|
969
969
|
}
|
|
970
970
|
async function downloadArtifact(distBase, token, manifest, destPath) {
|
|
971
971
|
const q = `?version=${encodeURIComponent(manifest.version)}`;
|
|
972
|
-
const res = await fetch(`${distBase.replace(/\/$/, "")}/
|
|
972
|
+
const res = await fetch(`${distBase.replace(/\/$/, "")}/artifact${q}`, {
|
|
973
973
|
headers: bearer(token),
|
|
974
974
|
// fetch follows the 302 to the presigned URL on its own; the redirect target
|
|
975
975
|
// is unauthenticated (the signature is the gate) so the bearer header is
|
|
@@ -977,7 +977,7 @@ async function downloadArtifact(distBase, token, manifest, destPath) {
|
|
|
977
977
|
redirect: "follow"
|
|
978
978
|
});
|
|
979
979
|
if (!res.ok || !res.body) {
|
|
980
|
-
throw new Error(`GET /
|
|
980
|
+
throw new Error(`GET /artifact \u2192 ${res.status}: ${(await res.text()).slice(0, 200)}`);
|
|
981
981
|
}
|
|
982
982
|
const hash = createHash("sha256");
|
|
983
983
|
const source = Readable.fromWeb(res.body);
|
|
@@ -1923,7 +1923,7 @@ var parsePort = (raw) => {
|
|
|
1923
1923
|
return n;
|
|
1924
1924
|
};
|
|
1925
1925
|
program.command("init").description("interactive first-run wizard: data location, port, and the executor credential").action(init);
|
|
1926
|
-
program.command("install").description("install the server artifact (token \u2192 gated download, or --from a local tarball)").option("--token <token>", "distribution token (cabdist_\u2026) \u2014 prompted if omitted").option("--from <tarball>", "install from a local artifact tarball instead of downloading").option("--dist-base <url>", "distribution origin to fetch from (default https://
|
|
1926
|
+
program.command("install").description("install the server artifact (token \u2192 gated download, or --from a local tarball)").option("--token <token>", "distribution token (cabdist_\u2026) \u2014 prompted if omitted").option("--from <tarball>", "install from a local artifact tarball instead of downloading").option("--dist-base <url>", "distribution origin to fetch from (default https://dist.cabane.ai)").option("--version <version>", "install a specific published version (default: latest)").option("--port <port>", "local port the server will listen on (default 3000)", parsePort).option("--force", "reinstall even if this version is already present").action(install);
|
|
1927
1927
|
program.command("up").description("start + supervise the stack (Postgres, server, house bridge)").option("--daemon", "run in the background (terminal returns; stop with `cabane down`)").option("--port <port>", "override the configured port", parsePort).action(up);
|
|
1928
1928
|
program.command("setup-agent").description("after browser signup: register the house bridge + put your agent on it").option("--token <token>", "a Cabane access token (cab_\u2026) \u2014 prompted if omitted").option("--model <model>", "model the agent runs (default anthropic/claude-opus-4-8)").action(setupAgent);
|
|
1929
1929
|
program.command("update").description("install a newer published artifact (keeps the previous for rollback)").option("--token <token>", "distribution token (cabdist_\u2026) \u2014 defaults to the stored one").option("--dist-base <url>", "distribution origin to fetch from").option("--version <version>", "install a specific version instead of latest").action(update);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabane/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The cabane CLI — install, supervise (server + embedded Postgres + house bridge), and update a self-hosted Cabane on your own machine. No docker, no repo.",
|
|
6
6
|
"license": "UNLICENSED",
|