projectionlab-mcp 1.2.1 → 1.2.2

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.
@@ -10,6 +10,12 @@
10
10
  * connection at a time. The incumbent keeps it: a second authenticated
11
11
  * executor is refused with 4004 and retries until the incumbent goes away,
12
12
  * unless it requests takeover or repeats the incumbent's instanceId.
13
+ *
14
+ * Server instances share the port the same way: one holds it, others wait.
15
+ * A waiting instance that has work connects to the port and sends a yield
16
+ * frame; the holder finishes its queued operations, releases the port, drops
17
+ * its executor with an ordinary close (so the executor reconnects within
18
+ * seconds, to the new holder), and closes the yield socket with 4005.
13
19
  */
14
20
  /** Bumped on any breaking change to frame shapes or semantics. */
15
21
  export const PROTOCOL_VERSION = 1;
@@ -33,5 +39,13 @@ export const CLOSE_CODES = {
33
39
  REPLACED: 4003,
34
40
  /** Another executor holds the connection; retry later. */
35
41
  BUSY: 4004,
42
+ /** Sent on a yield socket only: the holder released the port. */
43
+ YIELDED: 4005,
44
+ /**
45
+ * The server handed the port to another server instance. A standard code
46
+ * (RFC 6455 7.4.1 range, IANA "Service Restart"), not 4003 or 4004, so
47
+ * executors reconnect on their fast schedule and reach the new holder.
48
+ */
49
+ HANDED_OVER: 1012,
36
50
  };
37
51
  //# sourceMappingURL=wire.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wire.js","sourceRoot":"","sources":["../../src/types/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAE7C,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,kFAAkF;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AA0G5C,gDAAgD;AAChD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,8FAA8F;IAC9F,WAAW,EAAE,IAAI;IACjB,iCAAiC;IACjC,gBAAgB,EAAE,IAAI;IACtB,4FAA4F;IAC5F,QAAQ,EAAE,IAAI;IACd,0DAA0D;IAC1D,IAAI,EAAE,IAAI;CACF,CAAC"}
1
+ {"version":3,"file":"wire.js","sourceRoot":"","sources":["../../src/types/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAE7C,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,kFAAkF;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAqH5C,gDAAgD;AAChD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,8FAA8F;IAC9F,WAAW,EAAE,IAAI;IACjB,iCAAiC;IACjC,gBAAgB,EAAE,IAAI;IACtB,4FAA4F;IAC5F,QAAQ,EAAE,IAAI;IACd,0DAA0D;IAC1D,IAAI,EAAE,IAAI;IACV,iEAAiE;IACjE,OAAO,EAAE,IAAI;IACb;;;;OAIG;IACH,WAAW,EAAE,IAAI;CACT,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projectionlab-mcp",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "MCP server for ProjectionLab: read and safely edit your retirement plan from any MCP-compatible AI assistant",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -43,7 +43,10 @@ options page (browsers isolate extension storage by ID, so settings do not trans
43
43
  | Failing item | What it means | What to do with the user |
44
44
  |---|---|---|
45
45
  | `API_KEY_MISSING` in `errors` | The server has no Plugin API key | See "Setting the API key" |
46
- | `browser: false`, port held by another instance | Another agent on this machine runs the server and has the extension | Wait for that agent to exit (this server takes over within about a minute), or give this one its own `PL_WS_PORT` and point the extension at it |
46
+ | `browser: false`, port held by another process that did not hand it over | Another agent or session on this machine runs an older server that cannot hand the port over, or one with a different `PL_WS_TOKEN` | Ask the user to close that session or quit its MCP host (or update its projectionlab-mcp); this server takes over within seconds |
47
+ | `browser: false`, holder still busy with its own operations | Another instance is mid-operation and did not release the port in time | Wait a moment and run `projectionlab_check_connection` again |
48
+ | `browser: false`, port held by a program that is not projectionlab-mcp | Some other program is listening on the WebSocket port | Ask the user to stop that program, or set `PL_WS_PORT` to a free port for this server and enter the same port on the extension's options page |
49
+ | `browser: false`, handing the port over did not complete | Another instance holds the port and the browser did not reconnect here in time | Run `projectionlab_check_connection` again; if it keeps failing, ask the user to close the other agent's session |
47
50
  | `browser: false` otherwise | No extension or snippet is connected | See "Connecting the browser" |
48
51
  | `pageLoaded: false` | No ProjectionLab tab is open | Ask the user to open https://app.projectionlab.com and log in |
49
52
  | `apiAvailable: false` | Plugins are off, or the user is logged out | ProjectionLab -> Account Settings -> Plugins -> enable plugins |
@@ -368,8 +371,9 @@ Change progress:
368
371
  `projectionlab_list_snapshots` shows them, including the pre-rollback
369
372
  snapshot a confirmed rollback saves, so a rollback is undone by rolling
370
373
  back once more with `nBack: 1`.
371
- - **`PLAN_CONFLICT`** means a plan was saved in ProjectionLab after the tool
372
- read it, so the write was refused to avoid overwriting that edit. Re-run the
374
+ - **`PLAN_CONFLICT`** means a plan was saved after the tool read it, in
375
+ ProjectionLab or by another agent, so the write was refused to avoid
376
+ overwriting that change. Re-run the
373
377
  dry run to pick up the latest data, show the user the new preview, and
374
378
  confirm again. When confirming `projectionlab_update_plan_section`, pass the
375
379
  dry run's `planVersion` as `expectedPlanVersion`.