@codeforbreakfast/commy-mcp 0.24.3 → 0.25.1
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 +16 -13
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.1";
|
|
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
|
|
|
@@ -60888,11 +60885,13 @@ var buildToolDefs = (deps, cache) => {
|
|
|
60888
60885
|
type: "object",
|
|
60889
60886
|
properties: {
|
|
60890
60887
|
channel_name: { type: "string", description: "Channel the thread lives in" },
|
|
60891
|
-
thread: { type: "string", description: "Thread / topic name within the channel" }
|
|
60888
|
+
thread: { type: "string", description: "Thread / topic name within the channel" },
|
|
60889
|
+
cwd: cwdField
|
|
60892
60890
|
},
|
|
60893
60891
|
required: ["channel_name", "thread"],
|
|
60894
60892
|
additionalProperties: false
|
|
60895
60893
|
},
|
|
60894
|
+
hostSuppliedArgs: hostSuppliedSessionId,
|
|
60896
60895
|
handler: async (args2) => {
|
|
60897
60896
|
const run6 = runFor(args2);
|
|
60898
60897
|
await run6(exports_Effect.gen(function* () {
|
|
@@ -60909,11 +60908,13 @@ var buildToolDefs = (deps, cache) => {
|
|
|
60909
60908
|
type: "object",
|
|
60910
60909
|
properties: {
|
|
60911
60910
|
channel_name: { type: "string", description: "Channel the thread lives in" },
|
|
60912
|
-
thread: { type: "string", description: "Thread / topic name within the channel" }
|
|
60911
|
+
thread: { type: "string", description: "Thread / topic name within the channel" },
|
|
60912
|
+
cwd: cwdField
|
|
60913
60913
|
},
|
|
60914
60914
|
required: ["channel_name", "thread"],
|
|
60915
60915
|
additionalProperties: false
|
|
60916
60916
|
},
|
|
60917
|
+
hostSuppliedArgs: hostSuppliedSessionId,
|
|
60917
60918
|
handler: async (args2) => {
|
|
60918
60919
|
const run6 = runFor(args2);
|
|
60919
60920
|
await run6(exports_Effect.gen(function* () {
|
|
@@ -60953,11 +60954,13 @@ var buildToolDefs = (deps, cache) => {
|
|
|
60953
60954
|
description: {
|
|
60954
60955
|
type: "string",
|
|
60955
60956
|
description: "The channel's new description; empty string clears it"
|
|
60956
|
-
}
|
|
60957
|
+
},
|
|
60958
|
+
cwd: cwdField
|
|
60957
60959
|
},
|
|
60958
60960
|
required: ["channel_name", "description"],
|
|
60959
60961
|
additionalProperties: false
|
|
60960
60962
|
},
|
|
60963
|
+
hostSuppliedArgs: hostSuppliedSessionId,
|
|
60961
60964
|
handler: async (args2) => {
|
|
60962
60965
|
const run6 = runFor(args2);
|
|
60963
60966
|
await run6(exports_Effect.gen(function* () {
|