@agent-idle/cli 0.1.6 → 0.1.7

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.
Files changed (2) hide show
  1. package/index.js +4 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -179,14 +179,13 @@ var DEFAULT_CONVEX_URL = resolveConvexUrl();
179
179
  var AUTH_URL = process.env.AGENT_IDLE_AUTH_URL ?? BUILD_AUTH_URL ?? "http://localhost:1420";
180
180
  function cliAuthUrl(userCode2) {
181
181
  try {
182
- const url = new URL(AUTH_URL);
183
- url.searchParams.set("login", "1");
182
+ const url = new URL("/cli", AUTH_URL);
184
183
  if (userCode2) url.searchParams.set("code", userCode2);
185
184
  return url.toString();
186
185
  } catch {
187
- const join2 = AUTH_URL.includes("?") ? "&" : "?";
188
- const code = userCode2 ? `&code=${encodeURIComponent(userCode2)}` : "";
189
- return `${AUTH_URL}${join2}login=1${code}`;
186
+ const base = AUTH_URL.replace(/\/$/, "");
187
+ const code = userCode2 ? `?code=${encodeURIComponent(userCode2)}` : "";
188
+ return `${base}/cli${code}`;
190
189
  }
191
190
  }
192
191
  function ensureDir(path, mode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-idle/cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "agent-idle CLI: setup, ui, and the headless sensor daemon.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",