@neat.is/core 0.5.4-dev.20260721 → 0.6.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.
@@ -31,13 +31,13 @@ import {
31
31
  touchLastSeen,
32
32
  upsertObservedEdge,
33
33
  writeAtomically
34
- } from "./chunk-PEFX3DBR.js";
34
+ } from "./chunk-7C6ZULNU.js";
35
35
  import {
36
36
  assertBindAuthority,
37
37
  buildOtelReceiver,
38
38
  listenSteppingOtlp,
39
39
  readAuthEnv
40
- } from "./chunk-I4NZ7PSN.js";
40
+ } from "./chunk-BZ3AJVAC.js";
41
41
 
42
42
  // src/daemon.ts
43
43
  import {
@@ -1686,15 +1686,21 @@ var PROVIDER_DISPATCH = {
1686
1686
  resolveTarget: createCloudflareResolveTarget(config, graph)
1687
1687
  };
1688
1688
  },
1689
- // GET /user/tokens/verify — Cloudflare's own purpose-built "is this API
1690
- // token live" endpoint. 200 on a valid token, 401 on an invalid one.
1689
+ // GET /accounts/{accountId}/tokens/verify — the *account-scoped* token-verify
1690
+ // endpoint. A Workers connector token is scoped to the account, and the
1691
+ // user-level `GET /user/tokens/verify` returns 401 "Invalid API Token" for
1692
+ // such a token even though it authenticates fine against the account's own
1693
+ // resources (confirmed live). Probing the account-scoped verify endpoint —
1694
+ // `accountId` is already required for this provider — returns 200
1695
+ // `{status:"active"}` for a working token and 401 for a bad one, so a valid
1696
+ // Workers token is no longer falsely rejected at `neat connector add`.
1691
1697
  validate({ credentials, options, fetchImpl }) {
1692
1698
  const cfg = options;
1693
1699
  const baseUrl = cfg.baseUrl ?? CLOUDFLARE_API_BASE_URL;
1694
1700
  return authProbe({
1695
1701
  provider: "cloudflare",
1696
1702
  accountKey: cfg.accountId ?? "validate",
1697
- url: `${baseUrl}/user/tokens/verify`,
1703
+ url: `${baseUrl}/accounts/${cfg.accountId ?? ""}/tokens/verify`,
1698
1704
  token: String(credentials.apiToken ?? ""),
1699
1705
  ...fetchImpl ? { fetchImpl } : {}
1700
1706
  });
@@ -2759,4 +2765,4 @@ export {
2759
2765
  resolveHost,
2760
2766
  startDaemon
2761
2767
  };
2762
- //# sourceMappingURL=chunk-VR73QNJD.js.map
2768
+ //# sourceMappingURL=chunk-3YUNROLT.js.map