@echomem/mcp 1.4.55 → 1.4.56

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
@@ -784,6 +784,7 @@ class EchoMemApiClient {
784
784
  const response = await this.axios.post(`/api/extension/workspace-tickets/${encodeURIComponent(parsed.ticketId)}/sessions`, {
785
785
  contextId: sourceSession.contextId,
786
786
  workspaceId: parsed.workspaceId,
787
+ ticketLaunchId: parsed.launchId,
787
788
  });
788
789
  return response.data;
789
790
  }
@@ -166,7 +166,33 @@ const triggerMetadataSchema = {
166
166
  triggerMessageRole: z.string().optional(),
167
167
  cloudCoworkSessionId: z.string().regex(/^session_[A-Za-z0-9_-]{1,192}$/).optional(),
168
168
  };
169
- const CLOUD_COWORK_SESSION_DESCRIPTION = "Cloud Cowork only: the current session_ identifier supplied by the Cowork runtime. Repeat it on each EchoMem call so the shared remote-devices bridge can attach that one request to the same provisional conversation context. Never guess or reuse an ID from another conversation. Local Cowork, Claude Code, and Codex must omit this field.";
169
+ // Phrased as a capability test rather than a product name, deliberately.
170
+ //
171
+ // The previous wording opened "Cloud Cowork only" and closed "Local Cowork,
172
+ // Claude Code, and Codex must omit this field", which asks the model to work out
173
+ // which product it is running inside. A remote Cowork session cannot answer that
174
+ // -- it knows it is Claude, in Cowork, on this machine -- so with three of four
175
+ // named environments saying omit, omitting was the careful reading, and every
176
+ // such session landed in a context with no session identity that nothing could
177
+ // ever repair. Asked instead whether it *has* a session_ identifier, the same
178
+ // model answers immediately and correctly.
179
+ //
180
+ // The "never invent one" half is kept verbatim because it demonstrably holds: a
181
+ // model told outright to pass a fabricated session_ id refused, and quoted this
182
+ // clause back as the reason.
183
+ //
184
+ // The closing sentence replaces what the old wording achieved with its product
185
+ // list. Every host sees this field -- there is no gating by session type -- and a
186
+ // value supplied by one that is not remote Cowork is worse than the bug this
187
+ // rewrite fixes: it overrides that request's real local binding and writes a
188
+ // COMPLETE session identity, so isFakeContext is false and the repair service
189
+ // can never revisit it. The mixing guard in index.ts only catches hosts whose
190
+ // identity arrives by env or _meta (standalone Claude Code, Codex); everything on
191
+ // the shared desktop bridge -- Cowork and the Code tab alike -- reaches that
192
+ // check with a null source session and passes straight through. So the
193
+ // prohibition has to survive here, phrased as something a model can evaluate
194
+ // about itself rather than a product it has to recognise.
195
+ const CLOUD_COWORK_SESSION_DESCRIPTION = "If this conversation has a session_ identifier available to you, pass it here. Repeat it on each EchoMem call so the shared bridge can attach every request to the same conversation context. The test is whether you have such an identifier -- do not try to work out which product or environment you are running inside. Never guess an ID, invent one, or reuse one from another conversation. If this conversation is identified some other way -- a bare UUID, or an id beginning local_ -- then you do not have one: omit this field, and never reshape an identifier of another form into this one.";
170
196
  const CLOUD_COWORK_SESSION_PROPERTY = {
171
197
  type: "string",
172
198
  pattern: "^session_[A-Za-z0-9_-]{1,192}$",
@@ -258,6 +284,7 @@ export const linkWorkspaceTicketSessionSchema = z.object({
258
284
  ...triggerMetadataSchema,
259
285
  ticketId: z.string().uuid(),
260
286
  workspaceId: z.string().uuid().optional(),
287
+ launchId: z.string().uuid().optional(),
261
288
  });
262
289
  const dateBoundarySchema = z.string().trim().min(1).refine((value) => Number.isFinite(Date.parse(value)), "Expected an ISO-8601 date or date-time string");
263
290
  export const timeRangeSchema = z.object({
@@ -503,7 +530,7 @@ export function listToolSpecs(opts = {}) {
503
530
  {
504
531
  name: canonicalToolNames.linkWorkspaceTicketSession,
505
532
  title: "Link this agent conversation to an Echo workspace ticket",
506
- description: withMcpVersion("Call when the user asks to work on, continue, attach, or bind this conversation to an Echo workspace ticket and supplies its UUID. Pass the ticketId exactly; pass workspaceId when a structured Echo ticket marker provides it. The operation is idempotent. A verified local source session links immediately. Cloud Cowork has no local transcript, so pass its current session_ runtime identifier as cloudCoworkSessionId; EchoMem records that path explicitly as provisional and links it immediately. Otherwise Echo Desktop can recover this exact invocation from a local transcript. An accepted_for_desktop_recovery response is asynchronous acceptance, not a failed link; do not claim final success or failure until ticket Activity provides final-state evidence. Never guess or ask the user for a source-session/context ID."),
533
+ description: withMcpVersion("Call when the user asks to work on, continue, attach, or bind this conversation to an Echo workspace ticket and supplies its UUID. Pass ticketId exactly. When a structured Echo ticket marker is present, also pass its workspaceId and launchId exactly; the backend verifies the registered launch nonce and treats that entry point as team-work sharing intent. Never invent a launchId for a session attached later. The operation is idempotent. A verified local source session links immediately. If you have a session_ identifier for this conversation, pass it as cloudCoworkSessionId; EchoMem records that path explicitly as provisional and links it immediately. Otherwise Echo Desktop can recover this exact invocation from a local transcript. An accepted_for_desktop_recovery response is asynchronous acceptance, not a failed link; do not claim final success or failure until ticket Activity provides final-state evidence. Never guess or ask the user for a source-session/context ID."),
507
534
  inputSchema: {
508
535
  type: "object",
509
536
  properties: {
@@ -517,6 +544,11 @@ export function listToolSpecs(opts = {}) {
517
544
  format: "uuid",
518
545
  description: "Optional Echo workspace UUID when it is present in the structured launch marker.",
519
546
  },
547
+ launchId: {
548
+ type: "string",
549
+ format: "uuid",
550
+ description: "Optional registered launch UUID copied exactly from the structured Echo ticket marker. Omit it for a session linked later.",
551
+ },
520
552
  triggerMessage: {
521
553
  type: "string",
522
554
  description: "Optional user message that expressed the ticket-linking intent.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@echomem/mcp",
3
- "version": "1.4.55",
3
+ "version": "1.4.56",
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",