@echomem/mcp 1.4.67 → 1.4.69

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.
@@ -13,7 +13,7 @@ import { assembleCodex, assembleClaude } from "../migrate.js";
13
13
  import { readBillingAlert } from "../billing-alert.js";
14
14
  import { readSessionWorkingDirectory, } from "./session-launcher.js";
15
15
  const API_BASE = (process.env.ECHO_API_BASE_URL || "https://echo-mem-chrome.vercel.app").replace(/\/$/, "");
16
- const PRICING_URL = (process.env.ECHO_PRICING_URL || "https://echoknows.com/account").replace(/\/$/, "");
16
+ const PRICING_URL = (process.env.ECHO_PRICING_URL || "https://echoknows.com/dashboard/account").replace(/\/$/, "");
17
17
  export async function createHudServer(opts = {}) {
18
18
  const mode = opts.mode || "auto";
19
19
  const port = opts.port ?? 17377;
package/dist/hud/web.js CHANGED
@@ -1729,7 +1729,7 @@ export const HUD_HTML = String.raw `<!doctype html>
1729
1729
  state: "ok",
1730
1730
  plan: "pro",
1731
1731
  paid: true,
1732
- pricingUrl: "https://echoknows.com/account?source=hud_preview",
1732
+ pricingUrl: "https://echoknows.com/dashboard/account?source=hud_preview",
1733
1733
  memoryProcessingQuota: { used: previewProcessingUsed, limit: 200000, remaining: 200000 - previewProcessingUsed, resetAt: new Date(Date.now() + 31 * 60 * 60 * 1000).toISOString() },
1734
1734
  memorySearchQuota: { used: previewSearchUsed, limit: 500, remaining: 500 - previewSearchUsed, resetAt: new Date(Date.now() + 31 * 60 * 60 * 1000).toISOString() },
1735
1735
  historicalConversationQuota: { used: 191, limit: 500, remaining: 309 },
package/dist/index.js CHANGED
@@ -12,14 +12,14 @@ import { createHash, randomUUID } from "node:crypto";
12
12
  import { AsyncLocalStorage } from "node:async_hooks";
13
13
  import { fetchEncryptionConfig, decryptMemoryFields, verifyKeyB64, } from "./encryption.js";
14
14
  import { refreshInstalledMemoryGuidance, runCli } from "./setup.js";
15
- import { MCP_PACKAGE_VERSION, MCP_SERVER_INSTRUCTIONS, MEMORY_CITATION_INSTRUCTION, SAVED_MEMORY_RECEIPT_INSTRUCTION, } from "./package-metadata.js";
15
+ import { MCP_PACKAGE_VERSION, MCP_SERVER_INSTRUCTIONS, MEMORY_CITATION_INSTRUCTION, SAVED_MEMORY_RECEIPT_INSTRUCTION, GROUP_SESSION_SHARING_DISABLED_NOTE, GROUP_SESSION_SHARING_PROMPTS_ENABLED, } from "./package-metadata.js";
16
16
  import { clearBillingAlert, writeBillingAlert } from "./billing-alert.js";
17
17
  import { checkLatestUpdateStatus, formatUpdateNotice, formatUpdateStatusText, startBackgroundUpdateCheck, } from "./update-check.js";
18
18
  import { autoUpdateHeadlessRuntime } from "./headless-runtime.js";
19
19
  import { formatTicketFilingPacket, formatWorkspaceTicketOverview, ticketAddressById, } from "./ticket-review-format.js";
20
20
  import { SOURCE_SESSION_CLOUD_TOOL_ARGUMENT_EVIDENCE, resolveCloudCoworkSessionFromToolArguments, resolveSourceSessionRequestContext, resolveSourceSessionFromBindingToken, resolveSourceSessionFromBindingTokenWithRetry, } from "./source-session.js";
21
21
  const ECHO_API_BASE_URL = process.env.ECHO_API_BASE_URL || "https://echo-mem-chrome.vercel.app";
22
- const ECHO_PRICING_URL = process.env.ECHO_PRICING_URL || "https://echoknows.com/account";
22
+ const ECHO_PRICING_URL = process.env.ECHO_PRICING_URL || "https://echoknows.com/dashboard/account";
23
23
  const ECHO_MEMORY_WEB_URL = (process.env.ECHO_MEMORY_WEB_URL || "https://echoknows.com/memory").replace(/\/$/, "");
24
24
  const DESKTOP_MANAGED = process.env.ECHO_DESKTOP_MANAGED === "1";
25
25
  const CONNECT_DEVICE_INSTRUCTION = DESKTOP_MANAGED
@@ -125,6 +125,25 @@ function appendPricingSource(url, source) {
125
125
  return url;
126
126
  }
127
127
  }
128
+ /**
129
+ * A browser cannot tell whether Echo Desktop is installed, but a desktop-managed
130
+ * runtime knows it is. The hint lets the account page offer to open the app
131
+ * instead of guessing with a timed redirect.
132
+ */
133
+ function appendDesktopClientHint(url) {
134
+ if (!DESKTOP_MANAGED)
135
+ return url;
136
+ try {
137
+ const parsed = new URL(url);
138
+ if (!parsed.searchParams.has("client")) {
139
+ parsed.searchParams.set("client", "desktop");
140
+ }
141
+ return parsed.toString();
142
+ }
143
+ catch {
144
+ return url;
145
+ }
146
+ }
128
147
  function formatUpgradeRequiredResult(error) {
129
148
  if (!axios.isAxiosError(error))
130
149
  return null;
@@ -142,7 +161,7 @@ function formatUpgradeRequiredResult(error) {
142
161
  ?? "Memory search and recall require an Echo Pro or Power plan.";
143
162
  const code = readString(data, "error") ?? readString(data, "code");
144
163
  const plan = readString(data, "plan");
145
- const pricingUrl = appendPricingSource(upgradeUrl, "mcp_search");
164
+ const pricingUrl = appendDesktopClientHint(appendPricingSource(upgradeUrl, "mcp_search"));
146
165
  const normalizedCode = String(code || "").toUpperCase();
147
166
  const kind = status === 429 || normalizedCode.includes("QUOTA") || normalizedCode.includes("LIMIT")
148
167
  ? "quota_exceeded"
@@ -689,6 +708,10 @@ function inputAnalyticsForTool(canonicalName, args) {
689
708
  function toolEventName(canonicalName, status) {
690
709
  return `[MCP] ${canonicalName} ${status}`;
691
710
  }
711
+ const GROUP_SESSION_SHARING_DISABLED_MESSAGE = [
712
+ "Agent-driven group sharing is disabled. This conversation's memories stay private.",
713
+ GROUP_SESSION_SHARING_DISABLED_NOTE,
714
+ ].join(" ");
692
715
  const SUBAGENT_DURABLE_WRITE_MESSAGE = [
693
716
  "Codex subagents cannot save EchoMem memories or manage conversation sharing.",
694
717
  "Return durable findings to the root agent; the root agent must consolidate them and call save_conversation once.",
@@ -2313,7 +2336,9 @@ Details: ${m.details || "N/A"}`)
2313
2336
  syncedGroupNames.length
