@agenticmail/openclaw 0.5.34 → 0.5.37

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1787,12 +1787,23 @@ ${orig.text || ""}`;
1787
1787
  handler: async (params) => {
1788
1788
  try {
1789
1789
  const c = await ctxForParams(ctx, params);
1790
- return await apiRequest(c, "POST", "/tasks/assign", {
1790
+ const result = await apiRequest(c, "POST", "/tasks/assign", {
1791
1791
  assignee: params.assignee,
1792
1792
  taskType: params.taskType,
1793
1793
  payload: params.payload,
1794
1794
  expiresInSeconds: params.expiresInSeconds
1795
1795
  });
1796
+ if (result?.id && coordination?.spawnForTask) {
1797
+ const taskPayload = {
1798
+ task: params.payload?.task || params.payload?.description || JSON.stringify(params.payload || {}),
1799
+ _mode: "light",
1800
+ _async: true,
1801
+ ...params.payload || {}
1802
+ };
1803
+ coordination.spawnForTask(params.assignee, result.id, taskPayload).catch(() => {
1804
+ });
1805
+ }
1806
+ return result;
1796
1807
  } catch (err) {
1797
1808
  return { success: false, error: err.message };
1798
1809
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/openclaw",
3
- "version": "0.5.34",
3
+ "version": "0.5.37",
4
4
  "description": "OpenClaw plugin for AgenticMail \u2014 email, SMS, and phone number access for OpenClaw agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",