projectionlab-mcp 1.3.1 → 1.4.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.
Files changed (111) hide show
  1. package/HOW-IT-WORKS.md +1 -1
  2. package/MANUAL-SETUP.md +1 -1
  3. package/README.md +18 -0
  4. package/REFERENCE.md +7 -7
  5. package/SETUP-FOR-AGENTS.md +1 -1
  6. package/dist/bootstrap.js +0 -1
  7. package/dist/bootstrap.js.map +1 -1
  8. package/dist/bridge.d.ts +8 -14
  9. package/dist/config.js +4 -2
  10. package/dist/config.js.map +1 -1
  11. package/dist/currentFinances.d.ts +4 -12
  12. package/dist/currentFinances.js +8 -44
  13. package/dist/currentFinances.js.map +1 -1
  14. package/dist/dataModel.d.ts +9 -11
  15. package/dist/dataModel.js +25 -849
  16. package/dist/dataModel.js.map +1 -1
  17. package/dist/diff.d.ts +10 -20
  18. package/dist/diff.js +30 -163
  19. package/dist/diff.js.map +1 -1
  20. package/dist/extensionBridge.d.ts +16 -15
  21. package/dist/extensionBridge.js +33 -49
  22. package/dist/extensionBridge.js.map +1 -1
  23. package/dist/index.js +4 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/layout.d.ts +32 -36
  26. package/dist/layout.js +44 -62
  27. package/dist/layout.js.map +1 -1
  28. package/dist/linkedFields.d.ts +2 -5
  29. package/dist/linkedFields.js +3 -5
  30. package/dist/linkedFields.js.map +1 -1
  31. package/dist/pathPatch.d.ts +3 -4
  32. package/dist/pathPatch.js +8 -8
  33. package/dist/pathPatch.js.map +1 -1
  34. package/dist/planSettings.d.ts +4 -6
  35. package/dist/planSettings.js +5 -9
  36. package/dist/planSettings.js.map +1 -1
  37. package/dist/plans.d.ts +2 -2
  38. package/dist/plans.js +2 -2
  39. package/dist/realEstate.d.ts +0 -21
  40. package/dist/realEstate.js +0 -117
  41. package/dist/realEstate.js.map +1 -1
  42. package/dist/resources/dataModel.d.ts +2 -6
  43. package/dist/resources/dataModel.js +12 -53
  44. package/dist/resources/dataModel.js.map +1 -1
  45. package/dist/resources/knowledge.d.ts +2 -7
  46. package/dist/resources/knowledge.js +8 -245
  47. package/dist/resources/knowledge.js.map +1 -1
  48. package/dist/resources/planData.js +1 -1
  49. package/dist/resources/planData.js.map +1 -1
  50. package/dist/settingsReport.d.ts +25 -0
  51. package/dist/settingsReport.js +464 -0
  52. package/dist/settingsReport.js.map +1 -0
  53. package/dist/settingsReportLayout.d.ts +59 -0
  54. package/dist/settingsReportLayout.js +367 -0
  55. package/dist/settingsReportLayout.js.map +1 -0
  56. package/dist/snapshot.d.ts +1 -2
  57. package/dist/snapshot.js +2 -2
  58. package/dist/snapshot.js.map +1 -1
  59. package/dist/summary.d.ts +3 -8
  60. package/dist/summary.js +7 -71
  61. package/dist/summary.js.map +1 -1
  62. package/dist/tools/bootstrap.js +1 -1
  63. package/dist/tools/bootstrap.js.map +1 -1
  64. package/dist/tools/clonePlan.js +3 -3
  65. package/dist/tools/clonePlan.js.map +1 -1
  66. package/dist/tools/connection.js +3 -3
  67. package/dist/tools/connection.js.map +1 -1
  68. package/dist/tools/deletePlan.js +3 -3
  69. package/dist/tools/deletePlan.js.map +1 -1
  70. package/dist/tools/diff.js +17 -23
  71. package/dist/tools/diff.js.map +1 -1
  72. package/dist/tools/export.js +2 -2
  73. package/dist/tools/export.js.map +1 -1
  74. package/dist/tools/getCurrentFinances.js +8 -48
  75. package/dist/tools/getCurrentFinances.js.map +1 -1
  76. package/dist/tools/getPlan.js +2 -4
  77. package/dist/tools/getPlan.js.map +1 -1
  78. package/dist/tools/getPlanSection.js +19 -10
  79. package/dist/tools/getPlanSection.js.map +1 -1
  80. package/dist/tools/getPlanSettings.js +8 -12
  81. package/dist/tools/getPlanSettings.js.map +1 -1
  82. package/dist/tools/restore.js +12 -87
  83. package/dist/tools/restore.js.map +1 -1
  84. package/dist/tools/schema.js +16 -71
  85. package/dist/tools/schema.js.map +1 -1
  86. package/dist/tools/settingsReport.d.ts +3 -0
  87. package/dist/tools/settingsReport.js +76 -0
  88. package/dist/tools/settingsReport.js.map +1 -0
  89. package/dist/tools/snapshots.js +9 -14
  90. package/dist/tools/snapshots.js.map +1 -1
  91. package/dist/tools/summary.js +1 -1
  92. package/dist/tools/summary.js.map +1 -1
  93. package/dist/tools/updateAccount.js +16 -26
  94. package/dist/tools/updateAccount.js.map +1 -1
  95. package/dist/tools/updatePlanEvent.js +10 -10
  96. package/dist/tools/updatePlanEvent.js.map +1 -1
  97. package/dist/tools/updatePlanSection.js +4 -5
  98. package/dist/tools/updatePlanSection.js.map +1 -1
  99. package/dist/tools/updatePlanSettings.js +4 -4
  100. package/dist/tools/updatePlanSettings.js.map +1 -1
  101. package/dist/tools/writeGuard.d.ts +3 -2
  102. package/dist/tools/writeGuard.js +5 -4
  103. package/dist/tools/writeGuard.js.map +1 -1
  104. package/dist/types/projectionlab.d.ts +4 -5
  105. package/dist/types/wire.d.ts +1 -1
  106. package/dist/types/wire.js.map +1 -1
  107. package/package.json +1 -1
  108. package/skills/projectionlab/SKILL.md +78 -64
  109. package/dist/resources/layoutResource.d.ts +0 -19
  110. package/dist/resources/layoutResource.js +0 -43
  111. package/dist/resources/layoutResource.js.map +0 -1
