@codeforbreakfast/commy-mcp 0.25.3 → 0.25.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/server.js +9 -6
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -40967,7 +40967,7 @@ class Server extends Protocol {
|
|
|
40967
40967
|
}
|
|
40968
40968
|
|
|
40969
40969
|
// packages/mcp/mcp-server.ts
|
|
40970
|
-
var PLUGIN_VERSION = "0.25.
|
|
40970
|
+
var PLUGIN_VERSION = "0.25.4";
|
|
40971
40971
|
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.
|
|
40972
40972
|
|
|
40973
40973
|
**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.
|
|
@@ -41329,7 +41329,7 @@ var buildToolDefs = (deps, cache) => {
|
|
|
41329
41329
|
const hostSuppliedSessionId = ["session_id"];
|
|
41330
41330
|
const cwdField = {
|
|
41331
41331
|
type: "string",
|
|
41332
|
-
description: "Calling session's working directory. In Claude Code, the PreToolUse hook injects this from the harness cwd; non-CC MCP clients may supply their own. Drives the project component of ephemeral cc-<project>-<8> names — without this the minted name
|
|
41332
|
+
description: "Calling session's working directory. In Claude Code, the PreToolUse hook injects this from the harness cwd; non-CC MCP clients may supply their own. Drives the project component of ephemeral cc-<project>-<8> names — without this, or when it is outside any repo, the minted name takes the project of the directory the server was launched in, or is a bare cc-<8> (an operator-forced COMMY_PROJECT slug overrides all of these)."
|
|
41333
41333
|
};
|
|
41334
41334
|
const readSessionId = (args) => getOrUndefined2(parseSessionId(args["session_id"]));
|
|
41335
41335
|
const feedSession = (sessionId) => sessionId === undefined || deps.feedSessionId === undefined ? _void : deps.feedSessionId(sessionId);
|
|
@@ -42063,6 +42063,8 @@ var makeProgram = (params = {}) => scoped2(gen2(function* () {
|
|
|
42063
42063
|
return succeedNone2;
|
|
42064
42064
|
return deriveProject({ cwd, readGitContext: readGitContext2 });
|
|
42065
42065
|
};
|
|
42066
|
+
const launchProject = getOrUndefined2(yield* projectForCwd(params.launchCwd));
|
|
42067
|
+
const projectForCall = (cwd) => projectForCwd(cwd).pipe(map18(orElse(() => fromNullable(launchProject))));
|
|
42066
42068
|
const canEditMessages = yield* adapter.publisher.editingAvailable().pipe(timeout2(EDITING_PROBE_TIMEOUT), catchAll2((error) => logWarning2(`commy plugin: could not read the realm's message-editing setting (${error.message}); offering edit_message and letting the substrate refuse if it is off`).pipe(as3(true))));
|
|
42067
42069
|
const narrowSet = createNarrowSet();
|
|
42068
42070
|
const mcp = buildMcpServer();
|
|
@@ -42075,7 +42077,7 @@ var makeProgram = (params = {}) => scoped2(gen2(function* () {
|
|
|
42075
42077
|
isBound: () => identityCache.boundIdentityIds().size > 0,
|
|
42076
42078
|
narrowSet,
|
|
42077
42079
|
inbox: adapter.inbox
|
|
42078
|
-
}), { sessionId: getOrUndefined2(sessionId), project:
|
|
42080
|
+
}), { sessionId: getOrUndefined2(sessionId), project: launchProject })), catchAll2((err) => logError2(`commy plugin: could not rebuild the subscription set: ${isError(err) ? err.message : String(err)}`).pipe(zipRight3(sync4(() => narrowSet.load(none2()))))), provide2(loggerLayer), ensuring2(succeed3(narrowSetRebuilt, undefined)));
|
|
42079
42081
|
const seedDefaults = (project) => registerType2Defaults !== undefined ? registerType2Defaults(project) : _void;
|
|
42080
42082
|
const seedIfFresh = (sessionId, project) => parsed.botName !== undefined ? _void : seedDefaultsIfFresh({ subscriptionStore, registerDefaults: seedDefaults }, project).pipe(catchAll2((err) => logError2(`commy plugin: subscription seed check failed for ${sessionId}: ${isError(err) ? err.message : String(err)}`).pipe(zipRight3(seedDefaults(project)))), provide2(loggerLayer));
|
|
42081
42083
|
const ensureSessionSubscriptions = (sessionId, project) => seedIfFresh(sessionId, project);
|
|
@@ -42116,7 +42118,7 @@ var makeProgram = (params = {}) => scoped2(gen2(function* () {
|
|
|
42116
42118
|
})));
|
|
42117
42119
|
const withBootSubscribeContext = (seed) => withSessionContext(seed, {
|
|
42118
42120
|
sessionId: getOrUndefined2(bootSessionId),
|
|
42119
|
-
project:
|
|
42121
|
+
project: launchProject
|
|
42120
42122
|
}).pipe(catchIf2(isBindError, (cause) => logWarning2(`commy plugin: boot-time subscribe could not bind an identity, so no ` + `subscriptions were applied yet — this seat will not receive channel traffic ` + `until it acts. ${isError(cause) ? cause.message : String(cause)}`).pipe(provide2(loggerLayer), as3([]))));
|
|
42121
42123
|
if (parsed.botName === undefined && parsed.subscribe !== undefined) {
|
|
42122
42124
|
yield* withBootSubscribeContext(binderFor(identityCache).pipe(as3([])));
|
|
@@ -42126,7 +42128,7 @@ var makeProgram = (params = {}) => scoped2(gen2(function* () {
|
|
|
42126
42128
|
adapter,
|
|
42127
42129
|
identityCache,
|
|
42128
42130
|
narrowSet,
|
|
42129
|
-
projectForCwd,
|
|
42131
|
+
projectForCwd: projectForCall,
|
|
42130
42132
|
ensureSessionSubscriptions,
|
|
42131
42133
|
persistSessionSubscriptions,
|
|
42132
42134
|
feedSessionId,
|
|
@@ -42229,7 +42231,8 @@ var clientDisconnect = (stdin) => async((resume) => {
|
|
|
42229
42231
|
});
|
|
42230
42232
|
var main = () => runMain3(makeProgram({
|
|
42231
42233
|
transport: new StdioServerTransport,
|
|
42232
|
-
shutdownSignal: clientDisconnect(process.stdin)
|
|
42234
|
+
shutdownSignal: clientDisconnect(process.stdin),
|
|
42235
|
+
launchCwd: process.cwd()
|
|
42233
42236
|
}).pipe(provide2(MainLive)), { disablePrettyLogger: true });
|
|
42234
42237
|
if (__require.main == __require.module) {
|
|
42235
42238
|
main();
|