2314
2337
  ? `Saved privately first and synced to approved groups: ${syncedGroupNames.join(", ")}.`
2315
2338
  : "Saved to your private memory.",
2316
- `This user has multiple groups: ${availableGroups.map((group) => `${readString(group, "name") ?? "Unnamed group"} (${readString(group, "id") ?? "unknown id"})`).join(", ")}. Call request_group_session_sharing with this conversation scope and one groupId at a time to obtain a separate text confirmation question for each group.`,
2339
+ GROUP_SESSION_SHARING_PROMPTS_ENABLED
2340
+ ? `This user has multiple groups: ${availableGroups.map((group) => `${readString(group, "name") ?? "Unnamed group"} (${readString(group, "id") ?? "unknown id"})`).join(", ")}. Call request_group_session_sharing with this conversation scope and one groupId at a time to obtain a separate text confirmation question for each group.`
2341
+ : "",
2317
2342
  failedSyncs.length
2318
2343
  ? `${failedSyncs.length} approved group sync(s) failed; private memories were preserved.`
2319
2344
  : "",
@@ -2322,7 +2347,9 @@ Details: ${m.details || "N/A"}`)
2322
2347
  : "",
2323
2348
  ].filter(Boolean).join(" ")
2324
2349
  : sharing?.decision === null || sharing?.decision === undefined
2325
- ? `Saved to your private memory. Call request_group_session_sharing with this conversation scope${readString(sharingGroup, "id") ? ` and groupId ${readString(sharingGroup, "id")}` : ""}, relay its exact text question for ${readString(sharingGroup, "name") ?? "your current group"}, and call set_group_session_sharing only after an explicit Yes or No. Silence leaves the state unset.`
2350
+ ? GROUP_SESSION_SHARING_PROMPTS_ENABLED
2351
+ ? `Saved to your private memory. Call request_group_session_sharing with this conversation scope${readString(sharingGroup, "id") ? ` and groupId ${readString(sharingGroup, "id")}` : ""}, relay its exact text question for ${readString(sharingGroup, "name") ?? "your current group"}, and call set_group_session_sharing only after an explicit Yes or No. Silence leaves the state unset.`
2352
+ : "Saved to your private memory."
2326
2353
  : sharing.decision === "private"
2327
2354
  ? "Saved to your private memory."
2328
2355
  : syncedGroupNames.length
@@ -2351,7 +2378,7 @@ Details: ${m.details || "N/A"}`)
2351
2378
  const text = [
2352
2379
  `Successfully ingested conversation. Extracted ${memoriesExtracted} memory distinct events.`,
2353
2380
  receipt,
2354
- typeof groupSharingScopeId === "string" && groupSharingScopeId
2381
+ GROUP_SESSION_SHARING_PROMPTS_ENABLED && typeof groupSharingScopeId === "string" && groupSharingScopeId
2355
2382
  ? `Conversation sharing scope: ${groupSharingScopeId}\nReuse this exact groupSharingScopeId only for request_group_session_sharing, set_group_session_sharing, and save_conversation calls in this conversation. Never reuse it in another conversation or save it as memory.`
2356
2383
  : "",
2357
2384
  typeof memoriesDiscarded === "number" && memoriesDiscarded > 0
@@ -3321,7 +3348,9 @@ Details: ${m.details || "N/A"}`;
3321
3348
  participantText,
3322
3349
  "",
3323
3350
  "Declared titles and responsibilities are directory facts. Use search_memories with scope=workspace for current work evidence, and label suggested contribution areas as inference that should be confirmed with the team.",
3324
- "Use request_group_session_sharing to mint or read this conversation's sharing scope; never infer sharing from the member's role, memories, or MCP transport session.",
3351
+ GROUP_SESSION_SHARING_PROMPTS_ENABLED
3352
+ ? "Use request_group_session_sharing to mint or read this conversation's sharing scope; never infer sharing from the member's role, memories, or MCP transport session."
3353
+ : GROUP_SESSION_SHARING_DISABLED_NOTE,
3325
3354
  currentParticipant
3326
3355
  && (!readString(currentParticipant, "title") || !readString(currentParticipant, "responsibilitySummary"))
3327
3356
  ? "Your group profile is incomplete. Use prepare_group_publication to review your memory evidence, propose the missing fields, and pass them only after confirmation to complete_group_publication."
@@ -3354,7 +3383,9 @@ Details: ${m.details || "N/A"}`;
3354
3383
  return {
3355
3384
  content: [{
3356
3385
  type: "text",
3357
- text: `${scopeText}\n\nThis user belongs to multiple groups: ${choices}. Reuse this same conversation scope and call request_group_session_sharing once per groupId to obtain a separate text confirmation question for each group.`,
3386
+ text: GROUP_SESSION_SHARING_PROMPTS_ENABLED
3387
+ ? `${scopeText}\n\nThis user belongs to multiple groups: ${choices}. Reuse this same conversation scope and call request_group_session_sharing once per groupId to obtain a separate text confirmation question for each group.`
3388
+ : GROUP_SESSION_SHARING_DISABLED_MESSAGE,
3358
3389
  }],
3359
3390
  };
3360
3391
  }
