morpheus-cli 0.7.6 → 0.7.7

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.
@@ -48,14 +48,25 @@ export const ApocDelegateTool = tool(async ({ task, context }) => {
48
48
  ChannelRegistry.sendToUser(ctx.origin_channel, ctx.origin_user_id, '🧑‍🔬 Apoc is executing your request...')
49
49
  .catch(() => { });
50
50
  }
51
- const apoc = Apoc.getInstance();
52
- const result = await apoc.execute(task, context, sessionId);
53
- TaskRequestContext.incrementSyncDelegation();
54
- display.log(`Apoc sync execution completed.`, {
55
- source: "ApocDelegateTool",
56
- level: "info",
57
- });
58
- return result;
51
+ try {
52
+ const apoc = Apoc.getInstance();
53
+ const result = await apoc.execute(task, context, sessionId);
54
+ TaskRequestContext.incrementSyncDelegation();
55
+ display.log(`Apoc sync execution completed.`, {
56
+ source: "ApocDelegateTool",
57
+ level: "info",
58
+ });
59
+ return result;
60
+ }
61
+ catch (syncErr) {
62
+ // Still count as sync delegation so Oracle passes through the error message
63
+ TaskRequestContext.incrementSyncDelegation();
64
+ display.log(`Apoc sync execution failed: ${syncErr.message}`, {
65
+ source: "ApocDelegateTool",
66
+ level: "error",
67
+ });
68
+ return `❌ Apoc error: ${syncErr.message}`;
69
+ }
59
70
  }
60
71
  // ── Async mode (default): create background task ──
61
72
  const existingAck = TaskRequestContext.findDuplicateDelegation("apoc", task);
@@ -76,19 +76,30 @@ export const NeoDelegateTool = tool(async ({ task, context }) => {
76
76
  ChannelRegistry.sendToUser(ctx.origin_channel, ctx.origin_user_id, '🥷 Neo is executing your request...')
77
77
  .catch(() => { });
78
78
  }
79
- const neo = Neo.getInstance();
80
- const result = await neo.execute(task, context, sessionId, {
81
- origin_channel: ctx?.origin_channel ?? "api",
82
- session_id: sessionId,
83
- origin_message_id: ctx?.origin_message_id,
84
- origin_user_id: ctx?.origin_user_id,
85
- });
86
- TaskRequestContext.incrementSyncDelegation();
87
- display.log(`Neo sync execution completed.`, {
88
- source: "NeoDelegateTool",
89
- level: "info",
90
- });
91
- return result;
79
+ try {
80
+ const neo = Neo.getInstance();
81
+ const result = await neo.execute(task, context, sessionId, {
82
+ origin_channel: ctx?.origin_channel ?? "api",
83
+ session_id: sessionId,
84
+ origin_message_id: ctx?.origin_message_id,
85
+ origin_user_id: ctx?.origin_user_id,
86
+ });
87
+ TaskRequestContext.incrementSyncDelegation();
88
+ display.log(`Neo sync execution completed.`, {
89
+ source: "NeoDelegateTool",
90
+ level: "info",
91
+ });
92
+ return result;
93
+ }
94
+ catch (syncErr) {
95
+ // Still count as sync delegation so Oracle passes through the error message
96
+ TaskRequestContext.incrementSyncDelegation();
97
+ display.log(`Neo sync execution failed: ${syncErr.message}`, {
98
+ source: "NeoDelegateTool",
99
+ level: "error",
100
+ });
101
+ return `❌ Neo error: ${syncErr.message}`;
102
+ }
92
103
  }
93
104
  // ── Async mode (default): create background task ──
94
105
  const existingAck = TaskRequestContext.findDuplicateDelegation("neo", task);
@@ -63,14 +63,25 @@ export const TrinityDelegateTool = tool(async ({ task, context }) => {
63
63
  ChannelRegistry.sendToUser(ctx.origin_channel, ctx.origin_user_id, '👩‍💻 Trinity is executing your request...')
64
64
  .catch(() => { });
65
65
  }
66
- const trinity = Trinity.getInstance();
67
- const result = await trinity.execute(task, context, sessionId);
68
- TaskRequestContext.incrementSyncDelegation();
69
- display.log(`Trinity sync execution completed.`, {
70
- source: 'TrinityDelegateTool',
71
- level: 'info',
72
- });
73
- return result;
66
+ try {
67
+ const trinity = Trinity.getInstance();
68
+ const result = await trinity.execute(task, context, sessionId);
69
+ TaskRequestContext.incrementSyncDelegation();
70
+ display.log(`Trinity sync execution completed.`, {
71
+ source: 'TrinityDelegateTool',
72
+ level: 'info',
73
+ });
74
+ return result;
75
+ }
76
+ catch (syncErr) {
77
+ // Still count as sync delegation so Oracle passes through the error message
78
+ TaskRequestContext.incrementSyncDelegation();
79
+ display.log(`Trinity sync execution failed: ${syncErr.message}`, {
80
+ source: 'TrinityDelegateTool',
81
+ level: 'error',
82
+ });
83
+ return `❌ Trinity error: ${syncErr.message}`;
84
+ }
74
85
  }
75
86
  // ── Async mode (default): create background task ──
76
87
  const existingAck = TaskRequestContext.findDuplicateDelegation('trinit', task);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morpheus-cli",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "description": "Morpheus is a local AI agent for developers, running as a CLI daemon that connects to LLMs, local tools, and MCPs, enabling interaction via Terminal, Telegram, and Discord. Inspired by the character Morpheus from *The Matrix*, the project acts as an intelligent orchestrator, bridging the gap between the developer and complex systems.",
5
5
  "bin": {
6
6
  "morpheus": "./bin/morpheus.js"