@aigne/afs-cli 1.11.0-beta.10 → 1.11.0-beta.11

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.
@@ -64,7 +64,13 @@ function createMCPAuthContext(options) {
64
64
  if (result.action === "decline") return "declined";
65
65
  return "cancelled";
66
66
  } catch {
67
- return "cancelled";
67
+ try {
68
+ console.error(`\n${message}\n${url}`);
69
+ await (openURLFn ?? openURL)(url);
70
+ return "accepted";
71
+ } catch {
72
+ return "cancelled";
73
+ }
68
74
  }
69
75
  }
70
76
  };
@@ -63,7 +63,13 @@ function createMCPAuthContext(options) {
63
63
  if (result.action === "decline") return "declined";
64
64
  return "cancelled";
65
65
  } catch {
66
- return "cancelled";
66
+ try {
67
+ console.error(`\n${message}\n${url}`);
68
+ await (openURLFn ?? openURL)(url);
69
+ return "accepted";
70
+ } catch {
71
+ return "cancelled";
72
+ }
67
73
  }
68
74
  }
69
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-auth-context.mjs","names":[],"sources":["../../src/credential/mcp-auth-context.ts"],"sourcesContent":["/**\n * MCP AuthContext implementation.\n *\n * Uses MCP elicitation protocol to collect credentials:\n * - Non-sensitive fields: form mode (Client renders UI)\n * - Sensitive fields: URL mode (local HTTP server, data never passes through Client/LLM)\n *\n * Requires an MCP Server instance that supports elicitation.\n */\n\nimport { execFile } from \"node:child_process\";\nimport { randomBytes } from \"node:crypto\";\nimport type { AuthContext, CallbackServer, JSONSchema7 } from \"@aigne/afs\";\nimport { getSensitiveFields } from \"@aigne/afs/utils/schema\";\nimport type { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\nimport { createAuthServer } from \"./auth-server.js\";\n\nexport interface MCPAuthContextOptions {\n /** The MCP Server instance (for sending elicitation requests) */\n server: Server;\n /** Pre-resolved fields from Step 2 (env/store/config) */\n resolved?: Record<string, unknown>;\n /** Override browser URL opener (for testing). Falls back to platform-default open. */\n openURL?: (url: string) => Promise<void>;\n}\n\n/**\n * Create an MCP AuthContext for MCP-based credential collection.\n */\nexport function createMCPAuthContext(options: MCPAuthContextOptions): AuthContext {\n const { server } = options;\n const resolved = options.resolved ?? {};\n const openURLFn = options.openURL;\n\n return {\n get resolved() {\n return { ...resolved };\n },\n\n async collect(schema: JSONSchema7): Promise<Record<string, unknown> | null> {\n const properties = (schema as any).properties;\n if (!properties || typeof properties !== \"object\") return {};\n\n const sensitiveFields = new Set(getSensitiveFields(schema));\n const hasSensitive = sensitiveFields.size > 0;\n\n // Strategy: try elicitation first, fall back to browser if client doesn't support it.\n // ElicitationUnsupportedError means \"not supported\" → try next mode.\n // null means \"user declined/cancelled\" → stop and return null.\n\n if (hasSensitive) {\n // Sensitive fields: try URL mode (data stays local, never through Client/LLM)\n try {\n return await collectViaURLMode(server, schema);\n } catch (err) {\n if (!(err instanceof ElicitationUnsupportedError)) throw err;\n }\n // URL mode not supported — browser fallback (also keeps data local)\n return collectViaBrowser(schema, openURLFn);\n }\n\n // Non-sensitive only: try form mode (Client renders UI)\n try {\n return await collectViaFormMode(server, schema);\n } catch (err) {\n if (!(err instanceof ElicitationUnsupportedError)) throw err;\n }\n\n // Form mode not supported — browser fallback\n return collectViaBrowser(schema, openURLFn);\n },\n\n async createCallbackServer(): Promise<CallbackServer> {\n const authServer = await createAuthServer();\n return {\n callbackURL: authServer.callbackURL,\n waitForCallback: authServer.waitForCallback.bind(authServer),\n close: authServer.close.bind(authServer),\n };\n },\n\n async requestOpenURL(\n url: string,\n message: string,\n ): Promise<\"accepted\" | \"declined\" | \"cancelled\"> {\n try {\n const elicitationId = randomBytes(16).toString(\"hex\");\n const result = await server.elicitInput({\n mode: \"url\",\n message,\n url,\n elicitationId,\n });\n\n if (result.action === \"accept\") return \"accepted\";\n if (result.action === \"decline\") return \"declined\";\n return \"cancelled\";\n } catch {\n // Client doesn't support elicitation — try direct open\n return \"cancelled\";\n }\n },\n };\n}\n\n/** Sentinel error: elicitation mode not supported by client */\nclass ElicitationUnsupportedError extends Error {\n constructor(mode: string) {\n super(`Client does not support ${mode} elicitation`);\n }\n}\n\n/**\n * Collect non-sensitive fields via MCP form mode elicitation.\n *\n * @throws ElicitationUnsupportedError if client doesn't support form mode\n * @returns collected values, or null if user declined/cancelled\n */\nasync function collectViaFormMode(\n server: Server,\n schema: JSONSchema7,\n): Promise<Record<string, unknown> | null> {\n const properties = (schema as any).properties || {};\n const required = (schema as any).required || [];\n\n // Build elicitation form schema (simplified for MCP form mode)\n const formProperties: Record<string, any> = {};\n for (const [key, prop] of Object.entries(properties) as [string, any][]) {\n formProperties[key] = {\n type: \"string\",\n ...(prop.description ? { description: prop.description } : {}),\n ...(prop.title ? { title: prop.title } : {}),\n ...(prop.default != null ? { default: prop.default } : {}),\n };\n }\n\n try {\n const result = await server.elicitInput({\n mode: \"form\",\n message: \"Please provide the required configuration:\",\n requestedSchema: {\n type: \"object\" as const,\n properties: formProperties,\n required,\n },\n });\n\n if (result.action === \"accept\" && result.content) {\n return result.content as Record<string, unknown>;\n }\n\n // User declined or cancelled\n return null;\n } catch {\n // Client doesn't support form elicitation\n throw new ElicitationUnsupportedError(\"form\");\n }\n}\n\n/**\n * Collect fields containing sensitive data via URL mode.\n * Starts a local HTTP server, sends URL mode elicitation so Client opens the browser.\n * Form data goes directly from browser to local server (never through Client/LLM).\n *\n * @throws ElicitationUnsupportedError if client doesn't support URL mode\n * @returns collected values, or null if user declined/cancelled\n */\nasync function collectViaURLMode(\n server: Server,\n schema: JSONSchema7,\n): Promise<Record<string, unknown> | null> {\n const authServer = await createAuthServer();\n\n try {\n const elicitationId = randomBytes(16).toString(\"hex\");\n const formURL = `${authServer.baseURL}/auth?nonce=${authServer.nonce}`;\n\n // Send URL mode elicitation to client — let errors propagate\n let elicitResult: { action: string };\n try {\n elicitResult = await server.elicitInput({\n mode: \"url\",\n message: \"Please fill in the credential form in your browser:\",\n url: formURL,\n elicitationId,\n });\n } catch {\n // Client doesn't support URL elicitation\n throw new ElicitationUnsupportedError(\"url\");\n }\n\n if (elicitResult.action !== \"accept\") {\n // User declined or cancelled\n return null;\n }\n\n // Client accepted — wait for form submission with timeout\n const result = await authServer.waitForForm(schema as Record<string, any>, {\n title: \"AFS Credential Collection\",\n timeout: 120_000, // 2-minute safety timeout\n });\n\n // Notify client that elicitation is complete\n try {\n const notifyComplete = server.createElicitationCompletionNotifier(elicitationId);\n await notifyComplete();\n } catch {\n // Notification failure is non-critical\n }\n\n return result;\n } finally {\n authServer.close();\n }\n}\n\n/**\n * Fallback: collect credentials by opening a browser directly.\n * Used when MCP client doesn't support elicitation protocol.\n */\nasync function collectViaBrowser(\n schema: JSONSchema7,\n openURLFn?: (url: string) => Promise<void>,\n): Promise<Record<string, unknown> | null> {\n const properties = (schema as any).properties || {};\n if (Object.keys(properties).length === 0) return {};\n\n const authServer = await createAuthServer();\n const formURL = `${authServer.baseURL}/auth?nonce=${authServer.nonce}`;\n\n console.error(`\\nPlease fill in credentials in your browser:\\n${formURL}`);\n\n try {\n await (openURLFn ?? openURL)(formURL);\n } catch {\n // Browser failed to open; URL is already printed above\n }\n\n try {\n const result = await authServer.waitForForm(schema as Record<string, any>, {\n title: \"AFS Credential Collection\",\n });\n return result;\n } finally {\n authServer.close();\n }\n}\n\n/**\n * Open a URL in the default browser.\n */\nfunction openURL(url: string): Promise<void> {\n const cmd =\n process.platform === \"darwin\" ? \"open\" : process.platform === \"win32\" ? \"cmd\" : \"xdg-open\";\n\n const args = process.platform === \"win32\" ? [\"/c\", \"start\", \"\", url] : [url];\n\n return new Promise((resolve, reject) => {\n execFile(cmd, args, (err) => {\n if (err) reject(err);\n else resolve();\n });\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,SAAgB,qBAAqB,SAA6C;CAChF,MAAM,EAAE,WAAW;CACnB,MAAM,WAAW,QAAQ,YAAY,EAAE;CACvC,MAAM,YAAY,QAAQ;AAE1B,QAAO;EACL,IAAI,WAAW;AACb,UAAO,EAAE,GAAG,UAAU;;EAGxB,MAAM,QAA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R,KAAI;AAIF,SAHe,MAAM,WAAW,YAAY,QAA+B,EACzE,OAAO,6BACR,CAAC;WAEM;AACR,aAAW,OAAO;;;;;;AAOtB,SAAS,QAAQ,KAA4B;CAC3C,MAAM,MACJ,QAAQ,aAAa,WAAW,SAAS,QAAQ,aAAa,UAAU,QAAQ;CAElF,MAAM,OAAO,QAAQ,aAAa,UAAU;EAAC;EAAM;EAAS;EAAI;EAAI,GAAG,CAAC,IAAI;AAE5E,QAAO,IAAI,SAAS,SAAS,WAAW;AACtC,WAAS,KAAK,OAAO,QAAQ;AAC3B,OAAI,IAAK,QAAO,IAAI;OACf,UAAS;IACd;GACF"}
1
+ {"version":3,"file":"mcp-auth-context.mjs","names":[],"sources":["../../src/credential/mcp-auth-context.ts"],"sourcesContent":["/**\n * MCP AuthContext implementation.\n *\n * Uses MCP elicitation protocol to collect credentials:\n * - Non-sensitive fields: form mode (Client renders UI)\n * - Sensitive fields: URL mode (local HTTP server, data never passes through Client/LLM)\n *\n * Requires an MCP Server instance that supports elicitation.\n */\n\nimport { execFile } from \"node:child_process\";\nimport { randomBytes } from \"node:crypto\";\nimport type { AuthContext, CallbackServer, JSONSchema7 } from \"@aigne/afs\";\nimport { getSensitiveFields } from \"@aigne/afs/utils/schema\";\nimport type { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\nimport { createAuthServer } from \"./auth-server.js\";\n\nexport interface MCPAuthContextOptions {\n /** The MCP Server instance (for sending elicitation requests) */\n server: Server;\n /** Pre-resolved fields from Step 2 (env/store/config) */\n resolved?: Record<string, unknown>;\n /** Override browser URL opener (for testing). Falls back to platform-default open. */\n openURL?: (url: string) => Promise<void>;\n}\n\n/**\n * Create an MCP AuthContext for MCP-based credential collection.\n */\nexport function createMCPAuthContext(options: MCPAuthContextOptions): AuthContext {\n const { server } = options;\n const resolved = options.resolved ?? {};\n const openURLFn = options.openURL;\n\n return {\n get resolved() {\n return { ...resolved };\n },\n\n async collect(schema: JSONSchema7): Promise<Record<string, unknown> | null> {\n const properties = (schema as any).properties;\n if (!properties || typeof properties !== \"object\") return {};\n\n const sensitiveFields = new Set(getSensitiveFields(schema));\n const hasSensitive = sensitiveFields.size > 0;\n\n // Strategy: try elicitation first, fall back to browser if client doesn't support it.\n // ElicitationUnsupportedError means \"not supported\" → try next mode.\n // null means \"user declined/cancelled\" → stop and return null.\n\n if (hasSensitive) {\n // Sensitive fields: try URL mode (data stays local, never through Client/LLM)\n try {\n return await collectViaURLMode(server, schema);\n } catch (err) {\n if (!(err instanceof ElicitationUnsupportedError)) throw err;\n }\n // URL mode not supported — browser fallback (also keeps data local)\n return collectViaBrowser(schema, openURLFn);\n }\n\n // Non-sensitive only: try form mode (Client renders UI)\n try {\n return await collectViaFormMode(server, schema);\n } catch (err) {\n if (!(err instanceof ElicitationUnsupportedError)) throw err;\n }\n\n // Form mode not supported — browser fallback\n return collectViaBrowser(schema, openURLFn);\n },\n\n async createCallbackServer(): Promise<CallbackServer> {\n const authServer = await createAuthServer();\n return {\n callbackURL: authServer.callbackURL,\n waitForCallback: authServer.waitForCallback.bind(authServer),\n close: authServer.close.bind(authServer),\n };\n },\n\n async requestOpenURL(\n url: string,\n message: string,\n ): Promise<\"accepted\" | \"declined\" | \"cancelled\"> {\n try {\n const elicitationId = randomBytes(16).toString(\"hex\");\n const result = await server.elicitInput({\n mode: \"url\",\n message,\n url,\n elicitationId,\n });\n\n if (result.action === \"accept\") return \"accepted\";\n if (result.action === \"decline\") return \"declined\";\n return \"cancelled\";\n } catch {\n // Client doesn't support elicitation — open browser directly\n try {\n console.error(`\\n${message}\\n${url}`);\n await (openURLFn ?? openURL)(url);\n return \"accepted\";\n } catch {\n return \"cancelled\";\n }\n }\n },\n };\n}\n\n/** Sentinel error: elicitation mode not supported by client */\nclass ElicitationUnsupportedError extends Error {\n constructor(mode: string) {\n super(`Client does not support ${mode} elicitation`);\n }\n}\n\n/**\n * Collect non-sensitive fields via MCP form mode elicitation.\n *\n * @throws ElicitationUnsupportedError if client doesn't support form mode\n * @returns collected values, or null if user declined/cancelled\n */\nasync function collectViaFormMode(\n server: Server,\n schema: JSONSchema7,\n): Promise<Record<string, unknown> | null> {\n const properties = (schema as any).properties || {};\n const required = (schema as any).required || [];\n\n // Build elicitation form schema (simplified for MCP form mode)\n const formProperties: Record<string, any> = {};\n for (const [key, prop] of Object.entries(properties) as [string, any][]) {\n formProperties[key] = {\n type: \"string\",\n ...(prop.description ? { description: prop.description } : {}),\n ...(prop.title ? { title: prop.title } : {}),\n ...(prop.default != null ? { default: prop.default } : {}),\n };\n }\n\n try {\n const result = await server.elicitInput({\n mode: \"form\",\n message: \"Please provide the required configuration:\",\n requestedSchema: {\n type: \"object\" as const,\n properties: formProperties,\n required,\n },\n });\n\n if (result.action === \"accept\" && result.content) {\n return result.content as Record<string, unknown>;\n }\n\n // User declined or cancelled\n return null;\n } catch {\n // Client doesn't support form elicitation\n throw new ElicitationUnsupportedError(\"form\");\n }\n}\n\n/**\n * Collect fields containing sensitive data via URL mode.\n * Starts a local HTTP server, sends URL mode elicitation so Client opens the browser.\n * Form data goes directly from browser to local server (never through Client/LLM).\n *\n * @throws ElicitationUnsupportedError if client doesn't support URL mode\n * @returns collected values, or null if user declined/cancelled\n */\nasync function collectViaURLMode(\n server: Server,\n schema: JSONSchema7,\n): Promise<Record<string, unknown> | null> {\n const authServer = await createAuthServer();\n\n try {\n const elicitationId = randomBytes(16).toString(\"hex\");\n const formURL = `${authServer.baseURL}/auth?nonce=${authServer.nonce}`;\n\n // Send URL mode elicitation to client — let errors propagate\n let elicitResult: { action: string };\n try {\n elicitResult = await server.elicitInput({\n mode: \"url\",\n message: \"Please fill in the credential form in your browser:\",\n url: formURL,\n elicitationId,\n });\n } catch {\n // Client doesn't support URL elicitation\n throw new ElicitationUnsupportedError(\"url\");\n }\n\n if (elicitResult.action !== \"accept\") {\n // User declined or cancelled\n return null;\n }\n\n // Client accepted — wait for form submission with timeout\n const result = await authServer.waitForForm(schema as Record<string, any>, {\n title: \"AFS Credential Collection\",\n timeout: 120_000, // 2-minute safety timeout\n });\n\n // Notify client that elicitation is complete\n try {\n const notifyComplete = server.createElicitationCompletionNotifier(elicitationId);\n await notifyComplete();\n } catch {\n // Notification failure is non-critical\n }\n\n return result;\n } finally {\n authServer.close();\n }\n}\n\n/**\n * Fallback: collect credentials by opening a browser directly.\n * Used when MCP client doesn't support elicitation protocol.\n */\nasync function collectViaBrowser(\n schema: JSONSchema7,\n openURLFn?: (url: string) => Promise<void>,\n): Promise<Record<string, unknown> | null> {\n const properties = (schema as any).properties || {};\n if (Object.keys(properties).length === 0) return {};\n\n const authServer = await createAuthServer();\n const formURL = `${authServer.baseURL}/auth?nonce=${authServer.nonce}`;\n\n console.error(`\\nPlease fill in credentials in your browser:\\n${formURL}`);\n\n try {\n await (openURLFn ?? openURL)(formURL);\n } catch {\n // Browser failed to open; URL is already printed above\n }\n\n try {\n const result = await authServer.waitForForm(schema as Record<string, any>, {\n title: \"AFS Credential Collection\",\n });\n return result;\n } finally {\n authServer.close();\n }\n}\n\n/**\n * Open a URL in the default browser.\n */\nfunction openURL(url: string): Promise<void> {\n const cmd =\n process.platform === \"darwin\" ? \"open\" : process.platform === \"win32\" ? \"cmd\" : \"xdg-open\";\n\n const args = process.platform === \"win32\" ? [\"/c\", \"start\", \"\", url] : [url];\n\n return new Promise((resolve, reject) => {\n execFile(cmd, args, (err) => {\n if (err) reject(err);\n else resolve();\n });\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,SAAgB,qBAAqB,SAA6C;CAChF,MAAM,EAAE,WAAW;CACnB,MAAM,WAAW,QAAQ,YAAY,EAAE;CACvC,MAAM,YAAY,QAAQ;AAE1B,QAAO;EACL,IAAI,WAAW;AACb,UAAO,EAAE,GAAG,UAAU;;EAGxB,MAAM,QAAQ,QAA8D;GAC1E,MAAM,aAAc,OAAe;AACnC,OAAI,CAAC,cAAc,OAAO,eAAe,SAAU,QAAO,EAAE;AAS5D,OAPwB,IAAI,IAAI,mBAAmB,OA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AAW,YAAY,QAA+B,EACzE,OAAO,6BACR,CAAC;WAEM;AACR,aAAW,OAAO;;;;;;AAOtB,SAAS,QAAQ,KAA4B;CAC3C,MAAM,MACJ,QAAQ,aAAa,WAAW,SAAS,QAAQ,aAAa,UAAU,QAAQ;CAElF,MAAM,OAAO,QAAQ,aAAa,UAAU;EAAC;EAAM;EAAS;EAAI;EAAI,GAAG,CAAC,IAAI;AAE5E,QAAO,IAAI,SAAS,SAAS,WAAW;AACtC,WAAS,KAAK,OAAO,QAAQ;AAC3B,OAAI,IAAK,QAAO,IAAI;OACf,UAAS;IACd;GACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/afs-cli",
3
- "version": "1.11.0-beta.10",
3
+ "version": "1.11.0-beta.11",
4
4
  "description": "AFS Command Line Interface",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -53,24 +53,24 @@
53
53
  "yargs": "^17.7.2",
54
54
  "yargs-parser": "^22.0.0",
55
55
  "zod": "^4.0.0",
56
- "@aigne/afs-cloudflare": "1.11.0-beta.10",
57
- "@aigne/afs-dns": "1.11.0-beta.10",
58
- "@aigne/afs-ec2": "1.11.0-beta.10",
59
- "@aigne/afs-fs": "1.11.0-beta.10",
60
- "@aigne/afs-gce": "1.11.0-beta.10",
61
- "@aigne/afs-gcs": "1.11.0-beta.10",
62
- "@aigne/afs-git": "1.11.0-beta.10",
63
- "@aigne/afs-github": "1.11.0-beta.10",
64
- "@aigne/afs-http": "1.11.0-beta.10",
65
- "@aigne/afs-json": "1.11.0-beta.10",
66
- "@aigne/afs-mcp": "1.11.0-beta.10",
67
- "@aigne/afs-sandbox": "1.11.0-beta.10",
68
- "@aigne/afs-sqlite": "1.11.0-beta.10",
69
- "@aigne/afs-toml": "1.11.0-beta.10",
70
- "@aigne/afs-workspace": "1.11.0-beta.10",
71
- "@aigne/afs-s3": "1.11.0-beta.10",
72
- "@aigne/afs-registry": "1.11.0-beta.10",
73
- "@aigne/afs": "1.11.0-beta.10"
56
+ "@aigne/afs-cloudflare": "1.11.0-beta.11",
57
+ "@aigne/afs": "1.11.0-beta.11",
58
+ "@aigne/afs-dns": "1.11.0-beta.11",
59
+ "@aigne/afs-ec2": "1.11.0-beta.11",
60
+ "@aigne/afs-gce": "1.11.0-beta.11",
61
+ "@aigne/afs-fs": "1.11.0-beta.11",
62
+ "@aigne/afs-gcs": "1.11.0-beta.11",
63
+ "@aigne/afs-git": "1.11.0-beta.11",
64
+ "@aigne/afs-github": "1.11.0-beta.11",
65
+ "@aigne/afs-http": "1.11.0-beta.11",
66
+ "@aigne/afs-json": "1.11.0-beta.11",
67
+ "@aigne/afs-mcp": "1.11.0-beta.11",
68
+ "@aigne/afs-registry": "1.11.0-beta.11",
69
+ "@aigne/afs-s3": "1.11.0-beta.11",
70
+ "@aigne/afs-sandbox": "1.11.0-beta.11",
71
+ "@aigne/afs-toml": "1.11.0-beta.11",
72
+ "@aigne/afs-sqlite": "1.11.0-beta.11",
73
+ "@aigne/afs-workspace": "1.11.0-beta.11"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@modelcontextprotocol/server-everything": "^2026.1.26",