minutes-mcp 0.27.2 → 0.28.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/dist/index.js CHANGED
@@ -1591,7 +1591,7 @@ const COPILOT_SUPPORTED = hasFeature(CLI_CAPABILITIES, "copilot_realtime");
1591
1591
  // `./version.ts` (see issue #183). Hosted `.mcpb` bundles will run
1592
1592
  // against CLIs with different minor/patch numbers within the same
1593
1593
  // major; that is explicitly supported.
1594
- const MCP_SERVER_VERSION = "0.27.2";
1594
+ const MCP_SERVER_VERSION = "0.28.1";
1595
1595
  export function parseKnowledgeConfig(configContent) {
1596
1596
  const knowledgeMatch = configContent.match(/\[knowledge\][\s\S]*?(?=\n\[|$)/);
1597
1597
  if (!knowledgeMatch) {
@@ -2695,6 +2695,27 @@ async function oldCliReadinessGuidance(runner, platform) {
2695
2695
  return null;
2696
2696
  }
2697
2697
  }
2698
+ function linuxLoaderGuidance(error, platform) {
2699
+ if (platform !== "linux")
2700
+ return null;
2701
+ const stderr = error?.stderr;
2702
+ if (typeof stderr !== "string")
2703
+ return null;
2704
+ // These are loader failures before Minutes can run, not policy diagnostics.
2705
+ // Never echo stderr or paths; recognize only known runtime prerequisites.
2706
+ if (/error while loading shared libraries: (?:libpipewire-0\.3|libasound)\.so\.[0-9]+: cannot open shared object file/.test(stderr)) {
2707
+ return "The Minutes Linux engine cannot start because an audio runtime library is missing. " +
2708
+ "On Ubuntu 24.04, install libasound2t64 and libpipewire-0.3-0t64, then restart the MCP host. " +
2709
+ "These libraries are required even for read-only tools. " +
2710
+ "See https://github.com/silverstein/minutes/blob/main/docs/install.md#linux";
2711
+ }
2712
+ if (/version [`']GLIBC_2\.[0-9]{1,2}' not found/.test(stderr)) {
2713
+ return "The downloaded Minutes Linux engine requires glibc 2.39 or newer (Ubuntu 24.04). " +
2714
+ "On an older distribution such as Debian 12, build minutes-cli from source on that machine. " +
2715
+ "See https://github.com/silverstein/minutes/blob/main/docs/install.md#linux";
2716
+ }
2717
+ return null;
2718
+ }
2698
2719
  export async function readAgentTrustReadiness(runner = runMinutes, platform = process.platform) {
2699
2720
  let stdout;
2700
2721
  try {
@@ -2708,6 +2729,9 @@ export async function readAgentTrustReadiness(runner = runMinutes, platform = pr
2708
2729
  // "could not be verified safely" and nothing to do about it (#774).
2709
2730
  if (error?.cliMissing)
2710
2731
  throw error;
2732
+ const loaderGuidance = linuxLoaderGuidance(error, platform);
2733
+ if (loaderGuidance)
2734
+ throw new Error(loaderGuidance);
2711
2735
  if (rejectedUnknownSubcommand(error, "agent-readiness")) {
2712
2736
  const guidance = await oldCliReadinessGuidance(runner, platform);
2713
2737
  if (guidance)
@@ -3110,12 +3134,14 @@ async function spawnCopilotCli(goal, surface) {
3110
3134
  const stdoutFd = openSync(paths.nudges, "a");
3111
3135
  const stderrFd = openSync(paths.stderr, "a");
3112
3136
  let child;
3137
+ let exitCode;
3113
3138
  try {
3114
3139
  child = spawn(MINUTES_BIN, ["copilot", "start", "--goal", goal, "--surface", surface], {
3115
3140
  detached: true,
3116
3141
  stdio: ["ignore", stdoutFd, stderrFd],
3117
3142
  env: mcpCliChildEnv({ RUST_LOG: "info" }),
3118
3143
  });
3144
+ child.once("exit", (code) => { exitCode = code; });
3119
3145
  }
3120
3146
  finally {
3121
3147
  closeSync(stdoutFd);
@@ -3148,7 +3174,7 @@ async function spawnCopilotCli(goal, surface) {
3148
3174
  }
3149
3175
  throw error;
3150
3176
  }
3151
- return session;
3177
+ return { session, exitedSuccessfully: () => exitCode === 0 };
3152
3178
  }
3153
3179
  function processIsAlive(pid) {
3154
3180
  try {
@@ -6657,7 +6683,7 @@ if (COPILOT_SUPPORTED) {
6657
6683
  };
6658
6684
  }
6659
6685
  try {
6660
- const observerSession = await spawnCopilotCli(goal, surface);
6686
+ const { session: observerSession, exitedSuccessfully } = await spawnCopilotCli(goal, surface);
6661
6687
  const status = await waitForCopilotStatus((candidate) => candidate.active || !processIsAlive(observerSession.pid), 5000);
6662
6688
  const observation = await readCopilotNudgeObservation(status);
6663
6689
  const snapshot = buildLiveCopilotResourcePayload(status, observation);
@@ -6691,6 +6717,16 @@ if (COPILOT_SUPPORTED) {
6691
6717
  structuredContent: snapshot,
6692
6718
  };
6693
6719
  }
6720
+ if (status.available && status.setup_needed && exitedSuccessfully()) {
6721
+ return {
6722
+ content: [{
6723
+ type: "text",
6724
+ text: "Coach needs a local AI model before it can start. " +
6725
+ "Run `minutes coach setup`, then start Coach again. No recording was opened.",
6726
+ }],
6727
+ structuredContent: snapshot,
6728
+ };
6729
+ }
6694
6730
  const stderr = await readCopilotStderrTail();
6695
6731
  return {
6696
6732
  content: [{