@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.
package/dist/testing.cjs CHANGED
@@ -1787,6 +1787,7 @@ var TestServer = class {
1787
1787
  throw MAPRequestError.agentNotFound(params.parent);
1788
1788
  }
1789
1789
  return this.#handleAgentsRegister(connection, {
1790
+ agentId: params.agentId,
1790
1791
  name: params.name,
1791
1792
  role: params.role,
1792
1793
  parent: params.parent
@@ -5568,6 +5569,58 @@ var AgentConnection = class _AgentConnection {
5568
5569
  return await this.#connection.sendRequest(method, params);
5569
5570
  }
5570
5571
  // ===========================================================================
5572
+ // Tasks
5573
+ // ===========================================================================
5574
+ /**
5575
+ * Create a new task.
5576
+ *
5577
+ * @param params - Task creation parameters
5578
+ * @returns The created task
5579
+ */
5580
+ async createTask(params) {
5581
+ return this.#connection.sendRequest(
5582
+ TASK_METHODS.TASKS_CREATE,
5583
+ params
5584
+ );
5585
+ }
5586
+ /**
5587
+ * Assign a task to an agent.
5588
+ *
5589
+ * @param taskId - ID of the task to assign
5590
+ * @param agentId - ID of the agent to assign to
5591
+ * @returns The updated task
5592
+ */
5593
+ async assignTask(taskId, agentId) {
5594
+ return this.#connection.sendRequest(
5595
+ TASK_METHODS.TASKS_ASSIGN,
5596
+ { taskId, agentId }
5597
+ );
5598
+ }
5599
+ /**
5600
+ * Update a task's status or fields.
5601
+ *
5602
+ * @param params - Update parameters including taskId and fields to change
5603
+ * @returns The updated task
5604
+ */
5605
+ async updateTask(params) {
5606
+ return this.#connection.sendRequest(
5607
+ TASK_METHODS.TASKS_UPDATE,
5608
+ params
5609
+ );
5610
+ }
5611
+ /**
5612
+ * List tasks with optional filters.
5613
+ *
5614
+ * @param params - Optional filter, limit, and cursor parameters
5615
+ * @returns Paginated list of tasks
5616
+ */
5617
+ async listTasks(params) {
5618
+ return this.#connection.sendRequest(
5619
+ TASK_METHODS.TASKS_LIST,
5620
+ params ?? {}
5621
+ );
5622
+ }
5623
+ // ===========================================================================
5571
5624
  // Internal
5572
5625
  // ===========================================================================
5573
5626
  /**