clawborrator-cli 0.0.44 → 0.0.45
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-bundled/claw.cjs +7 -3
- package/package.json +1 -1
package/dist-bundled/claw.cjs
CHANGED
|
@@ -64009,7 +64009,10 @@ var import_node_fs = require("node:fs");
|
|
|
64009
64009
|
var CONFIG_DIR = (0, import_node_path.resolve)((0, import_node_os.homedir)(), ".clawborrator");
|
|
64010
64010
|
var CONFIG_PATH = (0, import_node_path.resolve)(CONFIG_DIR, "config.json");
|
|
64011
64011
|
var DEFAULTS = {
|
|
64012
|
-
|
|
64012
|
+
// Default to the public hub. Local-dev users override via either
|
|
64013
|
+
// CLAWBORRATOR_HUB=http://localhost:8787 or `claw login --hub <url>`,
|
|
64014
|
+
// which persists into ~/.clawborrator/config.json.
|
|
64015
|
+
hubUrl: process.env.CLAWBORRATOR_HUB ?? "https://next.clawborrator.com",
|
|
64013
64016
|
sessionToken: null
|
|
64014
64017
|
};
|
|
64015
64018
|
function loadConfig() {
|
|
@@ -64197,9 +64200,10 @@ async function browserOAuthFlow(hubUrl) {
|
|
|
64197
64200
|
}
|
|
64198
64201
|
return res.json();
|
|
64199
64202
|
}
|
|
64200
|
-
var loginCmd = new Command("login").description("authenticate against a hub_v1 instance via GitHub OAuth (browser callback)").option("--hub <url>", "hub URL
|
|
64203
|
+
var loginCmd = new Command("login").description("authenticate against a hub_v1 instance via GitHub OAuth (browser callback)").option("--hub <url>", "hub URL (overrides config and CLAWBORRATOR_HUB; persists on success). Default: https://next.clawborrator.com").action(async (opts) => {
|
|
64201
64204
|
const cfg = loadConfig();
|
|
64202
|
-
const hubUrl = opts.hub ?? cfg.hubUrl;
|
|
64205
|
+
const hubUrl = (opts.hub ?? cfg.hubUrl).replace(/\/+$/, "");
|
|
64206
|
+
console.log(`hub: ${hubUrl}`);
|
|
64203
64207
|
try {
|
|
64204
64208
|
const { user, session } = await browserOAuthFlow(hubUrl);
|
|
64205
64209
|
saveConfig({ hubUrl, sessionToken: session.token });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawborrator-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "claw — command-line client for clawborrator hub_v1. Manages PATs, channel tokens, sessions, cross-session routing, and webhooks; ships an inline TUI for live multi-operator session attach.",
|
|
6
6
|
"license": "MIT",
|