@multi-agent-protocol/sdk 0.0.9 → 0.0.10
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/dist/{index-J32EeqzO.d.cts → index-C7Jyk_qT.d.cts} +21 -0
- package/dist/{index-J32EeqzO.d.ts → index-C7Jyk_qT.d.ts} +21 -0
- package/dist/index.cjs +26 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +26 -0
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +26 -0
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
|
@@ -4933,6 +4933,27 @@ declare class ClientConnection {
|
|
|
4933
4933
|
resumed: boolean;
|
|
4934
4934
|
agent?: Agent;
|
|
4935
4935
|
}>;
|
|
4936
|
+
/**
|
|
4937
|
+
* Call a server extension method directly via JSON-RPC.
|
|
4938
|
+
*
|
|
4939
|
+
* Extension methods (prefixed with `_macro/` or similar) are registered on the
|
|
4940
|
+
* server's RPC handler and callable as standard JSON-RPC methods. This bypasses
|
|
4941
|
+
* ACP-over-MAP messaging — use this for simple request/response operations that
|
|
4942
|
+
* don't need ACP session semantics.
|
|
4943
|
+
*
|
|
4944
|
+
* @param method - The extension method name (e.g., "_macro/workspace/files/search")
|
|
4945
|
+
* @param params - Parameters to pass to the extension method
|
|
4946
|
+
* @returns The result from the extension method
|
|
4947
|
+
*
|
|
4948
|
+
* @example
|
|
4949
|
+
* ```typescript
|
|
4950
|
+
* const result = await client.callExtension('_macro/workspace/files/search', {
|
|
4951
|
+
* agentId: 'agent-1',
|
|
4952
|
+
* query: 'app.tsx',
|
|
4953
|
+
* });
|
|
4954
|
+
* ```
|
|
4955
|
+
*/
|
|
4956
|
+
callExtension<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
|
|
4936
4957
|
/**
|
|
4937
4958
|
* Create a new mail conversation.
|
|
4938
4959
|
*
|
|
@@ -4933,6 +4933,27 @@ declare class ClientConnection {
|
|
|
4933
4933
|
resumed: boolean;
|
|
4934
4934
|
agent?: Agent;
|
|
4935
4935
|
}>;
|
|
4936
|
+
/**
|
|
4937
|
+
* Call a server extension method directly via JSON-RPC.
|
|
4938
|
+
*
|
|
4939
|
+
* Extension methods (prefixed with `_macro/` or similar) are registered on the
|
|
4940
|
+
* server's RPC handler and callable as standard JSON-RPC methods. This bypasses
|
|
4941
|
+
* ACP-over-MAP messaging — use this for simple request/response operations that
|
|
4942
|
+
* don't need ACP session semantics.
|
|
4943
|
+
*
|
|
4944
|
+
* @param method - The extension method name (e.g., "_macro/workspace/files/search")
|
|
4945
|
+
* @param params - Parameters to pass to the extension method
|
|
4946
|
+
* @returns The result from the extension method
|
|
4947
|
+
*
|
|
4948
|
+
* @example
|
|
4949
|
+
* ```typescript
|
|
4950
|
+
* const result = await client.callExtension('_macro/workspace/files/search', {
|
|
4951
|
+
* agentId: 'agent-1',
|
|
4952
|
+
* query: 'app.tsx',
|
|
4953
|
+
* });
|
|
4954
|
+
* ```
|
|
4955
|
+
*/
|
|
4956
|
+
callExtension<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
|
|
4936
4957
|
/**
|
|
4937
4958
|
* Create a new mail conversation.
|
|
4938
4959
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -3330,6 +3330,32 @@ var ClientConnection = class _ClientConnection {
|
|
|
3330
3330
|
return this.#connection.sendRequest(STATE_METHODS.AGENTS_RESUME, { agentId });
|
|
3331
3331
|
}
|
|
3332
3332
|
// ===========================================================================
|
|
3333
|
+
// Extensions
|
|
3334
|
+
// ===========================================================================
|
|
3335
|
+
/**
|
|
3336
|
+
* Call a server extension method directly via JSON-RPC.
|
|
3337
|
+
*
|
|
3338
|
+
* Extension methods (prefixed with `_macro/` or similar) are registered on the
|
|
3339
|
+
* server's RPC handler and callable as standard JSON-RPC methods. This bypasses
|
|
3340
|
+
* ACP-over-MAP messaging — use this for simple request/response operations that
|
|
3341
|
+
* don't need ACP session semantics.
|
|
3342
|
+
*
|
|
3343
|
+
* @param method - The extension method name (e.g., "_macro/workspace/files/search")
|
|
3344
|
+
* @param params - Parameters to pass to the extension method
|
|
3345
|
+
* @returns The result from the extension method
|
|
3346
|
+
*
|
|
3347
|
+
* @example
|
|
3348
|
+
* ```typescript
|
|
3349
|
+
* const result = await client.callExtension('_macro/workspace/files/search', {
|
|
3350
|
+
* agentId: 'agent-1',
|
|
3351
|
+
* query: 'app.tsx',
|
|
3352
|
+
* });
|
|
3353
|
+
* ```
|
|
3354
|
+
*/
|
|
3355
|
+
async callExtension(method, params) {
|
|
3356
|
+
return this.#connection.sendRequest(method, params);
|
|
3357
|
+
}
|
|
3358
|
+
// ===========================================================================
|
|
3333
3359
|
// Mail
|
|
3334
3360
|
// ===========================================================================
|
|
3335
3361
|
/**
|