aai-gateway 0.3.2 → 0.3.5
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 +280 -264
- package/dist/cli.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{server-CGpNZvfw.js → server-DrBOLU_J.js} +717 -93
- package/dist/server-DrBOLU_J.js.map +1 -0
- package/package.json +1 -1
- package/dist/server-CGpNZvfw.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,121 +1,164 @@
|
|
|
1
1
|
# AAI Gateway
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## One MCP. All Apps. Zero Code Changes.
|
|
4
4
|
|
|
5
|
-
A
|
|
5
|
+
> A single MCP server that connects AI Agents to all Web and Desktop applications.
|
|
6
|
+
> Apps conforming to the **[AAI Protocol](https://github.com/gybob/aai-protocol)** can be **seamlessly integrated** without developing any source code—just provide a descriptor.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
[](https://www.npmjs.com/package/aai-gateway)
|
|
9
|
+
[](https://github.com/gybob/aai-gateway/blob/main/LICENSE)
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Why AAI Gateway?
|
|
14
|
+
|
|
15
|
+
| Traditional Approach | AAI Gateway |
|
|
16
|
+
| ------------------------------------------- | ------------------------------------------------- |
|
|
17
|
+
| One MCP Server per App | **One MCP for all applications** |
|
|
18
|
+
| Requires modifying app code | **Zero-code integration, just a descriptor** |
|
|
19
|
+
| Loads all tools at once (context explosion) | **Progressive disclosure, load on-demand** |
|
|
20
|
+
| Platform-specific only | **Cross-platform: Web + macOS + Windows + Linux** |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Architecture
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 🚀 Core Innovations
|
|
31
|
+
|
|
32
|
+
Traditional MCP servers return all tools on `tools/list`, causing:
|
|
10
33
|
|
|
11
34
|
```
|
|
12
|
-
|
|
13
|
-
→ Context window
|
|
14
|
-
→ Agent
|
|
15
|
-
→
|
|
35
|
+
50 apps × 20 tools per app = 1000+ tool entries
|
|
36
|
+
→ Context window explosion
|
|
37
|
+
→ Agent performance degradation
|
|
38
|
+
→ Reduced response accuracy
|
|
16
39
|
```
|
|
17
40
|
|
|
18
|
-
|
|
41
|
+
### 1. Progressive Disclosure
|
|
42
|
+
|
|
43
|
+
AAI Gateway's solution:
|
|
19
44
|
|
|
20
45
|
```
|
|
21
|
-
|
|
22
|
-
→
|
|
23
|
-
|
|
24
|
-
→
|
|
46
|
+
tools/list returns only lightweight entries:
|
|
47
|
+
├── web:discover → Discover web apps and get their capabilities
|
|
48
|
+
├── app:<desktop-app-id> → Discovered desktop apps (one entry per app)
|
|
49
|
+
└── aai:exec → Universal executor for all operations
|
|
50
|
+
|
|
51
|
+
= 50 apps + 2 tools = 52 entries ✅
|
|
52
|
+
|
|
53
|
+
Agent calls web:discover or app:<id> on-demand to get detailed operation guides
|
|
25
54
|
```
|
|
26
55
|
|
|
27
|
-
|
|
56
|
+
**Result**: **95% reduction** in context usage, faster and more accurate Agent responses.
|
|
57
|
+
|
|
58
|
+
### 2. Unified Descriptor
|
|
59
|
+
|
|
60
|
+
Every integration is normalized through the same `aai.json` descriptor model. At a high level, the descriptor defines:
|
|
61
|
+
|
|
62
|
+
- App identity and metadata
|
|
63
|
+
- Execution binding
|
|
64
|
+
- Tool definitions
|
|
65
|
+
- Parameter schemas
|
|
66
|
+
- Authentication requirements
|
|
67
|
+
|
|
68
|
+
For the full descriptor format, see the **[AAI Protocol `aai.json` spec](https://github.com/gybob/aai-protocol/blob/main/spec/aai-json.md)**.
|
|
69
|
+
|
|
70
|
+
---
|
|
28
71
|
|
|
29
72
|
## How It Works
|
|
30
73
|
|
|
74
|
+
### Web App Workflow
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
1. User: "Search my Notion workspace"
|
|
78
|
+
2. Agent recognizes "Notion" as a web application
|
|
79
|
+
→ Calls web:discover to fetch Notion's capabilities
|
|
80
|
+
3. tools/call("web:discover", {url: "notion.com"})
|
|
81
|
+
→ Returns operation guide: listDatabases(), queryDatabase(id), search(query)
|
|
82
|
+
4. tools/call("aai:exec", {app: "notion.com", tool: "search", args: {...}})
|
|
83
|
+
→ Executes and returns result
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Desktop App Workflow
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
1. AAI Gateway scans system for AAI-enabled desktop apps
|
|
90
|
+
→ Found apps appear as app:<id> entries in tools/list
|
|
91
|
+
2. User: "Show my work tasks"
|
|
92
|
+
→ Agent finds matching app:guanchen.worklens
|
|
93
|
+
3. tools/call("app:guanchen.worklens")
|
|
94
|
+
→ Returns operation guide: listTasks(), getTaskDetail(id), createTask()
|
|
95
|
+
4. tools/call("aai:exec", {app: "guanchen.worklens", tool: "listTasks", args: {}})
|
|
96
|
+
→ Executes and returns result
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### ACP Agent Workflow
|
|
100
|
+
|
|
31
101
|
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
│ │
|
|
41
|
-
│ 2. User: "Send an email to John" │
|
|
42
|
-
│ └─→ Agent matches "email" → calls app:com.apple.mail │
|
|
43
|
-
│ │
|
|
44
|
-
│ 3. tools/call("app:com.apple.mail") │
|
|
45
|
-
│ └─→ Returns: Operation guide with available tools │
|
|
46
|
-
│ - sendEmail(to, subject, body) │
|
|
47
|
-
│ - readInbox(folder, limit) │
|
|
48
|
-
│ - ... │
|
|
49
|
-
│ │
|
|
50
|
-
│ 4. tools/call("aai:exec", {app, tool: "sendEmail", args}) │
|
|
51
|
-
│ └─→ Executes operation │
|
|
52
|
-
│ │
|
|
53
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
54
|
-
|
|
55
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
56
|
-
│ Web App Workflow │
|
|
57
|
-
├─────────────────────────────────────────────────────────────────┤
|
|
58
|
-
│ │
|
|
59
|
-
│ 1. User: "Search my Notion workspace" │
|
|
60
|
-
│ └─→ Agent matches "Notion" → calls web:discover │
|
|
61
|
-
│ │
|
|
62
|
-
│ 2. tools/call("web:discover", {url: "notion.com"}) │
|
|
63
|
-
│ └─→ Returns: Operation guide with available tools │
|
|
64
|
-
│ - listDatabases(), queryDatabase(id), search(query) │
|
|
65
|
-
│ - ... │
|
|
66
|
-
│ │
|
|
67
|
-
│ 3. tools/call("aai:exec", {app: "notion.com", tool, args}) │
|
|
68
|
-
│ └─→ Executes operation │
|
|
69
|
-
│ │
|
|
70
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
102
|
+
1. AAI Gateway scans for installed ACP agents at startup
|
|
103
|
+
→ Found agents appear as app:<agent-id> entries in tools/list
|
|
104
|
+
2. User: "Use OpenCode to refactor this code"
|
|
105
|
+
→ Agent finds matching app:dev.sst.opencode
|
|
106
|
+
3. tools/call("app:dev.sst.opencode")
|
|
107
|
+
→ Returns operation guide: session/new(), session/prompt(message)
|
|
108
|
+
4. tools/call("aai:exec", {app: "dev.sst.opencode", tool: "session/prompt", args: {message: "refactor this code"}})
|
|
109
|
+
→ Executes via ACP (stdio JSON-RPC) and returns result
|
|
71
110
|
```
|
|
72
111
|
|
|
73
|
-
|
|
112
|
+
## 🔐 Security & Consent
|
|
74
113
|
|
|
75
|
-
|
|
76
|
-
- AAI Gateway: 50 apps + 2 = 52 context entries
|
|
114
|
+
AAI Gateway implements a **caller-aware consent mechanism** to protect user privacy and control:
|
|
77
115
|
|
|
78
|
-
|
|
116
|
+
### Per-Caller Authorization
|
|
79
117
|
|
|
80
|
-
- **
|
|
81
|
-
- **
|
|
82
|
-
- **
|
|
83
|
-
- **
|
|
118
|
+
- **Client Identification**: When an MCP client (Claude Desktop, Cursor, Windsurf, etc.) requests tool access, AAI Gateway identifies the caller from the MCP protocol metadata
|
|
119
|
+
- **Isolated Consent**: Consent decisions are stored **per caller**, meaning authorization granted to Claude Desktop is NOT automatically granted to Cursor
|
|
120
|
+
- **Clear Dialogs**: Consent dialogs clearly show which client is requesting access: "Claude Desktop wants to use: sendEmail"
|
|
121
|
+
- **Re-authorization Required**: Different MCP clients must obtain their own authorization for the same tools
|
|
84
122
|
|
|
85
|
-
|
|
123
|
+
### Consent Flow
|
|
86
124
|
|
|
87
|
-
|
|
125
|
+
```
|
|
126
|
+
1. MCP client (e.g., Cursor) calls a tool for the first time
|
|
127
|
+
2. AAI Gateway checks: Has Cursor been authorized for this tool?
|
|
128
|
+
3. If not → Show consent dialog: "Cursor wants to use: sendEmail"
|
|
129
|
+
4. User decision is stored with caller identity: consents["Cursor"]["com.example.mail"]["sendEmail"]
|
|
130
|
+
5. Next call from Cursor → No dialog (already authorized)
|
|
131
|
+
6. Claude Desktop calls same tool → Consent dialog shown (different caller)
|
|
132
|
+
```
|
|
88
133
|
|
|
89
|
-
|
|
134
|
+
This ensures that each MCP client has explicit user authorization, preventing cross-client authorization leakage.
|
|
90
135
|
|
|
91
|
-
|
|
92
|
-
| --------------- | -------- | ----------------------------------------------- |
|
|
93
|
-
| macOS Reminders | macOS | createReminder, listReminders, completeReminder |
|
|
94
|
-
| Your app here | - | - |
|
|
136
|
+
> 💡 **Note**: Caller identity is informational and not a security boundary. The real security is enforced by the operating system (TCC on macOS, UAC on Windows, etc.).
|
|
95
137
|
|
|
96
|
-
|
|
138
|
+
---
|
|
97
139
|
|
|
98
|
-
|
|
140
|
+
## 📱 Supported Apps
|
|
99
141
|
|
|
100
|
-
|
|
101
|
-
| ----------------- | -------------- | ------------------------ |
|
|
102
|
-
| **Notion** | API Key | All-in-one workspace |
|
|
103
|
-
| **Yuque (语雀)** | API Key | Knowledge management |
|
|
104
|
-
| **Feishu (飞书)** | App Credential | Enterprise collaboration |
|
|
142
|
+
These apps have built-in descriptors and work out of the box:
|
|
105
143
|
|
|
106
|
-
|
|
144
|
+
| App | Type | Auth Type | Tools | Description |
|
|
145
|
+
| ----------------- | --------- | -------------- | ----- | --------------------------------------------------- |
|
|
146
|
+
| **Notion** | Web | API Key | 11 | Notes, docs, knowledge base, project management |
|
|
147
|
+
| **Yuque (语雀)** | Web | API Key | 7 | Alibaba Cloud knowledge management platform |
|
|
148
|
+
| **Feishu / Lark** | Web | App Credential | 11 | Enterprise collaboration (docs, wiki, IM, calendar) |
|
|
149
|
+
| **OpenCode** | ACP Agent | None | 4 | Open-source AI coding agent with terminal UI |
|
|
150
|
+
| **Claude Code** | ACP Agent | None | 4 | Anthropic's official AI coding agent |
|
|
151
|
+
| **Gemini CLI** | ACP Agent | None | 4 | Google's Gemini CLI coding agent |
|
|
107
152
|
|
|
108
|
-
|
|
153
|
+
> 💡 Want to add your app? See [How to Integrate](#how-to-integrate) | [Upcoming Apps](#upcoming-apps)
|
|
109
154
|
|
|
110
|
-
|
|
111
|
-
- macOS (Linux and Windows support planned)
|
|
112
|
-
- VS Code, Cursor, Windsurf, Claude Desktop, or any MCP client
|
|
155
|
+
> ⚠️ **Note**: AAI Gateway is currently in active development. Bugs may exist. Contributions are welcome!
|
|
113
156
|
|
|
114
|
-
|
|
157
|
+
---
|
|
115
158
|
|
|
116
|
-
|
|
159
|
+
## Installation
|
|
117
160
|
|
|
118
|
-
|
|
161
|
+
Add AAI Gateway to your MCP client configuration:
|
|
119
162
|
|
|
120
163
|
```json
|
|
121
164
|
{
|
|
@@ -140,7 +183,7 @@ claude mcp add aai-gateway npx aai-gateway
|
|
|
140
183
|
<details>
|
|
141
184
|
<summary>Claude Desktop</summary>
|
|
142
185
|
|
|
143
|
-
Follow the MCP
|
|
186
|
+
Follow the [MCP installation guide](https://modelcontextprotocol.io/quickstart/user). Config: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
144
187
|
|
|
145
188
|
</details>
|
|
146
189
|
|
|
@@ -151,22 +194,18 @@ Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user),
|
|
|
151
194
|
code --add-mcp '{"name":"aai-gateway","command":"npx","args":["aai-gateway"]}'
|
|
152
195
|
```
|
|
153
196
|
|
|
154
|
-
Or add manually to your MCP settings.
|
|
155
|
-
|
|
156
197
|
</details>
|
|
157
198
|
|
|
158
199
|
<details>
|
|
159
200
|
<summary>Cursor</summary>
|
|
160
201
|
|
|
161
|
-
|
|
202
|
+
`Cursor Settings` → `MCP` → `Add new MCP Server`. Name: `aai-gateway`, Type: `command`, Command: `npx aai-gateway`
|
|
162
203
|
|
|
163
204
|
</details>
|
|
164
205
|
|
|
165
206
|
<details>
|
|
166
207
|
<summary>OpenCode</summary>
|
|
167
208
|
|
|
168
|
-
Add to `~/.config/opencode/opencode.json`:
|
|
169
|
-
|
|
170
209
|
```json
|
|
171
210
|
{
|
|
172
211
|
"$schema": "https://opencode.ai/config.json",
|
|
@@ -180,225 +219,202 @@ Add to `~/.config/opencode/opencode.json`:
|
|
|
180
219
|
}
|
|
181
220
|
```
|
|
182
221
|
|
|
183
|
-
|
|
222
|
+
</details>
|
|
184
223
|
|
|
185
|
-
|
|
186
|
-
{
|
|
187
|
-
"$schema": "https://opencode.ai/config.json",
|
|
188
|
-
"mcp": {
|
|
189
|
-
"aai-gateway": {
|
|
190
|
-
"type": "local",
|
|
191
|
-
"command": ["npx", "aai-gateway", "--dev"],
|
|
192
|
-
"enabled": true
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
```
|
|
224
|
+
---
|
|
197
225
|
|
|
198
|
-
|
|
226
|
+
## CLI Options
|
|
199
227
|
|
|
200
|
-
|
|
228
|
+
| Option | Description |
|
|
229
|
+
| ----------- | ----------------------------------------------- |
|
|
230
|
+
| `--dev` | Development mode, scans Xcode build directories |
|
|
231
|
+
| `--scan` | Scan for AAI-enabled apps and exit |
|
|
232
|
+
| `--version` | Show version |
|
|
233
|
+
| `--help` | Show help |
|
|
201
234
|
|
|
202
|
-
|
|
203
|
-
| ----------- | ------------------------------------------------------------------------------ |
|
|
204
|
-
| `--dev` | Enable development mode. Scans Xcode build directories for apps in development |
|
|
205
|
-
| `--scan` | Scan for AAI-enabled apps and exit (for debugging) |
|
|
206
|
-
| `--version` | Show version |
|
|
207
|
-
| `--help` | Show help |
|
|
235
|
+
---
|
|
208
236
|
|
|
209
|
-
|
|
237
|
+
## Appendix
|
|
210
238
|
|
|
211
|
-
|
|
212
|
-
{
|
|
213
|
-
"mcpServers": {
|
|
214
|
-
"aai-gateway": {
|
|
215
|
-
"command": "npx",
|
|
216
|
-
"args": ["aai-gateway", "--dev"]
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
```
|
|
239
|
+
### How to Integrate
|
|
221
240
|
|
|
222
|
-
|
|
241
|
+
There are two ways to integrate an app with AAI Gateway today:
|
|
223
242
|
|
|
224
|
-
|
|
243
|
+
#### Method 1: Provide a Descriptor File
|
|
225
244
|
|
|
226
|
-
|
|
245
|
+
Place an `aai.json` descriptor at the standard location:
|
|
227
246
|
|
|
228
|
-
|
|
247
|
+
| Platform | Location |
|
|
248
|
+
| ----------- | -------------------------------------------- |
|
|
249
|
+
| **Web** | `https://<your-domain>/.well-known/aai.json` |
|
|
250
|
+
| **macOS** | `<App>.app/Contents/Resources/aai.json` |
|
|
251
|
+
| **Windows** | `<App>.exe directory/aai.json` |
|
|
252
|
+
| **Linux** | `/usr/share/<app>/aai.json` |
|
|
229
253
|
|
|
230
|
-
|
|
231
|
-
{
|
|
232
|
-
"tools": [
|
|
233
|
-
{
|
|
234
|
-
"name": "app:com.apple.reminders",
|
|
235
|
-
"description": "【Reminders|提醒事项|Rappels】macOS reminders app. Aliases: todo, 待办. Call to get guide.",
|
|
236
|
-
"inputSchema": { "type": "object", "properties": {} }
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"name": "web:discover",
|
|
240
|
-
"description": "Discover web app guide. Use when user mentions a web service not in list.",
|
|
241
|
-
"inputSchema": {
|
|
242
|
-
"type": "object",
|
|
243
|
-
"properties": {
|
|
244
|
-
"url": { "type": "string", "description": "Web app URL, domain, or name" }
|
|
245
|
-
},
|
|
246
|
-
"required": ["url"]
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"name": "aai:exec",
|
|
251
|
-
"description": "Execute app operation. Use after reading the operation guide.",
|
|
252
|
-
"inputSchema": {
|
|
253
|
-
"type": "object",
|
|
254
|
-
"properties": {
|
|
255
|
-
"app": { "type": "string", "description": "App ID or URL" },
|
|
256
|
-
"tool": { "type": "string", "description": "Operation name" },
|
|
257
|
-
"args": { "type": "object", "description": "Operation parameters" }
|
|
258
|
-
},
|
|
259
|
-
"required": ["app", "tool"]
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
]
|
|
263
|
-
}
|
|
264
|
-
```
|
|
254
|
+
AAI Gateway will automatically discover and load the descriptor.
|
|
265
255
|
|
|
266
|
-
|
|
256
|
+
#### Method 2: Contribute to Built-in Registry
|
|
267
257
|
|
|
268
|
-
|
|
258
|
+
For apps without a hosted descriptor, you can add a built-in descriptor:
|
|
269
259
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
"name": "app:com.apple.reminders",
|
|
273
|
-
"arguments": {}
|
|
274
|
-
}
|
|
275
|
-
```
|
|
260
|
+
- **Web App**: Create `src/discovery/descriptors/<app>.ts`, register in `src/discovery/web-registry.ts`
|
|
261
|
+
- **ACP Agent**: Create `src/discovery/descriptors/<agent>-agent.ts`, register in `src/discovery/agent-registry.ts`
|
|
276
262
|
|
|
277
|
-
|
|
263
|
+
Then submit a pull request.
|
|
278
264
|
|
|
279
|
-
|
|
265
|
+
> **Note**: ACP agents are auto-discovered by checking if the CLI command exists on the system.
|
|
280
266
|
|
|
281
|
-
|
|
267
|
+
#### Supported Auth Types
|
|
282
268
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
269
|
+
| Type | Use Case | User Flow |
|
|
270
|
+
| --------------- | ------------------ | -------------------------- |
|
|
271
|
+
| `oauth2` | User authorization | Browser OAuth 2.0 + PKCE |
|
|
272
|
+
| `apiKey` | Static API tokens | Dialog prompts for token |
|
|
273
|
+
| `appCredential` | Enterprise apps | Dialog for App ID + Secret |
|
|
274
|
+
| `cookie` | No official API | Manual cookie extraction |
|
|
289
275
|
|
|
290
|
-
|
|
276
|
+
#### Platform Support
|
|
291
277
|
|
|
292
|
-
|
|
278
|
+
| Platform | Discovery | IPC | Consent | Storage |
|
|
279
|
+
| ----------- | ---------------------- | ---------------- | -------------- | --------- |
|
|
280
|
+
| **macOS** | Supported | Apple Events | osascript | Keychain |
|
|
281
|
+
| **Linux** | XDG paths | DBus (gdbus) | zenity/kdialog | libsecret |
|
|
282
|
+
| **Windows** | Program Files | COM (PowerShell) | PowerShell | CredMan |
|
|
283
|
+
| **Web** | `.well-known/aai.json` | HTTP | N/A | Platform |
|
|
284
|
+
| **Stdio** | Protocol only | Planned | N/A | N/A |
|
|
293
285
|
|
|
294
|
-
|
|
286
|
+
> **Note**: Linux and Windows implementations are functional but may require additional testing and refinement. Contributions are welcome!
|
|
295
287
|
|
|
296
|
-
|
|
297
|
-
{
|
|
298
|
-
"name": "aai:exec",
|
|
299
|
-
"arguments": {
|
|
300
|
-
"app": "com.apple.reminders",
|
|
301
|
-
"tool": "createReminder",
|
|
302
|
-
"args": {
|
|
303
|
-
"title": "Submit report",
|
|
304
|
-
"due": "2024-12-31 15:00"
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
```
|
|
288
|
+
#### Windows Requirements
|
|
309
289
|
|
|
310
|
-
**
|
|
290
|
+
- **PowerShell 5.1+** (comes with Windows 10+)
|
|
291
|
+
- **Execution Policy**: Must allow script execution
|
|
311
292
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
- Desktop apps: Native IPC
|
|
316
|
-
- Web apps: OAuth 2.1 PKCE, API Key, App Credential, or Cookie
|
|
317
|
-
4. Execute and return result
|
|
293
|
+
```powershell
|
|
294
|
+
# Check current policy
|
|
295
|
+
Get-ExecutionPolicy
|
|
318
296
|
|
|
319
|
-
|
|
297
|
+
# Set to allow local scripts (recommended)
|
|
298
|
+
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
|
|
299
|
+
```
|
|
320
300
|
|
|
321
|
-
|
|
322
|
-
| --------------- | ------------------ | ---------------------------------- |
|
|
323
|
-
| `oauth2` | User authorization | Browser-based OAuth 2.0 with PKCE |
|
|
324
|
-
| `apiKey` | Static API tokens | Dialog prompts for token |
|
|
325
|
-
| `appCredential` | Enterprise apps | Dialog prompts for App ID + Secret |
|
|
326
|
-
| `cookie` | No official API | Manual cookie extraction |
|
|
301
|
+
- **Credential Manager**: Built-in Windows feature, no additional setup needed
|
|
327
302
|
|
|
328
|
-
|
|
303
|
+
#### Linux Requirements
|
|
329
304
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
| macOS | ✅ | ✅ Apple Events | ✅ osascript | ✅ Keychain |
|
|
333
|
-
| Linux | ⚠️ XDG paths | ⚠️ DBus | ⚠️ zenity/kdialog | ⚠️ libsecret |
|
|
334
|
-
| Windows | ⚠️ Program Files | ⚠️ COM | ⚠️ PowerShell | ⚠️ Credential Manager |
|
|
335
|
-
| Web | ✅ `.well-known/aai.json` | ✅ HTTP + Auth | — | ✅ (via platform) |
|
|
305
|
+
- **DBus**: Usually pre-installed on modern Linux distributions
|
|
306
|
+
- **Dialog Tools**: Install one of the following:
|
|
336
307
|
|
|
337
|
-
|
|
308
|
+
```bash
|
|
309
|
+
# Ubuntu/Debian
|
|
310
|
+
sudo apt install zenity # or kdialog
|
|
338
311
|
|
|
339
|
-
|
|
312
|
+
# Fedora
|
|
313
|
+
sudo dnf install zenity # or kdialog
|
|
340
314
|
|
|
341
|
-
|
|
315
|
+
# Arch Linux
|
|
316
|
+
sudo pacman -S zenity # or kdialog
|
|
317
|
+
```
|
|
342
318
|
|
|
343
|
-
**
|
|
319
|
+
- **libsecret**: For secure credential storage
|
|
344
320
|
|
|
345
|
-
|
|
321
|
+
```bash
|
|
322
|
+
# Ubuntu/Debian
|
|
323
|
+
sudo apt install libsecret-tools
|
|
346
324
|
|
|
347
|
-
|
|
325
|
+
# Fedora
|
|
326
|
+
sudo dnf install libsecret
|
|
327
|
+
```
|
|
348
328
|
|
|
349
|
-
|
|
350
|
-
{
|
|
351
|
-
"schemaVersion": "1.0",
|
|
352
|
-
"version": "1.0.0",
|
|
353
|
-
"platform": "web",
|
|
354
|
-
"app": {
|
|
355
|
-
"id": "com.example.api",
|
|
356
|
-
"name": {
|
|
357
|
-
"en": "Example App",
|
|
358
|
-
"zh-CN": "示例应用"
|
|
359
|
-
},
|
|
360
|
-
"defaultLang": "en",
|
|
361
|
-
"description": "Brief description",
|
|
362
|
-
"aliases": ["example", "示例"]
|
|
363
|
-
},
|
|
364
|
-
"auth": {
|
|
365
|
-
"type": "apiKey",
|
|
366
|
-
"apiKey": {
|
|
367
|
-
"location": "header",
|
|
368
|
-
"name": "Authorization",
|
|
369
|
-
"prefix": "Bearer",
|
|
370
|
-
"obtainUrl": "https://example.com/settings/tokens"
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
"tools": [...]
|
|
374
|
-
}
|
|
375
|
-
```
|
|
329
|
+
---
|
|
376
330
|
|
|
377
|
-
|
|
331
|
+
### Upcoming Apps
|
|
378
332
|
|
|
379
|
-
|
|
333
|
+
The following apps are planned for future integration, organized by priority:
|
|
380
334
|
|
|
381
|
-
|
|
382
|
-
# List discovered AAI-enabled apps
|
|
383
|
-
npx aai-gateway --scan
|
|
335
|
+
#### 🚀 Priority P0 - High Activity + Simple Integration
|
|
384
336
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
337
|
+
| App | Auth Type | API Base | Description |
|
|
338
|
+
| ---------- | ------------------ | ------------------- | --------------------------------------- |
|
|
339
|
+
| **GitHub** | OAuth2 / API Key | `api.github.com` | Code hosting, repositories, issues, PRs |
|
|
340
|
+
| **Linear** | API Key | `api.linear.app` | Modern project management |
|
|
341
|
+
| **Stripe** | API Key | `api.stripe.com` | Payment processing |
|
|
342
|
+
| **Slack** | OAuth2 / Bot Token | `slack.com/api` | Team messaging and channels |
|
|
343
|
+
| **Jira** | OAuth2 / API Token | `api.atlassian.com` | Issue and project tracking |
|
|
344
|
+
| **Gitee** | API Key | `gitee.com/api/v5` | Code hosting (China) |
|
|
388
345
|
|
|
389
|
-
|
|
346
|
+
#### 🔥 Priority P1 - High Activity
|
|
390
347
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
348
|
+
| App | Auth Type | API Base | Description |
|
|
349
|
+
| -------------------- | ------------------ | ----------------------------- | ---------------------------- |
|
|
350
|
+
| **Google Drive** | OAuth2 | `www.googleapis.com/drive` | Cloud storage and files |
|
|
351
|
+
| **Google Calendar** | OAuth2 | `www.googleapis.com/calendar` | Calendar and scheduling |
|
|
352
|
+
| **Airtable** | API Key / OAuth2 | `api.airtable.com` | Database and spreadsheets |
|
|
353
|
+
| **Trello** | API Key + Token | `api.trello.com/1` | Kanban boards |
|
|
354
|
+
| **Asana** | API Key / OAuth2 | `app.asana.com/api/1.0` | Project management |
|
|
355
|
+
| **Discord** | Bot Token / OAuth2 | `discord.com/api/v10` | Community messaging |
|
|
356
|
+
| **GitLab** | API Key / OAuth2 | `gitlab.com/api/v4` | DevOps platform |
|
|
357
|
+
| **DingTalk (钉钉)** | App Credential | `api.dingtalk.com/v1.0` | Enterprise messaging (China) |
|
|
358
|
+
| **WeCom (企业微信)** | App Credential | `qyapi.weixin.qq.com/cgi-bin` | Enterprise WeChat (China) |
|
|
359
|
+
|
|
360
|
+
#### 📈 Priority P2 - Medium Activity
|
|
361
|
+
|
|
362
|
+
**Project Management & Collaboration:**
|
|
363
|
+
|
|
364
|
+
| App | Auth Type | Description |
|
|
365
|
+
| ---------- | ---------------- | ------------------------ |
|
|
366
|
+
| Monday.com | API Key | Work management platform |
|
|
367
|
+
| ClickUp | API Key | Productivity platform |
|
|
368
|
+
| Basecamp | OAuth2 | Project collaboration |
|
|
369
|
+
| Bitbucket | API Key / OAuth2 | Git repository hosting |
|
|
370
|
+
|
|
371
|
+
**Communication & Email:**
|
|
372
|
+
|
|
373
|
+
| App | Auth Type | Description |
|
|
374
|
+
| ----------------- | ----------------------- | -------------------------- |
|
|
375
|
+
| Gmail | OAuth2 | Email by Google |
|
|
376
|
+
| Microsoft Outlook | OAuth2 | Email by Microsoft |
|
|
377
|
+
| SendGrid | API Key | Email delivery service |
|
|
378
|
+
| Mailgun | API Key | Email API service |
|
|
379
|
+
| Twilio | API Key | SMS and voice API |
|
|
380
|
+
| Tencent Meeting | OAuth2 / App Credential | Video conferencing (China) |
|
|
381
|
+
|
|
382
|
+
**Data & Storage:**
|
|
383
|
+
|
|
384
|
+
| App | Auth Type | Description |
|
|
385
|
+
| ------------- | --------- | --------------------- |
|
|
386
|
+
| Supabase | API Key | Backend-as-a-Service |
|
|
387
|
+
| PlanetScale | API Key | Serverless MySQL |
|
|
388
|
+
| Neon | API Key | Serverless PostgreSQL |
|
|
389
|
+
| Aliyun Drive | OAuth2 | Cloud storage (China) |
|
|
390
|
+
| Baidu Netdisk | OAuth2 | Cloud storage (China) |
|
|
391
|
+
|
|
392
|
+
**Payments & Commerce:**
|
|
393
|
+
|
|
394
|
+
| App | Auth Type | Description |
|
|
395
|
+
| ---------- | -------------- | ------------------------ |
|
|
396
|
+
| PayPal | OAuth2 | Payment platform |
|
|
397
|
+
| Square | API Key | Payment processing |
|
|
398
|
+
| Shopify | API Key | E-commerce platform |
|
|
399
|
+
| WeChat Pay | App Credential | Payment platform (China) |
|
|
400
|
+
|
|
401
|
+
#### 🔍 Priority P3 - Search & AI
|
|
402
|
+
|
|
403
|
+
| App | Auth Type | API Base | Description |
|
|
404
|
+
| ------------ | --------- | ----------------------------- | ---------------------- |
|
|
405
|
+
| Brave Search | API Key | `api.search.brave.com/res/v1` | Privacy-focused search |
|
|
406
|
+
| Perplexity | API Key | `api.perplexity.ai` | AI search engine |
|
|
407
|
+
| Exa | API Key | `api.exa.ai` | AI-powered search |
|
|
408
|
+
| Tavily | API Key | `api.tavily.com` | Search API for AI |
|
|
409
|
+
|
|
410
|
+
Want to see your app prioritized? [Open an issue](https://github.com/gybob/aai-gateway/issues).
|
|
397
411
|
|
|
398
412
|
## Links
|
|
399
413
|
|
|
400
|
-
- [AAI Protocol Spec](https://github.com/gybob/aai-protocol)
|
|
401
|
-
- [Report Issues](https://github.com/gybob/aai-gateway/issues)
|
|
414
|
+
- **[AAI Protocol Spec](https://github.com/gybob/aai-protocol)** - Protocol specification
|
|
415
|
+
- [Report Issues](https://github.com/gybob/aai-gateway/issues) - Bug reports and feature requests
|
|
416
|
+
|
|
417
|
+
---
|
|
402
418
|
|
|
403
419
|
## License
|
|
404
420
|
|