@abloatai/ablo 0.16.0 → 0.16.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/CHANGELOG.md +17 -2
- package/dist/cli.cjs +6 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Fix `ablo login` against the standalone auth server.** The device flow now
|
|
8
|
+
targets two origins instead of one: the RFC 8628 device endpoints
|
|
9
|
+
(`/api/auth/device/*`) go to the identity server (`auth.abloatai.com`, override
|
|
10
|
+
`ABLO_AUTH_URL`), while the human approval page (`/cli`), sign-up, and the
|
|
11
|
+
key-handoff route (`/api/cli/provision-key`) go to the dashboard host
|
|
12
|
+
(`www.abloatai.com`, new override `ABLO_DASHBOARD_URL`). Previously every step
|
|
13
|
+
ran against `www`, where the Better Auth device endpoints no longer resolve —
|
|
14
|
+
producing "Couldn't start login… Is the dashboard reachable?". The CLI now also
|
|
15
|
+
builds the approval URL itself rather than trusting the server's
|
|
16
|
+
`verification_uri`, which (being a relative `/cli`) resolved against the auth
|
|
17
|
+
server's origin to a 404.
|
|
18
|
+
|
|
3
19
|
## 0.16.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -9,7 +25,6 @@
|
|
|
9
25
|
per committer kind (`user` / `agent` / `system`) — right next to its fields, using the
|
|
10
26
|
same `overwrite | reject | notify` vocabulary as the `onStale` write guard. It is a
|
|
11
27
|
third axis, orthogonal to `policy` (read access) and `groups` (delta routing).
|
|
12
|
-
|
|
13
28
|
- **`conflict` on `model()`** — a plain, serializable disposition map. Pure data, so it
|
|
14
29
|
round-trips through the schema registry to the server; the generic engine interprets it
|
|
15
30
|
at the commit chokepoint (no per-model logic in the engine).
|
|
@@ -26,7 +41,7 @@
|
|
|
26
41
|
```ts
|
|
27
42
|
import { coordination, humansOverwrite, agentsReject } from '@abloatai/ablo/schema';
|
|
28
43
|
|
|
29
|
-
conflict: coordination(humansOverwrite(), agentsReject())
|
|
44
|
+
conflict: coordination(humansOverwrite(), agentsReject());
|
|
30
45
|
// → { user: 'overwrite', agent: 'reject' }
|
|
31
46
|
```
|
|
32
47
|
|
package/dist/cli.cjs
CHANGED
|
@@ -280541,7 +280541,9 @@ init_cjs_shims();
|
|
|
280541
280541
|
var import_child_process = require("child_process");
|
|
280542
280542
|
var import_picocolors7 = __toESM(require_picocolors(), 1);
|
|
280543
280543
|
var CLIENT_ID = "ablo-cli";
|
|
280544
|
-
var
|
|
280544
|
+
var stripSlash = (u2) => u2.replace(/\/+$/, "");
|
|
280545
|
+
var AUTH_URL = stripSlash(process.env.ABLO_AUTH_URL ?? "https://auth.abloatai.com");
|
|
280546
|
+
var DASHBOARD_URL = stripSlash(process.env.ABLO_DASHBOARD_URL ?? "https://www.abloatai.com");
|
|
280545
280547
|
var sleep = (ms) => new Promise((r2) => setTimeout(r2, ms));
|
|
280546
280548
|
function openBrowser(url) {
|
|
280547
280549
|
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
@@ -280593,7 +280595,7 @@ async function deviceLogin(argv) {
|
|
|
280593
280595
|
}
|
|
280594
280596
|
const code = await codeRes.json();
|
|
280595
280597
|
const approvePath = `/cli?user_code=${code.user_code}`;
|
|
280596
|
-
const url = account === "signup" ? `${
|
|
280598
|
+
const url = account === "signup" ? `${DASHBOARD_URL}/signup?next=${encodeURIComponent(approvePath)}` : `${DASHBOARD_URL}${approvePath}`;
|
|
280597
280599
|
Me(`${import_picocolors7.default.bold(code.user_code)}
|
|
280598
280600
|
|
|
280599
280601
|
${import_picocolors7.default.dim(url)}`, "Approve in your browser");
|
|
@@ -280646,7 +280648,7 @@ ${import_picocolors7.default.dim(url)}`, "Approve in your browser");
|
|
|
280646
280648
|
s.message(
|
|
280647
280649
|
targetProject ? `Provisioning keys for ${targetProject}\u2026` : "Provisioning a sandbox key\u2026"
|
|
280648
280650
|
);
|
|
280649
|
-
const provRes = await fetch(`${
|
|
280651
|
+
const provRes = await fetch(`${DASHBOARD_URL}/api/cli/provision-key`, {
|
|
280650
280652
|
method: "POST",
|
|
280651
280653
|
headers: { authorization: `Bearer ${accessToken}`, "content-type": "application/json" },
|
|
280652
280654
|
// Scope the minted keys to the chosen project (`--project`/active), with
|
|
@@ -280661,7 +280663,7 @@ ${import_picocolors7.default.dim(url)}`, "Approve in your browser");
|
|
|
280661
280663
|
s.stop("Could not provision a key.");
|
|
280662
280664
|
const reason = provRes ? (await provRes.json().catch(() => ({}))).error : void 0;
|
|
280663
280665
|
if (reason) M2.error(reason);
|
|
280664
|
-
else if (provRes) M2.error(`Key provisioning returned ${provRes.status} from ${
|
|
280666
|
+
else if (provRes) M2.error(`Key provisioning returned ${provRes.status} from ${DASHBOARD_URL}/api/cli/provision-key.`);
|
|
280665
280667
|
M2.error(
|
|
280666
280668
|
`The browser approval succeeded but the key handoff failed. Try again, or grab a ${import_picocolors7.default.bold("sk_test_")} key from the dashboard and set ${import_picocolors7.default.bold("ABLO_API_KEY")}.`
|
|
280667
280669
|
);
|