@multi-agent-protocol/sdk 0.1.2 → 0.1.4

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.
@@ -1,4 +1,4 @@
1
- import { P as ParticipantCapabilities, hG as SystemExposure, d as FederationRoutingConfig, S as Stream, cy as BaseConnection, f as SessionId, A as AgentId, n as Agent, m as ScopeId, o as Scope, g9 as TaskId, dH as MAPTask, c as Message, r as Event, k as ParticipantId, N as SubscriptionId, cG as ClientConnectionOptions, cF as ClientConnection, c3 as AgentsListRequestParams, fy as ScopesListRequestParams, q as SubscriptionFilter, fY as Subscription, e as EventType, bM as AgentConnectionOptions, X as AgentConnection } from './index-B1Lpo3ll.cjs';
1
+ import { P as ParticipantCapabilities, hG as SystemExposure, d as FederationRoutingConfig, S as Stream, cy as BaseConnection, f as SessionId, A as AgentId, n as Agent, m as ScopeId, o as Scope, g9 as TaskId, dH as MAPTask, c as Message, r as Event, k as ParticipantId, N as SubscriptionId, cG as ClientConnectionOptions, cF as ClientConnection, c3 as AgentsListRequestParams, fy as ScopesListRequestParams, q as SubscriptionFilter, fY as Subscription, e as EventType, bM as AgentConnectionOptions, X as AgentConnection } from './index-B5adJHGI.cjs';
2
2
  import 'events';
3
3
 
4
4
  /**
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as ParticipantCapabilities, hG as SystemExposure, d as FederationRoutingConfig, S as Stream, cy as BaseConnection, f as SessionId, A as AgentId, n as Agent, m as ScopeId, o as Scope, g9 as TaskId, dH as MAPTask, c as Message, r as Event, k as ParticipantId, N as SubscriptionId, cG as ClientConnectionOptions, cF as ClientConnection, c3 as AgentsListRequestParams, fy as ScopesListRequestParams, q as SubscriptionFilter, fY as Subscription, e as EventType, bM as AgentConnectionOptions, X as AgentConnection } from './index-B1Lpo3ll.js';
1
+ import { P as ParticipantCapabilities, hG as SystemExposure, d as FederationRoutingConfig, S as Stream, cy as BaseConnection, f as SessionId, A as AgentId, n as Agent, m as ScopeId, o as Scope, g9 as TaskId, dH as MAPTask, c as Message, r as Event, k as ParticipantId, N as SubscriptionId, cG as ClientConnectionOptions, cF as ClientConnection, c3 as AgentsListRequestParams, fy as ScopesListRequestParams, q as SubscriptionFilter, fY as Subscription, e as EventType, bM as AgentConnectionOptions, X as AgentConnection } from './index-B5adJHGI.js';
2
2
  import 'events';
3
3
 
4
4
  /**
package/dist/testing.js CHANGED
@@ -1785,6 +1785,7 @@ var TestServer = class {
1785
1785
  throw MAPRequestError.agentNotFound(params.parent);
1786
1786
  }
1787
1787
  return this.#handleAgentsRegister(connection, {
1788
+ agentId: params.agentId,
1788
1789
  name: params.name,
1789
1790
  role: params.role,
1790
1791
  parent: params.parent
@@ -5566,6 +5567,58 @@ var AgentConnection = class _AgentConnection {
5566
5567
  return await this.#connection.sendRequest(method, params);
5567
5568
  }
5568
5569
  // ===========================================================================
5570
+ // Tasks
5571
+ // ===========================================================================
5572
+ /**
5573
+ * Create a new task.
5574
+ *
5575
+ * @param params - Task creation parameters
5576
+ * @returns The created task
5577
+ */
5578
+ async createTask(params) {
5579
+ return this.#connection.sendRequest(
5580
+ TASK_METHODS.TASKS_CREATE,
5581
+ params
5582
+ );
5583
+ }
5584
+ /**
5585
+ * Assign a task to an agent.
5586
+ *
5587
+ * @param taskId - ID of the task to assign
5588
+ * @param agentId - ID of the agent to assign to
5589
+ * @returns The updated task
5590
+ */
5591
+ async assignTask(taskId, agentId) {
5592
+ return this.#connection.sendRequest(
5593
+ TASK_METHODS.TASKS_ASSIGN,
5594
+ { taskId, agentId }
5595
+ );
5596
+ }
5597
+ /**
5598
+ * Update a task's status or fields.
5599
+ *
5600
+ * @param params - Update parameters including taskId and fields to change
5601
+ * @returns The updated task
5602
+ */
5603
+ async updateTask(params) {
5604
+ return this.#connection.sendRequest(
5605
+ TASK_METHODS.TASKS_UPDATE,
5606
+ params
5607
+ );
5608
+ }
5609
+ /**
5610
+ * List tasks with optional filters.
5611
+ *
5612
+ * @param params - Optional filter, limit, and cursor parameters
5613
+ * @returns Paginated list of tasks
5614
+ */
5615
+ async listTasks(params) {
5616
+ return this.#connection.sendRequest(
5617
+ TASK_METHODS.TASKS_LIST,
5618
+ params ?? {}
5619
+ );
5620
+ }
5621
+ // ===========================================================================
5569
5622
  // Internal
5570
5623
  // ===========================================================================
5571
5624
  /**