@codeforbreakfast/commy-mcp 0.24.3 → 0.25.0
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/server.js +7 -10
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -58306,20 +58306,17 @@ var sanitiseProjectSlug = (raw3) => {
|
|
|
58306
58306
|
const filtered = dashed.replace(/[^a-z0-9-]/g, "-");
|
|
58307
58307
|
const collapsed = filtered.replace(/-+/g, "-");
|
|
58308
58308
|
const trimmed2 = collapsed.replace(/^-+|-+$/g, "");
|
|
58309
|
-
if (
|
|
58309
|
+
if (!/^[a-z]/.test(trimmed2))
|
|
58310
58310
|
return exports_Option.none();
|
|
58311
|
-
|
|
58312
|
-
if (exports_String.isEmpty(truncated))
|
|
58313
|
-
return exports_Option.none();
|
|
58314
|
-
if (!/^[a-z]/.test(truncated))
|
|
58315
|
-
return exports_Option.none();
|
|
58316
|
-
return exports_Option.some(truncated);
|
|
58311
|
+
return exports_Option.some(trimmed2);
|
|
58317
58312
|
};
|
|
58313
|
+
var BOT_NAME_PROJECT_MAX = 12;
|
|
58318
58314
|
var composeBotName = (args2) => {
|
|
58319
58315
|
const suffix = args2.sessionId.slice(0, 8);
|
|
58320
58316
|
if (args2.project === undefined)
|
|
58321
58317
|
return decodeBotNameSync(`cc-${suffix}`);
|
|
58322
|
-
|
|
58318
|
+
const project3 = args2.project.slice(0, BOT_NAME_PROJECT_MAX).replace(/-+$/, "");
|
|
58319
|
+
return decodeBotNameSync(`cc-${project3}-${suffix}`);
|
|
58323
58320
|
};
|
|
58324
58321
|
var { InRepo, NotInRepo, $match: matchGitContext } = exports_Data.taggedEnum();
|
|
58325
58322
|
var basename2 = (path) => {
|
|
@@ -60139,10 +60136,10 @@ class Server extends Protocol {
|
|
|
60139
60136
|
}
|
|
60140
60137
|
|
|
60141
60138
|
// packages/mcp/mcp-server.ts
|
|
60142
|
-
var PLUGIN_VERSION = "0.
|
|
60139
|
+
var PLUGIN_VERSION = "0.25.0";
|
|
60143
60140
|
var COMMY_INSTRUCTIONS = `**Substrate.** commy is the inter-agent channel: agents and humans coordinate here. If you run it alongside other agent-messaging tools, keep one substrate canonical and don't fan the same message across all of them.
|
|
60144
60141
|
|
|
60145
|
-
**Channels.** Each project has one channel: \`#<project-slug>\` where the slug is resolved per session as \`COMMY_PROJECT\` env > git remote \`origin\` basename > git root basename. Sessions launched outside a git repo (e.g. \`/tmp\`, \`$HOME\`) have no project channel and should post to \`#general\` instead. Don't invent a channel name from a metaphor — never post to a literal \`#home\`, \`#project\`, or \`#<project>\`. Use \`list_channels\` to enumerate what actually exists in the realm; posting to a non-existent channel throws \`UnknownChannel\` rather than silently routing to Notification Bot.
|
|
60142
|
+
**Channels.** Each project has one channel: \`#<project-slug>\` where the slug is resolved per session as \`COMMY_PROJECT\` env > git remote \`origin\` basename > git root basename, lowercased with \`_\`, \`/\` and other punctuation turned into \`-\`. The slug is the whole name and is never shortened; your bot name may carry a shortened form of it, so don't read your channel off your bot name. Sessions launched outside a git repo (e.g. \`/tmp\`, \`$HOME\`) have no project channel and should post to \`#general\` instead. Don't invent a channel name from a metaphor — never post to a literal \`#home\`, \`#project\`, or \`#<project>\`. Use \`list_channels\` to enumerate what actually exists in the realm; posting to a non-existent channel throws \`UnknownChannel\` rather than silently routing to Notification Bot.
|
|
60146
60143
|
|
|
60147
60144
|
**Topics.** A topic is a logical thread of conversation within a channel; the \`post\` tool's \`thread\` argument names it (Zulip calls these "topics"). Open a new topic when the work shifts — a fresh task, a new question, a different incident — and reply into an existing one when you're continuing the same line of work. Name topics by the work, not the speaker: \`payments-migration\`, \`auth-token-refresh\`, \`events-queue-expiry\` — not \`bot-debugging\` or \`alice-asked\`. Top-level channel chatter (omit \`thread\`) is for terse status pings only; anything substantive deserves a topic.
|
|
60148
60145
|
|