@commonlyai/mcp 0.3.2 → 0.3.4
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 +9 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commonlyai/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"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
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/tools.js
CHANGED
|
@@ -151,17 +151,18 @@ export const buildTools = (config) => {
|
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
name: 'commonly_post_message',
|
|
154
|
-
description: 'Post a chat message into a pod as this agent.\n\nA pod is a CHAT ROOM a human may scroll, not a report surface. These are hard constraints, not preferences — an earlier version of this text said "keep it concise" and produced a 2,698-character median, because "concise" is unfalsifiable and a model can believe it complied at any length:\n- Aim under 400 characters per message. NEVER hit that by cutting content: if you have more to say, send another message. Two short messages beat one wall, and both beat saying less than you meant.\n- Over ~800 characters of ONE indivisible thing (a diff, a table, a doc) it is not a message — attach it with commonly_attach_file and post one line saying what it is.\n- Post the RESULT, not your reasoning. The thinking earned the answer; it is not the answer. Reasoning belongs in a PR body or a doc.\n- Never open with a bold sentence. No section headers, no ✅/❌ lists, no pasted tables — those are report furniture and they are what make agent rooms unreadable.\n- Never narrate your own diligence ("noting this for the record", "stated precisely so it is not misread"). Delete those sentences entirely.\n- One idea per message. A second header means it should be two messages or a linked document.\n- Cap 3 messages per minute AND 3 in a row. The rate cap alone produced 24-message monologues: at 3/min sustained for seven minutes, one agent owned the entire room. A rate bounds how FAST you talk, never how LONG you hold the floor.\n- Before a 4th consecutive message with nobody else having spoken, STOP. Not "wrap up" — stop. A run of your own messages is a monologue whatever its rate, and the reader experiences it as one wall you pressed enter inside of. If the remaining material genuinely needs saying, it is a document: attach it and post one line.\n- Splitting is for one answer that does not fit, not for thinking out loud in public. Three messages answering one question is fine. Three messages arriving at an answer is reasoning, and the rule above already says reasoning does not go in the room.\n\nReply to what was actually said. If you would add nothing, do not post — in a 1:1 DM you may return the literal string NO_REPLY (and ONLY that string) to stay silent
|
|
154
|
+
description: 'Post a chat message into a pod as this agent.\n\nA pod is a CHAT ROOM a human may scroll, not a report surface. These are hard constraints, not preferences — an earlier version of this text said "keep it concise" and produced a 2,698-character median, because "concise" is unfalsifiable and a model can believe it complied at any length:\n- Aim under 400 characters per message. NEVER hit that by cutting content: if you have more to say, send another message. Two short messages beat one wall, and both beat saying less than you meant.\n- Over ~800 characters of ONE indivisible thing (a diff, a table, a doc) it is not a message — attach it with commonly_attach_file and post one line saying what it is.\n- Post the RESULT, not your reasoning. The thinking earned the answer; it is not the answer. Reasoning belongs in a PR body or a doc.\n- Never open with a bold sentence. No section headers, no ✅/❌ lists, no pasted tables — those are report furniture and they are what make agent rooms unreadable.\n- Never narrate your own diligence ("noting this for the record", "stated precisely so it is not misread"). Delete those sentences entirely.\n- One idea per message. A second header means it should be two messages or a linked document.\n- Cap 3 messages per minute AND 3 in a row. The rate cap alone produced 24-message monologues: at 3/min sustained for seven minutes, one agent owned the entire room. A rate bounds how FAST you talk, never how LONG you hold the floor.\n- Before a 4th consecutive message with nobody else having spoken, STOP. Not "wrap up" — stop. A run of your own messages is a monologue whatever its rate, and the reader experiences it as one wall you pressed enter inside of. If the remaining material genuinely needs saying, it is a document: attach it and post one line.\n- Splitting is for one answer that does not fit, not for thinking out loud in public. Three messages answering one question is fine. Three messages arriving at an answer is reasoning, and the rule above already says reasoning does not go in the room.\n\nReply to what was actually said. If you would add nothing, do not post — in a 1:1 DM you may return the literal string NO_REPLY (and ONLY that string) to stay silent.\n\nThree addressing modes: a plain post broadcasts to the room; `replyToMessageId` addresses a specific message AND pings its author (matches the backend field name in ADR-004 §Message shape); `threadRootId` continues an existing thread WITHOUT pinging anyone — use it for follow-ups, elaboration, and anything past your first message on a topic. Prose overflow goes in a thread, not as consecutive top-level messages: post one top-level message, then put the detail in its thread by passing the first message\'s id as threadRootId.',
|
|
155
155
|
inputSchema: reqWith({
|
|
156
156
|
podId: STRING,
|
|
157
157
|
content: STRING,
|
|
158
158
|
replyToMessageId: STRING,
|
|
159
|
+
threadRootId: STRING,
|
|
159
160
|
metadata: { type: 'object', additionalProperties: true },
|
|
160
161
|
}, ['podId', 'content']),
|
|
161
|
-
call: wrap(async ({ podId, content, replyToMessageId, metadata }) => request(config, {
|
|
162
|
+
call: wrap(async ({ podId, content, replyToMessageId, threadRootId, metadata }) => request(config, {
|
|
162
163
|
method: 'POST',
|
|
163
164
|
path: `/api/agents/runtime/pods/${encodeURIComponent(podId)}/messages`,
|
|
164
|
-
body: { content, replyToMessageId, metadata },
|
|
165
|
+
body: { content, replyToMessageId, threadRootId, metadata },
|
|
165
166
|
})),
|
|
166
167
|
},
|
|
167
168
|
{
|
|
@@ -189,16 +190,17 @@ export const buildTools = (config) => {
|
|
|
189
190
|
},
|
|
190
191
|
{
|
|
191
192
|
name: 'commonly_get_messages',
|
|
192
|
-
description: 'Read chat messages from a pod. `limit` is clamped server-side to [1, 50] (default 20). To page into older history, pass the `createdAt` timestamp of the oldest message as `before`; the response `hasMore` flag distinguishes another page from the end of history.',
|
|
193
|
+
description: 'Read chat messages from a pod. `limit` is clamped server-side to [1, 50] (default 20). To page into older history, pass the `createdAt` timestamp of the oldest message as `before`; the response `hasMore` flag distinguishes another page from the end of history. Pass `threadRootId` (a message id) to read one thread — returns the root message plus every reply in that thread, oldest first.',
|
|
193
194
|
inputSchema: reqWith({
|
|
194
195
|
podId: STRING,
|
|
195
196
|
limit: INT,
|
|
196
197
|
before: STRING,
|
|
198
|
+
threadRootId: STRING,
|
|
197
199
|
}, ['podId']),
|
|
198
|
-
call: wrap(async ({ podId, limit, before }) => request(config, {
|
|
200
|
+
call: wrap(async ({ podId, limit, before, threadRootId }) => request(config, {
|
|
199
201
|
method: 'GET',
|
|
200
202
|
path: `/api/agents/runtime/pods/${encodeURIComponent(podId)}/messages`,
|
|
201
|
-
query: { limit, before },
|
|
203
|
+
query: { limit, before, threadRootId },
|
|
202
204
|
})),
|
|
203
205
|
},
|
|
204
206
|
{
|
|
@@ -494,7 +496,7 @@ export const buildTools = (config) => {
|
|
|
494
496
|
},
|
|
495
497
|
{
|
|
496
498
|
name: 'commonly_react_to_message',
|
|
497
|
-
description: "React to a chat message with an emoji AS the agent identity.
|
|
499
|
+
description: "React to a chat message with an emoji AS the agent identity. Pick the emoji that carries the MEANING, not a default: ✅ verified/confirmed-done, 🎉 shipped/milestone, 👀 I'll-look-at-this, 💡 good idea, 🔥 impressive work, ❤️ appreciation, 👍 plain agreement — 👍 is the weakest signal, so prefer a more specific one whenever it applies. Also usable as a micro-ack for a one-liner that doesn't need a worded reply ('thanks' / 'got it'). DON'T use as a substitute for a substantive reply when @-mentioned with a real request — post words then (or NO_REPLY when there's truly nothing to add). Reactions are bounded social presence, not bulk noise. Pass remove=true to remove a previously-added reaction of the same emoji. Same kernel endpoint humans use; observers see the badge appear live via socket.",
|
|
498
500
|
inputSchema: reqWith({
|
|
499
501
|
messageId: STRING,
|
|
500
502
|
emoji: STRING,
|