@@ -26,9 +26,9 @@ returns `browser`, `pageLoaded`, `apiAvailable`, `apiKeyValid`, `errors`,
26
26
  answered. When the first four flags are `true`, proceed. Otherwise fix the
27
27
  first failing item with the user, one step at a time, then check again.
28
28
 
29
- `apiContract` is the Plugin API contract the page offers: `1` on
30
- ProjectionLab 4 and `2` on ProjectionLab 5 (Early Access, at
31
- https://ea.projectionlab.com). On `2`, follow "ProjectionLab 5" below.
29
+ `apiContract` is the Plugin API contract the page offers: `2` on
30
+ ProjectionLab 5. A page that reports no contract or another one fails the
31
+ check with `UNSUPPORTED_API_VERSION`, and nothing is read or written there.
32
32
 
33
33
  `notices` are plain sentences about the server's release, never connection
34
34
  failures. When the list is not empty, tell the user each one once, in plain
@@ -52,7 +52,7 @@ options page (browsers isolate extension storage by ID, so settings do not trans
52
52
  | `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 |
53
53
  | `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 |
54
54
  | `browser: false` otherwise | No extension or snippet is connected | See "Connecting the browser" |
55
- | `pageLoaded: false` | No ProjectionLab tab is open, or the account is on v5 Early Access and the extension has not been allowed to use it | Ask the user to open https://app.projectionlab.com and log in. If ProjectionLab sends them to https://ea.projectionlab.com, ask them to press **Allow ea.projectionlab.com** on the extension's options page and approve the browser's prompt |
55
+ | `pageLoaded: false` | No ProjectionLab tab is open, or the account is on Early Access and the extension has not been allowed to use it | Ask the user to open https://app.projectionlab.com and log in. If ProjectionLab sends them to https://ea.projectionlab.com, ask them to press **Allow ea.projectionlab.com** on the extension's options page and approve the browser's prompt |
56
56
  | `apiAvailable: false` | Plugins are off, or the user is logged out | ProjectionLab -> Account Settings -> Plugins -> enable plugins |
57
57
  | `apiKeyValid: false` | The key does not match the account | Ask the user to copy the key again from Account Settings -> Plugins |
58
58
 
@@ -93,7 +93,7 @@ Recommended, persistent: the **MCP Bridge for ProjectionLab** browser extension.
93
93
  The status changes to **Connected** and the toolbar icon shows a green
94
94
  check.
95
95
  4. Open https://app.projectionlab.com and log in. If ProjectionLab sends the
96
- user to https://ea.projectionlab.com (v5 Early Access), they press
96
+ user to https://ea.projectionlab.com (Early Access), they press
97
97
  **Allow ea.projectionlab.com** on the options page and approve the
98
98
  browser's prompt.
99
99
 
@@ -106,6 +106,34 @@ Quick, no install: call `projectionlab_get_bootstrap` and have the user paste
106
106
  the returned snippet into the ProjectionLab tab's developer console (F12 ->
107
107
  Console). It must be pasted again after every page reload.
108
108
 
109
+ ## What to offer the user
110
+
111
+ When the user asks what this server is good for, or seems unsure where to
112
+ start, offer workflows like these:
113
+
114
+ - **Balance refresh**: the user pastes statement figures, or another
115
+ connected tool supplies them, and `projectionlab_update_account` updates the
116
+ matching Current Finances accounts.
117
+ - **Plan audit**: read the plan and flag stale balances, expenses that end too
118
+ early or never end, inconsistent growth or inflation settings, and benefit
119
+ start ages that look unintended.
120
+ - **Explain the plan**: `projectionlab_get_settings_report` for one plan or two
121
+ side by side; `projectionlab_diff` for exact differences between plans or
122
+ against a snapshot.
123
+ - **Scenarios**: `projectionlab_clone_plan`, then change the copy (retire
124
+ earlier, lower returns, add a home purchase) so the user compares results in
125
+ ProjectionLab.
126
+ - **Bulk edits**: the same change across many items or plans, each previewed
127
+ before it is confirmed.
128
+ - **Tax strategy**: the `optimize-tax` prompt for Roth conversions, brackets
129
+ and IRMAA against the user's real ages and income, then plan copies for
130
+ ProjectionLab's Optimizer and projections to judge.
131
+ - **History and undo**: `projectionlab_list_snapshots` and
132
+ `projectionlab_rollback`.
133
+
134
+ Say plainly that projections and Chance of Success run only in ProjectionLab,
135
+ so the user checks results there.
136
+
109
137
  ## Reading the plan
110
138
 
111
139
  Plans are addressed by `planIdentifier`: a plan name (case-insensitive; a
@@ -122,6 +150,7 @@ narrowest read that answers the question.
122
150
  | One whole plan | `projectionlab_get_plan` |
123
151
  | One section of a plan, one event, or one path in it | `projectionlab_get_plan_section` |
124
152
  | Assumptions, Chance of Success, withdrawal strategy | `projectionlab_get_plan_settings` |
153
+ | A readable report of a plan's settings, or two plans' settings side by side | `projectionlab_get_settings_report` |
125
154
  | Current Finances, or one account's editable paths | `projectionlab_get_current_finances` |
126
155
  | Everything (rarely needed) | `projectionlab_export_data` |
127
156
  | Snapshots already saved (id, time, operation, sections) | `projectionlab_list_snapshots` |
@@ -140,6 +169,19 @@ narrowest read that answers the question.
140
169
  `listPaths: true` to list editable dot paths with their JSON types.
141
170
  - `projectionlab_get_plan_settings` returns `variables`, `montecarlo` and
142
171
  `withdrawalStrategy` as dot paths with JSON types; pass `section` for one.
172
+ - `projectionlab_get_settings_report` renders the same three sections as a
173
+ markdown report for the user, grouped by topic with everyday settings first
174
+ (growth and inflation, withdrawals, tax strategy, taxes, bonds), then more
175
+ and advanced ones. Settings use their on-screen label where one is known and
176
+ an italic descriptive name otherwise, with values as the app shows them.
177
+ Settings the plan's current choices leave unused (a withdrawal rule that is
178
+ not selected, custom rate curves in fixed mode) are listed near the end
179
+ with the choice that would use them. Add
180
+ `comparePlanIdentifier` for a second plan's column and a Differs marker, and
181
+ `differencesOnly: true` to list only what differs. Show the report as
182
+ returned. Use it when the user asks to see, review or compare settings; use
183
+ `projectionlab_get_plan_settings` for the paths a write needs, and
184
+ `projectionlab_diff` with `planA` and `planB` for events and accounts.
143
185
  - `projectionlab_get_current_finances` with an exact `accountId` and
144
186
  `listPaths: true` lists that account's editable paths. Real-estate assets
145
187
  (`type: "real-estate"` in `assets`) carry a `realEstate` block:
@@ -235,11 +277,9 @@ values; it is not an API, and it does not contain the application logic.
235
277
  When a change's effect matters, the user has to look at the result in the
236
278
  ProjectionLab UI. The stored data cannot show it.
237
279
 
238
- ### ProjectionLab 5
280
+ ### How ProjectionLab 5 stores the data
239
281
 
240
- When `projectionlab_check_connection` reports `apiContract: 2`, the account is
241
- on ProjectionLab 5 and its data has a different layout. The read tools handle
242
- both layouts; these differences show through:
282
+ These traits of the ProjectionLab 5 data show through the tools:
243
283
 
244
284
  - **No active plan.** A ProjectionLab 5 plan has no `active` flag, so
245
285
  `projectionlab_get_plan` reports `active: "not reported"`. Never call a plan
@@ -255,8 +295,7 @@ both layouts; these differences show through:
255
295
  `eventIdentifier` matches no event id or name. A priority's `accountId` is
256
296
  different: it holds the id of the plan's account event, not the Current
257
297
  Finances account id. Keep the two kinds of id apart.
258
- - **Linked fields belong to Current Finances.** On ProjectionLab 5, a linked
259
- event takes some fields from the item it links to, and ProjectionLab
298
+ - **Linked fields belong to Current Finances.** A linked event takes some fields from the item it links to, and ProjectionLab
260
299
  overwrites a value written to them in the plan. An account event takes its
261
300
  name, type, balance, owner, icon, liquidity, cost basis and withdrawal terms
262
301
  (`EWAge`, `hasEWPenalty`, `EWPenaltyRate`, `withdrawContribsFree`), among
@@ -272,22 +311,12 @@ both layouts; these differences show through:
272
311
  Finances document, not one per plan, so `projectionlab_update_account` and
273
312
  a Current Finances restore change what every plan starts from. Say so in
274
313
  the preview before confirming. Plans keep their own copies of the linked
275
- fields. On ProjectionLab 5, those copies refresh when a plan is opened or
276
- saved, so an export can show an old value in a plan nobody has opened
277
- since. Read today's figure from Current Finances, not from a plan event. On ProjectionLab 5, a balance or value
314
+ fields. Those copies refresh when a plan is opened or saved, so an export
315
+ can show an old value in a plan nobody has opened since. Read today's
316
+ figure from Current Finances, not from a plan event. A balance or value
278
317
  edit also overwrites that account's `accountHistory` entry for the current
279
318
  day.
280
- - **Resources.** `projectionlab://data-model` and `projectionlab://knowledge`
281
- follow the layout the last connection check found. Read
282
- `projectionlab://data-model?layout=v4` or `?layout=v5` (the same for
283
- `knowledge`) to pick one explicitly.
284
- - **Every write but Progress works.** The plan tools (`projectionlab_update_plan_event`,
285
- `projectionlab_update_plan_section`, `projectionlab_update_plan_settings`,
286
- `projectionlab_clone_plan`, `projectionlab_delete_plan`,
287
- `projectionlab_restore_plans`) and `projectionlab_update_account` behave as
288
- on ProjectionLab 4. `projectionlab_update_account` reports the account's
289
- `kind` instead of a `collection`.
290
- - **Current Finances restores keep missing accounts.** On ProjectionLab 5,
319
+ - **Current Finances restores keep missing accounts.**
291
320
  `projectionlab_restore_current_finances` and a rollback of a Current
292
321
  Finances snapshot replace every non-account field and each account they
293
322
  hold, but never delete an account: one missing from the submission or the
@@ -295,9 +324,8 @@ both layouts; these differences show through:
295
324
  lists those as `keptAccounts`; tell the user, and have them archive or
296
325
  delete such an account in the ProjectionLab app if it should go.
297
326
  - **Settings restores replace the whole document.**
298
- `projectionlab_restore_settings` behaves as on ProjectionLab 4: the
299
- submission replaces every setting, and ProjectionLab refuses a settings
300
- document it cannot read. Settings are account-wide, not per plan.
327
+ With `projectionlab_restore_settings`, the submission replaces every
328
+ setting, and ProjectionLab refuses a settings document it cannot read. Settings are account-wide, not per plan.
301
329
  - **Year alignment can change plans.** The account's year alignment
302
330
  (`settings.plan.alignment`) and a plan's override (`variables.alignment`)
303
331
  decide where each plan year starts, and so how many plan years the plan
@@ -316,12 +344,9 @@ both layouts; these differences show through:
316
344
  document the user has just edited until a read shows the edit: a write
317
345
  replaces the unsaved change.
318
346
  - **Progress cannot be written.** ProjectionLab 5 records Progress history
319
- by itself whenever a current value changes, and removed the way to
320
- replace it. `projectionlab_restore_progress` and a rollback of a snapshot
321
- holding progress, dry runs included, are refused with
322
- `WRITE_NOT_SUPPORTED` before they preview or snapshot anything. Tell the
323
- user plainly; to bring back Progress from a backup file, they use Restore
324
- in the ProjectionLab app.
347
+ by itself whenever a current value changes and offers no way to replace
348
+ it, so no tool writes it. Tell the user plainly; to bring back Progress
349
+ from a backup file, they use Restore in the ProjectionLab app.
325
350
  - **Old snapshots.** A snapshot taken on ProjectionLab 4 cannot be compared
326
351
  with or restored onto ProjectionLab 5 data: `projectionlab_diff` and
327
352
  `projectionlab_rollback` refuse it with `LAYOUT_MISMATCH`. A ProjectionLab 4
@@ -336,7 +361,7 @@ Change the plan only when the user explicitly asks for that change.
336
361
  - Never guess a path. Read it first with `projectionlab_get_plan_settings`,
337
362
  `projectionlab_get_plan_section` or `projectionlab_get_current_finances`,
338
363
  the last two with `listPaths: true`.
339
- - Never assume a rate's scale. ProjectionLab 4.6.0 stores most rates as
364
+ - Never assume a rate's scale. ProjectionLab stores most rates as
340
365
  percentage points (`variables.inflation: 3` means 3%), but some as fractions
341
366
  (`variables.taxStrategy.bracketRate: 0.22` means 22%). Read the current
342
367
  value first and write the new one on the same scale; `projectionlab://data-model`
@@ -376,8 +401,8 @@ not enable writes on your own.
376
401
 
377
402
  ### Units
378
403
 
379
- The scale of a number is the easiest thing to get wrong. Confirmed on
380
- ProjectionLab 4.6.0:
404
+ The scale of a number is the easiest thing to get wrong.
405
+ `projectionlab://data-model` records these scales:
381
406
 
382
407
  - Rates in `variables` are percentage points: `inflation: 3` means 3%.
383
408
  - `taxStrategy.bracketRate` and `taxStrategy.capGainsBracketRate` are decimal
@@ -452,7 +477,7 @@ Every tool below also takes `confirm` (default `false`, a dry run).
452
477
  | A what-if copy of a plan | `projectionlab_clone_plan` | `planIdentifier`, `newName` |
453
478
  | Remove a plan the user has decided to discard | `projectionlab_delete_plan` | `planId` (exact ID only) |
454
479
  | A whole plan section, rebuilt deliberately | `projectionlab_update_plan_section` | `planIdentifier`, `section`, complete `sectionData`, plus `expectedPlanVersion` from the dry run |
455
- | Replace a whole data area (rare) | `projectionlab_restore_plans`, `projectionlab_restore_current_finances`, `projectionlab_restore_progress`, `projectionlab_restore_settings` | `plans`, `currentFinances`, `progress`, `settings`: the complete replacement |
480
+ | Replace a whole data area (rare) | `projectionlab_restore_plans`, `projectionlab_restore_current_finances`, `projectionlab_restore_settings` | `plans`, `currentFinances`, `settings`: the complete replacement |
456
481
  | Undo a confirmed change | `projectionlab_rollback` | exactly one of `snapshotId`, `nBack`, `beforeTime` |
457
482
 
458
483
  Prefer the targeted tools: they change only the paths given and keep sibling
@@ -480,9 +505,8 @@ patch the copy.
480
505
  refuses the last remaining plan. Its snapshot lets
481
506
  `projectionlab_rollback` restore the deleted plan.
482
507
 
483
- `projectionlab_restore_current_finances`, `projectionlab_restore_plans`,
484
- `projectionlab_restore_progress` and `projectionlab_restore_settings` replace
485
- an entire data area. Use them only when the user wants exactly that.
508
+ `projectionlab_restore_current_finances`, `projectionlab_restore_plans` and
509
+ `projectionlab_restore_settings` replace an entire data area. Use them only when the user wants exactly that.
486
510
  `projectionlab_restore_plans` refuses an empty array, which would delete every
487
511
  plan.
488
512
 
@@ -627,27 +651,10 @@ must-have." Same plan and event as the example above.
627
651
  `{"spendingType": {"before": "discretionary", "after": "essential"}}`.
628
652
  Show it, get the user's approval, then confirm.
629
653
 
630
- **Change a Current Finances account (ProjectionLab 4).** User: "Our rental
631
- property is worth 480000 now; update Current Finances."
632
-
633
- 1. `projectionlab_describe_schema` gives the asset's exact `accountId` (a
634
- property reads as `type: "real-estate"`). Then
635
- `projectionlab_get_current_finances` with that `accountId` and
636
- `listPaths: true` lists the account's editable paths, including `amount`
637
- and `balance`.
638
- 2. `projectionlab_update_account` with
639
- `{"accountId": "acct_abc123", "pathChanges": {"amount": 480000}}` returns
640
- `dryRun: true`, the `accountName`, `collection: "assets"`, and `changes`
641
- such as `{"amount": {"before": 450000, "after": 480000}}`. A property's
642
- market value is stored in `amount`; `balance` is its outstanding loan, so
643
- a value change goes in `amount`, never `balance`. Show the preview.
644
- 3. After the user approves, repeat the call with `"confirm": true`. The reply
645
- gives `verified` and saves a snapshot of Current Finances.
646
-
647
- **The same change on ProjectionLab 5.** When `projectionlab_check_connection`
648
- reports `apiContract: 2`, Current Finances accounts are records of
649
- `documents.currentFinances.accounts`, keyed by id and narrowed by `kind`, and
650
- a property keeps its loan in a separate debt record.
654
+ **Change a Current Finances account.** User: "Our rental property is worth
655
+ 480000 now; update Current Finances." Current Finances accounts are records
656
+ of `documents.currentFinances.accounts`, keyed by id and narrowed by `kind`,
657
+ and a property keeps its loan in a separate debt record.
651
658
 
