@codeforbreakfast/commy-mcp 0.21.0 → 0.22.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +15 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeforbreakfast/commy-mcp",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "commy MCP server — the inter-agent communication substrate, runnable on node via npx.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/server.js CHANGED
@@ -57268,6 +57268,11 @@ var intentToTarget = (intent) => exports_Match.value(intent).pipe(exports_Match.
57268
57268
  thread: threadName3
57269
57269
  })
57270
57270
  }));
57271
+ var intentToToken = (intent) => exports_Match.value(intent).pipe(exports_Match.discriminatorsExhaustive("kind")({
57272
+ channel: ({ channelName }) => channelName,
57273
+ "new-topics-in-channel": ({ channelName }) => `${NEW_TOPICS_PREFIX}${channelName}`,
57274
+ thread: ({ channelName, threadName: threadName3 }) => `${channelName}/${threadName3}`
57275
+ }));
57271
57276
 
57272
57277
  // packages/mcp/bootstrap.ts
57273
57278
  class EnvConfigError extends exports_Data.TaggedError("EnvConfigError") {
@@ -57330,7 +57335,11 @@ var userConfigString = (key) => exports_Config.string(key).pipe(exports_Config.m
57330
57335
  }
57331
57336
  return exports_Either.right(value5);
57332
57337
  }));
57333
- var optionalUserConfig = (key) => exports_Config.option(userConfigString(key));
57338
+ var USER_CONFIG_SUFFIX = "_USER_CONFIG";
57339
+ var optionalUserConfig = (key) => exports_Config.option(userConfigString(`${key}${USER_CONFIG_SUFFIX}`).pipe(exports_Config.orElseIf({
57340
+ if: exports_ConfigError.isMissingDataOnly,
57341
+ orElse: () => userConfigString(key)
57342
+ })));
57334
57343
  var QUEUE_IDLE_TIMEOUT_DEFAULT_SECS = 86400;
57335
57344
  var queueIdleTimeoutSecs = (key) => optionalUserConfig(key).pipe(exports_Config.mapOrFail((option7) => exports_Option.match(option7, {
57336
57345
  onNone: () => exports_Either.right(QUEUE_IDLE_TIMEOUT_DEFAULT_SECS),
@@ -59248,7 +59257,7 @@ class Server extends Protocol {
59248
59257
  }
59249
59258
 
59250
59259
  // packages/mcp/mcp-server.ts
59251
- var PLUGIN_VERSION = "0.21.0";
59260
+ var PLUGIN_VERSION = "0.22.0";
59252
59261
  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.
59253
59262
 
59254
59263
  **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.
@@ -59610,7 +59619,7 @@ var buildToolDefs = (deps, cache) => {
59610
59619
  threadName: threadName3.value
59611
59620
  };
59612
59621
  narrowSet.add(intent);
59613
- await runEdge(adapter4.inbox.subscribe(intentToTarget(intent)));
59622
+ await runEdge(adapter4.inbox.subscribe(intentToTarget(intent)).pipe(exports_Effect.zipRight(deps.persistSessionSubscriptions ?? exports_Effect.void)));
59614
59623
  };
59615
59624
  const coreTools = [
59616
59625
  {
@@ -60352,6 +60361,9 @@ var makeProgram = (params = {}) => exports_Effect.scoped(exports_Effect.gen(func
60352
60361
  yield* exports_Effect.addFinalizer(() => identityCache.boundIdentityIds().size > 0 ? raceReleaseAgainstTimeout(adapter4.identity.release({ persistent: releasePersistent }), RELEASE_TIMEOUT_MS) : exports_Effect.void);
60353
60362
  const runsIdleSweep = parsed.botName === undefined;
60354
60363
  const subscribedIntents = yield* subscribeFromEnv(adapter4.inbox, narrowSet, parsed);
60364
+ if (subscribedIntents.length > 0) {
60365
+ yield* exports_Effect.logInfo(`commy plugin: applied ${subscribedIntents.length} boot-time subscribe target(s): ${subscribedIntents.map(intentToToken).join(", ")}`).pipe(exports_Effect.provide(loggerLayer));
60366
+ }
60355
60367
  if (parsed.botName === undefined) {
60356
60368
  narrowSet.beginBuffering();
60357
60369
  }