@commonlyai/mcp 0.3.4 → 0.3.6

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/package.json +7 -1
  2. package/src/tools.js +8 -6
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "@commonlyai/mcp",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
+ "license": "Apache-2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/Team-Commonly/commonly.git",
8
+ "directory": "commonly-mcp"
9
+ },
4
10
  "description": "Commonly MCP Server \u2014 exposes the kernel HTTP surface (CAP per ADR-004) as standard MCP tools so any MCP-capable runtime can consume `commonly_*` tools without driver-specific code.",
5
11
  "type": "module",
6
12
  "bin": {
package/src/tools.js CHANGED
@@ -58,6 +58,7 @@ 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'] };
61
62
 
62
63
  /**
63
64
  * Orientation served by `commonly_get_started`.
@@ -167,7 +168,7 @@ export const buildTools = (config) => {
167
168
  },
168
169
  {
169
170
  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.',
171
+ 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
172
  inputSchema: reqWith({
172
173
  messageId: STRING,
173
174
  podId: STRING,
@@ -181,11 +182,12 @@ export const buildTools = (config) => {
181
182
  },
182
183
  {
183
184
  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, {
185
+ 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.',
186
+ inputSchema: reqWith({ messageId: STRING, outcome: CLAIM_OUTCOME }, ['messageId']),
187
+ call: wrap(async ({ messageId, outcome }) => request(config, {
187
188
  method: 'DELETE',
188
189
  path: `/api/agents/runtime/messages/${encodeURIComponent(messageId)}/claim`,
190
+ body: outcome === undefined ? undefined : { outcome },
189
191
  })),
190
192
  },
191
193
  {
@@ -284,7 +286,7 @@ export const buildTools = (config) => {
284
286
  },
285
287
  {
286
288
  name: 'commonly_get_tasks',
287
- description: 'List tasks in a pod. Filter by `assignee` (e.g. "nova") and/or `status` (e.g. "pending,claimed" — comma-separated).',
289
+ description: 'List tasks in a pod. Filter by `assignee` (e.g. "nova") and/or `status` (e.g. "pending,claimed,blocked" — comma-separated).',
288
290
  inputSchema: reqWith({
289
291
  podId: STRING,
290
292
  assignee: STRING,
@@ -316,7 +318,7 @@ export const buildTools = (config) => {
316
318
  },
317
319
  {
318
320
  name: 'commonly_claim_task',
319
- description: 'Claim a pending task — atomic: exactly one claimant wins. The claim is a ~30-minute renewable LEASE, not a tenure (ADR-018 D4): call again to renew while genuinely working; a lapsed lease makes the task claimable by peers, so a dead claimant never holds work forever. A 409 names the live holder and when their lease frees.',
321
+ description: 'Claim a pending or blocked task — atomic: exactly one claimant wins. Claiming a blocked task resumes it into active work. The claim is a ~30-minute renewable LEASE, not a tenure (ADR-018 D4): call again to renew while genuinely working; a lapsed lease makes the task claimable by peers, so a dead claimant never holds work forever. A 409 names the live holder and when their lease frees.',
320
322
  inputSchema: reqWith({ podId: STRING, taskId: STRING }, ['podId', 'taskId']),
321
323
  call: wrap(async ({ podId, taskId }) => request(config, {
322
324
  method: 'POST',