projectionlab-mcp 1.4.0 → 1.4.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.
- package/README.md +18 -0
- package/REFERENCE.md +1 -1
- package/dist/changeSummary.d.ts +99 -0
- package/dist/changeSummary.js +306 -0
- package/dist/changeSummary.js.map +1 -0
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +1 -1
- package/dist/settingsReport.d.ts +9 -0
- package/dist/settingsReport.js +2 -2
- package/dist/settingsReport.js.map +1 -1
- package/dist/tools/clonePlan.js +8 -0
- package/dist/tools/clonePlan.js.map +1 -1
- package/dist/tools/deletePlan.js +7 -0
- package/dist/tools/deletePlan.js.map +1 -1
- package/dist/tools/restore.js +20 -0
- package/dist/tools/restore.js.map +1 -1
- package/dist/tools/snapshots.js +11 -0
- package/dist/tools/snapshots.js.map +1 -1
- package/dist/tools/updateAccount.js +9 -0
- package/dist/tools/updateAccount.js.map +1 -1
- package/dist/tools/updatePlanEvent.js +16 -1
- package/dist/tools/updatePlanEvent.js.map +1 -1
- package/dist/tools/updatePlanSection.js +16 -2
- package/dist/tools/updatePlanSection.js.map +1 -1
- package/dist/tools/updatePlanSettings.js +13 -3
- package/dist/tools/updatePlanSettings.js.map +1 -1
- package/package.json +1 -1
- package/skills/projectionlab/SKILL.md +39 -1
|
@@ -9,6 +9,7 @@ import { findPathChangeMismatches } from "../pathPatch.js";
|
|
|
9
9
|
import { resolvePlanIndex, planNotFoundError, requirePlans, } from "../plans.js";
|
|
10
10
|
import { exportSections } from "../layout.js";
|
|
11
11
|
import { assertWritesSupported } from "./writeGuard.js";
|
|
12
|
+
import { planSettingsChangeSummary } from "../changeSummary.js";
|
|
12
13
|
export function registerUpdatePlanSettingsTool(server, bridge, snapshots) {
|
|
13
14
|
server.registerTool("projectionlab_update_plan_settings", {
|
|
14
15
|
title: "Update Plan Settings",
|
|
@@ -58,6 +59,12 @@ export function registerUpdatePlanSettingsTool(server, bridge, snapshots) {
|
|
|
58
59
|
throw planNotFoundError(plans, planIdentifier);
|
|
59
60
|
const plan = plans[planIndex];
|
|
60
61
|
const { updated, changes } = applyPlanSettingChanges(plan[section], incoming, section);
|
|
62
|
+
const renderedChanges = redactSecrets(changes, { byName: true });
|
|
63
|
+
const summary = planSettingsChangeSummary({
|
|
64
|
+
planName: plan.name,
|
|
65
|
+
section,
|
|
66
|
+
changes: renderedChanges,
|
|
67
|
+
});
|
|
61
68
|
if (!confirm) {
|
|
62
69
|
return {
|
|
63
70
|
content: [
|
|
@@ -69,7 +76,8 @@ export function registerUpdatePlanSettingsTool(server, bridge, snapshots) {
|
|
|
69
76
|
planName: plan.name,
|
|
70
77
|
planId: plan.id,
|
|
71
78
|
section,
|
|
72
|
-
changes:
|
|
79
|
+
changes: renderedChanges,
|
|
80
|
+
summary,
|
|
73
81
|
warning: Object.keys(changes).length === 0
|
|
74
82
|
? "All supplied values already match the plan - nothing would change."
|
|
75
83
|
: `This will patch ${Object.keys(changes).length} setting(s) in "${section}" of plan "${plan.name}". Set confirm=true to proceed.`,
|
|
@@ -87,7 +95,8 @@ export function registerUpdatePlanSettingsTool(server, bridge, snapshots) {
|
|
|
87
95
|
success: true,
|
|
88
96
|
planName: plan.name,
|
|
89
97
|
section,
|
|
90
|
-
changes:
|
|
98
|
+
changes: renderedChanges,
|
|
99
|
+
summary,
|
|
91
100
|
verified: true,
|
|
92
101
|
message: "All supplied values already match the plan; no mutation was sent.",
|
|
93
102
|
}),
|
|
@@ -119,7 +128,8 @@ export function registerUpdatePlanSettingsTool(server, bridge, snapshots) {
|
|
|
119
128
|
success: true,
|
|
120
129
|
planName: plan.name,
|
|
121
130
|
section,
|
|
122
|
-
changes:
|
|
131
|
+
changes: renderedChanges,
|
|
132
|
+
summary,
|
|
123
133
|
verified,
|
|
124
134
|
...(verified
|
|
125
135
|
? {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatePlanSettings.js","sourceRoot":"","sources":["../../src/tools/updatePlanSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,GAEb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"updatePlanSettings.js","sourceRoot":"","sources":["../../src/tools/updatePlanSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,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O,WAAW,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -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
|
|
@@ -518,7 +546,9 @@ Change progress:
|
|
|
518
546
|
app shows it: "In Retire at 55, Travel goes from $10,000 to $12,000 a
|
|
519
547
|
year." Leave out field paths, IDs, and internal codes. For a whole-section
|
|
520
548
|
replacement, list what is added, removed, and changed rather than every
|
|
521
|
-
field.
|
|
549
|
+
field. Every write tool's dry run and confirmed result carry a `summary`
|
|
550
|
+
field that already says this in plain words; relay it as written, and add
|
|
551
|
+
context from the conversation where it helps.
|
|
522
552
|
- **Every confirmed change is snapshotted first.** Tell the user before the
|
|
523
553
|
first change that it can be undone: `projectionlab_list_snapshots` lists the
|
|
524
554
|
snapshots and `projectionlab_rollback` restores one (also a dry run until
|
|
@@ -703,6 +733,14 @@ at 60."
|
|
|
703
733
|
publish or paste balances, positions, account identifiers or exports anywhere
|
|
704
734
|
outside the conversation with the user.
|
|
705
735
|
- Never reveal `PL_API_KEY` or the WebSocket token.
|
|
736
|
+
- Describe the risk in proportion when the user asks. ProjectionLab holds only
|
|
737
|
+
what the user typed in (names, balances, income, expenses, ages, goals,
|
|
738
|
+
notes), with no bank logins, account numbers or live account connections.
|
|
739
|
+
The Plugin API key works only in a tab signed in to the user's own account;
|
|
740
|
+
ProjectionLab has no API that accepts the key on its own. What leaves the
|
|
741
|
+
computer is the plan figures sent to the AI model the user chose. The risk
|
|
742
|
+
worth managing is an unwanted plan edit, which read-only mode, previews and
|
|
743
|
+
snapshots address.
|
|
706
744
|
- This server provides plan data and education, not personalized financial,
|
|
707
745
|
investment or tax advice. Present analysis as information and point the user
|
|
708
746
|
to a licensed professional for decisions. Verify current-year tax figures
|