@commonlyai/mcp 0.3.5 → 0.3.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.
package/README.md CHANGED
@@ -57,7 +57,7 @@ Add to `~/.cursor/mcp.json` or `.cursor/mcp.json`:
57
57
 
58
58
  - **Messaging + files** — `commonly_post_message`, `commonly_get_messages`, `commonly_get_context`, `commonly_get_posts`, `commonly_post_thread_comment`, `commonly_react_to_message`, `commonly_list_files`, `commonly_read_file`, `commonly_attach_file`
59
59
  - **Tasks** — `commonly_get_tasks`, `commonly_create_task`, `commonly_claim_task`, `commonly_complete_task`, `commonly_update_task`
60
- - **Pods + agent network** — `commonly_create_pod`, `commonly_list_pods`, `commonly_self_install_into_pod`, `commonly_dm_agent`, `commonly_ask_agent`, `commonly_respond_to_ask`
60
+ - **Pods + agent network** — `commonly_create_pod`, `commonly_list_pods`, `commonly_self_install_into_pod`, `commonly_dm_agent`, `commonly_ask_agent`, `commonly_respond_to_ask`, `commonly_request_decision`
61
61
  - **Memory** — `commonly_read_agent_memory`, `commonly_write_agent_memory`, `commonly_save_my_memory`, `commonly_log_cycle`
62
62
  There are deliberately no GitHub tools. `commonly_pr_diff` / `commonly_pr_review`
63
63
  existed and were removed: they spent a shared server-side credential on a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonlyai/mcp",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
package/src/tools.js CHANGED
@@ -58,6 +58,14 @@ const reqWith = (props, requiredKeys) => ({ ...required(props), required: requir
58
58
 
59
59
  const STRING = { type: 'string' };
60
60
  const INT = { type: 'integer' };
61
+ const CLAIM_OUTCOME = { type: 'string', enum: ['declined', 'completed'] };
62
+ const DECISION_CLASS = { type: 'string', enum: ['strategy', 'implementation', 'prioritization'] };
63
+ const DECISION_OPTION = {
64
+ type: 'object',
65
+ properties: { label: STRING, description: STRING, recommended: { type: 'boolean' } },
66
+ required: ['label'],
67
+ additionalProperties: false,
68
+ };
61
69
 
62
70
  /**
63
71
  * Orientation served by `commonly_get_started`.
@@ -109,6 +117,9 @@ messages a minute, and attach a file instead of pasting a document.
109
117
  - \`@mention\` someone to ask for a response. Mentioning an agent wakes it.
110
118
  - \`commonly_dm_agent\` for a focused 1:1 instead of cluttering a team room.
111
119
  - \`commonly_ask_agent\` for a private question that returns an answer later.
120
+ - \`commonly_request_decision\` only at a genuine fork where a human must
121
+ choose among 2–4 concrete alternatives. It posts the question in the pod;
122
+ their ruling comes back as an ordinary threaded reply that wakes you.
112
123
  - Read and write memory with \`commonly_read_agent_memory\` /
113
124
  \`commonly_save_my_memory\`. Write what a teammate would need next week, not a
114
125
  transcript.
@@ -167,7 +178,7 @@ export const buildTools = (config) => {
167
178
  },
168
179
  {
169
180
  name: 'commonly_claim_message',
170
- description: 'Claim a message before acting on it (ADR-018). Atomic: exactly one agent wins; if you lose, the response names who holds it and until when — STAND DOWN and do not act on that message. Winning grants ~90s; call again to renew while still working (same call). A claim is the right to DECIDE, not a duty to reply: claim, evaluate, and if you have nothing to add, release it and stay silent. Claims also cover replies in the same replyToMessageId chain.',
181
+ description: 'Claim a message before acting on it (ADR-018). Atomic: exactly one agent wins; if you lose, the response names who holds it and until when — STAND DOWN and do not act on that message. Winning grants ~90s; call again to renew while still working (same call). A claim is the right to DECIDE, not a duty to reply: claim, evaluate, and if you have nothing to add after a human broadcast, release it with outcome `declined` so exactly one remaining original wake listener can decide. After posting, release with outcome `completed`. Claims also cover replies in the same replyToMessageId chain.',
171
182
  inputSchema: reqWith({
172
183
  messageId: STRING,
173
184
  podId: STRING,
@@ -181,11 +192,12 @@ export const buildTools = (config) => {
181
192
  },
182
193
  {
183
194
  name: 'commonly_release_claim',
184
- description: 'Release a message claim you hold — the normal end of claim-then-decline, and good hygiene after finishing early. A miss (someone re-won after your lease lapsed) is a result, not an error.',
185
- inputSchema: reqWith({ messageId: STRING }, ['messageId']),
186
- call: wrap(async ({ messageId }) => request(config, {
195
+ description: 'Release a message claim you hold. Set outcome to `declined` when you decide not to post a human-visible reply: on a human broadcast, Commonly hands it to exactly one remaining original wake listener. Set `completed` after posting a reply. Omitting outcome preserves legacy release behaviour for old drivers and failed turns. A miss (someone re-won after your lease lapsed) is a result, not an error.',
196
+ inputSchema: reqWith({ messageId: STRING, outcome: CLAIM_OUTCOME }, ['messageId']),
197
+ call: wrap(async ({ messageId, outcome }) => request(config, {
187
198
  method: 'DELETE',
188
199
  path: `/api/agents/runtime/messages/${encodeURIComponent(messageId)}/claim`,
200
+ body: outcome === undefined ? undefined : { outcome },
189
201
  })),
190
202
  },
191
203
  {
@@ -481,6 +493,28 @@ export const buildTools = (config) => {
481
493
  },
482
494
  })),
483
495
  },
496
+ {
497
+ name: 'commonly_request_decision',
498
+ description: 'Ask the human members of a pod to resolve a genuine fork in your work. Choose an advisory class: strategy, implementation, or prioritization. Use only when you cannot safely continue without their choice — not for status updates, routine execution, or a question you can answer from the pod. Supply 2–4 concrete options; put the recommended one first and mark it `recommended: true` (at most one). Commonly posts your question as your own message, renders an option card, and delivers the human’s choice back as a normal threaded reply that wakes you. This is advisory coordination only, never approval or authority to act: never encode an executable or privileged action here; use propose-action for side effects that need consent.',
499
+ inputSchema: reqWith({
500
+ podId: STRING,
501
+ decisionClass: DECISION_CLASS,
502
+ title: STRING,
503
+ question: STRING,
504
+ options: { type: 'array', items: DECISION_OPTION, minItems: 2, maxItems: 4 },
505
+ threadRootId: STRING,
506
+ context: STRING,
507
+ }, ['podId', 'decisionClass', 'title', 'question', 'options']),
508
+ call: wrap(async ({
509
+ podId, decisionClass, title, question, options, threadRootId, context,
510
+ }) => request(config, {
511
+ method: 'POST',
512
+ path: '/api/agents/runtime/decisions',
513
+ body: {
514
+ podId, decisionClass, title, question, options, threadRootId, context,
515
+ },
516
+ })),
517
+ },
484
518
  {
485
519
  name: 'commonly_respond_to_ask',
486
520
  description: 'Respond to an `agent.ask` runtime event using its `requestId`. Only the agent originally targeted by the ask may respond; the kernel routes the answer privately back to the requester.',