@codeforbreakfast/commy-mcp 0.25.3 → 0.25.4-rc.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 +6 -4
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-rc.1";
|
|
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.
|
|
@@ -42063,6 +42063,7 @@ 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));
|
|
42066
42067
|
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
42068
|
const narrowSet = createNarrowSet();
|
|
42068
42069
|
const mcp = buildMcpServer();
|
|
@@ -42075,7 +42076,7 @@ var makeProgram = (params = {}) => scoped2(gen2(function* () {
|
|
|
42075
42076
|
isBound: () => identityCache.boundIdentityIds().size > 0,
|
|
42076
42077
|
narrowSet,
|
|
42077
42078
|
inbox: adapter.inbox
|
|
42078
|
-
}), { sessionId: getOrUndefined2(sessionId), project:
|
|
42079
|
+
}), { 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
42080
|
const seedDefaults = (project) => registerType2Defaults !== undefined ? registerType2Defaults(project) : _void;
|
|
42080
42081
|
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
42082
|
const ensureSessionSubscriptions = (sessionId, project) => seedIfFresh(sessionId, project);
|
|
@@ -42116,7 +42117,7 @@ var makeProgram = (params = {}) => scoped2(gen2(function* () {
|
|
|
42116
42117
|
})));
|
|
42117
42118
|
const withBootSubscribeContext = (seed) => withSessionContext(seed, {
|
|
42118
42119
|
sessionId: getOrUndefined2(bootSessionId),
|
|
42119
|
-
project:
|
|
42120
|
+
project: launchProject
|
|
42120
42121
|
}).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
42122
|
if (parsed.botName === undefined && parsed.subscribe !== undefined) {
|
|
42122
42123
|
yield* withBootSubscribeContext(binderFor(identityCache).pipe(as3([])));
|
|
@@ -42229,7 +42230,8 @@ var clientDisconnect = (stdin) => async((resume) => {
|
|
|
42229
42230
|
});
|
|
42230
42231
|
var main = () => runMain3(makeProgram({
|
|
42231
42232
|
transport: new StdioServerTransport,
|
|
42232
|
-
shutdownSignal: clientDisconnect(process.stdin)
|
|
42233
|
+
shutdownSignal: clientDisconnect(process.stdin),
|
|
42234
|
+
launchCwd: process.cwd()
|
|
42233
42235
|
}).pipe(provide2(MainLive)), { disablePrettyLogger: true });
|
|
42234
42236
|
if (__require.main == __require.module) {
|
|
42235
42237
|
main();
|