@@ -3364,7 +3395,9 @@ Details: ${m.details || "N/A"}`;
3364
3395
  return {
3365
3396
  content: [{
3366
3397
  type: "text",
3367
- text: `${scopeText}\n\nNo sharing decision exists for this conversation. Call request_group_session_sharing with the scope above${readString(group, "id") ? ` and groupId ${readString(group, "id")}` : ""}, relay its exact text question, and call set_group_session_sharing only after an explicit Yes or No. Silence leaves the state unset.`,
3398
+ text: GROUP_SESSION_SHARING_PROMPTS_ENABLED
3399
+ ? `${scopeText}\n\nNo sharing decision exists for this conversation. Call request_group_session_sharing with the scope above${readString(group, "id") ? ` and groupId ${readString(group, "id")}` : ""}, relay its exact text question, and call set_group_session_sharing only after an explicit Yes or No. Silence leaves the state unset.`
3400
+ : GROUP_SESSION_SHARING_DISABLED_MESSAGE,
3368
3401
  }],
3369
3402
  };
3370
3403
  }
@@ -3412,6 +3445,14 @@ Details: ${m.details || "N/A"}`;
3412
3445
  };
3413
3446
  }
3414
3447
  async handleRequestGroupSessionSharing(args) {
3448
+ if (!GROUP_SESSION_SHARING_PROMPTS_ENABLED) {
3449
+ return {
3450
+ content: [{
3451
+ type: "text",
3452
+ text: GROUP_SESSION_SHARING_DISABLED_MESSAGE,
3453
+ }],
3454
+ };
3455
+ }
3415
3456
  const parsed = requestGroupSessionSharingSchema.parse(args ?? {});
3416
3457
  const payload = await this.client.getGroupSessionSharing(parsed);
3417
3458
  const groupSharingScopeId = readString(payload ?? {}, "groupSharingScopeId");
@@ -3467,6 +3508,14 @@ Details: ${m.details || "N/A"}`;
3467
3508
  };
3468
3509
  }
3469
3510
  async handleSetGroupSessionSharing(args) {
3511
+ if (!GROUP_SESSION_SHARING_PROMPTS_ENABLED) {
3512
+ return {
3513
+ content: [{
3514
+ type: "text",
3515
+ text: GROUP_SESSION_SHARING_DISABLED_MESSAGE,
3516
+ }],
3517
+ };
3518
+ }
3470
3519
  const parsed = setGroupSessionSharingSchema.parse(args ?? {});
3471
3520
  const payload = await this.client.setGroupSessionSharing(parsed);
3472
3521
  return this.formatGroupSessionSharingUpdate(parsed.share, payload);
@@ -3506,7 +3555,7 @@ Details: ${m.details || "N/A"}`;
3506
3555
  text: [
3507
3556
  `Invite code for ${payload?.group?.name ?? "your group"}: ${payload?.code}`,
3508
3557
  `Expires: ${payload?.expiresAt}`,
3509
- `Maximum uses: ${payload?.maxUses}`,
3558
+ "Anyone with this code can join until it expires.",
3510
3559
  "Share this secret code only with intended teammates.",
3511
3560
  ].join("\n"),
3512
3561
  }],
