@rndmjoker/proton-mcp 0.4.13 → 0.5.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.
- package/README.md +138 -21
- package/dist/browser/channel.d.ts +76 -0
- package/dist/browser/channel.js +162 -0
- package/dist/browser/channel.js.map +1 -0
- package/dist/browser/client.d.ts +50 -0
- package/dist/browser/client.js +284 -0
- package/dist/browser/client.js.map +1 -0
- package/dist/browser/connector.d.ts +15 -0
- package/dist/browser/connector.js +26 -0
- package/dist/browser/connector.js.map +1 -0
- package/dist/browser/host.d.ts +50 -0
- package/dist/browser/host.js +258 -0
- package/dist/browser/host.js.map +1 -0
- package/dist/browser/messages.d.ts +163 -0
- package/dist/browser/messages.js +338 -0
- package/dist/browser/messages.js.map +1 -0
- package/dist/browser/paths.d.ts +51 -0
- package/dist/browser/paths.js +92 -0
- package/dist/browser/paths.js.map +1 -0
- package/dist/browser/setup.d.ts +42 -0
- package/dist/browser/setup.js +170 -0
- package/dist/browser/setup.js.map +1 -0
- package/dist/filters/order.d.ts +66 -0
- package/dist/filters/order.js +108 -0
- package/dist/filters/order.js.map +1 -0
- package/dist/filters/sieve.d.ts +184 -0
- package/dist/filters/sieve.js +1312 -0
- package/dist/filters/sieve.js.map +1 -0
- package/dist/instances.d.ts +58 -0
- package/dist/instances.js +145 -0
- package/dist/instances.js.map +1 -0
- package/dist/mail/compose.d.ts +10 -0
- package/dist/mail/compose.js.map +1 -1
- package/dist/mail/record.d.ts +36 -0
- package/dist/mail/record.js +74 -0
- package/dist/mail/record.js.map +1 -0
- package/dist/permissions.d.ts +139 -0
- package/dist/permissions.js +355 -0
- package/dist/permissions.js.map +1 -0
- package/dist/server.js +330 -16
- package/dist/server.js.map +1 -1
- package/dist/session.d.ts +12 -0
- package/dist/session.js +23 -0
- package/dist/session.js.map +1 -1
- package/dist/settings.d.ts +81 -11
- package/dist/settings.js +160 -25
- package/dist/settings.js.map +1 -1
- package/dist/tools/confirm.d.ts +4 -2
- package/dist/tools/confirm.js +12 -3
- package/dist/tools/confirm.js.map +1 -1
- package/dist/tools/failures.d.ts +6 -8
- package/dist/tools/failures.js +36 -17
- package/dist/tools/failures.js.map +1 -1
- package/dist/tools/filter-tools.d.ts +82 -0
- package/dist/tools/filter-tools.js +729 -0
- package/dist/tools/filter-tools.js.map +1 -0
- package/dist/tools/filters.d.ts +8 -1
- package/dist/tools/filters.js +24 -12
- package/dist/tools/filters.js.map +1 -1
- package/dist/tools/format.d.ts +15 -0
- package/dist/tools/format.js +4 -3
- package/dist/tools/format.js.map +1 -1
- package/dist/tools/guidance.js +12 -7
- package/dist/tools/guidance.js.map +1 -1
- package/dist/tools/interface.d.ts +20 -6
- package/dist/tools/interface.js +40 -16
- package/dist/tools/interface.js.map +1 -1
- package/dist/tools/send.d.ts +9 -0
- package/dist/tools/send.js +51 -9
- package/dist/tools/send.js.map +1 -1
- package/dist/tools/sign-in-required.d.ts +15 -2
- package/dist/tools/sign-in-required.js +30 -2
- package/dist/tools/sign-in-required.js.map +1 -1
- package/dist/web/layout.d.ts +12 -5
- package/dist/web/layout.js +32 -9
- package/dist/web/layout.js.map +1 -1
- package/dist/web/pages.d.ts +4 -2
- package/dist/web/pages.js +10 -9
- package/dist/web/pages.js.map +1 -1
- package/dist/web/pending.d.ts +9 -6
- package/dist/web/pending.js +9 -7
- package/dist/web/pending.js.map +1 -1
- package/dist/web/preview-server.d.ts +33 -0
- package/dist/web/preview-server.js +102 -0
- package/dist/web/preview-server.js.map +1 -0
- package/dist/web/sections.d.ts +86 -1
- package/dist/web/sections.js +290 -7
- package/dist/web/sections.js.map +1 -1
- package/dist/web/security.d.ts +48 -13
- package/dist/web/security.js +68 -16
- package/dist/web/security.js.map +1 -1
- package/dist/web/server.d.ts +81 -24
- package/dist/web/server.js +478 -117
- package/dist/web/server.js.map +1 -1
- package/package.json +1 -1
package/dist/settings.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Settings the user can change while the server runs.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* One file for every running server. Each client session starts its own server,
|
|
5
|
+
* and until 2026-11-05 a setting changed in one interface held for that one
|
|
6
|
+
* server only. Now the interface has one fixed address, the first server to
|
|
7
|
+
* start serves it, and every server watches this file, so a change applies to
|
|
8
|
+
* all of them at once.
|
|
9
|
+
*
|
|
10
|
+
* What lives here: the Bridge ports, the PIN that guards changes, what the
|
|
11
|
+
* assistant may do per tool and within which bounds, what a filter from it may
|
|
12
|
+
* do beyond filing and flags, a recipient added to every message sent, and a
|
|
13
|
+
* counter that tells every server to reread the stored credentials after a
|
|
14
|
+
* sign-in or a sign-out somewhere else.
|
|
9
15
|
*
|
|
10
16
|
* **The host is deliberately not settable here.** It stays with the environment,
|
|
11
17
|
* where changing it is a conscious act. A host field in a web form is a field
|
|
@@ -16,6 +22,27 @@
|
|
|
16
22
|
* it, and having a stored value silently override it would make their setting a
|
|
17
23
|
* lie.
|
|
18
24
|
*/
|
|
25
|
+
import type { StoredPin } from './web/security.js';
|
|
26
|
+
import { type Unlockable } from './filters/sieve.js';
|
|
27
|
+
/** What the assistant may do with one tool. */
|
|
28
|
+
export type Level = 'off' | 'ask' | 'act';
|
|
29
|
+
/**
|
|
30
|
+
* Bounds on sending without asking. Every one of them is optional, and a send
|
|
31
|
+
* outside a bound asks rather than failing.
|
|
32
|
+
*/
|
|
33
|
+
export interface SendLimits {
|
|
34
|
+
/** Addresses or domains (written as "@example.com") that may be sent to. */
|
|
35
|
+
allowed?: string[];
|
|
36
|
+
/** How many messages may go out without asking per rolling hour. */
|
|
37
|
+
maxPerHour?: number;
|
|
38
|
+
/** The last day, YYYY-MM-DD, on which sending without asking applies. */
|
|
39
|
+
until?: string;
|
|
40
|
+
}
|
|
41
|
+
/** One recipient added to every message this server sends. */
|
|
42
|
+
export interface RecordCopy {
|
|
43
|
+
address: string;
|
|
44
|
+
mode: 'cc' | 'bcc';
|
|
45
|
+
}
|
|
19
46
|
export interface StoredSettings {
|
|
20
47
|
imapPort?: number;
|
|
21
48
|
smtpPort?: number;
|
|
@@ -28,25 +55,68 @@ export interface StoredSettings {
|
|
|
28
55
|
* `unofficial` mark beside the name stays whatever this says.
|
|
29
56
|
*/
|
|
30
57
|
noticeDismissed?: boolean;
|
|
58
|
+
/** The PIN every change in the interface asks for. Absent means none is set. */
|
|
59
|
+
pin?: StoredPin;
|
|
60
|
+
/**
|
|
61
|
+
* Raised by the server that showed the interface whenever somebody signed in
|
|
62
|
+
* or out there. Every other server rereads the stored credentials when it
|
|
63
|
+
* sees the number change.
|
|
64
|
+
*/
|
|
65
|
+
credentialsGeneration?: number;
|
|
66
|
+
/** Per tool name, where it departs from the default. */
|
|
67
|
+
levels?: Record<string, Level>;
|
|
68
|
+
limits?: SendLimits;
|
|
69
|
+
record?: RecordCopy;
|
|
70
|
+
/** What a filter from an assistant may do beyond filing and flags. Absent means nothing more. */
|
|
71
|
+
filterActions?: Unlockable[];
|
|
31
72
|
}
|
|
32
73
|
/** Where the settings live. Next to the credentials, under the user's own data. */
|
|
33
74
|
export declare function settingsPath(env?: NodeJS.ProcessEnv): string;
|
|
34
75
|
/** True for something that can be an IMAP or SMTP port. */
|
|
35
76
|
export declare function isPort(value: unknown): value is number;
|
|
77
|
+
/**
|
|
78
|
+
* Keeps what has the right shape and drops the rest, field by field.
|
|
79
|
+
*
|
|
80
|
+
* Exported for the tests and for anything that receives settings from
|
|
81
|
+
* somewhere other than this file. Whether a tool name exists is not decided
|
|
82
|
+
* here: an entry for a tool a later version removed must not break the file.
|
|
83
|
+
*/
|
|
84
|
+
export declare function sanitise(candidate: Record<string, unknown>): StoredSettings;
|
|
36
85
|
/**
|
|
37
86
|
* Reads the stored settings.
|
|
38
87
|
*
|
|
39
88
|
* A missing, unreadable or broken file yields no settings rather than an error:
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* discard a good one.
|
|
89
|
+
* none of them is worth refusing to start over, and every one has a default
|
|
90
|
+
* that is today's behaviour. Values of the wrong shape are dropped
|
|
91
|
+
* individually, so one bad entry does not discard a good one.
|
|
43
92
|
*/
|
|
44
93
|
export declare function loadSettings(path?: string): Promise<StoredSettings>;
|
|
45
94
|
/**
|
|
46
95
|
* Writes the settings.
|
|
47
96
|
*
|
|
48
|
-
* Mode 600 like everything else this server puts on disk
|
|
49
|
-
*
|
|
50
|
-
* ends up readable one day.
|
|
97
|
+
* Mode 600 like everything else this server puts on disk: the file holds the
|
|
98
|
+
* hash of the PIN now, and a directory of mixed permissions is how the file that
|
|
99
|
+
* does matter ends up readable one day.
|
|
100
|
+
*
|
|
101
|
+
* Written to a neighbouring file and renamed into place, because several
|
|
102
|
+
* servers read this file whenever it changes. A rename is atomic on the same
|
|
103
|
+
* file system, so a reader sees the old settings or the new ones and never half
|
|
104
|
+
* of each.
|
|
51
105
|
*/
|
|
52
106
|
export declare function saveSettings(settings: StoredSettings, path?: string): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Changes some settings and keeps the rest as they are on disk.
|
|
109
|
+
*
|
|
110
|
+
* Reads first rather than writing a copy held in memory: another server may
|
|
111
|
+
* have written since, and the copy would quietly undo that.
|
|
112
|
+
*/
|
|
113
|
+
export declare function updateSettings(change: (current: StoredSettings) => StoredSettings, path?: string): Promise<StoredSettings>;
|
|
114
|
+
/**
|
|
115
|
+
* Calls `onChange` with the settings whenever the file changes.
|
|
116
|
+
*
|
|
117
|
+
* Watches the directory rather than the file, because the file is replaced by a
|
|
118
|
+
* rename on every write, and a watch on the old file would see nothing after
|
|
119
|
+
* the first change. Bursts are collected for a moment so one write leads to one
|
|
120
|
+
* call. Returns a function that stops watching.
|
|
121
|
+
*/
|
|
122
|
+
export declare function watchSettings(onChange: (settings: StoredSettings) => void, path?: string, delayMs?: number): () => void;
|
package/dist/settings.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Settings the user can change while the server runs.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* One file for every running server. Each client session starts its own server,
|
|
5
|
+
* and until 2026-11-05 a setting changed in one interface held for that one
|
|
6
|
+
* server only. Now the interface has one fixed address, the first server to
|
|
7
|
+
* start serves it, and every server watches this file, so a change applies to
|
|
8
|
+
* all of them at once.
|
|
9
|
+
*
|
|
10
|
+
* What lives here: the Bridge ports, the PIN that guards changes, what the
|
|
11
|
+
* assistant may do per tool and within which bounds, what a filter from it may
|
|
12
|
+
* do beyond filing and flags, a recipient added to every message sent, and a
|
|
13
|
+
* counter that tells every server to reread the stored credentials after a
|
|
14
|
+
* sign-in or a sign-out somewhere else.
|
|
9
15
|
*
|
|
10
16
|
* **The host is deliberately not settable here.** It stays with the environment,
|
|
11
17
|
* where changing it is a conscious act. A host field in a web form is a field
|
|
@@ -16,9 +22,11 @@
|
|
|
16
22
|
* it, and having a stored value silently override it would make their setting a
|
|
17
23
|
* lie.
|
|
18
24
|
*/
|
|
19
|
-
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
20
|
-
import {
|
|
25
|
+
import { readFile, writeFile, mkdir, rename, rm } from 'node:fs/promises';
|
|
26
|
+
import { watch, mkdirSync } from 'node:fs';
|
|
27
|
+
import { basename, dirname, join } from 'node:path';
|
|
21
28
|
import { homedir } from 'node:os';
|
|
29
|
+
import { UNLOCKABLE } from './filters/sieve.js';
|
|
22
30
|
/** Where the settings live. Next to the credentials, under the user's own data. */
|
|
23
31
|
export function settingsPath(env = process.env) {
|
|
24
32
|
if (env.PROTON_MCP_SETTINGS_FILE)
|
|
@@ -29,13 +37,82 @@ export function settingsPath(env = process.env) {
|
|
|
29
37
|
export function isPort(value) {
|
|
30
38
|
return typeof value === 'number' && Number.isInteger(value) && value >= 1 && value <= 65535;
|
|
31
39
|
}
|
|
40
|
+
const LEVELS = new Set(['off', 'ask', 'act']);
|
|
41
|
+
const TOOL_NAME = /^[a-z][a-z_]{1,63}$/;
|
|
42
|
+
const DAY = /^\d{4}-\d{2}-\d{2}$/;
|
|
43
|
+
/**
|
|
44
|
+
* Keeps what has the right shape and drops the rest, field by field.
|
|
45
|
+
*
|
|
46
|
+
* Exported for the tests and for anything that receives settings from
|
|
47
|
+
* somewhere other than this file. Whether a tool name exists is not decided
|
|
48
|
+
* here: an entry for a tool a later version removed must not break the file.
|
|
49
|
+
*/
|
|
50
|
+
export function sanitise(candidate) {
|
|
51
|
+
const settings = {};
|
|
52
|
+
if (isPort(candidate.imapPort))
|
|
53
|
+
settings.imapPort = candidate.imapPort;
|
|
54
|
+
if (isPort(candidate.smtpPort))
|
|
55
|
+
settings.smtpPort = candidate.smtpPort;
|
|
56
|
+
// Only a literal true hides it. Anything else, including a string "true" from
|
|
57
|
+
// a hand-edited file, leaves the notice where it is.
|
|
58
|
+
if (candidate.noticeDismissed === true)
|
|
59
|
+
settings.noticeDismissed = true;
|
|
60
|
+
const pin = candidate.pin;
|
|
61
|
+
if (pin && typeof pin.salt === 'string' && typeof pin.hash === 'string' && pin.salt && pin.hash) {
|
|
62
|
+
settings.pin = { salt: pin.salt, hash: pin.hash };
|
|
63
|
+
}
|
|
64
|
+
const generation = candidate.credentialsGeneration;
|
|
65
|
+
if (typeof generation === 'number' && Number.isSafeInteger(generation) && generation >= 0) {
|
|
66
|
+
settings.credentialsGeneration = generation;
|
|
67
|
+
}
|
|
68
|
+
if (typeof candidate.levels === 'object' && candidate.levels !== null) {
|
|
69
|
+
const levels = {};
|
|
70
|
+
for (const [tool, level] of Object.entries(candidate.levels)) {
|
|
71
|
+
if (TOOL_NAME.test(tool) && typeof level === 'string' && LEVELS.has(level)) {
|
|
72
|
+
levels[tool] = level;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (Object.keys(levels).length > 0)
|
|
76
|
+
settings.levels = levels;
|
|
77
|
+
}
|
|
78
|
+
if (typeof candidate.limits === 'object' && candidate.limits !== null) {
|
|
79
|
+
const raw = candidate.limits;
|
|
80
|
+
const limits = {};
|
|
81
|
+
if (Array.isArray(raw.allowed)) {
|
|
82
|
+
const allowed = raw.allowed.filter((entry) => typeof entry === 'string' && entry.length > 0 && entry.length < 255);
|
|
83
|
+
if (allowed.length > 0)
|
|
84
|
+
limits.allowed = allowed;
|
|
85
|
+
}
|
|
86
|
+
if (typeof raw.maxPerHour === 'number' && Number.isInteger(raw.maxPerHour) && raw.maxPerHour > 0) {
|
|
87
|
+
limits.maxPerHour = raw.maxPerHour;
|
|
88
|
+
}
|
|
89
|
+
if (typeof raw.until === 'string' && DAY.test(raw.until))
|
|
90
|
+
limits.until = raw.until;
|
|
91
|
+
if (Object.keys(limits).length > 0)
|
|
92
|
+
settings.limits = limits;
|
|
93
|
+
}
|
|
94
|
+
const record = candidate.record;
|
|
95
|
+
if (record &&
|
|
96
|
+
typeof record.address === 'string' &&
|
|
97
|
+
record.address.length > 0 &&
|
|
98
|
+
(record.mode === 'cc' || record.mode === 'bcc')) {
|
|
99
|
+
settings.record = { address: record.address, mode: record.mode };
|
|
100
|
+
}
|
|
101
|
+
// Names a later version no longer knows are dropped, one by one.
|
|
102
|
+
if (Array.isArray(candidate.filterActions)) {
|
|
103
|
+
const known = UNLOCKABLE.filter((action) => candidate.filterActions.includes(action));
|
|
104
|
+
if (known.length > 0)
|
|
105
|
+
settings.filterActions = known;
|
|
106
|
+
}
|
|
107
|
+
return settings;
|
|
108
|
+
}
|
|
32
109
|
/**
|
|
33
110
|
* Reads the stored settings.
|
|
34
111
|
*
|
|
35
112
|
* A missing, unreadable or broken file yields no settings rather than an error:
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* discard a good one.
|
|
113
|
+
* none of them is worth refusing to start over, and every one has a default
|
|
114
|
+
* that is today's behaviour. Values of the wrong shape are dropped
|
|
115
|
+
* individually, so one bad entry does not discard a good one.
|
|
39
116
|
*/
|
|
40
117
|
export async function loadSettings(path = settingsPath()) {
|
|
41
118
|
let raw;
|
|
@@ -54,27 +131,85 @@ export async function loadSettings(path = settingsPath()) {
|
|
|
54
131
|
}
|
|
55
132
|
if (typeof parsed !== 'object' || parsed === null)
|
|
56
133
|
return {};
|
|
57
|
-
|
|
58
|
-
const settings = {};
|
|
59
|
-
if (isPort(candidate.imapPort))
|
|
60
|
-
settings.imapPort = candidate.imapPort;
|
|
61
|
-
if (isPort(candidate.smtpPort))
|
|
62
|
-
settings.smtpPort = candidate.smtpPort;
|
|
63
|
-
// Only a literal true hides it. Anything else, including a string "true" from
|
|
64
|
-
// a hand-edited file, leaves the notice where it is.
|
|
65
|
-
if (candidate.noticeDismissed === true)
|
|
66
|
-
settings.noticeDismissed = true;
|
|
67
|
-
return settings;
|
|
134
|
+
return sanitise(parsed);
|
|
68
135
|
}
|
|
69
136
|
/**
|
|
70
137
|
* Writes the settings.
|
|
71
138
|
*
|
|
72
|
-
* Mode 600 like everything else this server puts on disk
|
|
73
|
-
*
|
|
74
|
-
* ends up readable one day.
|
|
139
|
+
* Mode 600 like everything else this server puts on disk: the file holds the
|
|
140
|
+
* hash of the PIN now, and a directory of mixed permissions is how the file that
|
|
141
|
+
* does matter ends up readable one day.
|
|
142
|
+
*
|
|
143
|
+
* Written to a neighbouring file and renamed into place, because several
|
|
144
|
+
* servers read this file whenever it changes. A rename is atomic on the same
|
|
145
|
+
* file system, so a reader sees the old settings or the new ones and never half
|
|
146
|
+
* of each.
|
|
75
147
|
*/
|
|
76
148
|
export async function saveSettings(settings, path = settingsPath()) {
|
|
77
149
|
await mkdir(dirname(path), { recursive: true, mode: 0o700 });
|
|
78
|
-
|
|
150
|
+
const temporary = `${path}.${process.pid}.tmp`;
|
|
151
|
+
try {
|
|
152
|
+
await writeFile(temporary, `${JSON.stringify(settings, null, 2)}\n`, { mode: 0o600 });
|
|
153
|
+
await rename(temporary, path);
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
await rm(temporary, { force: true });
|
|
157
|
+
throw error;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Changes some settings and keeps the rest as they are on disk.
|
|
162
|
+
*
|
|
163
|
+
* Reads first rather than writing a copy held in memory: another server may
|
|
164
|
+
* have written since, and the copy would quietly undo that.
|
|
165
|
+
*/
|
|
166
|
+
export async function updateSettings(change, path = settingsPath()) {
|
|
167
|
+
const next = change(await loadSettings(path));
|
|
168
|
+
await saveSettings(next, path);
|
|
169
|
+
return next;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Calls `onChange` with the settings whenever the file changes.
|
|
173
|
+
*
|
|
174
|
+
* Watches the directory rather than the file, because the file is replaced by a
|
|
175
|
+
* rename on every write, and a watch on the old file would see nothing after
|
|
176
|
+
* the first change. Bursts are collected for a moment so one write leads to one
|
|
177
|
+
* call. Returns a function that stops watching.
|
|
178
|
+
*/
|
|
179
|
+
export function watchSettings(onChange, path = settingsPath(), delayMs = 100) {
|
|
180
|
+
let watcher;
|
|
181
|
+
let timer;
|
|
182
|
+
const name = basename(path);
|
|
183
|
+
const reload = () => {
|
|
184
|
+
if (timer)
|
|
185
|
+
clearTimeout(timer);
|
|
186
|
+
timer = setTimeout(() => {
|
|
187
|
+
void loadSettings(path).then(onChange);
|
|
188
|
+
}, delayMs);
|
|
189
|
+
timer.unref();
|
|
190
|
+
};
|
|
191
|
+
try {
|
|
192
|
+
// Created here when missing, or the watch would have nothing to attach to
|
|
193
|
+
// and the first save by another server would go unnoticed.
|
|
194
|
+
mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
|
|
195
|
+
watcher = watch(dirname(path), { persistent: false }, (_event, file) => {
|
|
196
|
+
// Some platforms leave the name out. Rereading then costs one read.
|
|
197
|
+
if (file === null || file === name)
|
|
198
|
+
reload();
|
|
199
|
+
});
|
|
200
|
+
watcher.on('error', () => {
|
|
201
|
+
// A directory that disappears ends the watch. The settings in memory stay
|
|
202
|
+
// as they were, which is the same as nobody having changed anything.
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
// Not watchable on this system. Settings then apply to the server that
|
|
207
|
+
// showed the interface and to every server started afterwards.
|
|
208
|
+
}
|
|
209
|
+
return () => {
|
|
210
|
+
if (timer)
|
|
211
|
+
clearTimeout(timer);
|
|
212
|
+
watcher?.close();
|
|
213
|
+
};
|
|
79
214
|
}
|
|
80
215
|
//# sourceMappingURL=settings.js.map
|
package/dist/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAkB,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,OAAO,EAAE,UAAU,EAAmB,MAAM,oBAAoB,CAAA;AAoDhE,mFAAmF;AACnF,MAAM,UAAU,YAAY,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IAC/D,IAAI,GAAG,CAAC,wBAAwB;QAAE,OAAO,GAAG,CAAC,wBAAwB,CAAA;IACrE,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,CAAC,CAAA;AAClE,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,MAAM,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,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CAAC;IAAC,MAAM,CAAC;QACP,uEAAuE;QACvE,+DAA+D;IACjE,CAAC;IAED,OAAO,GAAG,EAAE;QACV,IAAI,KAAK;YAAE,YAAY,CAAC,KAAK,CAAC,CAAA;QAC9B,OAAO,EAAE,KAAK,EAAE,CAAA;IAClB,CAAC,CAAA;AACH,CAAC"}
|
package/dist/tools/confirm.d.ts
CHANGED
|
@@ -101,9 +101,11 @@ export declare function clientCanConfirm(ctx: unknown): boolean;
|
|
|
101
101
|
* a wall of them is how the answer became unreachable, and half a wall read
|
|
102
102
|
* halfway is worse than a sentence that says where to look.
|
|
103
103
|
*/
|
|
104
|
-
export declare function describeForConfirmation(draft: Draft, what: string, previewUrl?: string
|
|
104
|
+
export declare function describeForConfirmation(draft: Draft, what: string, previewUrl?: string,
|
|
105
|
+
/** Why the question is asked although the tool may send on its own. */
|
|
106
|
+
heldBack?: string): string;
|
|
105
107
|
/** The question, returned from the handler rather than pushed to the client. */
|
|
106
|
-
export declare function confirmationRequest(draft: Draft, what: string, requestState: string, previewUrl?: string): InputRequiredResult;
|
|
108
|
+
export declare function confirmationRequest(draft: Draft, what: string, requestState: string, previewUrl?: string, heldBack?: string): InputRequiredResult;
|
|
107
109
|
/** What the client sent back, if anything. */
|
|
108
110
|
export declare function confirmationAnswer(ctx: unknown): 'missing' | 'yes' | 'no';
|
|
109
111
|
/** The sealed state from a previous round, already verified by the SDK. */
|
package/dist/tools/confirm.js
CHANGED
|
@@ -140,13 +140,22 @@ export function clientCanConfirm(ctx) {
|
|
|
140
140
|
* a wall of them is how the answer became unreachable, and half a wall read
|
|
141
141
|
* halfway is worse than a sentence that says where to look.
|
|
142
142
|
*/
|
|
143
|
-
export function describeForConfirmation(draft, what, previewUrl
|
|
143
|
+
export function describeForConfirmation(draft, what, previewUrl,
|
|
144
|
+
/** Why the question is asked although the tool may send on its own. */
|
|
145
|
+
heldBack) {
|
|
144
146
|
const lines = [
|
|
145
147
|
`${what} would be sent from ${showRecipient(draft.from)}.`,
|
|
146
148
|
'',
|
|
147
149
|
describeRecipients(draft),
|
|
148
150
|
`Subject: ${draft.subject || '(no subject)'}`,
|
|
149
151
|
];
|
|
152
|
+
if (draft.record) {
|
|
153
|
+
lines.push(`Added by your settings as a copy of everything sent: ${draft.record.address} ` +
|
|
154
|
+
`(${draft.record.mode === 'cc' ? 'Cc' : 'Bcc'}).`);
|
|
155
|
+
}
|
|
156
|
+
if (heldBack) {
|
|
157
|
+
lines.push('', `This tool may send without asking, but ${heldBack}, so you are asked.`);
|
|
158
|
+
}
|
|
150
159
|
const counts = countsFor(draft);
|
|
151
160
|
if (counts)
|
|
152
161
|
lines.push('', counts);
|
|
@@ -224,12 +233,12 @@ function countsFor(draft) {
|
|
|
224
233
|
return `It carries ${list}.`;
|
|
225
234
|
}
|
|
226
235
|
/** The question, returned from the handler rather than pushed to the client. */
|
|
227
|
-
export function confirmationRequest(draft, what, requestState, previewUrl) {
|
|
236
|
+
export function confirmationRequest(draft, what, requestState, previewUrl, heldBack) {
|
|
228
237
|
return inputRequired({
|
|
229
238
|
requestState,
|
|
230
239
|
inputRequests: {
|
|
231
240
|
[CONFIRM_KEY]: inputRequired.elicit({
|
|
232
|
-
message: describeForConfirmation(draft, what, previewUrl),
|
|
241
|
+
message: describeForConfirmation(draft, what, previewUrl, heldBack),
|
|
233
242
|
requestedSchema: {
|
|
234
243
|
type: 'object',
|
|
235
244
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm.js","sourceRoot":"","sources":["../../src/tools/confirm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAE7E,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,UAAU,EACV,YAAY,EACZ,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EAAE,CAAC;IACjC,OAAO,EAAE,IAAI;CACd,CAAC,CAAA;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,aAAa,EAAE,GAAmB,EAAE,CAClC,OAAO,CACL,kEAAkE;QAChE,0FAA0F;QAC1F,4FAA4F;QAC5F,0FAA0F;QAC1F,iFAAiF;QACjF,2FAA2F;QAC3F,gBAAgB,CACnB;IACH,QAAQ,EAAE,GAAmB,EAAE,CAC7B,OAAO,CAAC,6EAA6E,CAAC;IACxF,OAAO,EAAE,GAAmB,EAAE,CAC5B,OAAO,CACL,sEAAsE;QACpE,uFAAuF;QACvF,4FAA4F;QAC5F,0DAA0D,CAC7D;IACH,SAAS,EAAE,GAAmB,EAAE,CAC9B,OAAO,CACL,2FAA2F;QACzF,eAAe,CAClB;CACJ,CAAA"}
|
package/dist/tools/failures.d.ts
CHANGED
|
@@ -13,23 +13,21 @@ import type { CallToolResult, InputRequiredResult } from '@modelcontextprotocol/
|
|
|
13
13
|
import { type MissingCredentials } from './sign-in-required.js';
|
|
14
14
|
export declare function setSignInHint(hint: () => string | undefined): void;
|
|
15
15
|
export declare function setLockedCheck(check: () => Promise<boolean>): void;
|
|
16
|
+
export declare function setElsewhereCheck(check: () => boolean): void;
|
|
16
17
|
/** For tests, which must not inherit a hint from another test. */
|
|
17
18
|
export declare function _clearSignInHint(): void;
|
|
18
19
|
/** The sign-in address, when the interface is running. */
|
|
19
20
|
export declare function signInUrl(): string | undefined;
|
|
21
|
+
export declare function setPreviewBase(base: (digest: string) => string | undefined): void;
|
|
20
22
|
/**
|
|
21
23
|
* Where a message waiting for confirmation can be read.
|
|
22
24
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* Returns nothing when no interface is running. The confirmation then says so
|
|
28
|
-
* rather than offering a link that goes nowhere, because a question asked with
|
|
29
|
-
* less behind it than usual should say as much.
|
|
25
|
+
* Returns nothing when this server cannot show previews. The confirmation then
|
|
26
|
+
* says so rather than offering a link that goes nowhere, because a question
|
|
27
|
+
* asked with less behind it than usual should say as much.
|
|
30
28
|
*/
|
|
31
29
|
export declare function previewUrl(digest: string): string | undefined;
|
|
32
|
-
/** Which of the
|
|
30
|
+
/** Which of the three situations the caller is in. */
|
|
33
31
|
export declare function missingCredentials(): Promise<MissingCredentials>;
|
|
34
32
|
/**
|
|
35
33
|
* Describes a failure, and for the ones with a remedy says who has to act.
|
package/dist/tools/failures.js
CHANGED
|
@@ -39,41 +39,60 @@ let lockedCheck;
|
|
|
39
39
|
export function setLockedCheck(check) {
|
|
40
40
|
lockedCheck = check;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Whether the server that shows the page is signed in with a password that
|
|
44
|
+
* stays with it, while this one is not.
|
|
45
|
+
*
|
|
46
|
+
* Asked before the locked check, because it overrules it: while that server
|
|
47
|
+
* shows the page, the page offers neither the sign-in form nor the unlock
|
|
48
|
+
* form, so the remedy the other two answers name is out of reach.
|
|
49
|
+
*/
|
|
50
|
+
let elsewhereCheck;
|
|
51
|
+
export function setElsewhereCheck(check) {
|
|
52
|
+
elsewhereCheck = check;
|
|
53
|
+
}
|
|
42
54
|
/** For tests, which must not inherit a hint from another test. */
|
|
43
55
|
export function _clearSignInHint() {
|
|
44
56
|
signInHint = undefined;
|
|
45
57
|
lockedCheck = undefined;
|
|
58
|
+
elsewhereCheck = undefined;
|
|
59
|
+
previewBase = undefined;
|
|
46
60
|
}
|
|
47
61
|
/** The sign-in address, when the interface is running. */
|
|
48
62
|
export function signInUrl() {
|
|
49
63
|
return signInHint?.();
|
|
50
64
|
}
|
|
51
65
|
/**
|
|
52
|
-
* Where
|
|
66
|
+
* Where this server shows the messages waiting for confirmation.
|
|
53
67
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
68
|
+
* Its own source rather than the sign-in address. Since 2026-11-05 every
|
|
69
|
+
* running server shares one interface, but a waiting message is held only in
|
|
70
|
+
* the memory of the server that asked, so that server shows it on a port of
|
|
71
|
+
* its own.
|
|
72
|
+
*/
|
|
73
|
+
let previewBase;
|
|
74
|
+
export function setPreviewBase(base) {
|
|
75
|
+
previewBase = base;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Where a message waiting for confirmation can be read.
|
|
57
79
|
*
|
|
58
|
-
* Returns nothing when
|
|
59
|
-
* rather than offering a link that goes nowhere, because a question
|
|
60
|
-
* less behind it than usual should say as much.
|
|
80
|
+
* Returns nothing when this server cannot show previews. The confirmation then
|
|
81
|
+
* says so rather than offering a link that goes nowhere, because a question
|
|
82
|
+
* asked with less behind it than usual should say as much.
|
|
61
83
|
*/
|
|
62
84
|
export function previewUrl(digest) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
85
|
+
return previewBase?.(digest);
|
|
86
|
+
}
|
|
87
|
+
/** Which of the three situations the caller is in. */
|
|
88
|
+
export async function missingCredentials() {
|
|
66
89
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return url.toString();
|
|
90
|
+
if (elsewhereCheck?.() === true)
|
|
91
|
+
return 'elsewhere';
|
|
70
92
|
}
|
|
71
93
|
catch {
|
|
72
|
-
|
|
94
|
+
// A list of servers that cannot be read leaves the other two answers.
|
|
73
95
|
}
|
|
74
|
-
}
|
|
75
|
-
/** Which of the two situations the caller is in. */
|
|
76
|
-
export async function missingCredentials() {
|
|
77
96
|
try {
|
|
78
97
|
return (await lockedCheck?.()) === true ? 'locked' : 'not-signed-in';
|
|
79
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failures.js","sourceRoot":"","sources":["../../src/tools/failures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,WAAW,EAAqB,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,SA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