@kya-os/mcp-i 1.5.1 → 1.5.3-canary.0

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.
@@ -42,6 +42,8 @@ export interface AgentReputation {
42
42
  export interface AuthHandshakeConfig {
43
43
  /** Delegation verifier instance */
44
44
  delegationVerifier: DelegationVerifier;
45
+ /** Resume token store (REQUIRED to persist tokens across calls) */
46
+ resumeTokenStore: ResumeTokenStore;
45
47
  /** KTA API configuration (optional, for reputation checks) */
46
48
  kta?: {
47
49
  apiUrl: string;
@@ -205,9 +205,8 @@ async function fetchAgentReputation(agentDid, ktaConfig) {
205
205
  * @returns NeedsAuthorizationError
206
206
  */
207
207
  async function buildNeedsAuthorizationError(agentDid, scopes, config, message) {
208
- // Generate resume token (simple implementation - use proper store in production)
209
- const resumeTokenStore = new MemoryResumeTokenStore(config.bouncer.resumeTokenTtl || 600_000);
210
- const resumeToken = await resumeTokenStore.create(agentDid, scopes, {
208
+ // Use the persistent resume token store from config
209
+ const resumeToken = await config.resumeTokenStore.create(agentDid, scopes, {
211
210
  requestedAt: Date.now(),
212
211
  });
213
212
  const expiresAt = Date.now() + (config.bouncer.resumeTokenTtl || 600_000);