@@ -3519,8 +3568,8 @@ Details: ${m.details || "N/A"}`;
3519
3568
  content: [{
3520
3569
  type: "text",
3521
3570
  text: payload?.alreadyMember
3522
- ? `You are already a member of ${payload?.group?.name ?? "this group"}. No memories were published. Use prepare_group_publication to review memories and propose any missing title or responsibility fields, then call request_group_session_sharing and relay its exact text question. Silence stays unset for a later checkpoint.`
3523
- : `Joined ${payload?.group?.name ?? "the company group"}. No memories were published. Next use prepare_group_publication to review candidates, infer a proposed title and responsibility summary, and ask the user to confirm that profile together with the publication preview. Also call request_group_session_sharing without a scope and relay its exact text question. Silence leaves consent unset for a later checkpoint.`,
3571
+ ? `You are already a member of ${payload?.group?.name ?? "this group"}. No memories were published. Use prepare_group_publication to review memories and propose any missing title or responsibility fields.${GROUP_SESSION_SHARING_PROMPTS_ENABLED ? " Then call request_group_session_sharing and relay its exact text question. Silence stays unset for a later checkpoint." : ` ${GROUP_SESSION_SHARING_DISABLED_NOTE}`}`
3572
+ : `Joined ${payload?.group?.name ?? "the company group"}. No memories were published. Next use prepare_group_publication to review candidates, infer a proposed title and responsibility summary, and ask the user to confirm that profile together with the publication preview.${GROUP_SESSION_SHARING_PROMPTS_ENABLED ? " Also call request_group_session_sharing without a scope and relay its exact text question. Silence leaves consent unset for a later checkpoint." : ` ${GROUP_SESSION_SHARING_DISABLED_NOTE}`}`,
3524
3573
  }],
3525
3574
  };
3526
3575
  }
@@ -22,6 +22,12 @@ export const MCP_PACKAGE_VERSION = stringOrFallback(packageJson.version, FALLBAC
22
22
  export const MCP_PACKAGE_DESCRIPTION = stringOrFallback(packageJson.description, FALLBACK_PACKAGE.description);
23
23
  export const MCP_PACKAGE_LABEL = `${MCP_PACKAGE_NAME}@${MCP_PACKAGE_VERSION}`;
24
24
  export const MCP_DESKTOP_MANAGED = process.env.ECHO_DESKTOP_MANAGED === "1";
25
+ /**
26
+ * Agent-driven group sharing prompts. Disabled: the user manages group sharing on their
27
+ * own surface, not by being asked through the agent. Flip to true to restore the ask —
28
+ * the tools, handlers and prompt text are all still here.
29
+ */
30
+ export const GROUP_SESSION_SHARING_PROMPTS_ENABLED = false;
25
31
  export const MCP_UPDATE_COMMAND = `npx -y ${MCP_PACKAGE_NAME}@latest update`;
26
32
  export const MCP_UPDATE_ALL_COMMAND = `${MCP_UPDATE_COMMAND} --all`;
27
33
  export const MCP_VAULT_UNLOCK_INSTRUCTION = MCP_DESKTOP_MANAGED
@@ -32,6 +38,17 @@ const MCP_UPDATE_INSTRUCTION = MCP_DESKTOP_MANAGED
32
38
  : `updates auto-install in the background; on failure run \`${MCP_UPDATE_ALL_COMMAND}\``;
33
39
  export const MEMORY_CITATION_INSTRUCTION = 'If the user-facing answer materially relies on one or more EchoMem memories, end it with a compact "EchoMem sources:" list containing only the memories actually used. For memories owned by teammates or accepted friends, call record_memory_citations immediately before the final answer with those exact Memory IDs. Do not cite memories that were merely retrieved. Use each memory key as the Markdown label and its canonical https://echoknows.com/memory/<memory-id> URL. Omit the sources section and citation receipt when no memory informed the answer.';
34
40
  export const SAVED_MEMORY_RECEIPT_INSTRUCTION = 'After save_conversation succeeds and returns one or more saved memory IDs, make the save visible in the final user-facing answer with a compact "EchoMem saved:" list containing every memory created by that call. Use each memory key as the Markdown label and its canonical https://echoknows.com/memory/<memory-id> URL. This save receipt is separate from "EchoMem sources:" and does not imply that the newly saved memories informed the answer.';
