@agentxm/registry-auth 0.28.7 → 0.28.9

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.
@@ -37,18 +37,13 @@ export interface LoginScopeOptions {
37
37
  readonly scopes?: ReadonlyArray<string>;
38
38
  }
39
39
  export interface MeResponse {
40
- readonly userId: string;
41
40
  readonly userHandle: Handle;
42
- readonly email: string;
43
41
  readonly tokenType: string;
44
42
  readonly scopes: ReadonlyArray<string>;
45
- readonly orgs: ReadonlyArray<{
46
- readonly id: string;
47
- readonly handle: Handle;
48
- }>;
49
- }
50
- export interface WhoamiResponse {
51
- readonly handle: Handle;
43
+ readonly resourceRestrictions: {
44
+ readonly extensions: ReadonlyArray<string> | null;
45
+ };
46
+ readonly expiresAt: DateTime.Utc | null;
52
47
  }
53
48
  export interface TokenPermissionsRequest {
54
49
  readonly owners?: ReadonlyArray<string>;
@@ -167,7 +162,6 @@ export interface AuthClientService {
167
162
  readonly refreshToken: (refreshTokenValue: string) => Effect.Effect<NormalizedTokenResponse, AuthError>;
168
163
  readonly revokeToken: (token: string) => Effect.Effect<void, AuthError>;
169
164
  readonly getMe: (accessToken: string) => Effect.Effect<MeResponse, AuthError>;
170
- readonly getWhoami: (accessToken: string) => Effect.Effect<WhoamiResponse, AuthError>;
171
165
  readonly createToken: (accessToken: string, params: CreateTokenParams, options?: CreateTokenOptions) => Effect.Effect<CreatedTokenResponse, AuthError>;
172
166
  readonly listTokens: (accessToken: string, params?: {
173
167
  readonly limit?: number;
@@ -436,21 +436,11 @@ export const AuthClientLive = Layer.effect(AuthClient, Effect.gen(function* () {
436
436
  .AuthGetMe(undefined)
437
437
  .pipe(Effect.mapError((error) => mapRegistryAuthError(registryUrl, "Could not read authenticated user", error)));
438
438
  return {
439
- userId: decoded.user.id,
440
439
  userHandle: normalizeHandle(decoded.user.handle),
441
- email: decoded.user.email ?? "",
442
440
  tokenType: decoded.token.type,
443
441
  scopes: decoded.token.scopes,
444
- orgs: [],
445
- };
446
- });
447
- const getWhoami = Effect.fn("AuthClient.getWhoami")(function* (accessToken) {
448
- const authedClient = makeGeneratedAuthClient(httpClient, registryUrl, accessToken);
449
- const decoded = yield* authedClient
450
- .AuthGetWhoami(undefined)
451
- .pipe(Effect.mapError((error) => mapRegistryAuthError(registryUrl, "Could not read authenticated identity", error)));
452
- return {
453
- handle: normalizeHandle(decoded.handle),
442
+ resourceRestrictions: decoded.token.resource_restrictions,
443
+ expiresAt: decoded.token.expires_at,
454
444
  };
455
445
  });
456
446
  const createToken = Effect.fn("AuthClient.createToken")(function* (accessToken, params, options) {
@@ -574,7 +564,6 @@ export const AuthClientLive = Layer.effect(AuthClient, Effect.gen(function* () {
574
564
  refreshToken,
575
565
  revokeToken,
576
566
  getMe,
577
- getWhoami,
578
567
  createToken,
579
568
  listTokens,
580
569
  waitForStepUpRequest,
@@ -616,10 +605,6 @@ export const AuthClientTest = (overrides) => Layer.succeed(AuthClient, {
616
605
  category: "auth",
617
606
  detail: "Not implemented in test",
618
607
  })),
619
- getWhoami: () => Effect.fail(new RegistryAuthFailed({
620
- category: "auth",
621
- detail: "Not implemented in test",
622
- })),
623
608
  createToken: () => Effect.fail(new RegistryAuthFailed({
624
609
  category: "auth",
625
610
  detail: "Not implemented in test",
package/package.json CHANGED
@@ -1,65 +1,65 @@
1
1
  {
2
- "name": "@agentxm/registry-auth",
3
- "version": "0.28.7",
4
- "description": "AXM registry-auth feature: login, logout, token, identity inspection, device and loopback flows, and credential lifecycle for the axm CLI. Unstable and unsupported — use the axm.sh CLI.",
5
- "type": "module",
6
- "license": "FSL-1.1-MIT",
7
- "homepage": "https://axm.sh",
2
+ "author": "AgentXM <hello@agentxm.ai> (https://agentxm.ai)",
8
3
  "bugs": {
9
4
  "url": "https://github.com/agentxm/axm/issues"
10
5
  },
11
- "author": "AgentXM <hello@agentxm.ai> (https://agentxm.ai)",
12
- "repository": {
13
- "type": "git",
14
- "url": "https://github.com/agentxm/axm.git",
15
- "directory": "packages/registry-auth"
6
+ "dependencies": {
7
+ "@agentxm/extension-model": "^0.28.9",
8
+ "@agentxm/registry-client": "^0.28.9",
9
+ "@agentxm/registry-protocol": "^0.28.9",
10
+ "@napi-rs/keyring": "^1.3.0",
11
+ "effect": "4.0.0-rc.112",
12
+ "proper-lockfile": "^4.1.2"
13
+ },
14
+ "description": "AXM registry-auth feature: login, logout, token, identity inspection, device and loopback flows, and credential lifecycle for the axm CLI. Unstable and unsupported — use the axm.sh CLI.",
15
+ "devDependencies": {
16
+ "@effect/platform-node": "4.0.0-rc.112",
17
+ "@effect/vitest": "4.0.0-rc.112",
18
+ "@types/bun": "^1.3.14",
19
+ "@types/proper-lockfile": "^4.1.4",
20
+ "@typescript/native": "npm:typescript@^7.0.2",
21
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
22
+ "vitest": "^4.1.10"
23
+ },
24
+ "engines": {
25
+ "node": ">=22.19.0"
16
26
  },
17
- "sideEffects": false,
18
27
  "exports": {
19
28
  ".": {
20
- "types": "./dist/src/index.d.ts",
21
29
  "axm-source": "./src/index.ts",
22
- "default": "./dist/src/index.js"
30
+ "default": "./dist/src/index.js",
31
+ "types": "./dist/src/index.d.ts"
23
32
  },
24
33
  "./live": {
25
- "types": "./dist/src/live.d.ts",
26
34
  "axm-source": "./src/live.ts",
27
- "default": "./dist/src/live.js"
35
+ "default": "./dist/src/live.js",
36
+ "types": "./dist/src/live.d.ts"
28
37
  },
29
38
  "./testing": {
30
- "types": "./dist/src/testing.d.ts",
31
39
  "axm-source": "./src/testing.ts",
32
- "default": "./dist/src/testing.js"
40
+ "default": "./dist/src/testing.js",
41
+ "types": "./dist/src/testing.d.ts"
33
42
  }
34
43
  },
35
44
  "files": [
36
45
  "dist/src/",
37
46
  "!**/*.map"
38
47
  ],
39
- "publishConfig": {
40
- "access": "public"
41
- },
42
- "engines": {
43
- "node": ">=22.19.0"
44
- },
48
+ "homepage": "https://axm.sh",
49
+ "license": "FSL-1.1-MIT",
50
+ "name": "@agentxm/registry-auth",
45
51
  "nx": {
46
52
  "includedScripts": []
47
53
  },
48
- "dependencies": {
49
- "@napi-rs/keyring": "^1.3.0",
50
- "effect": "4.0.0-rc.112",
51
- "proper-lockfile": "^4.1.2",
52
- "@agentxm/registry-protocol": "^0.28.7",
53
- "@agentxm/extension-model": "^0.28.7",
54
- "@agentxm/registry-client": "^0.28.7"
54
+ "publishConfig": {
55
+ "access": "public"
55
56
  },
56
- "devDependencies": {
57
- "@effect/platform-node": "4.0.0-rc.112",
58
- "@effect/vitest": "4.0.0-rc.112",
59
- "@types/bun": "^1.3.14",
60
- "@types/proper-lockfile": "^4.1.4",
61
- "@typescript/native": "npm:typescript@^7.0.2",
62
- "typescript": "npm:@typescript/typescript6@^6.0.2",
63
- "vitest": "^4.1.10"
64
- }
65
- }
57
+ "repository": {
58
+ "directory": "packages/registry-auth",
59
+ "type": "git",
60
+ "url": "https://github.com/agentxm/axm.git"
61
+ },
62
+ "sideEffects": false,
63
+ "type": "module",
64
+ "version": "0.28.9"
65
+ }