impreza-mcp 0.46.0 → 0.48.0
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 +911 -819
- package/dist/client.d.ts +13 -0
- package/dist/client.js +52 -1
- package/dist/client.js.map +1 -1
- package/dist/credentials.d.ts +35 -0
- package/dist/credentials.js +129 -0
- package/dist/credentials.js.map +1 -0
- package/dist/customer-workflows.d.ts +31 -0
- package/dist/customer-workflows.js +47 -6
- package/dist/customer-workflows.js.map +1 -1
- package/dist/failover-workflows.d.ts +201 -0
- package/dist/failover-workflows.js +100 -0
- package/dist/failover-workflows.js.map +1 -0
- package/dist/host-inventory-privacy.d.ts +1 -0
- package/dist/host-inventory-privacy.js +16 -0
- package/dist/host-inventory-privacy.js.map +1 -0
- package/dist/host-inventory-schema.d.ts +846 -0
- package/dist/host-inventory-schema.js +1614 -0
- package/dist/host-inventory-schema.js.map +1 -0
- package/dist/login.d.ts +3 -0
- package/dist/login.js +87 -0
- package/dist/login.js.map +1 -0
- package/dist/output-schemas.d.ts +3 -0
- package/dist/output-schemas.js +18550 -0
- package/dist/output-schemas.js.map +1 -0
- package/dist/pitr-workflows.d.ts +1 -1
- package/dist/playbooks.d.ts +26 -0
- package/dist/playbooks.js +156 -0
- package/dist/playbooks.js.map +1 -0
- package/dist/server.js +382 -25
- package/dist/server.js.map +1 -1
- package/dist/shield-controls.d.ts +45 -0
- package/dist/shield-controls.js +41 -0
- package/dist/shield-controls.js.map +1 -0
- package/dist/ui-assets.d.ts +3 -3
- package/dist/ui-assets.js +2462 -2481
- package/dist/ui-assets.js.map +1 -1
- package/package.json +63 -63
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import type { ImprezaClient } from './client.js';
|
|
2
|
+
export declare const CUSTOMER_DOMAIN_FAILOVER_TOOLS: {
|
|
3
|
+
name: "impreza_challenge_failover_domain" | "impreza_verify_failover_domain" | "impreza_get_failover_domain";
|
|
4
|
+
title: "Request a hostname TXT challenge" | "Verify customer hostname ownership" | "Read customer hostname verification";
|
|
5
|
+
description: "Create a 15-minute account-bound, one-use TXT challenge for the customer hostname on this running app. Publish the returned TXT yourself. Impreza only queries DNS. Manage scope; account credential without confinement." | "Query the exact ownership TXT through Impreza local uncached Unbound. A successful challenge is consumed once; verification lasts 24 hours and TXT is checked again before pairing, review and cutover. Manage scope; account credential without confinement." | "Read the pending TXT challenge or saved ownership verification for this account app. This read does not prove current DNS freshness. Read scope; account credential without confinement.";
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object";
|
|
8
|
+
properties: {
|
|
9
|
+
readonly deployment_id: {
|
|
10
|
+
type: string;
|
|
11
|
+
pattern: string;
|
|
12
|
+
};
|
|
13
|
+
} | {
|
|
14
|
+
readonly deployment_id: {
|
|
15
|
+
type: string;
|
|
16
|
+
pattern: string;
|
|
17
|
+
};
|
|
18
|
+
readonly challenge_id: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly pattern: "^fdc_[a-f0-9]{24}$";
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
readonly deployment_id: {
|
|
24
|
+
type: string;
|
|
25
|
+
pattern: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: ("deployment_id" | "challenge_id")[];
|
|
29
|
+
additionalProperties: boolean;
|
|
30
|
+
};
|
|
31
|
+
annotations: {
|
|
32
|
+
openWorldHint: boolean;
|
|
33
|
+
idempotentHint?: boolean;
|
|
34
|
+
readOnlyHint: boolean;
|
|
35
|
+
destructiveHint: boolean;
|
|
36
|
+
};
|
|
37
|
+
}[];
|
|
38
|
+
export declare const FAILOVER_TOOLS: ({
|
|
39
|
+
name: "impreza_declare_external_failover_country" | "impreza_pair_failover_standby" | "impreza_get_failover_standby" | "impreza_confirm_failover_sync" | "impreza_prepare_failover" | "impreza_get_failover" | "impreza_apply_failover" | "impreza_retry_failover_activation" | "impreza_prepare_failback" | "impreza_get_failback" | "impreza_apply_failback" | "impreza_set_failover_drill_policy" | "impreza_run_failover_drill" | "impreza_get_failover_drill";
|
|
40
|
+
title: "Declare an external server country" | "Pair a cold standby" | "Read a standby pair" | "Verify a cold standby copy" | "Review a cold failover" | "Read a failover receipt" | "Apply a reviewed failover" | "Retry reviewed target activation" | "Review a failback" | "Read a failback receipt" | "Apply a reviewed failback" | "Schedule standby drills" | "Run a standby drill now" | "Read a standby drill";
|
|
41
|
+
description: string;
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: "object";
|
|
44
|
+
properties: {
|
|
45
|
+
cutover_id: {
|
|
46
|
+
type: string;
|
|
47
|
+
pattern: string;
|
|
48
|
+
};
|
|
49
|
+
review_digest: {
|
|
50
|
+
type: string;
|
|
51
|
+
pattern: string;
|
|
52
|
+
};
|
|
53
|
+
confirm: {
|
|
54
|
+
type: string;
|
|
55
|
+
const: boolean;
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
readonly agent_id: {
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly pattern: "^agt_[a-f0-9]{16,32}$";
|
|
61
|
+
};
|
|
62
|
+
readonly country_code: {
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
readonly pattern: "^[A-Z]{2}$";
|
|
65
|
+
};
|
|
66
|
+
} | {
|
|
67
|
+
readonly deployment_id: {
|
|
68
|
+
type: string;
|
|
69
|
+
pattern: string;
|
|
70
|
+
};
|
|
71
|
+
readonly target_deployment_id: {
|
|
72
|
+
type: string;
|
|
73
|
+
pattern: string;
|
|
74
|
+
};
|
|
75
|
+
readonly mode: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
readonly enum: readonly ["cold"];
|
|
78
|
+
};
|
|
79
|
+
} | {
|
|
80
|
+
readonly deployment_id: {
|
|
81
|
+
type: string;
|
|
82
|
+
pattern: string;
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
85
|
+
readonly deployment_id: {
|
|
86
|
+
type: string;
|
|
87
|
+
pattern: string;
|
|
88
|
+
};
|
|
89
|
+
readonly backup_id: {
|
|
90
|
+
type: string;
|
|
91
|
+
pattern: string;
|
|
92
|
+
};
|
|
93
|
+
readonly restore_id: {
|
|
94
|
+
type: string;
|
|
95
|
+
pattern: string;
|
|
96
|
+
};
|
|
97
|
+
readonly deploy_command_id: {
|
|
98
|
+
readonly type: "string";
|
|
99
|
+
readonly pattern: "^cmd_[a-f0-9]{16,32}$";
|
|
100
|
+
};
|
|
101
|
+
} | {
|
|
102
|
+
readonly deployment_id: {
|
|
103
|
+
type: string;
|
|
104
|
+
pattern: string;
|
|
105
|
+
};
|
|
106
|
+
} | {
|
|
107
|
+
readonly cutover_id: {
|
|
108
|
+
type: string;
|
|
109
|
+
pattern: string;
|
|
110
|
+
};
|
|
111
|
+
} | {
|
|
112
|
+
readonly cutover_id: {
|
|
113
|
+
type: string;
|
|
114
|
+
pattern: string;
|
|
115
|
+
};
|
|
116
|
+
} | {
|
|
117
|
+
readonly failback_id: {
|
|
118
|
+
type: string;
|
|
119
|
+
pattern: string;
|
|
120
|
+
};
|
|
121
|
+
} | {
|
|
122
|
+
readonly failback_id: {
|
|
123
|
+
type: string;
|
|
124
|
+
pattern: string;
|
|
125
|
+
};
|
|
126
|
+
readonly review_digest: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
readonly pattern: "^[a-f0-9]{64}$";
|
|
129
|
+
};
|
|
130
|
+
readonly confirm: {
|
|
131
|
+
readonly type: "boolean";
|
|
132
|
+
readonly const: true;
|
|
133
|
+
};
|
|
134
|
+
} | {
|
|
135
|
+
readonly deployment_id: {
|
|
136
|
+
type: string;
|
|
137
|
+
pattern: string;
|
|
138
|
+
};
|
|
139
|
+
readonly interval_minutes: {
|
|
140
|
+
readonly type: readonly ["integer", "null"];
|
|
141
|
+
readonly minimum: 60;
|
|
142
|
+
readonly maximum: 10080;
|
|
143
|
+
};
|
|
144
|
+
} | {
|
|
145
|
+
readonly deployment_id: {
|
|
146
|
+
type: string;
|
|
147
|
+
pattern: string;
|
|
148
|
+
};
|
|
149
|
+
} | {
|
|
150
|
+
readonly drill_id: {
|
|
151
|
+
type: string;
|
|
152
|
+
pattern: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
required: ("mode" | "deployment_id" | "review_digest" | "confirm" | "backup_id" | "agent_id" | "country_code" | "target_deployment_id" | "restore_id" | "deploy_command_id" | "cutover_id" | "failback_id" | "interval_minutes" | "drill_id")[];
|
|
156
|
+
additionalProperties: boolean;
|
|
157
|
+
};
|
|
158
|
+
annotations: {
|
|
159
|
+
idempotentHint?: boolean;
|
|
160
|
+
readOnlyHint: boolean;
|
|
161
|
+
destructiveHint: boolean;
|
|
162
|
+
openWorldHint: boolean;
|
|
163
|
+
};
|
|
164
|
+
} | {
|
|
165
|
+
name: "impreza_challenge_failover_domain" | "impreza_verify_failover_domain" | "impreza_get_failover_domain";
|
|
166
|
+
title: "Request a hostname TXT challenge" | "Verify customer hostname ownership" | "Read customer hostname verification";
|
|
167
|
+
description: "Create a 15-minute account-bound, one-use TXT challenge for the customer hostname on this running app. Publish the returned TXT yourself. Impreza only queries DNS. Manage scope; account credential without confinement." | "Query the exact ownership TXT through Impreza local uncached Unbound. A successful challenge is consumed once; verification lasts 24 hours and TXT is checked again before pairing, review and cutover. Manage scope; account credential without confinement." | "Read the pending TXT challenge or saved ownership verification for this account app. This read does not prove current DNS freshness. Read scope; account credential without confinement.";
|
|
168
|
+
inputSchema: {
|
|
169
|
+
type: "object";
|
|
170
|
+
properties: {
|
|
171
|
+
readonly deployment_id: {
|
|
172
|
+
type: string;
|
|
173
|
+
pattern: string;
|
|
174
|
+
};
|
|
175
|
+
} | {
|
|
176
|
+
readonly deployment_id: {
|
|
177
|
+
type: string;
|
|
178
|
+
pattern: string;
|
|
179
|
+
};
|
|
180
|
+
readonly challenge_id: {
|
|
181
|
+
readonly type: "string";
|
|
182
|
+
readonly pattern: "^fdc_[a-f0-9]{24}$";
|
|
183
|
+
};
|
|
184
|
+
} | {
|
|
185
|
+
readonly deployment_id: {
|
|
186
|
+
type: string;
|
|
187
|
+
pattern: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
required: ("deployment_id" | "challenge_id")[];
|
|
191
|
+
additionalProperties: boolean;
|
|
192
|
+
};
|
|
193
|
+
annotations: {
|
|
194
|
+
openWorldHint: boolean;
|
|
195
|
+
idempotentHint?: boolean;
|
|
196
|
+
readOnlyHint: boolean;
|
|
197
|
+
destructiveHint: boolean;
|
|
198
|
+
};
|
|
199
|
+
})[];
|
|
200
|
+
export declare function isFailoverTool(name: string): boolean;
|
|
201
|
+
export declare function callFailoverTool(client: ImprezaClient, name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const deployment = z.string().regex(/^dpl_(?:[a-f0-9]{16}|[a-f0-9]{24})$(?![\s\S])/);
|
|
3
|
+
const cutover = z.string().regex(/^fov_[a-f0-9]{24}$(?![\s\S])/);
|
|
4
|
+
const failback = z.string().regex(/^fbk_[a-f0-9]{24}$(?![\s\S])/);
|
|
5
|
+
const drill = z.string().regex(/^fdr_[a-f0-9]{24}$(?![\s\S])/);
|
|
6
|
+
const backup = z.string().regex(/^bkp_[a-f0-9]{16}$(?![\s\S])/);
|
|
7
|
+
const command = z.string().regex(/^cmd_[a-f0-9]{16,32}$(?![\s\S])/);
|
|
8
|
+
const digest = z.string().regex(/^[a-f0-9]{64}$(?![\s\S])/);
|
|
9
|
+
const confirmation = { cutover_id: cutover, review_digest: digest, confirm: z.literal(true) };
|
|
10
|
+
const agent = z.string().regex(/^agt_[a-f0-9]{16,32}$(?![\s\S])/);
|
|
11
|
+
const countries = new Set('AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW'.split(' '));
|
|
12
|
+
const schemas = {
|
|
13
|
+
impreza_challenge_failover_domain: z.object({ deployment_id: deployment }).strict(),
|
|
14
|
+
impreza_verify_failover_domain: z.object({ deployment_id: deployment, challenge_id: z.string().regex(/^fdc_[a-f0-9]{24}$/) }).strict(),
|
|
15
|
+
impreza_get_failover_domain: z.object({ deployment_id: deployment }).strict(),
|
|
16
|
+
impreza_declare_external_failover_country: z.object({ agent_id: agent, country_code: z.string().refine(v => countries.has(v), 'Use a valid ISO country code') }).strict(),
|
|
17
|
+
impreza_pair_failover_standby: z.object({ deployment_id: deployment, target_deployment_id: deployment, mode: z.literal('cold') }).strict().refine(v => v.deployment_id !== v.target_deployment_id, 'Choose a different standby deployment'),
|
|
18
|
+
impreza_get_failover_standby: z.object({ deployment_id: deployment }).strict(),
|
|
19
|
+
impreza_confirm_failover_sync: z.object({ deployment_id: deployment, backup_id: backup, restore_id: backup, deploy_command_id: command }).strict(),
|
|
20
|
+
impreza_prepare_failover: z.object({ deployment_id: deployment }).strict(),
|
|
21
|
+
impreza_get_failover: z.object({ cutover_id: cutover }).strict(),
|
|
22
|
+
impreza_apply_failover: z.object(confirmation).strict(),
|
|
23
|
+
impreza_retry_failover_activation: z.object(confirmation).strict(),
|
|
24
|
+
impreza_prepare_failback: z.object({ cutover_id: cutover }).strict(),
|
|
25
|
+
impreza_get_failback: z.object({ failback_id: failback }).strict(),
|
|
26
|
+
impreza_apply_failback: z.object({ failback_id: failback, review_digest: digest, confirm: z.literal(true) }).strict(),
|
|
27
|
+
impreza_set_failover_drill_policy: z.object({ deployment_id: deployment, interval_minutes: z.union([z.number().int().min(60).max(10080), z.null()]) }).strict(),
|
|
28
|
+
impreza_run_failover_drill: z.object({ deployment_id: deployment }).strict(),
|
|
29
|
+
impreza_get_failover_drill: z.object({ drill_id: drill }).strict(),
|
|
30
|
+
};
|
|
31
|
+
const dep = { type: 'string', pattern: '^dpl_(?:[a-f0-9]{16}|[a-f0-9]{24})$' };
|
|
32
|
+
const fov = { type: 'string', pattern: '^fov_[a-f0-9]{24}$' };
|
|
33
|
+
const bkp = { type: 'string', pattern: '^bkp_[a-f0-9]{16}$' };
|
|
34
|
+
const fbk = { type: 'string', pattern: '^fbk_[a-f0-9]{24}$' };
|
|
35
|
+
const fdr = { type: 'string', pattern: '^fdr_[a-f0-9]{24}$' };
|
|
36
|
+
const apply = { cutover_id: fov, review_digest: { type: 'string', pattern: '^[a-f0-9]{64}$' }, confirm: { type: 'boolean', const: true } };
|
|
37
|
+
const specs = [
|
|
38
|
+
['impreza_declare_external_failover_country', 'Declare an external server country', 'Record your declared country for an online external agent before pairing. Country declared by you, not verified by Impreza. A changed agent IP requires a new declaration. Deploy scope.', { agent_id: { type: 'string', pattern: '^agt_[a-f0-9]{16,32}$' }, country_code: { type: 'string', pattern: '^[A-Z]{2}$' } }, ['agent_id', 'country_code'], false, false, true],
|
|
39
|
+
['impreza_pair_failover_standby', 'Pair a cold standby', 'Pair two existing compatible apps on this account in different reported countries. Managed countries come from internal inventory; an external country is declared by the customer and is not verified by Impreza. Deploy scope. Does not provision servers, copy data or switch traffic. First create the reviewed catalog standby with impreza_deploy_catalog_app and standby:true, without domain or onion. The standby must have no public route or onion. Failover moves only a hostname in the managed zone or a public .onion: custom domains, private onion services, database bindings and dedicated servers are not supported.', { deployment_id: dep, target_deployment_id: dep, mode: { type: 'string', enum: ['cold'] } }, ['deployment_id', 'target_deployment_id', 'mode'], false, false, false],
|
|
40
|
+
['impreza_get_failover_standby', 'Read a standby pair', 'Read the standby and its saved sync receipt. Read scope. A ready label is revalidated before cutover.', { deployment_id: dep }, ['deployment_id'], true, false, true],
|
|
41
|
+
['impreza_confirm_failover_sync', 'Verify a cold standby copy', 'Verify the exact completed source backup, target restore and healthy redeploy caused by that restore. Manage scope. Does not copy data or activate traffic. Unrelated, stale or cross-account receipts are refused.', { deployment_id: dep, backup_id: bkp, restore_id: bkp, deploy_command_id: { type: 'string', pattern: '^cmd_[a-f0-9]{16,32}$' } }, ['deployment_id', 'backup_id', 'restore_id', 'deploy_command_id'], false, false, true],
|
|
42
|
+
['impreza_prepare_failover', 'Review a cold failover', 'Create a 15-minute review for a planned failover. Deploy scope. Does not stop apps or switch traffic. Inspect source, target, hostname, countries, backup age and interruption risk before asking the user to confirm. Backup age is not a promise of zero loss.', { deployment_id: dep }, ['deployment_id'], false, false, false],
|
|
43
|
+
['impreza_get_failover', 'Read a failover receipt', 'Read a reviewed failover and its saved progress receipt. Read scope. Accepted or activating is not verified completion; retain the cutover_id and read until verified or actionable failure.', { cutover_id: fov }, ['cutover_id'], true, false, true],
|
|
44
|
+
['impreza_apply_failover', 'Apply a reviewed failover', 'After explicit user confirmation, submit confirm=true and the exact review_digest. Manage scope. Stops and fences the source writer, transfers the managed hostname and activates the restored standby; a public onion is sealed to the standby, published there and its old copy purged. Interrupts traffic and may lose changes since the copied backup. Acceptance only queues work; read the receipt to verify. Repeating the same accepted review returns its receipt.', apply, ['cutover_id', 'review_digest', 'confirm'], false, true, true],
|
|
45
|
+
['impreza_retry_failover_activation', 'Retry reviewed target activation', 'Retry a failed target activation only after reviewing the existing failover receipt and obtaining explicit user confirmation. Manage scope. Requires the original digest and confirm=true; retries are bounded and revalidate ownership, route and DNS. Does not undo the source fence or create a new failover.', apply, ['cutover_id', 'review_digest', 'confirm'], false, true, false],
|
|
46
|
+
['impreza_prepare_failback', 'Review a failback', 'Create a 15-minute review to fail back a verified cutover. Deploy scope. Does not start apps, copy data or switch traffic. The review lifts only the old primary fence and then makes the old primary the cold standby of the current one; the way back is an ordinary backup, restore, sync confirmation and reviewed cutover.', { cutover_id: fov }, ['cutover_id'], false, false, false],
|
|
47
|
+
['impreza_get_failback', 'Read a failback receipt', 'Read a failback review and its receipt. Read scope. Releasing is not completion; retain the failback_id and read until inverted or an actionable failure.', { failback_id: fbk }, ['failback_id'], true, false, true],
|
|
48
|
+
['impreza_apply_failback', 'Apply a reviewed failback', 'After explicit user confirmation, submit confirm=true and the exact review_digest. Manage scope. The old host releases exactly the fence of the verified cutover; its app stays stopped and unrouted, and the pair is inverted so the old primary becomes an unprovisioned standby. Moves no traffic. Next, back up the current primary, restore that backup into the old one, confirm the sync and review the return cutover. Repeating the same accepted review returns its receipt.', { failback_id: fbk, review_digest: { type: 'string', pattern: '^[a-f0-9]{64}$' }, confirm: { type: 'boolean', const: true } }, ['failback_id', 'review_digest', 'confirm'], false, true, true],
|
|
49
|
+
['impreza_set_failover_drill_policy', 'Schedule standby drills', 'Set how often the cold standby is re-copied and verified, from 60 to 10080 minutes, or null to stop. Manage scope. Each drill backs up the primary, restores that copy over the standby in its country, waits for a healthy redeploy and records the verified copy; it never switches traffic. The first drill is one interval away.', { deployment_id: dep, interval_minutes: { type: ['integer', 'null'], minimum: 60, maximum: 10080 } }, ['deployment_id', 'interval_minutes'], false, true, true],
|
|
50
|
+
['impreza_run_failover_drill', 'Run a standby drill now', 'Start a drill of the cold standby now. Manage scope. It backs up the primary, restores that copy over the standby, waits for the healthy redeploy the restore causes and records the verified copy with measured durations. The standby data is replaced; the primary is only read and no traffic moves. Read the drill until verified or failed.', { deployment_id: dep }, ['deployment_id'], false, true, false],
|
|
51
|
+
['impreza_get_failover_drill', 'Read a standby drill', 'Read a standby drill, its current step and, when verified, the exact receipts and measured durations. Read scope. Durations describe that drill, not a recovery promise.', { drill_id: fdr }, ['drill_id'], true, false, true],
|
|
52
|
+
];
|
|
53
|
+
const V1_FAILOVER_TOOLS = specs.map(([name, title, description, properties, required, readOnlyHint, destructiveHint, idempotentHint]) => ({
|
|
54
|
+
name, title, description: description + ' Hosted MCP requires an account credential without resource confinement.',
|
|
55
|
+
inputSchema: { type: 'object', properties, required: [...required], additionalProperties: false },
|
|
56
|
+
annotations: { readOnlyHint, destructiveHint, openWorldHint: true, ...(readOnlyHint ? {} : { idempotentHint }) },
|
|
57
|
+
}));
|
|
58
|
+
const customerDomainEnabled = process.env.IMPREZA_CUSTOMER_DOMAIN_FAILOVER === '1';
|
|
59
|
+
const customerDomainSpecs = [
|
|
60
|
+
['impreza_challenge_failover_domain', 'Request a hostname TXT challenge', 'Create a 15-minute account-bound, one-use TXT challenge for the customer hostname on this running app. Publish the returned TXT yourself. Impreza only queries DNS. Manage scope; account credential without confinement.', { deployment_id: dep }, ['deployment_id'], false],
|
|
61
|
+
['impreza_verify_failover_domain', 'Verify customer hostname ownership', 'Query the exact ownership TXT through Impreza local uncached Unbound. A successful challenge is consumed once; verification lasts 24 hours and TXT is checked again before pairing, review and cutover. Manage scope; account credential without confinement.', { deployment_id: dep, challenge_id: { type: 'string', pattern: '^fdc_[a-f0-9]{24}$' } }, ['deployment_id', 'challenge_id'], false],
|
|
62
|
+
['impreza_get_failover_domain', 'Read customer hostname verification', 'Read the pending TXT challenge or saved ownership verification for this account app. This read does not prove current DNS freshness. Read scope; account credential without confinement.', { deployment_id: dep }, ['deployment_id'], true],
|
|
63
|
+
];
|
|
64
|
+
export const CUSTOMER_DOMAIN_FAILOVER_TOOLS = customerDomainSpecs.map(([name, title, description, properties, required, readOnlyHint]) => ({
|
|
65
|
+
name, title, description, inputSchema: { type: 'object', properties, required: [...required], additionalProperties: false },
|
|
66
|
+
annotations: { readOnlyHint, destructiveHint: false, ...(!readOnlyHint ? { idempotentHint: false } : {}), openWorldHint: true },
|
|
67
|
+
}));
|
|
68
|
+
export const FAILOVER_TOOLS = [...V1_FAILOVER_TOOLS, ...(customerDomainEnabled ? CUSTOMER_DOMAIN_FAILOVER_TOOLS : [])];
|
|
69
|
+
const customerDomainNames = new Set(CUSTOMER_DOMAIN_FAILOVER_TOOLS.map(t => t.name));
|
|
70
|
+
const routes = {
|
|
71
|
+
impreza_challenge_failover_domain: ['POST', '/v1/platform/deployments/{deployment_id}/failover-domain/challenge'],
|
|
72
|
+
impreza_verify_failover_domain: ['POST', '/v1/platform/deployments/{deployment_id}/failover-domain/verify'],
|
|
73
|
+
impreza_get_failover_domain: ['GET', '/v1/platform/deployments/{deployment_id}/failover-domain'],
|
|
74
|
+
impreza_declare_external_failover_country: ['POST', '/v1/platform/agents/{agent_id}/failover-jurisdiction'],
|
|
75
|
+
impreza_pair_failover_standby: ['POST', '/v1/platform/deployments/custom/{deployment_id}/failover-standby'],
|
|
76
|
+
impreza_get_failover_standby: ['GET', '/v1/platform/deployments/custom/{deployment_id}/failover-standby'],
|
|
77
|
+
impreza_confirm_failover_sync: ['POST', '/v1/platform/deployments/custom/{deployment_id}/failover-standby/confirm-sync'],
|
|
78
|
+
impreza_prepare_failover: ['POST', '/v1/platform/deployments/custom/{deployment_id}/prepare-failover'],
|
|
79
|
+
impreza_get_failover: ['GET', '/v1/platform/failover-cutovers/{cutover_id}'],
|
|
80
|
+
impreza_apply_failover: ['POST', '/v1/platform/failover-cutovers/{cutover_id}/apply'],
|
|
81
|
+
impreza_retry_failover_activation: ['POST', '/v1/platform/failover-cutovers/{cutover_id}/retry-activation'],
|
|
82
|
+
impreza_prepare_failback: ['POST', '/v1/platform/failover-cutovers/{cutover_id}/prepare-failback'],
|
|
83
|
+
impreza_get_failback: ['GET', '/v1/platform/failover-failbacks/{failback_id}'],
|
|
84
|
+
impreza_apply_failback: ['POST', '/v1/platform/failover-failbacks/{failback_id}/apply'],
|
|
85
|
+
impreza_set_failover_drill_policy: ['POST', '/v1/platform/deployments/custom/{deployment_id}/failover-standby/drill-policy'],
|
|
86
|
+
impreza_run_failover_drill: ['POST', '/v1/platform/deployments/custom/{deployment_id}/failover-standby/drills'],
|
|
87
|
+
impreza_get_failover_drill: ['GET', '/v1/platform/failover-drills/{drill_id}'],
|
|
88
|
+
};
|
|
89
|
+
export function isFailoverTool(name) { return Object.hasOwn(routes, name) && (!customerDomainNames.has(name) || customerDomainEnabled); }
|
|
90
|
+
export async function callFailoverTool(client, name, args) {
|
|
91
|
+
if (!isFailoverTool(name))
|
|
92
|
+
throw new Error('Unknown failover workflow');
|
|
93
|
+
const route = routes[name], schema = schemas[name];
|
|
94
|
+
if (!route || !schema)
|
|
95
|
+
throw new Error('Unknown failover workflow');
|
|
96
|
+
const body = schema.parse(args);
|
|
97
|
+
const path = route[1].replace(/\{([a-z_]+)\}/g, (_, key) => { const value = body[key]; delete body[key]; return encodeURIComponent(String(value)); });
|
|
98
|
+
return route[0] === 'GET' ? client.get(path) : client.post(path, body);
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=failover-workflows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failover-workflows.js","sourceRoot":"","sources":["../src/failover-workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,MAAM,UAAU,GAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;AACnF,MAAM,OAAO,GAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC/D,MAAM,QAAQ,GAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAChE,MAAM,KAAK,GAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC7D,MAAM,MAAM,GAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC9D,MAAM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O,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAG,CAAC,KAAK,IAAI,CAAC,MAAM;QAAC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAClE,MAAM,IAAI,GAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAA2B,CAAC;IACxD,MAAM,IAAI,GAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAC,CAAC,CAAQ,EAAC,GAAU,EAAC,EAAE,GAAC,MAAM,KAAK,GAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA,OAAO,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;IACxJ,OAAO,KAAK,CAAC,CAAC,CAAC,KAAG,KAAK,CAAA,CAAC,CAAA,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA,CAAC,CAAA,MAAM,CAAC,IAAI,CAAC,IAAI,EAAC,IAAI,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hostInventoryForMcp(payload: unknown, includeSshFingerprints?: boolean): unknown;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Project only MCP output; preserve the REST object and its strict output schema.
|
|
2
|
+
export function hostInventoryForMcp(payload, includeSshFingerprints = false) {
|
|
3
|
+
if (includeSshFingerprints || !payload || typeof payload !== 'object')
|
|
4
|
+
return payload;
|
|
5
|
+
const view = payload;
|
|
6
|
+
if (!view.facts || typeof view.facts !== 'object')
|
|
7
|
+
return payload;
|
|
8
|
+
const facts = view.facts;
|
|
9
|
+
if (!facts.ssh || typeof facts.ssh !== 'object')
|
|
10
|
+
return payload;
|
|
11
|
+
const ssh = facts.ssh;
|
|
12
|
+
if (!ssh.value || typeof ssh.value !== 'object' || Array.isArray(ssh.value))
|
|
13
|
+
return payload;
|
|
14
|
+
return { ...view, facts: { ...facts, ssh: { ...ssh, value: { ...ssh.value, fingerprints: [] } } } };
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=host-inventory-privacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-inventory-privacy.js","sourceRoot":"","sources":["../src/host-inventory-privacy.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,UAAU,mBAAmB,CAAC,OAAgB,EAAE,sBAAsB,GAAG,KAAK;IAClF,IAAI,sBAAsB,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IACtF,MAAM,IAAI,GAAG,OAAkC,CAAC;IAChD,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IAClE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAgC,CAAC;IACpD,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IAChE,MAAM,GAAG,GAAG,KAAK,CAAC,GAA8B,CAAC;IACjD,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC;IAC5F,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,EAAE,GAAG,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AACtG,CAAC"}
|