@vess-id/ai-identity 0.5.0-alpha.13 → 0.5.0-alpha.15

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
@@ -71,7 +71,6 @@ client.user // UserIdentityManager — user DID management
71
71
  client.vc // VCManager — VC issuance (SD-JWT)
72
72
  client.vp // VPManager — VP creation and verification
73
73
  client.tool // ToolManager — tool invocation with VP authorization
74
- client.memory // MemoryManager — vector-backed memory storage
75
74
  client.grant // GrantManager — grant suggestion and confirmation
76
75
  ```
77
76
 
@@ -138,21 +137,6 @@ const result = await client.invokeTool<SlackResponse>(
138
137
  )
139
138
  ```
140
139
 
141
- ### Memory
142
-
143
- Vector-backed memory with VC authorization:
144
-
145
- ```typescript
146
- await client.writeMemory('Meeting notes: ...', 'project-alpha', [vc], {
147
- type: 'meeting-notes',
148
- })
149
-
150
- const results = await client.queryMemory('latest meeting decisions', [vc], {
151
- namespace: 'project-alpha',
152
- limit: 10,
153
- })
154
- ```
155
-
156
140
  ## Action Registry
157
141
 
158
142
  All supported actions are defined in `ACTION_REGISTRY` using `provider.resource.operation` format:
package/dist/client.d.ts CHANGED
@@ -4,7 +4,6 @@ import { UserIdentityManager } from './identity/user-identity-manager';
4
4
  import { VCManager } from './vc/vc-manager';
5
5
  import { VPManager } from './vp/vp-manager';
6
6
  import { ToolManager } from './tool/tool-manager';
7
- import { MemoryManager } from './memory/memory-manager';
8
7
  import { GrantManager } from './grant/grant-manager';
9
8
  import { Agent, ConnectorResponse } from './types';