41
+ const GROUP_SHARING_SURFACE = MCP_DESKTOP_MANAGED ? "in Echo Desktop" : "at echoknows.com";
42
+ export const GROUP_SESSION_SHARING_DISABLED_NOTE = `Never ask the user whether to share memories with a company group; the user manages group sharing ${GROUP_SHARING_SURFACE}.`;
43
+ export const GROUP_SESSION_SHARING_SAVE_INSTRUCTION = GROUP_SESSION_SHARING_PROMPTS_ENABLED
44
+ ? " For group sharing, reuse the exact groupSharingScopeId returned by request_group_session_sharing or an earlier save in this conversation. Never reuse it in another conversation or save it as memory. Each group has an independent decision under the same conversation scope; eligible memories sync automatically to every approved group, while flagged memories stay private. If a selected group has no decision yet, call request_group_session_sharing, relay its exact text question, and call set_group_session_sharing only after an explicit Yes or No. Silence leaves consent unset; never infer the answer."
45
+ : ` Saves are always private. ${GROUP_SESSION_SHARING_DISABLED_NOTE}`;
46
+ export const GROUP_SESSION_SHARING_CONTEXT_INSTRUCTION = GROUP_SESSION_SHARING_PROMPTS_ENABLED
47
+ ? " Conversation sharing is separate; call request_group_session_sharing instead of inferring it."
48
+ : "";
49
+ export const GROUP_SESSION_SHARING_JOIN_INSTRUCTION = GROUP_SESSION_SHARING_PROMPTS_ENABLED
50
+ ? " Also call request_group_session_sharing without a scope and relay its exact text question. Silence stays unset and should be prompted again at a later qualifying checkpoint."
51
+ : ` ${GROUP_SESSION_SHARING_DISABLED_NOTE}`;
35
52
  export const MCP_SERVER_INSTRUCTIONS = [
36
53
  `${MCP_PACKAGE_DESCRIPTION} (${MCP_PACKAGE_LABEL}).`,
37
54
  `If stale, ${MCP_UPDATE_INSTRUCTION}; restart afterward.`,
@@ -40,11 +57,13 @@ export const MCP_SERVER_INSTRUCTIONS = [
40
57
  "Before re-deriving prior decisions or preferences, use search_memories.",
41
58
  `Before a final response for a durable decision, implementation, fix, commit, passing verification, release, or milestone, call save_conversation; skip secrets and trivial work. If locked, tell the user to ${MCP_VAULT_UNLOCK_INSTRUCTION}.`,
42
59
  "After a successful save, show every memory created by that call in a compact EchoMem saved: list with canonical links; this is separate from \"EchoMem sources:\".",
43
- "For company groups, request sharing near start or after a save; relay its exact question and set only after explicit Yes/No. Reuse its scope only in this conversation; each group needs a choice, silence means unset, and flagged memories stay private.",
60
+ GROUP_SESSION_SHARING_PROMPTS_ENABLED
61
+ ? "For company groups, request sharing near start or after a save; relay its exact question and set only after explicit Yes/No. Reuse its scope only in this conversation; each group needs a choice, silence means unset, and flagged memories stay private."
62
+ : `Saves stay private. ${GROUP_SESSION_SHARING_DISABLED_NOTE}`,
44
63
  "EchoMem credential identity overrides profiles, hosts, git identity, and inference. Use get_group_context for workspace orientation and search_memories with scope=workspace for shared work.",
45
64
  "For memory-informed final answers, record exact used teammate/friend IDs with a unique receiptId, then end with an EchoMem sources: list using memory keys and canonical https://echoknows.com/memory/<memory-id> links.",
46
65
  "Group profiles, sharing, publication, sensitive flags, and deletion require explicit confirmation. Never store or log an echo_grp_ invite code.",
47
- ].join(" ");
66
+ ].filter(Boolean).join(" ");
48
67
  export function withMcpVersion(description) {
49
68
  return `${description}\n\nEchoMem MCP bridge: ${MCP_PACKAGE_LABEL}.`;
50
69
  }
@@ -1,4 +1,5 @@
1
1
  import fs from "node:fs";
2
+ import { GROUP_SESSION_SHARING_DISABLED_NOTE, GROUP_SESSION_SHARING_PROMPTS_ENABLED } from "./package-metadata.js";
2
3
  const SAVE_TOOL_RE = /^(?:mcp__[\w.-]+__)?save_conversation$/i;
3
4
  const MUTATION_TOOL_RE = /(?:^|[._])(?:apply_patch|Edit|Write)$/i;
4
5
  const DURABLE_COMMAND_RE = /\b(?:git\s+commit|npm\s+(?:run\s+)?(?:test|build|lint)|pnpm\s+(?:test|build|lint)|yarn\s+(?:test|build|lint)|pytest|cargo\s+test|go\s+test|deploy|publish)\b/i;
