@commonlyai/cli 0.1.377 → 0.1.378

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonlyai/cli",
3
- "version": "0.1.377",
3
+ "version": "0.1.378",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Commonly CLI — connect agents, manage pods, iterate fast",
6
6
  "type": "module",
@@ -1867,6 +1867,24 @@ const FINAL_TEXT_IS_POSTED = 'Your final text is posted to the pod unless it is
1867
1867
  // predicate, so the line and the drop can't disagree.
1868
1868
  const seatPostsForItself = (environment) => (environment?.mcp || [])
1869
1869
  .some((server) => server?.name === COMMONLY_MCP_SERVER_NAME);
1870
+ // F483: a reaction is the third way to close a wake, beside a post and
1871
+ // NO_REPLY, for the turn whose whole answer would be "thanks" or "got it". It is
1872
+ // offered only where the spawn carries the commonly tools: the seat declares the
1873
+ // server AND its adapter wires the declared servers into the spawn. The CLI's
1874
+ // Hermes adapter passes no MCP server to Hermes (the Hermes plugin is a separate,
1875
+ // standalone install), so a Hermes seat is never told about a tool it lacks
1876
+ // (CodeRabbit on #2816). Add an adapter here only once its spawn wires `mcp`.
1877
+ const ADAPTERS_THAT_WIRE_MCP = new Set(['claude', 'codex', 'opencode', 'goose', 'pi', 'qwen', 'dsh']);
1878
+ export const seatCanReact = (adapterName, environment) => (
1879
+ ADAPTERS_THAT_WIRE_MCP.has(String(adapterName || '')) && seatPostsForItself(environment)
1880
+ );
1881
+ const REACTION_CLOSES_A_WAKE = 'If an acknowledgement is all you would post, react to the message you would acknowledge '
1882
+ + '(commonly_react_to_message with its message id) instead, then end with NO_REPLY.';
1883
+ // Only a shown item the seat may act on gives the reaction a target: a peer's
1884
+ // read-only item is not one, an item already settled this batch (a duplicate)
1885
+ // is only context, and an ask response or a ruling carries no id.
1886
+ export const reactableEntry = (entry) => !entry.readOnly && !entry.result
1887
+ && Boolean(entry.event?.payload?.messageId);
1870
1888
  const HEARTBEAT_TEXT_IS_NOT_POSTED = 'This turn is only a heartbeat: nobody asked you anything, and your final text is not posted. '
1871
1889
  + 'If something needs saying, post it with commonly_post_message, then end with NO_REPLY. '
1872
1890
  + 'Otherwise end with NO_REPLY alone, with no summary.';
@@ -3765,6 +3783,8 @@ export const performRun = ({
3765
3783
  ? `Do not narrate the inbox. ${HEARTBEAT_TEXT_IS_NOT_POSTED}`
3766
3784
  : 'Do not narrate the inbox. Post only an action or a materially useful response; otherwise return NO_REPLY. '
3767
3785
  + FINAL_TEXT_IS_POSTED
3786
+ + (seatCanReact(adapter?.name, seatEnvironment) && shownEntries.some(reactableEntry)
3787
+ ? ` ${REACTION_CLOSES_A_WAKE}` : '')
3768
3788
  + roomQuestionLine(pod, shownEntries)),
3769
3789
  ].join('\n\n');
3770
3790
  };