aai-gateway 0.1.0 → 0.1.2
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
|
@@ -6,8 +6,7 @@ Reference implementation of the [AAI Protocol](https://github.com/gybob/aai-prot
|
|
|
6
6
|
|
|
7
7
|
### Key Features
|
|
8
8
|
|
|
9
|
-
- **
|
|
10
|
-
- **Progressive discovery**. Apps discovered on-demand via MCP resources, avoiding context explosion.
|
|
9
|
+
- **Tool discovery**. All discovered app tools exposed via `tools/list` for seamless MCP client integration.
|
|
11
10
|
- **Native security**. Leverages OS-level consent (TCC, UAC, Polkit) and secure storage (Keychain, Credential Manager).
|
|
12
11
|
- **Cross-platform**. Supports macOS today, Linux and Windows planned.
|
|
13
12
|
|
|
@@ -133,8 +132,7 @@ Use `--dev` when developing AAI-enabled applications in Xcode to discover apps b
|
|
|
133
132
|
|
|
134
133
|
### MCP Interface
|
|
135
134
|
|
|
136
|
-
AAI Gateway exposes
|
|
137
|
-
|
|
135
|
+
AAI Gateway exposes standard MCP primitives: `resources/list`, `resources/read`, `tools/list`, and `tools/call`.
|
|
138
136
|
#### `resources/list`
|
|
139
137
|
|
|
140
138
|
Returns all AAI-enabled apps discovered on the current machine.
|
|
@@ -165,6 +163,27 @@ Accepts two URI types:
|
|
|
165
163
|
|
|
166
164
|
Returns the full `aai.json` descriptor including the app's tool list and schemas.
|
|
167
165
|
|
|
166
|
+
#### `tools/list`
|
|
167
|
+
|
|
168
|
+
Returns all tools from all discovered apps. Each tool name is prefixed with the app's bundle ID to avoid collisions.
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"tools": [
|
|
173
|
+
{
|
|
174
|
+
"name": "com.acme.crm:create_contact",
|
|
175
|
+
"description": "Create a new contact in the CRM",
|
|
176
|
+
"inputSchema": { ... }
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "com.acme.invoice:send_invoice",
|
|
180
|
+
"description": "Send an invoice to a customer",
|
|
181
|
+
"inputSchema": { ... }
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
168
187
|
#### `tools/call`
|
|
169
188
|
|
|
170
189
|
Tool name format: `<app-id>:<tool-name>`
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { b as createDesktopDiscovery, d as createGatewayServer, l as logger } from "./server-
|
|
2
|
+
import { b as createDesktopDiscovery, d as createGatewayServer, l as logger } from "./server-Co-wKJpj.js";
|
|
3
3
|
const VERSION = "0.1.0";
|
|
4
4
|
function parseArgs(args) {
|
|
5
5
|
return {
|
package/dist/index.js
CHANGED
|
@@ -7934,8 +7934,8 @@ class MacOSDiscovery {
|
|
|
7934
7934
|
searchPaths.push(...XCODE_DEV_PATHS);
|
|
7935
7935
|
logger.info("Development mode enabled - scanning Xcode build directories");
|
|
7936
7936
|
}
|
|
7937
|
-
const
|
|
7938
|
-
const findCmd = `find ${
|
|
7937
|
+
const pathsArg = searchPaths.join(" ");
|
|
7938
|
+
const findCmd = `setopt nullglob 2>/dev/null; find ${pathsArg} -maxdepth 4 -path "*/Contents/Resources/aai.json" 2>/dev/null`;
|
|
7939
7939
|
let stdout;
|
|
7940
7940
|
try {
|
|
7941
7941
|
const result = await execAsync(findCmd, { shell: "/bin/zsh" });
|
|
@@ -8588,6 +8588,20 @@ class AaiGatewayServer {
|
|
|
8588
8588
|
}));
|
|
8589
8589
|
return { resources };
|
|
8590
8590
|
});
|
|
8591
|
+
this.server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
8592
|
+
const tools = [];
|
|
8593
|
+
for (const app of this.desktopRegistry.values()) {
|
|
8594
|
+
for (const tool of app.descriptor.tools) {
|
|
8595
|
+
tools.push({
|
|
8596
|
+
name: `${app.appId}:${tool.name}`,
|
|
8597
|
+
description: tool.description,
|
|
8598
|
+
inputSchema: tool.parameters ?? { type: "object", properties: {} }
|
|
8599
|
+
});
|
|
8600
|
+
}
|
|
8601
|
+
}
|
|
8602
|
+
logger.debug({ toolCount: tools.length }, "tools/list requested");
|
|
8603
|
+
return { tools };
|
|
8604
|
+
});
|
|
8591
8605
|
this.server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
8592
8606
|
const uri = request.params.uri;
|
|
8593
8607
|
let descriptor;
|
|
@@ -8688,4 +8702,4 @@ export {
|
|
|
8688
8702
|
parseAaiJson as p,
|
|
8689
8703
|
startOAuthFlow as s
|
|
8690
8704
|
};
|
|
8691
|
-
//# sourceMappingURL=server-
|
|
8705
|
+
//# sourceMappingURL=server-Co-wKJpj.js.map
|