@jaccard-ai/eve-auth 0.2.2-rc.1 → 0.2.3

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/README.md CHANGED
@@ -27,12 +27,13 @@ pnpm add @jaccard-ai/eve-auth
27
27
  eve 0.78.0 or later is a peer dependency: the tool-stub grant and the
28
28
  forwarder check need it, and eve 0.78 needs Node 24, so this package does too.
29
29
  One release serves both eve lines (`>=0.78.0 || >=1.0.0-rc.8`): the source
30
- type-checks and its tests pass against eve 0.78.0 and 1.0.0-rc.8. While eve
31
- 1.0 is a release candidate, the releases built and tested for it (0.2.2-rc.N)
32
- are on the npm `next` dist-tag (`pnpm add @jaccard-ai/eve-auth@next`), and
33
- `latest` stays on 0.2.1. `@jaccard-ai/eve-sandbox` and
34
- `@jaccard-ai/eve-metrics` each have one line per eve minor; install the ones
35
- that match the agent's eve.
30
+ type-checks and its tests pass against eve 0.78.0 and 1.0.0. 0.2.2, on
31
+ `latest`, is the first release built and tested for eve 1.0 (its
32
+ prereleases, 0.2.2-rc.N, are on `next`); an eve 0.78 agent can take it too.
33
+ An eve 1.x agent needs 0.2.3 or later for `jaccard agent connect`: earlier
34
+ releases do not grant agent info, which eve 1.x refuses members without.
35
+ `@jaccard-ai/eve-sandbox` and `@jaccard-ai/eve-metrics` each have one line
36
+ per eve minor; install the ones that match the agent's eve.
36
37
 
37
38
  From 0.2.2 every key set fetch sends `x-jaccard-client:
38
39
  @jaccard-ai/eve-auth@<version> eve@<version>` (JAC-2967), so the platform can
@@ -202,7 +203,9 @@ refuses every request this way unless its author passes the `tenant` option.
202
203
  (`principalId`, `principalType` and `authenticator` as non-empty strings,
203
204
  optional `issuer` and `subject` non-empty strings, and `attributes` of strings or lists
204
205
  of strings). eve receives it unchanged (a grant field inside it is ignored), plus `allowToolStubs: true` when the
205
- token carries `jaccard_tool_stubs`.
206
+ token carries `jaccard_tool_stubs`, and always `allowAgentInfo: true`: eve 1.x
207
+ serves `GET /eve/v1/info` only to operators otherwise, and `jaccard agent
208
+ connect` reads it first.
206
209
 
207
210
  ## Debugging a refusal
208
211
 
package/dist/client.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export declare const CLIENT_HEADER = "x-jaccard-client";
2
2
  /** Built in, not read at runtime; client.test.ts holds it equal to package.json's. */
3
- export declare const PACKAGE_VERSION = "0.2.2-rc.1";
3
+ export declare const PACKAGE_VERSION = "0.2.3";
4
4
  /** `@jaccard-ai/eve-auth@<version>`, then `eve@<version>` when eve's manifest resolves. */
5
5
  export declare function clientHeader(eveVersion: string | undefined): string;
6
6
  /** eve's version from its own manifest; undefined where a bundle left eve out. */
package/dist/client.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { createRequire } from 'node:module';
4
4
  export const CLIENT_HEADER = 'x-jaccard-client';
5
5
  /** Built in, not read at runtime; client.test.ts holds it equal to package.json's. */
6
- export const PACKAGE_VERSION = '0.2.2-rc.1';
6
+ export const PACKAGE_VERSION = '0.2.3';
7
7
  /** `@jaccard-ai/eve-auth@<version>`, then `eve@<version>` when eve's manifest resolves. */
8
8
  export function clientHeader(eveVersion) {
9
9
  const self = `@jaccard-ai/eve-auth@${PACKAGE_VERSION}`;
package/dist/oidc.js CHANGED
@@ -30,6 +30,8 @@ export function jaccardOidc(options = {}) {
30
30
  subject: outcome.subject,
31
31
  principalType: outcome.record.principalType,
32
32
  });
33
- return outcome.record;
33
+ // eve 1.x serves GET /eve/v1/info only to operators without this grant,
34
+ // and `jaccard agent connect` stops when info is refused.
35
+ return { ...outcome.record, allowAgentInfo: true };
34
36
  }, [{ scheme: 'Bearer' }]);
35
37
  }
package/dist/verify.d.ts CHANGED
@@ -8,11 +8,12 @@ import type { AuthResult } from 'eve/channels/auth';
8
8
  import type { IdentitySettings } from './config.js';
9
9
  export type VerifyFailure = 'malformed' | 'key-set-unavailable' | 'unknown-key' | 'invalid-signature' | 'wrong-issuer' | 'wrong-audience' | 'expired' | 'too-old' | 'invalid-identity';
10
10
  /**
11
- * The acceptance, with the tool-stub grant eve's channel reads at runtime. eve 1.0
12
- * types the grant on `EveAuthResult` only, which eve 0.78 lacks; this compiles on both.
11
+ * The acceptance, with the grants eve's channel reads at runtime. eve 1.0 types
12
+ * them on `EveAuthResult` only, which eve 0.78 lacks; this compiles on both.
13
13
  */
14
14
  export type IdentityResult = AuthResult & {
15
15
  readonly allowToolStubs?: boolean;
16
+ readonly allowAgentInfo?: boolean;
16
17
  };
17
18
  /** `subject` on a rejection is the token's `sub`, decoded without verification. */
18
19
  export type VerifyOutcome = {
package/dist/verify.js CHANGED
@@ -68,7 +68,7 @@ const isAttributeValue = (value) => typeof value === 'string' || (Array.isArray(
68
68
  function identityRecord(value) {
69
69
  if (!isObject(value))
70
70
  return undefined;
71
- const { allowToolStubs: _grant, attributes, ...rest } = value;
71
+ const { allowToolStubs: _stubs, allowAgentInfo: _info, attributes, ...rest } = value;
72
72
  if (!isNonEmptyText(rest.principalId))
73
73
  return undefined;
74
74
  if (!isNonEmptyText(rest.principalType))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaccard-ai/eve-auth",
3
- "version": "0.2.2-rc.1",
3
+ "version": "0.2.3",
4
4
  "description": "Route auth for eve agents on the Jaccard platform: verifies the identity token that the platform's auth service signs for each allowed request.",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "homepage": "https://www.jaccard.ai",
@@ -26,17 +26,18 @@
26
26
  "README.md"
27
27
  ],
28
28
  "dependencies": {
29
- "jose": "6.2.15"
29
+ "jose": "6.2.18"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "eve": ">=0.78.0 || >=1.0.0-rc.8"
33
33
  },
34
34
  "devDependencies": {
35
- "@types/node": "^22.13.1",
36
- "@vitest/coverage-v8": "^5.1.0",
37
- "eve": "1.0.0-rc.8",
35
+ "@types/node": "^22.20.7",
36
+ "@vitest/coverage-v8": "^5.1.2",
37
+ "ai": "^7.0.184",
38
+ "eve": "1.1.0",
38
39
  "typescript": "^7.0.2",
39
- "vitest": "^5.1.0"
40
+ "vitest": "^5.1.2"
40
41
  },
41
42
  "publishConfig": {
42
43
  "access": "public"