@commonlyai/mcp 0.3.5 → 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.
- package/package.json +1 -1
- package/src/tools.js +6 -4
package/package.json
CHANGED
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
|
|
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
|
|
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
|
{
|