652
659
  1. `projectionlab_describe_schema` reports `layout: "v5"` and lists every
653
660
  account with its stored `kind` and `type`: the property is a
@@ -663,8 +670,7 @@ a property keeps its loan in a separate debt record.
663
670
  `listPaths: true` lists the record's editable paths, including `value` and
664
671
  `purchasePrice`. Then `projectionlab_update_account` with
665
672
  `{"accountId": "asset_abc123", "pathChanges": {"value": 480000}}` returns
666
- `dryRun: true`, the `accountName`, `kind: "real-asset"` where the
667
- ProjectionLab 4 reply carries a `collection`, and `changes` such as
673
+ `dryRun: true`, the `accountName`, `kind: "real-asset"`, and `changes` such as
668
674
  `{"value": {"before": 450000, "after": 480000}}`. A property's market value
669
675
  is stored in `value`, never in `balance`: `balance` belongs to the debt, so
670
676
  the loan itself changes only by patching `debt_abc123`. Say in the preview
@@ -725,6 +731,14 @@ at 60."
725
731
  publish or paste balances, positions, account identifiers or exports anywhere
726
732
  outside the conversation with the user.
727
733
  - Never reveal `PL_API_KEY` or the WebSocket token.
734
+ - Describe the risk in proportion when the user asks. ProjectionLab holds only
735
+ what the user typed in (names, balances, income, expenses, ages, goals,
736
+ notes), with no bank logins, account numbers or live account connections.
737
+ The Plugin API key works only in a tab signed in to the user's own account;
738
+ ProjectionLab has no API that accepts the key on its own. What leaves the
739
+ computer is the plan figures sent to the AI model the user chose. The risk
740
+ worth managing is an unwanted plan edit, which read-only mode, previews and
741
+ snapshots address.
728
742
  - This server provides plan data and education, not personalized financial,
