@multi-agent-protocol/sdk 0.0.8 → 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/testing.cjs CHANGED
@@ -265,7 +265,11 @@ var FEDERATION_ERROR_CODES = {
265
265
  /** Message has already visited this system (loop detected) */
266
266
  FEDERATION_LOOP_DETECTED: 5010,
267
267
  /** Message exceeded maximum hop count */
268
- FEDERATION_MAX_HOPS_EXCEEDED: 5011
268
+ FEDERATION_MAX_HOPS_EXCEEDED: 5011,
269
+ /** DID document resolution failed (network error, invalid document, etc.) */
270
+ FEDERATION_DID_RESOLUTION_FAILED: 5004,
271
+ /** DID proof verification failed (bad signature, expired, wrong challenge, etc.) */
272
+ FEDERATION_DID_PROOF_INVALID: 5005
269
273
  };
270
274
  var MAIL_ERROR_CODES = {
271
275
  MAIL_CONVERSATION_NOT_FOUND: 1e4,
@@ -4003,6 +4007,32 @@ var ClientConnection = class _ClientConnection {
4003
4007
  return this.#connection.sendRequest(STATE_METHODS.AGENTS_RESUME, { agentId });
4004
4008
  }
4005
4009
  // ===========================================================================
4010
+ // Extensions
4011
+ // ===========================================================================
4012
+ /**
4013
+ * Call a server extension method directly via JSON-RPC.
4014
+ *
4015
+ * Extension methods (prefixed with `_macro/` or similar) are registered on the
4016
+ * server's RPC handler and callable as standard JSON-RPC methods. This bypasses
4017
+ * ACP-over-MAP messaging — use this for simple request/response operations that
4018
+ * don't need ACP session semantics.
4019
+ *
4020
+ * @param method - The extension method name (e.g., "_macro/workspace/files/search")
4021
+ * @param params - Parameters to pass to the extension method
4022
+ * @returns The result from the extension method
4023
+ *
4024
+ * @example
4025
+ * ```typescript
4026
+ * const result = await client.callExtension('_macro/workspace/files/search', {
4027
+ * agentId: 'agent-1',
4028
+ * query: 'app.tsx',
4029
+ * });
4030
+ * ```
4031
+ */
4032
+ async callExtension(method, params) {
4033
+ return this.#connection.sendRequest(method, params);
4034
+ }
4035
+ // ===========================================================================
4006
4036
  // Mail
4007
4037
  // ===========================================================================
4008
4038
  /**