@@ -7,9 +8,13 @@ const CHECKPOINT_REASON = [
7
8
  "Run EchoMem's private completion checkpoint before finishing this turn.",
8
9
  "Review the work that just completed. If it produced a durable decision, confirmed preference, implementation, resolved bug, commit, passing verification, release, or project milestone, call `save_conversation` now. Prefer the `messages` field and omit `conversation`: copy the smallest relevant contiguous set of user and assistant turns verbatim, preserving role and order. Exclude system instructions, tool calls, and hidden content. Use at most six messages and 12,000 total characters; drop whole older turns instead of truncating or rewriting them. If exact source text is unavailable, use `conversation` with a concise structured summary prefixed `Summary (source excerpt unavailable):`.",
9
10
  "Do not save secrets or incidental chatter. If the work was not durable, do not call the tool and finish normally.",
10
- "Private persistence happens first. For a user with a company group, call `request_group_session_sharing` near conversation start or after a qualifying private save.",
11
- "On the first request_group_session_sharing call in a conversation, omit groupSharingScopeId so EchoMem mints a fresh opaque scope. Reuse that exact scope only in this conversation for later get/request/set/save calls, and never persist it as memory. If multiple groups are returned, reuse the same scope and call once per groupId. Relay the tool's exact text question and call set_group_session_sharing only after an explicit Yes/No. Silence leaves that group's state unset. A Share decision syncs eligible memories from later saves carrying the same scope to that group; saves automatically sync to every approved group. Keep private keeps them private for that group.",
12
- "Flagged memories are withheld from automatic conversation sync and remain private.",
11
+ ...(GROUP_SESSION_SHARING_PROMPTS_ENABLED
12
+ ? [
13
+ "Private persistence happens first. For a user with a company group, call `request_group_session_sharing` near conversation start or after a qualifying private save.",
14
+ "On the first request_group_session_sharing call in a conversation, omit groupSharingScopeId so EchoMem mints a fresh opaque scope. Reuse that exact scope only in this conversation for later get/request/set/save calls, and never persist it as memory. If multiple groups are returned, reuse the same scope and call once per groupId. Relay the tool's exact text question and call set_group_session_sharing only after an explicit Yes/No. Silence leaves that group's state unset. A Share decision syncs eligible memories from later saves carrying the same scope to that group; saves automatically sync to every approved group. Keep private keeps them private for that group.",
15
+ "Flagged memories are withheld from automatic conversation sync and remain private.",
16
+ ]
17
+ : [`Saves are always private. ${GROUP_SESSION_SHARING_DISABLED_NOTE}`]),
13
18
  "If EchoMem reports that the encrypted vault is locked, relay its local unlock instruction; for a standalone installation, use `echomem-mcp unlock`. Never silently skip a qualifying checkpoint.",
14
19
  ].join(" ");