729
743
  investment or tax advice. Present analysis as information and point the user
730
744
  to a licensed professional for decisions. Verify current-year tax figures
@@ -1,19 +0,0 @@
1
- import { type McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import type { Bridge } from "../bridge.js";
3
- import { type ExportLayout } from "../layout.js";
4
- export interface LayoutResourceSpec {
5
- name: string;
6
- uri: string;
7
- title: string;
8
- description: string;
9
- render: (layout: ExportLayout) => string;
10
- }
11
- /**
12
- * Registers a markdown resource whose text follows the ProjectionLab layout.
13
- *
14
- * The plain URI is a fixed resource, so it is listed and read by exact match.
15
- * `<uri>?layout=v4` and `<uri>?layout=v5` are served by a URI template beside
16
- * it, because the SDK reads a fixed resource only when the requested URI
17
- * matches it exactly, query string included.
18
- */
19
- export declare function registerLayoutResource(server: McpServer, bridge: Bridge | undefined, spec: LayoutResourceSpec): void;
@@ -1,43 +0,0 @@
1
- import { ResourceTemplate, } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { layoutForContract } from "../layout.js";
3
- /**
4
- * Registers a markdown resource whose text follows the ProjectionLab layout.
5
- *
6
- * The plain URI is a fixed resource, so it is listed and read by exact match.
7
- * `<uri>?layout=v4` and `<uri>?layout=v5` are served by a URI template beside
8
- * it, because the SDK reads a fixed resource only when the requested URI
9
- * matches it exactly, query string included.
10
- */
11
- export function registerLayoutResource(server, bridge, spec) {
12
- const metadata = {
13
- title: spec.title,
14
- description: spec.description,
15
- mimeType: "text/markdown",
16
- };
17
- const read = async (uri) => {
18
- let layout;
19
- const param = uri.searchParams.get("layout");
20
- if (param === "v5" || param === "v4") {
21
- layout = param;
22
- }
23
- else if (bridge) {
24
- // The contract the last connection check or write read; reading a
25
- // resource never waits on the browser.
26
- const contract = bridge.knownApiContract();
27
- if (contract !== undefined)
28
- layout = layoutForContract(contract);
29
- }
30
- return {
31
- contents: [
32
- {
33
- uri: uri.href,
34
- text: spec.render(layout ?? "v4"),
35
- mimeType: "text/markdown",
36
- },
37
- ],
38
- };
39
- };
40
- server.registerResource(spec.name, spec.uri, metadata, read);
41
- server.registerResource(`${spec.name}-layout`, new ResourceTemplate(`${spec.uri}{?layout}`, { list: undefined }), metadata, read);
42
- }
43
- //# sourceMappingURL=layoutResource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layoutResource.js","sourceRoot":"","sources":["../../src/resources/layoutResource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,GAEjB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAqB,MAAM,cAAc,CAAC;AAUpE;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAAiB,EACjB,MAA0B,EAC1B,IAAwB;IAExB,MAAM,QAAQ,GAAG;QACf,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,QAAQ,EAAE,eAAe;KAC1B,CAAC;IACF,MAAM,IAAI,GAAG,KAAK,EAAE,GAAQ,EAAE,EAAE;QAC9B,IAAI,MAAgC,CAAC;QACrC,MAAM,KAAK,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACrC,MAAM,GAAG,KAAK,CAAC;QACjB,CAAC;aAAM,IAAI,MAAM,EAAE,CAAC;YAClB,kEAAkE;YAClE,uCAAuC;YACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAC3C,IAAI,QAAQ,KAAK,SAAS;gBAAE,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QACnE,CAAC;QACD,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,GAAG,CAAC,IAAI;oBACb,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC;oBACjC,QAAQ,EAAE,eAAe;iBAC1B;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IAEF,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,gBAAgB,CACrB,GAAG,IAAI,CAAC,IAAI,SAAS,EACrB,IAAI,gBAAgB,CAAC,GAAG,IAAI,CAAC,GAAG,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EACjE,QAAQ,EACR,IAAI,CACL,CAAC;AACJ,CAAC"}