10
9
  export declare class AIdentityClient {
@@ -13,7 +12,6 @@ export declare class AIdentityClient {
13
12
  readonly vc: VCManager;
14
13
  readonly vp: VPManager;
15
14
  readonly tool: ToolManager;
16
- readonly memory: MemoryManager;
17
15
  readonly grant: GrantManager;
18
16
  private keyManager;
19
17
  private currentAgent?;
@@ -59,18 +57,6 @@ export declare class AIdentityClient {
59
57
  * Invoke a tool with automatic VP creation
60
58
  */
61
59
  invokeTool<T = any>(tool: string, action: string, params: Record<string, any>, vcs: string[]): Promise<ConnectorResponse<T>>;
62
- /**
63
- * Write to memory with automatic VP creation
64
- */
65
- writeMemory(content: string, namespace: string, vcs: string[], metadata?: Record<string, any>): Promise<import("./memory/memory-manager").MemoryDocument>;
66
- /**
67
- * Query memory with automatic VP creation
68
- */
69
- queryMemory(query: string, vcs: string[], options?: {
70
- namespace?: string;
71
- limit?: number;
72
- filter?: Record<string, any>;
73
- }): Promise<import("./memory/memory-manager").MemoryQueryResult>;
74
60
  }
75
61
  export declare function getClient(config?: AIdentityConfig, password?: string): AIdentityClient;
76
62
  export { configure, AIdentityConfig } from './config';
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAa,MAAM,UAAU,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAElD,qBAAa,eAAe;IAC1B,SAAgB,KAAK,EAAE,YAAY,CAAA;IACnC,SAAgB,IAAI,EAAE,mBAAmB,CAAA;IACzC,SAAgB,EAAE,EAAE,SAAS,CAAA;IAC7B,SAAgB,EAAE,EAAE,SAAS,CAAA;IAC7B,SAAgB,IAAI,EAAE,WAAW,CAAA;IACjC,SAAgB,MAAM,EAAE,aAAa,CAAA;IACrC,SAAgB,KAAK,EAAE,YA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M,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,GAAG,EAAE,MAAM,EAAE,GACZ,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;CAYjC;AAKD,wBAAgB,SAAS,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,eAAe,CAKtF;AAED,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA"}
package/dist/index.d.mts CHANGED
@@ -4,6 +4,31 @@ import Ajv from 'ajv';
4
4
  import { SDJwtVcInstance } from '@sd-jwt/sd-jwt-vc';
5
5
  import { DisclosureFrame } from '@sd-jwt/types';
6
6
 
7
+ interface AIdentityConfig {
8
+ didApi?: {
9
+ baseUrl: string;
10
+ apiKey?: string;
11
+ bearerToken?: string;
12
+ };
13
+ issuerApi?: {
14
+ baseUrl: string;
15
+ apiKey?: string;
16
+ bearerToken?: string;
17
+ };
18
+ verifierApi?: {
19
+ baseUrl: string;
20
+ apiKey?: string;
21
+ bearerToken?: string;
22
+ };
23
+ proxyApi?: {
24
+ baseUrl: string;
25
+ };
26
+ storage?: {
27
+ keyStorePath?: string;
28
+ };
29
+ }
30
+ declare function configure(config: AIdentityConfig): void;
31
+
7
32
  interface DIDDocument {
8
33
  '@context': string | string[];
9
34
  id: string;
@@ -2803,145 +2828,6 @@ declare class KeyManager {
2803
2828
  private decrypt;
2804
2829
  }
2805
2830
 
2806
- declare class VPManager {
2807
- private keyManager;
2808
- constructor(keyManager?: KeyManager);
2809
- /**
2810
- * Create a SD-JWT presentation using the present() method
2811
- * This properly binds the holder's key to the SD-JWT VC
2812
- */
2813
- create(vcs: string[], // Array of SD-JWT VC strings
2814
- options: {
2815
- holderDid: string;
2816
- challenge: string;
2817
- domain: string;
2818
- purpose?: string;
2819
- }): Promise<string>;
2820
- /**
2821
- * Verify a Verifiable Presentation
2822
- */
2823
- verify(vpJwt: string, options: {
2824
- expectedChallenge: string;
2825
- expectedDomain: string;
2826
- expectedHolder?: string;
2827
- }): Promise<VerifiablePresentation>;
2828
- /**
2829
- * Create a VP request
2830
- */
2831
- createRequest(domain: string, query?: {
2832
- type?: string;
2833
- credentialQuery?: any;
2834
- }): VPRequest;
2835
- /**
2836
- * Submit VP to a verifier
2837
- */
2838
- submit(vpJwt: string, verifierEndpoint: string): Promise<{
2839
- verified: boolean;
2840
- result?: any;
2841
- }>;
2842
- }
2843
-
2844
- /**
2845
- * NOTE: MemoryManager is currently DORMANT (as of 2026-03-29).
2846
- * The API memory endpoints exist but are not actively called in production.
2847
- * The server-side implementation (InMemoryProvider) is volatile and not shared across instances.
2848
- * Do not rely on this in production until a persistent backend is introduced.
2849
- */
2850
- interface MemoryDocument {
2851
- id: string;
2852
- namespace: string;
2853
- content: string;
2854
- metadata?: Record<string, any>;
2855
- embedding?: number[];
2856
- createdAt: string;
2857
- updatedAt: string;
2858
- }
2859
- interface MemoryQuery {
2860
- query: string;
2861
- namespace?: string;
2862
- limit?: number;
2863
- filter?: Record<string, any>;
2864
- includeEmbedding?: boolean;
2865
- }
2866
- interface MemoryQueryResult {
2867
- documents: MemoryDocument[];
2868
- scores?: number[];
2869
- total: number;
2870
- }
2871
- declare class MemoryManager {
2872
- private vpManager;
2873
- private proxyApiUrl;
2874
- constructor(vpManager?: VPManager);
2875
- /**
2876
- * Write a document to memory
2877
- */
2878
- write(content: string, options: {
2879
- namespace: string;
2880
- metadata?: Record<string, any>;
2881
- vcs: string[];
2882
- holderDid: string;
2883
- }): Promise<MemoryDocument>;
2884
- /**
2885
- * Query memory with vector search
2886
- */
2887
- query(query: string, options: {
2888
- namespace?: string;
2889
- limit?: number;
2890
- filter?: Record<string, any>;
2891
- vcs: string[];
2892
- holderDid: string;
2893
- }): Promise<MemoryQueryResult>;
2894
- /**
2895
- * Delete a document from memory
2896
- */
2897
- delete(documentId: string, options: {
2898
- namespace: string;
2899
- vcs: string[];
2900
- holderDid: string;
2901
- }): Promise<void>;
2902
- /**
2903
- * List documents in a namespace
2904
- */
2905
- list(options: {
2906
- namespace: string;
2907
- limit?: number;
2908
- offset?: number;
2909
- vcs: string[];
2910
- holderDid: string;
2911
- }): Promise<MemoryQueryResult>;
2912
- /**
2913
- * Check if VCs authorize memory access
2914
- */
2915
- checkAuthorization(vcs: string[], action: 'read' | 'write' | 'delete', resource: string): Promise<boolean>;
2916
- private matchResource;
2917
- private generateChallenge;
2918
- }
2919
-
2920
- interface AIdentityConfig {
2921
- didApi?: {
2922
- baseUrl: string;
2923
- apiKey?: string;
2924
- bearerToken?: string;
2925
- };
2926
- issuerApi?: {
2927
- baseUrl: string;
2928
- apiKey?: string;
2929
- bearerToken?: string;
2930
- };
2931
- verifierApi?: {
2932
- baseUrl: string;
2933
- apiKey?: string;
2934
- bearerToken?: string;
2935
- };
2936
- proxyApi?: {
2937
- baseUrl: string;
2938
- };
2939
- storage?: {
2940
- keyStorePath?: string;
2941
- };
2942
- }
2943
- declare function configure(config: AIdentityConfig): void;
2944
-
2945
2831
  declare class AgentManager {
2946
2832
  private keyManager;
2947
2833
  private agentDIDManager;
@@ -3110,6 +2996,44 @@ declare class VCManager {
3110
2996
  private calculateExpirationDate;
3111
2997
  }
3112
2998
 
2999
+ declare class VPManager {
3000
+ private keyManager;
3001
+ constructor(keyManager?: KeyManager);
3002
+ /**
3003
+ * Create a SD-JWT presentation using the present() method
3004
+ * This properly binds the holder's key to the SD-JWT VC
3005
+ */
3006
+ create(vcs: string[], // Array of SD-JWT VC strings
3007
+ options: {
3008
+ holderDid: string;
3009
+ challenge: string;
3010
+ domain: string;
3011
+ purpose?: string;
3012
+ }): Promise<string>;
3013
+ /**
3014
+ * Verify a Verifiable Presentation
3015
+ */
3016
+ verify(vpJwt: string, options: {
3017
+ expectedChallenge: string;
3018
+ expectedDomain: string;
3019
+ expectedHolder?: string;
3020
+ }): Promise<VerifiablePresentation>;
3021
+ /**
3022
+ * Create a VP request
3023
+ */
3024
+ createRequest(domain: string, query?: {
3025
+ type?: string;
3026
+ credentialQuery?: any;
3027
+ }): VPRequest;
3028
+ /**
3029
+ * Submit VP to a verifier
3030
+ */
3031
+ submit(vpJwt: string, verifierEndpoint: string): Promise<{
3032
+ verified: boolean;
3033
+ result?: any;
3034
+ }>;
3035
+ }
3036
+
3113
3037
  interface ToolDefinition {
3114
3038
  name: string;
3115
3039
  description: string;
@@ -3296,7 +3220,6 @@ declare class AIdentityClient {
3296
3220
  readonly vc: VCManager;
3297
3221
  readonly vp: VPManager;
3298
3222
  readonly tool: ToolManager;
3299
- readonly memory: MemoryManager;
3300
3223
  readonly grant: GrantManager;
3301
3224
  private keyManager;
3302
3225
  private currentAgent?;
@@ -3342,18 +3265,6 @@ declare class AIdentityClient {
3342
3265
  * Invoke a tool with automatic VP creation
3343
3266
  */
3344
3267
  invokeTool<T = any>(tool: string, action: string, params: Record<string, any>, vcs: string[]): Promise<ConnectorResponse<T>>;
3345
- /**
3346
- * Write to memory with automatic VP creation
3347
- */
3348
- writeMemory(content: string, namespace: string, vcs: string[], metadata?: Record<string, any>): Promise<MemoryDocument>;
3349
- /**
3350
- * Query memory with automatic VP creation
3351
- */
3352
- queryMemory(query: string, vcs: string[], options?: {
3353
- namespace?: string;
3354
- limit?: number;
3355
- filter?: Record<string, any>;
3356
- }): Promise<MemoryQueryResult>;
3357
3268
  }
3358
3269
  declare function getClient(config?: AIdentityConfig, password?: string): AIdentityClient;
3359
3270
 
@@ -8605,6 +8516,162 @@ declare function resolveUserTier(tier: string | undefined | null): UserTier;
8605
8516
  */
8606
8517
  declare function getTierLimits(tier: string | undefined | null): TierLimits;
8607
8518
 
8519
+ /**
8520
+ * P1-A14a-1 / Threat Model S4 — canonical-string + signature-header
8521
+ * helpers for HMAC body signing of internal HTTP requests.
8522
+ *
8523
+ * Pure module: no NestJS, no I/O, no side effects. SDK is the
8524
+ * single source of truth (P1-A14a-2d) — api / remote-mcp /
8525
+ * slack-bot all import from `@vess-id/ai-identity`.
8526
+ *
8527
+ * Header format (Q1 = A, Stripe-style versioned):
8528
+ * X-Internal-Signature: v1=<keyId>:<unixSeconds>:<base64(hmac)>
8529
+ *
8530
+ * Canonical string (Q2 = A, no header inclusion):
8531
+ * ${METHOD.toUpperCase()}\n${path}\n${unixSeconds}\n${sha256Hex(rawBody)}
8532
+ *
8533
+ * Replay window (Q3 = A): 300 seconds — enforced by the api guard,
8534
+ * not here. This module is responsible for *constructing* the
8535
+ * canonical string and *parsing* the header; freshness is policy.
8536
+ */
8537
+ declare const SIGNATURE_HEADER = "x-internal-signature";
8538
+ declare const SIGNATURE_VERSION_PREFIX = "v1=";
8539
+ /**
8540
+ * SHA-256 hex digest of an arbitrary buffer or string. Hex (not
8541
+ * base64) so the canonical string is URL-safe and grep-friendly in
8542
+ * logs if a future debug session ever needs to reconstruct it
8543
+ * server-side.
8544
+ */
8545
+ declare function sha256Hex(input: Buffer | string): string;
8546
+ /**
8547
+ * Build the canonical string that gets HMAC'd. The components are
8548
+ * separated by `\n` because no legitimate input contains `\n` (the
8549
+ * method is uppercase ASCII, the path is URL-encoded by the caller,
8550
+ * the timestamp is digits, the body hash is hex). Using `\n` as
8551
+ * separator avoids ambiguity that delimiters like `:` would
8552
+ * introduce when the path contains a colon.
8553
+ *
8554
+ * Whitespace is NOT trimmed — input must be exactly what will land
8555
+ * on the wire. Caller controls case and encoding.
8556
+ */
8557
+ declare function buildCanonicalString(args: {
8558
+ method: string;
8559
+ path: string;
8560
+ unixSeconds: number;
8561
+ rawBody: Buffer | string;
8562
+ }): string;
8563
+ /** Shape of a parsed `X-Internal-Signature` header. */
8564
+ interface ParsedSignature {
8565
+ /** Identifier of the signing key (e.g. `'mcp-v2'`). */
8566
+ keyId: string;
8567
+ /** Unix epoch seconds at signing time. */
8568
+ unixSeconds: number;
8569
+ /** Base64-encoded HMAC-SHA256 digest. */
8570
+ signature: string;
8571
+ }
8572
+ /**
8573
+ * Parse a `X-Internal-Signature` header value. Returns `null` for
8574
+ * any malformed shape rather than throwing — the api guard converts
8575
+ * `null` to a `401 Unauthorized` so a malformed header never
8576
+ * triggers a `500`.
8577
+ *
8578
+ * Accepted: `v1=<keyId>:<digits>:<base64>`
8579
+ *
8580
+ * Defensive checks:
8581
+ * - Must start with `v1=` (Q1: explicit version prefix)
8582
+ * - keyId / signature must be non-empty after split
8583
+ * - timestamp must parse to a finite, non-negative integer
8584
+ * - keyId must be ASCII identifier-safe ([A-Za-z0-9_-]+) so a
8585
+ * malicious header cannot smuggle control chars or whitespace
8586
+ * into log lines / metric labels
8587
+ * - signature must be valid base64 (only base64 alphabet chars)
8588
+ */
8589
+ declare function parseSignatureHeader(headerValue: string | undefined): ParsedSignature | null;
8590
+ /**
8591
+ * Format a ParsedSignature back into a header string. Round-trips
8592
+ * with `parseSignatureHeader` for any validly-shaped input.
8593
+ *
8594
+ * Used by the signing side (HTTP client). Keeping it next to the
8595
+ * parser pins the format in one place.
8596
+ */
8597
+ declare function formatSignatureHeader(parsed: ParsedSignature): string;
8598
+
8599
+ /**
8600
+ * P1-A14a-2d — pure HMAC signer for outbound /api/internal/**
8601
+ * requests. Lives in SDK so remote-mcp and slack-bot (both of which
8602
+ * already depend on `@vess-id/ai-identity`) can attach
8603
+ * `X-Internal-Signature` to every request without dragging the
8604
+ * api package into their dependency graph.
8605
+ *
8606
+ * Pure (no I/O, no Nest). Mirrors the `utils/crypto.ts` profile:
8607
+ * the only Node-builtin used is `crypto.createHmac`.
8608
+ *
8609
+ * Pairing with the verifier
8610
+ * -------------------------
8611
+ * The verifier (api side, `HmacKeyset.verify` →
8612
+ * `buildCanonicalString` → constant-time compare) reads the same
8613
+ * `buildCanonicalString` from this module by construction. As long
8614
+ * as both sides pass the same `(method, path, unixSeconds, rawBody)`
8615
+ * the HMACs match by definition.
8616
+ *
8617
+ * Body bytes
8618
+ * ----------
8619
+ * The caller MUST pass the exact bytes that go on the wire as
8620
+ * `rawBody`. Re-running `JSON.stringify(...)` on each side would
8621
+ * risk a byte mismatch (object key order is implementation-defined
8622
+ * in spec, even though V8 preserves insertion order in practice).
8623
+ * The api-client `makeRequest` helper computes `JSON.stringify`
8624
+ * once, hands the same string to both `signRequest` and `fetch`.
8625
+ */
8626
+ /**
8627
+ * Minimum signer key length in raw bytes. 32 bytes = 256 bits
8628
+ * matches HMAC-SHA256's natural block size and the verifier's
8629
+ * `MIN_KEY_BYTES`. A truncated env var (accidental newline,
8630
+ * copy-paste error) is the realistic failure mode this guards
8631
+ * against.
8632
+ */
8633
+ declare const MIN_SIGNER_KEY_BYTES = 32;
8634
+ interface InternalHmacSignerKey {
8635
+ /** Stable identifier for the key, e.g. `'mcp-v1'`. Embedded in
8636
+ * the X-Internal-Signature header so the verifier can pick the
8637
+ * right key. Must match `/^[A-Za-z0-9_-]+$/`. */
8638
+ keyId: string;
8639
+ /** Raw HMAC secret. >= MIN_SIGNER_KEY_BYTES bytes. */
8640
+ secret: Buffer;
8641
+ }
8642
+ interface SignRequestArgs {
8643
+ /** HTTP method. Will be upper-cased by `buildCanonicalString`,
8644
+ * but callers should pass the uppercase form they use on the
8645
+ * wire so signer and `fetch()` stay in lockstep. */
8646
+ method: string;
8647
+ /** URL path with query string already stripped (verifier does
8648
+ * `request.originalUrl?.split('?')[0]`; signer must mirror).
8649
+ * Path encoding (e.g. `%2F` vs `/`) is caller's responsibility
8650
+ * — the canonical string treats them as different bytes. */
8651
+ path: string;
8652
+ /** Wire bytes. The same string/buffer passed to `fetch({body})`
8653
+ * must be passed here — `JSON.stringify` runs ONCE per request
8654
+ * in the caller. */
8655
+ rawBody: Buffer | string;
8656
+ /** Optional fixed timestamp for testing. Defaults to
8657
+ * `Math.floor(Date.now() / 1000)`. */
8658
+ unixSeconds?: number;
8659
+ }
8660
+ /**
8661
+ * Sign an outbound request and return a fully-formatted
8662
+ * `X-Internal-Signature` header value. The caller sets the header
8663
+ * on the outbound request directly:
8664
+ *
8665
+ * ```ts
8666
+ * headers[SIGNATURE_HEADER] = signRequest(key, { method, path, rawBody })
8667
+ * ```
8668
+ *
8669
+ * Throws if key material is invalid (bad keyId or short secret) —
8670
+ * surfacing misconfiguration loudly at request time rather than
8671
+ * silently producing a header the verifier will reject.
8672
+ */
8673
+ declare function signRequest(key: InternalHmacSignerKey, args: SignRequestArgs): string;
8674
+
8608
8675
  declare const version = "0.0.1";
8609
8676
 
8610
- export { type ABACPolicyEngine, ACTION_PARAMS_MAX_SIZE, ACTION_PREFIXES, ACTION_REGISTRY, AIdentityClient, type AIdentityConfig, AIdentityError, type APIAgent, type APICredential, APIVCManager, type AbacDecision, type AbacInput, type AcceptInvitationRequest, type AckEventResponse, type ActionInputSchema, type ActionMapping, type ActionMeta, type ActionParamDisplay, type ActionRegistry, type ActionRiskLevel, type Agent, type AgentCreateOptions, type AgentDIDConfig, AgentDIDManager, AgentManager, AgentStatus, AgentType, type AgentWithId, AllowAllAbac, type AnyProvider, type ApiKeyValidationResult, type AuditEvent, type AuditQuery, AuthProvider, type AuthState, AuthenticationError, type AutoApproveConfig, type BindingSource, CANONICAL_PROVIDERS, type CanonicalProvider, type CapabilityMeta, type CheckGrantPermissionRequest, type CheckGrantPermissionResult, type CheckPermissionInput, type CheckPermissionResult, type CollectContextRequest, type ConfirmGrantSuggestionRequest, type ConnectorAction, type ConnectorConfig, type ConnectorExecutionContext, type ConnectorResponse, type ConnectorResponseMetadata, type ConnectorTokenConfig, type ConstraintEvaluationResult, ConstraintEvaluator, type ConstraintEvaluatorOptions, type ConstraintViolation, type ConstraintWarning, type ContextBindingSource, type ContextProvider, type CreateGrantRequest, type CreateInvitationRequest, type CreateReceiptRequest, type CredentialRef, CredentialStatus, type CredentialStore, CredentialType, DEFAULT_CONSTRAINTS_BY_RISK, type DIDDocument, type DataAccessVC, type DecisionTrace, type DelegationVC, DeviceEnrollManager, type DeviceEnrollPollResult, type DeviceEnrollServerSideParams, type DeviceEnrollStartParams, type DeviceEnrollStartResult, type DisclosureFields, DummyCreds, DummyVpVerifier, type EmployeeVPRequest, type EvaluationContext, type ExternalActionRequest, FilesystemKeyStorage, GATEWAY_ERROR_CODE, GatewayClient, GatewayError, type GatewayErrorCode, type GatewayEvent, type GetEventsOptions, type GetEventsResponse, type GitHubConfig, type GoogleConfig, type Grant, type GrantConstraints, type GrantResource, GrantResourceType, GrantScope, GrantStatus, type GrantUsage, type IConnectorService, type IStateStore, type Intent, type IntentEvaluationResult, type IntentObligation, type IntentResource, InvalidVPError, type Invitation, type InvitationRole, InvitationStatus, type IssueSDJWTVCRequest, type IssueSDJWTVCResult, type JiraBoard, type JiraConfig, type JiraIssue, type JiraIssueType, type JiraProject, type JiraSprint, type JiraStatus, type JiraUser, type JiraWorklog, type JsonSchema, JsonStateStore, KeyManager, type KeyPairGenerationResult, type KeyStorageConfig, type KeyStorageProvider, LEGACY_RESOURCE_TYPE_MAP, type MemoryDocument, MemoryKeyStorage, MemoryManager, type MemoryQuery, type MemoryQueryResult, NetworkError, type NormalizeIntentRequest, type NormalizedIntent, type OAuthAuthorizeRequest, type OAuthCallbackParams, type OAuthConnection, OAuthProvider, type OAuthToken, type OrganizationConfig, type OrganizationPermission, type OrganizationPolicy, type OrganizationVC, PROVIDER_ALIASES, type ParamBindingSource, type ParsedResourceType, type PermissionConstraints, type PermissionMode, type PermissionResource, type PermissionRule, type PermissionTimeConstraint, type PermissionVcClaims, type PlanDelegationInput, type PlanDelegationResult, type PolicyCondition, type PolicyEvaluationResult, type PolicyInput, type PolicyRule, type PolicyTarget, type Provider, REAUTH_REQUIRED_ACTION, RESOURCE_TYPES, type ReBACChecker, type Receipt, type ReceiptListResult, type ReceiptOutcome, type ReceiptSearchQuery, ReceiptStatus, type Relation, type ResolvedTargets, type ResourceIdBinding, type ResourceRef, type ResourceScope, type ResourceType, type RiskAssessmentResult, type RiskFactor, type RiskLevel, SDJwtClient, ScopeUnmatchedError, type SecondaryBinding, SimpleRebac, type SlackConfig, StandardActionCategory, type SuggestGrantRequest, type SuggestedAction, type SuggestedConstraints, type SuggestedGrant, type SuggestedResource, type SuggestionRiskLevel, TIER_LIMITS, type TargetBindings, type TargetConstraint, TargetResolver, type TierLimits, type TimeWindowCheckResult, type TimeWindowConstraint, type ToolDefinition, type ToolInvocation, ToolManager, type ToolPermissionRequest, type ToolPermissionVC, type UnifiedResourceType, type UpdateGrantRequest, type UserIdentity, type UserIdentityConfig, type UserIdentityCreateOptions, UserIdentityManager, UserKeyPairManager, type UserTier, VALID_MCP_ACTIONS, VALID_MCP_TOOLS, VCExpiredError, VCManager, VCRevokedError, VCStatus, type VCTemplate, VCType, VPManager, type VPRequest, type VerifiablePresentation, type VerificationMethod, type VerifiedVcClaims, type VerifyInvitationResponse, type VerifyReceiptRequest, type VerifyReceiptResult, type VerifySDJWTVCResult, type VpVerifier, WRITE_ACTION_NAMES, type WeeklyReportData, type WeeklyReportSummary, buildGrantIdFields, canonicalizeAction, checkPermissionWithVP, configure, createAjv, createDidJwk, credentialStatusToVCStatus, defaultConstraintEvaluator, evaluateConstraints, extractProjectKey, extractPublicKey, extractPublicKeyFromDid, generateActionParamsDisplay, generateActionSummary, generateKeyPair, generateNonce, getActionAliases, getAllActionForms, getAllValidMcpActionNames, getClient, getDefaultDisclosureFields, getKeyIdFromDid, getRequiredRelations, getRequiredScopes, getTierLimits, getValidMcpActionNames, grantConstraintsToPermissionConstraints, grantToPermissionRules, indexActions, indexCapabilities, isActionEquivalent, isCanonicalProvider, isUnlimited, isValidDidJwk, isValidProvider, isWriteAction, loadActionRegistryFromFile, loadActionRegistryFromObject, normalizeMcpActionName, parseGrantAction, parseGrantResourceType, planDelegationForVC, publicKeysMatch, resolveActionsFromSelection, resolveProvider, resolveResourceType, resolveUserTier, signJWT, validateRegistryObject, vcStatusToCredentialStatus, verifyJWT, version };
8677
+ export { type ABACPolicyEngine, ACTION_PARAMS_MAX_SIZE, ACTION_PREFIXES, ACTION_REGISTRY, AIdentityClient, type AIdentityConfig, AIdentityError, type APIAgent, type APICredential, APIVCManager, type AbacDecision, type AbacInput, type AcceptInvitationRequest, type AckEventResponse, type ActionInputSchema, type ActionMapping, type ActionMeta, type ActionParamDisplay, type ActionRegistry, type ActionRiskLevel, type Agent, type AgentCreateOptions, type AgentDIDConfig, AgentDIDManager, AgentManager, AgentStatus, AgentType, type AgentWithId, AllowAllAbac, type AnyProvider, type ApiKeyValidationResult, type AuditEvent, type AuditQuery, AuthProvider, type AuthState, AuthenticationError, type AutoApproveConfig, type BindingSource, CANONICAL_PROVIDERS, type CanonicalProvider, type CapabilityMeta, type CheckGrantPermissionRequest, type CheckGrantPermissionResult, type CheckPermissionInput, type CheckPermissionResult, type CollectContextRequest, type ConfirmGrantSuggestionRequest, type ConnectorAction, type ConnectorConfig, type ConnectorExecutionContext, type ConnectorResponse, type ConnectorResponseMetadata, type ConnectorTokenConfig, type ConstraintEvaluationResult, ConstraintEvaluator, type ConstraintEvaluatorOptions, type ConstraintViolation, type ConstraintWarning, type ContextBindingSource, type ContextProvider, type CreateGrantRequest, type CreateInvitationRequest, type CreateReceiptRequest, type CredentialRef, CredentialStatus, type CredentialStore, CredentialType, DEFAULT_CONSTRAINTS_BY_RISK, type DIDDocument, type DataAccessVC, type DecisionTrace, type DelegationVC, DeviceEnrollManager, type DeviceEnrollPollResult, type DeviceEnrollServerSideParams, type DeviceEnrollStartParams, type DeviceEnrollStartResult, type DisclosureFields, DummyCreds, DummyVpVerifier, type EmployeeVPRequest, type EvaluationContext, type ExternalActionRequest, FilesystemKeyStorage, GATEWAY_ERROR_CODE, GatewayClient, GatewayError, type GatewayErrorCode, type GatewayEvent, type GetEventsOptions, type GetEventsResponse, type GitHubConfig, type GoogleConfig, type Grant, type GrantConstraints, type GrantResource, GrantResourceType, GrantScope, GrantStatus, type GrantUsage, type IConnectorService, type IStateStore, type Intent, type IntentEvaluationResult, type IntentObligation, type IntentResource, type InternalHmacSignerKey, InvalidVPError, type Invitation, type InvitationRole, InvitationStatus, type IssueSDJWTVCRequest, type IssueSDJWTVCResult, type JiraBoard, type JiraConfig, type JiraIssue, type JiraIssueType, type JiraProject, type JiraSprint, type JiraStatus, type JiraUser, type JiraWorklog, type JsonSchema, JsonStateStore, KeyManager, type KeyPairGenerationResult, type KeyStorageConfig, type KeyStorageProvider, LEGACY_RESOURCE_TYPE_MAP, MIN_SIGNER_KEY_BYTES, MemoryKeyStorage, NetworkError, type NormalizeIntentRequest, type NormalizedIntent, type OAuthAuthorizeRequest, type OAuthCallbackParams, type OAuthConnection, OAuthProvider, type OAuthToken, type OrganizationConfig, type OrganizationPermission, type OrganizationPolicy, type OrganizationVC, PROVIDER_ALIASES, type ParamBindingSource, type ParsedResourceType, type ParsedSignature, type PermissionConstraints, type PermissionMode, type PermissionResource, type PermissionRule, type PermissionTimeConstraint, type PermissionVcClaims, type PlanDelegationInput, type PlanDelegationResult, type PolicyCondition, type PolicyEvaluationResult, type PolicyInput, type PolicyRule, type PolicyTarget, type Provider, REAUTH_REQUIRED_ACTION, RESOURCE_TYPES, type ReBACChecker, type Receipt, type ReceiptListResult, type ReceiptOutcome, type ReceiptSearchQuery, ReceiptStatus, type Relation, type ResolvedTargets, type ResourceIdBinding, type ResourceRef, type ResourceScope, type ResourceType, type RiskAssessmentResult, type RiskFactor, type RiskLevel, SDJwtClient, SIGNATURE_HEADER, SIGNATURE_VERSION_PREFIX, ScopeUnmatchedError, type SecondaryBinding, type SignRequestArgs, SimpleRebac, type SlackConfig, StandardActionCategory, type SuggestGrantRequest, type SuggestedAction, type SuggestedConstraints, type SuggestedGrant, type SuggestedResource, type SuggestionRiskLevel, TIER_LIMITS, type TargetBindings, type TargetConstraint, TargetResolver, type TierLimits, type TimeWindowCheckResult, type TimeWindowConstraint, type ToolDefinition, type ToolInvocation, ToolManager, type ToolPermissionRequest, type ToolPermissionVC, type UnifiedResourceType, type UpdateGrantRequest, type UserIdentity, type UserIdentityConfig, type UserIdentityCreateOptions, UserIdentityManager, UserKeyPairManager, type UserTier, VALID_MCP_ACTIONS, VALID_MCP_TOOLS, VCExpiredError, VCManager, VCRevokedError, VCStatus, type VCTemplate, VCType, VPManager, type VPRequest, type VerifiablePresentation, type VerificationMethod, type VerifiedVcClaims, type VerifyInvitationResponse, type VerifyReceiptRequest, type VerifyReceiptResult, type VerifySDJWTVCResult, type VpVerifier, WRITE_ACTION_NAMES, type WeeklyReportData, type WeeklyReportSummary, buildCanonicalString, buildGrantIdFields, canonicalizeAction, checkPermissionWithVP, configure, createAjv, createDidJwk, credentialStatusToVCStatus, defaultConstraintEvaluator, evaluateConstraints, extractProjectKey, extractPublicKey, extractPublicKeyFromDid, formatSignatureHeader, generateActionParamsDisplay, generateActionSummary, generateKeyPair, generateNonce, getActionAliases, getAllActionForms, getAllValidMcpActionNames, getClient, getDefaultDisclosureFields, getKeyIdFromDid, getRequiredRelations, getRequiredScopes, getTierLimits, getValidMcpActionNames, grantConstraintsToPermissionConstraints, grantToPermissionRules, indexActions, indexCapabilities, isActionEquivalent, isCanonicalProvider, isUnlimited, isValidDidJwk, isValidProvider, isWriteAction, loadActionRegistryFromFile, loadActionRegistryFromObject, normalizeMcpActionName, parseGrantAction, parseGrantResourceType, parseSignatureHeader, planDelegationForVC, publicKeysMatch, resolveActionsFromSelection, resolveProvider, resolveResourceType, resolveUserTier, sha256Hex, signJWT, signRequest, validateRegistryObject, vcStatusToCredentialStatus, verifyJWT, version };
package/dist/index.d.ts CHANGED
@@ -11,7 +11,6 @@ export { VCManager } from './vc/vc-manager';
11
11
  export { APIVCManager } from './vc/api-vc-manager';
12
12
  export { VPManager } from './vp/vp-manager';
13
13
  export { ToolManager, ToolDefinition } from './tool/tool-manager';
14
- export { MemoryManager, MemoryDocument, MemoryQuery, MemoryQueryResult, } from './memory/memory-manager';
15
14
  export { getDefaultDisclosureFields, DisclosureFields, } from './utils/sdjwt-disclosure';
16
15
  export { ConstraintEvaluator, ConstraintEvaluatorOptions, defaultConstraintEvaluator, evaluateConstraints, } from './constraint/constraint-evaluator';
17
16
  export * from './storage';
@@ -31,5 +30,6 @@ export { TargetResolver, extractProjectKey } from './resolver/target-resolver';
31
30
  export * from './types';
32
31
  export { isWriteAction, WRITE_ACTION_NAMES } from './utils/action-classifier';
33
32
  export { resolveUserTier, getTierLimits, isUnlimited } from './utils/tier-utils';
33
+ export * from './internal-signature';
34
34
  export declare const version = "0.0.1";
35
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGrD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAGrD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,YAAY,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,EACL,aAAa,EACb,cAAc,EACd,WAAW,EACX,iBAAiB,GAClB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC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