15
20
  function currentTurnSlice(transcript) {
@@ -64,7 +64,7 @@ function extractionPreviewBootstrap(options) {
64
64
  trialEndedAt: options.trialEndedAt ?? null,
65
65
  cancelAtPeriodEnd: options.cancelAtPeriodEnd ?? false,
66
66
  currentPeriodEnd: options.currentPeriodEnd ?? null,
67
- pricingUrl: "https://echoknows.com/account?source=mcp_onboarding",
67
+ pricingUrl: "https://echoknows.com/dashboard/account?source=mcp_onboarding",
68
68
  account: {
69
69
  displayName: "Preview User",
70
70
  email: "preview@example.com",
package/dist/setup.js CHANGED
@@ -34,7 +34,7 @@ import { resolveClaudeCoworkSessionRoots, resolveClaudeDesktopSupportRoots, reso
34
34
  import { isEphemeralNpxPath, reexecFromDurableRuntime, resolveDurableDistPath, resolveGlobalEntry } from "./durable-entry.js";
35
35
  import { installSaveCheckpointHooks, installSourceSessionHooks, removeLifecycleHooks } from "./hud/hooks.js";
36
36
  import { atomicWriteJsonObject, atomicWriteTextFile, readJsonObjectFile } from "./config-files.js";
37
- import { MCP_PACKAGE_LABEL, MCP_PACKAGE_NAME, MCP_PACKAGE_VERSION, MCP_UPDATE_ALL_COMMAND, MCP_UPDATE_COMMAND } from "./package-metadata.js";
37
+ import { GROUP_SESSION_SHARING_DISABLED_NOTE, GROUP_SESSION_SHARING_PROMPTS_ENABLED, MCP_PACKAGE_LABEL, MCP_PACKAGE_NAME, MCP_PACKAGE_VERSION, MCP_UPDATE_ALL_COMMAND, MCP_UPDATE_COMMAND } from "./package-metadata.js";
38
38
  import { checkLatestUpdateStatus, compareSemver, readCachedUpdateStatus } from "./update-check.js";
39
39
  import { startMcpControlServer } from "./mcp-control.js";
40
40
  import { analyticsErrorCode, productAnalytics, trackCliCommandRun, } from "./product-analytics.js";
@@ -43,7 +43,7 @@ import { installHeadlessRuntimeSync, readHeadlessRuntimeInstallation, removeHead
43
43
  // The setup dashboard, account login, and encryption passphrase entry are all served by this
44
44
  // localhost bridge. The hosted API only sends OTP email, verifies the code, and mints a device token.
45
45
  const API_BASE_URL = (process.env.ECHO_API_BASE_URL || "https://echo-mem-chrome.vercel.app").replace(/\/$/, "");
46
- const PRICING_URL = (process.env.ECHO_PRICING_URL || "https://echoknows.com/account").replace(/\/$/, "");
46
+ const PRICING_URL = (process.env.ECHO_PRICING_URL || "https://echoknows.com/dashboard/account").replace(/\/$/, "");
47
47
  function hostedBillingEndpoint(pathname) {
48
48
  const url = new URL(PRICING_URL);
49
49
  url.pathname = pathname;
@@ -465,7 +465,9 @@ function echomemGuidanceBlock() {
465
465
  "- Before the final response for a task that produced a durable decision, confirmed preference, implementation, resolved bug, commit, passing verification, release, or project milestone: call `save_conversation`. This private checkpoint does not require a separate user request. Do not save secrets, credentials, incidental chatter, or trivial read-only work. If a qualifying save fails because the encrypted vault is locked, relay the bridge's unlock instruction; for this standalone runtime, use `echomem-mcp unlock`. Never silently skip it.",
466
466
  "- For `save_conversation`, prefer `messages` and omit `conversation`: copy the smallest relevant contiguous set of user and assistant turns verbatim, preserving role and order. Exclude system instructions, tool calls, and hidden content. Use at most six messages and 12,000 total characters; drop whole older turns instead of truncating or rewriting them. If exact source text is unavailable, use `conversation` with a concise structured summary prefixed `Summary (source excerpt unavailable):`.",
467
467
  '- After `save_conversation` succeeds and returns one or more saved memory IDs, make the save visible in the final user-facing answer with a compact `EchoMem saved:` list containing every memory created by that call. Link each memory key to its canonical `https://echoknows.com/memory/<memory-id>` URL. This save receipt is separate from `EchoMem sources:` and does not imply the newly saved memories informed the answer.',
468
- "- For a user with a company group, call `request_group_session_sharing` near conversation start or after a qualifying private save. On the first call in a conversation, omit `groupSharingScopeId` so EchoMem mints a fresh opaque scope. Reuse that exact scope only in this conversation for later get/request/set/save calls, and never persist it as memory. If multiple groups are returned, reuse the same scope and call once per `groupId`. Relay the tool's exact text question and call `set_group_session_sharing` only after an explicit Yes/No. Silence leaves that group's state unset; never infer an answer. Saves sync eligible memories to every approved group; a No keeps them private for that group.",
468
+ GROUP_SESSION_SHARING_PROMPTS_ENABLED
469
+ ? "- For a user with a company group, call `request_group_session_sharing` near conversation start or after a qualifying private save. On the first call in a conversation, omit `groupSharingScopeId` so EchoMem mints a fresh opaque scope. Reuse that exact scope only in this conversation for later get/request/set/save calls, and never persist it as memory. If multiple groups are returned, reuse the same scope and call once per `groupId`. Relay the tool's exact text question and call `set_group_session_sharing` only after an explicit Yes/No. Silence leaves that group's state unset; never infer an answer. Saves sync eligible memories to every approved group; a No keeps them private for that group."
470
+ : `- Saves are always private. ${GROUP_SESSION_SHARING_DISABLED_NOTE}`,
469
471
  "- If the user pastes a session carryover/checkpoint: it may reference `get_checkpoint_by_context` — use it to pull the checkpoint/decision trail when you need more than the snapshot.",
470
472
  "",
471
473
  "### Ticket stewardship",
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { MCP_DESKTOP_MANAGED, MCP_VAULT_UNLOCK_INSTRUCTION, MEMORY_CITATION_INSTRUCTION, SAVED_MEMORY_RECEIPT_INSTRUCTION, withMcpVersion, } from "./package-metadata.js";
2
+ import { MCP_DESKTOP_MANAGED, MCP_VAULT_UNLOCK_INSTRUCTION, MEMORY_CITATION_INSTRUCTION, SAVED_MEMORY_RECEIPT_INSTRUCTION, withMcpVersion, GROUP_SESSION_SHARING_CONTEXT_INSTRUCTION, GROUP_SESSION_SHARING_JOIN_INSTRUCTION, GROUP_SESSION_SHARING_PROMPTS_ENABLED, GROUP_SESSION_SHARING_SAVE_INSTRUCTION, } from "./package-metadata.js";
3
3
  import { ATOMIC_TICKET_DESCRIPTION_MAX, ATOMIC_TICKET_DESCRIPTION_RULE } from "./ticket-review-format.js";
4
4
  export const canonicalToolNames = {
5
5
  bindSourceSession: "bind_source_session",
@@ -59,6 +59,9 @@ export const hiddenCompatibilityToolNames = new Set([
59
59
  canonicalToolNames.recordWorkspaceTicketProposal,
60
60
  canonicalToolNames.acknowledgeWorkspaceTicketReview,
61
61
  canonicalToolNames.getGroupSessionSharing,
62
+ ...(GROUP_SESSION_SHARING_PROMPTS_ENABLED
63
+ ? []
64
+ : [canonicalToolNames.requestGroupSessionSharing, canonicalToolNames.setGroupSessionSharing]),
62
65
  canonicalToolNames.updateGroupProfile,
63
66
  canonicalToolNames.publishToGroup,
64
67
  canonicalToolNames.publishBatchToGroup,
@@ -733,7 +736,6 @@ export const createGroupInviteSchema = z.object({
733
736
  ...triggerMetadataSchema,
734
737
  ...workspaceSelectorSchema,
735
738
  expiresInDays: z.number().int().min(1).max(30).optional(),
736
- maxUses: z.number().int().min(1).max(100).optional(),
737
739
  });
738
740
  export const joinGroupSchema = z.object({
739
741
  ...triggerMetadataSchema,
@@ -1262,7 +1264,7 @@ export function listToolSpecs(opts = {}) {
1262
1264
  },
1263
1265
  {
1264
1266
  name: canonicalToolNames.save,
1265
- description: `Save durable knowledge from this conversation into the user's private EchoMem (durable memories are extracted automatically). Call before the final response when work produced a durable decision, confirmed preference, implementation, resolved bug, commit, passing verification, release, or project milestone; this private checkpoint does not require a separate user request. Omit secrets, incidental chatter, and trivial read-only work. If the encrypted vault is locked, tell the user to ${MCP_VAULT_UNLOCK_INSTRUCTION} and never silently skip a qualifying checkpoint. Private persistence happens first. For group sharing, reuse the exact groupSharingScopeId returned by request_group_session_sharing or an earlier save in this conversation. Never reuse it in another conversation or save it as memory. Each group has an independent decision under the same conversation scope; eligible memories sync automatically to every approved group, while flagged memories stay private. If a selected group has no decision yet, call request_group_session_sharing, relay its exact text question, and call set_group_session_sharing only after an explicit Yes or No. Silence leaves consent unset; never infer the answer. New extraction input uses the plan's weekly processing allowance; if the limit is reached, nothing is saved. passthrough=true stores the text verbatim as a session capsule. ${SAVED_MEMORY_RECEIPT_INSTRUCTION}`,
1267
+ description: `Save durable knowledge from this conversation into the user's private EchoMem (durable memories are extracted automatically). Call before the final response when work produced a durable decision, confirmed preference, implementation, resolved bug, commit, passing verification, release, or project milestone; this private checkpoint does not require a separate user request. Omit secrets, incidental chatter, and trivial read-only work. If the encrypted vault is locked, tell the user to ${MCP_VAULT_UNLOCK_INSTRUCTION} and never silently skip a qualifying checkpoint. Private persistence happens first.${GROUP_SESSION_SHARING_SAVE_INSTRUCTION} New extraction input uses the plan's weekly processing allowance; if the limit is reached, nothing is saved. passthrough=true stores the text verbatim as a session capsule. ${SAVED_MEMORY_RECEIPT_INSTRUCTION}`,
1266
1268
  inputSchema: {
1267
1269
  type: "object",
1268
1270
  properties: {
@@ -1498,7 +1500,7 @@ export function listToolSpecs(opts = {}) {
1498
1500
  },
1499
1501
  {
1500
1502
  name: canonicalToolNames.groupContext,
1501
- description: `Get your current company workspace, its participant directory, declared titles and responsibilities, published-memory coverage, and the current member authenticated by the EchoMem credential. That authenticated EchoMem identity is authoritative over any conflicting host identity or inference. Use this before answering who works on what; use search_memories with scope=workspace for shared work retrieval. Treat declared profile fields as facts and memory-derived work as evidence or inference. Conversation sharing is separate; call request_group_session_sharing instead of inferring it.${groupMapSection}`,
1503
+ description: `Get your current company workspace, its participant directory, declared titles and responsibilities, published-memory coverage, and the current member authenticated by the EchoMem credential. That authenticated EchoMem identity is authoritative over any conflicting host identity or inference. Use this before answering who works on what; use search_memories with scope=workspace for shared work retrieval. Treat declared profile fields as facts and memory-derived work as evidence or inference.${GROUP_SESSION_SHARING_CONTEXT_INSTRUCTION}${groupMapSection}`,
1502
1504
  inputSchema: {
1503
1505
  type: "object",
1504
1506
  properties: {
@@ -1583,18 +1585,17 @@ export function listToolSpecs(opts = {}) {
1583
1585
  },
1584
1586
  {
1585
1587
  name: canonicalToolNames.createGroupInvite,
1586
- description: "Generate a secret, expiring invite code for the current group. Only the group creator may call this in the MVP. Return the code only to the user so they can share it intentionally; never log it.",
1588
+ description: "Generate a secret, expiring invite code for the current group; anyone with it can join until it expires. Only the group creator may call this in the MVP. Return the code only to the user so they can share it intentionally; never log it.",
1587
1589
  inputSchema: {
1588
1590
  type: "object",
1589
1591
  properties: {
1590
1592
  expiresInDays: { type: "number", default: 7 },
1591
- maxUses: { type: "number", default: 20 },
1592
1593
  },
1593
1594
  },
1594
1595
  },
1595
1596
  {
1596
1597
  name: canonicalToolNames.joinGroup,
1597
- description: "Join a company memory group using an invite code after the user explicitly asks to join. Joining never publishes memories. Next call prepare_group_publication, infer a proposed title and responsibility summary from the user's own candidate memories, and ask the user to confirm the profile together with the publication preview. Also call request_group_session_sharing without a scope and relay its exact text question. Silence stays unset and should be prompted again at a later qualifying checkpoint.",
1598
+ description: `Join a company memory group using an invite code after the user explicitly asks to join. Joining never publishes memories. Next call prepare_group_publication, infer a proposed title and responsibility summary from the user's own candidate memories, and ask the user to confirm the profile together with the publication preview.${GROUP_SESSION_SHARING_JOIN_INSTRUCTION}`,
1598
1599
  inputSchema: {
1599
1600
  type: "object",
1600
1601
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@echomem/mcp",
3
- "version": "1.4.67",
3
+ "version": "1.4.69",
4
4
  "description": "EchoMem MCP bridge for cross-agent memory, local history import, and recall",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",