@wootsup/yt-builder-mcp 1.6.0 → 1.7.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 +1 -1
- package/bin/yt-builder-mcp.js +72 -0
- package/dist/catalog/tool-catalog-markdown.d.ts +55 -0
- package/dist/catalog/tool-catalog-markdown.d.ts.map +1 -0
- package/dist/catalog/tool-catalog-markdown.js +84 -0
- package/dist/catalog/tool-catalog-markdown.js.map +1 -0
- package/dist/diagnostics/ca-reexec.d.ts +41 -0
- package/dist/diagnostics/ca-reexec.d.ts.map +1 -0
- package/dist/diagnostics/ca-reexec.js +91 -0
- package/dist/diagnostics/ca-reexec.js.map +1 -0
- package/dist/diagnostics/ca-trust.d.ts +11 -0
- package/dist/diagnostics/ca-trust.d.ts.map +1 -1
- package/dist/diagnostics/ca-trust.js +14 -1
- package/dist/diagnostics/ca-trust.js.map +1 -1
- package/dist/diagnostics/diagnose-network-error.d.ts +11 -0
- package/dist/diagnostics/diagnose-network-error.d.ts.map +1 -1
- package/dist/diagnostics/diagnose-network-error.js +18 -3
- package/dist/diagnostics/diagnose-network-error.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/install-skill.d.ts +23 -2
- package/dist/install-skill.d.ts.map +1 -1
- package/dist/install-skill.js +35 -3
- package/dist/install-skill.js.map +1 -1
- package/dist/setup-cli.d.ts +7 -3
- package/dist/setup-cli.d.ts.map +1 -1
- package/dist/setup-cli.js +82 -13
- package/dist/setup-cli.js.map +1 -1
- package/dist/setup-wizard-handshake.d.ts.map +1 -1
- package/dist/setup-wizard-handshake.js +17 -4
- package/dist/setup-wizard-handshake.js.map +1 -1
- package/dist/setup-wizard-types.d.ts +13 -0
- package/dist/setup-wizard-types.d.ts.map +1 -1
- package/dist/setup-wizard.d.ts.map +1 -1
- package/dist/setup-wizard.js +74 -0
- package/dist/setup-wizard.js.map +1 -1
- package/dist/skill-manifest.d.ts +35 -0
- package/dist/skill-manifest.d.ts.map +1 -0
- package/dist/skill-manifest.js +91 -0
- package/dist/skill-manifest.js.map +1 -0
- package/dist/tools/elements/handlers-write.d.ts.map +1 -1
- package/dist/tools/elements/handlers-write.js +55 -0
- package/dist/tools/elements/handlers-write.js.map +1 -1
- package/dist/tools/elements/schema-validation.d.ts +78 -0
- package/dist/tools/elements/schema-validation.d.ts.map +1 -0
- package/dist/tools/elements/schema-validation.js +205 -0
- package/dist/tools/elements/schema-validation.js.map +1 -0
- package/dist/tools/format/pages-format.d.ts +9 -5
- package/dist/tools/format/pages-format.d.ts.map +1 -1
- package/dist/tools/format/pages-format.js +22 -14
- package/dist/tools/format/pages-format.js.map +1 -1
- package/dist/tools/format/source-schema-format.d.ts +10 -0
- package/dist/tools/format/source-schema-format.d.ts.map +1 -1
- package/dist/tools/format/source-schema-format.js +50 -3
- package/dist/tools/format/source-schema-format.js.map +1 -1
- package/dist/tools/inspection.js +6 -5
- package/dist/tools/inspection.js.map +1 -1
- package/dist/tools/pages/builders.d.ts.map +1 -1
- package/dist/tools/pages/builders.js +24 -11
- package/dist/tools/pages/builders.js.map +1 -1
- package/dist/tools/pages/handlers-read.d.ts +5 -2
- package/dist/tools/pages/handlers-read.d.ts.map +1 -1
- package/dist/tools/pages/handlers-read.js +29 -7
- package/dist/tools/pages/handlers-read.js.map +1 -1
- package/dist/tools/pages/schemas.d.ts +14 -1
- package/dist/tools/pages/schemas.d.ts.map +1 -1
- package/dist/tools/pages/schemas.js +28 -5
- package/dist/tools/pages/schemas.js.map +1 -1
- package/dist/tools/sources/builders.d.ts.map +1 -1
- package/dist/tools/sources/builders.js +4 -3
- package/dist/tools/sources/builders.js.map +1 -1
- package/dist/tools/sources/handlers.d.ts +2 -0
- package/dist/tools/sources/handlers.d.ts.map +1 -1
- package/dist/tools/sources/handlers.js +8 -0
- package/dist/tools/sources/handlers.js.map +1 -1
- package/dist/uninstall-skill.d.ts +6 -0
- package/dist/uninstall-skill.d.ts.map +1 -1
- package/dist/uninstall-skill.js +20 -2
- package/dist/uninstall-skill.js.map +1 -1
- package/dist/uninstall.d.ts +2 -0
- package/dist/uninstall.d.ts.map +1 -1
- package/dist/uninstall.js +1 -1
- package/dist/uninstall.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/skills/yt-builder-mcp/SKILL.md +76 -48
package/README.md
CHANGED
|
@@ -196,7 +196,7 @@ exit with code `2` and a clear error to stderr:
|
|
|
196
196
|
npx -y @wootsup/yt-builder-mcp setup \
|
|
197
197
|
--non-interactive \
|
|
198
198
|
--client cursor --client claude-desktop \
|
|
199
|
-
--url https://
|
|
199
|
+
--url https://your-site.example/wordpress \
|
|
200
200
|
--token "$YTB_TOKEN"
|
|
201
201
|
```
|
|
202
202
|
|
package/bin/yt-builder-mcp.js
CHANGED
|
@@ -25,15 +25,39 @@
|
|
|
25
25
|
* YTB_MCP_TEST_MODE=1 forces the 'server' route so the smoke-test probe
|
|
26
26
|
* always reaches `dist/index.js` even when run from a TTY.
|
|
27
27
|
*
|
|
28
|
+
* RUNTIME CA SELF-HEAL (server branch only): corporate-CA trust used to depend
|
|
29
|
+
* ENTIRELY on `NODE_OPTIONS=--use-system-ca` being in the client config env
|
|
30
|
+
* before Node booted. When that value got clobbered (Glöckle v1.6) Node fell
|
|
31
|
+
* back to its bundled Mozilla CAs, could not build the corporate TLS-inspection
|
|
32
|
+
* chain, and `/mcp` hung for 30s. To stop depending on the config carrying the
|
|
33
|
+
* flag, the server SELF-HEALS: in the 'server' branch, BEFORE importing
|
|
34
|
+
* `dist/index.js`, if this Node supports `--use-system-ca` (≥ 22.15.0) AND the
|
|
35
|
+
* flag is not already active AND a loop-guard sentinel is not set, we re-exec
|
|
36
|
+
* the SAME bin with `node --use-system-ca …`, inherit stdio (so the MCP stdio
|
|
37
|
+
* JSON-RPC transport is byte-transparent — the parent is a thin passthrough),
|
|
38
|
+
* forward the child's exit code, and do NOT continue in the parent. The sentinel
|
|
39
|
+
* (set on the child env) + the already-active check PREVENT an infinite re-exec
|
|
40
|
+
* loop. The whole step is wrapped in try/catch: ANY failure falls through to a
|
|
41
|
+
* normal in-process start — a re-exec failure must NEVER break startup. The
|
|
42
|
+
* decision is the pure, unit-tested `decideCaReexec()`. The re-exec is SKIPPED
|
|
43
|
+
* under YTB_MCP_TEST_MODE=1 and never runs on the 'cli'/'hint' routes.
|
|
44
|
+
*
|
|
28
45
|
* @license MIT
|
|
29
46
|
*/
|
|
30
47
|
import { argv, stdin, stderr, exit } from 'node:process';
|
|
48
|
+
import { spawnSync } from 'node:child_process';
|
|
49
|
+
import { fileURLToPath } from 'node:url';
|
|
31
50
|
|
|
32
51
|
import {
|
|
33
52
|
decideInvocation,
|
|
34
53
|
isKnownSubcommand,
|
|
35
54
|
BARE_INVOCATION_HINT,
|
|
36
55
|
} from '../dist/cli/invocation-decision.js';
|
|
56
|
+
import {
|
|
57
|
+
decideCaReexec,
|
|
58
|
+
CA_REEXEC_SENTINEL,
|
|
59
|
+
USE_SYSTEM_CA_FLAG,
|
|
60
|
+
} from '../dist/diagnostics/ca-reexec.js';
|
|
37
61
|
|
|
38
62
|
const args = argv.slice(2);
|
|
39
63
|
const subcommand = args[0];
|
|
@@ -67,6 +91,54 @@ if (action === 'cli') {
|
|
|
67
91
|
} else {
|
|
68
92
|
// 'server' — stdin is NOT a TTY (an AI client piping JSON-RPC → real
|
|
69
93
|
// MCP stdio server) or YTB_MCP_TEST_MODE=1 forced this route.
|
|
94
|
+
|
|
95
|
+
// RUNTIME CA SELF-HEAL: re-exec with `--use-system-ca` when needed so
|
|
96
|
+
// corporate TLS-inspection trust no longer depends on the client config
|
|
97
|
+
// carrying NODE_OPTIONS. SKIPPED under test mode (the smoke test must reach
|
|
98
|
+
// dist/index.js without a fork). Defensive: ANY failure falls through to a
|
|
99
|
+
// normal in-process start — a re-exec failure must never break startup.
|
|
100
|
+
if (process.env.YTB_MCP_TEST_MODE !== '1') {
|
|
101
|
+
try {
|
|
102
|
+
const shouldReexec = decideCaReexec({
|
|
103
|
+
nodeVersion: process.version,
|
|
104
|
+
execArgv: process.execArgv,
|
|
105
|
+
nodeOptions: process.env.NODE_OPTIONS,
|
|
106
|
+
sentinel: process.env[CA_REEXEC_SENTINEL],
|
|
107
|
+
});
|
|
108
|
+
if (shouldReexec) {
|
|
109
|
+
const self = fileURLToPath(import.meta.url);
|
|
110
|
+
// stdio:'inherit' → the child owns the MCP stdio JSON-RPC
|
|
111
|
+
// transport directly; the parent is a transparent passthrough
|
|
112
|
+
// that just forwards the child's exit code.
|
|
113
|
+
const child = spawnSync(
|
|
114
|
+
process.execPath,
|
|
115
|
+
[USE_SYSTEM_CA_FLAG, self, ...args],
|
|
116
|
+
{
|
|
117
|
+
stdio: 'inherit',
|
|
118
|
+
env: { ...process.env, [CA_REEXEC_SENTINEL]: '1' },
|
|
119
|
+
},
|
|
120
|
+
);
|
|
121
|
+
if (child.error) {
|
|
122
|
+
// Spawn itself failed (e.g. EACCES) — fall through to an
|
|
123
|
+
// in-process start rather than exiting on a heal failure.
|
|
124
|
+
stderr.write(
|
|
125
|
+
`yt-builder-mcp: CA self-heal re-exec failed (${child.error.message}); ` +
|
|
126
|
+
'starting in-process.\n',
|
|
127
|
+
);
|
|
128
|
+
} else {
|
|
129
|
+
// The child ran the server to completion; mirror its exit.
|
|
130
|
+
// signal → 1 (no clean code), else the child's code (or 0).
|
|
131
|
+
exit(child.signal ? 1 : (child.status ?? 0));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
} catch (err) {
|
|
135
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
136
|
+
stderr.write(
|
|
137
|
+
`yt-builder-mcp: CA self-heal skipped (${msg}); starting in-process.\n`,
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
70
142
|
// `dist/index.js` branches on the env var: test-mode prints the tool
|
|
71
143
|
// list to stderr and exits 0; otherwise it starts the stdio server.
|
|
72
144
|
// Importing here does NOT itself force stdio mode.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* packages/mcp/src/catalog/tool-catalog-markdown.ts — Behavior-Truth ④.
|
|
3
|
+
*
|
|
4
|
+
* The SINGLE source of truth for the SKILL.md "Tool Catalog" appendix
|
|
5
|
+
* Markdown. Previously this rendering logic lived ONLY inline in
|
|
6
|
+
* `scripts/extract-tools.mjs`, so nothing could re-derive the appendix to
|
|
7
|
+
* assert it stayed fresh — a tool description could drift from the committed
|
|
8
|
+
* appendix and every test stayed green (the render_preview/A6 stale-row proved
|
|
9
|
+
* it live).
|
|
10
|
+
*
|
|
11
|
+
* Now BOTH consumers import this one pure function:
|
|
12
|
+
* - `scripts/extract-tools.mjs` (the generator) — via the compiled
|
|
13
|
+
* `dist/index.js` re-export.
|
|
14
|
+
* - `tests/skills/skill-md-behavior-truth.test.ts` (the freshness gate) —
|
|
15
|
+
* re-renders from the live `buildAllTools()` registry and byte-compares
|
|
16
|
+
* against the committed appendix block.
|
|
17
|
+
*
|
|
18
|
+
* Because there is exactly ONE renderer, the generated appendix and the
|
|
19
|
+
* freshness assertion can never disagree about the row format. The output is
|
|
20
|
+
* byte-identical to the prior inline implementation.
|
|
21
|
+
*
|
|
22
|
+
* @license MIT
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* The minimal tool metadata the catalog row needs. `buildAllTools()` returns
|
|
26
|
+
* `AnyToolDefinition[]`, which is structurally assignable to this — kept as a
|
|
27
|
+
* decoupled structural type so the renderer stays pure and dependency-free.
|
|
28
|
+
*/
|
|
29
|
+
export interface CatalogToolEntry {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly description: string;
|
|
32
|
+
readonly inputSchema: Readonly<Record<string, unknown>>;
|
|
33
|
+
readonly annotations: {
|
|
34
|
+
readonly readOnlyHint?: boolean;
|
|
35
|
+
readonly destructiveHint?: boolean;
|
|
36
|
+
readonly idempotentHint?: boolean;
|
|
37
|
+
readonly openWorldHint?: boolean;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** Split counts the header line derives from the gateway source-of-truth. */
|
|
41
|
+
export interface CatalogCounts {
|
|
42
|
+
/** `ESSENTIAL_TOOLS.length` — the L1 forwarded essentials. */
|
|
43
|
+
readonly essentialCount: number;
|
|
44
|
+
/** `DIRECT_TOP_LEVEL_TOOLS.length` — the L3 direct top-level tools. */
|
|
45
|
+
readonly directCount: number;
|
|
46
|
+
/** Top-level gateways advertised in `tools/list` (write + read-only). */
|
|
47
|
+
readonly gatewayCount?: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Render the deterministic tool-catalog Markdown (header line + table) for the
|
|
51
|
+
* SKILL.md appendix. Pure: identical input ⇒ identical bytes. The trailing
|
|
52
|
+
* newline matches the generator's `lines.join('\n') + '\n'` contract.
|
|
53
|
+
*/
|
|
54
|
+
export declare function renderToolCatalogMarkdown(tools: readonly CatalogToolEntry[], counts: CatalogCounts): string;
|
|
55
|
+
//# sourceMappingURL=tool-catalog-markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-catalog-markdown.d.ts","sourceRoot":"","sources":["../../src/catalog/tool-catalog-markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACxD,QAAQ,CAAC,WAAW,EAAE;QAClB,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;QAChC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;QACnC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;QAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;KACpC,CAAC;CACL;AAED,6EAA6E;AAC7E,MAAM,WAAW,aAAa;IAC1B,8DAA8D;IAC9D,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAClC;AAiCD;;;;GAIG;AACH,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,SAAS,gBAAgB,EAAE,EAClC,MAAM,EAAE,aAAa,GACtB,MAAM,CA+BR"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* packages/mcp/src/catalog/tool-catalog-markdown.ts — Behavior-Truth ④.
|
|
3
|
+
*
|
|
4
|
+
* The SINGLE source of truth for the SKILL.md "Tool Catalog" appendix
|
|
5
|
+
* Markdown. Previously this rendering logic lived ONLY inline in
|
|
6
|
+
* `scripts/extract-tools.mjs`, so nothing could re-derive the appendix to
|
|
7
|
+
* assert it stayed fresh — a tool description could drift from the committed
|
|
8
|
+
* appendix and every test stayed green (the render_preview/A6 stale-row proved
|
|
9
|
+
* it live).
|
|
10
|
+
*
|
|
11
|
+
* Now BOTH consumers import this one pure function:
|
|
12
|
+
* - `scripts/extract-tools.mjs` (the generator) — via the compiled
|
|
13
|
+
* `dist/index.js` re-export.
|
|
14
|
+
* - `tests/skills/skill-md-behavior-truth.test.ts` (the freshness gate) —
|
|
15
|
+
* re-renders from the live `buildAllTools()` registry and byte-compares
|
|
16
|
+
* against the committed appendix block.
|
|
17
|
+
*
|
|
18
|
+
* Because there is exactly ONE renderer, the generated appendix and the
|
|
19
|
+
* freshness assertion can never disagree about the row format. The output is
|
|
20
|
+
* byte-identical to the prior inline implementation.
|
|
21
|
+
*
|
|
22
|
+
* @license MIT
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Derive the `Kind` column from the MCP annotation hints. Mirrors the prior
|
|
26
|
+
* inline logic exactly: read flag → 'read', plus destructive / idempotent /
|
|
27
|
+
* openWorld; no flags at all ⇒ 'mutating'.
|
|
28
|
+
*/
|
|
29
|
+
function describeAnnotations(a) {
|
|
30
|
+
if (a === null || a === undefined || typeof a !== 'object')
|
|
31
|
+
return 'read';
|
|
32
|
+
const flags = [];
|
|
33
|
+
if (a.readOnlyHint === true)
|
|
34
|
+
flags.push('read');
|
|
35
|
+
if (a.destructiveHint === true)
|
|
36
|
+
flags.push('destructive');
|
|
37
|
+
if (a.idempotentHint === true)
|
|
38
|
+
flags.push('idempotent');
|
|
39
|
+
if (a.openWorldHint === true)
|
|
40
|
+
flags.push('openWorld');
|
|
41
|
+
return flags.length === 0 ? 'mutating' : flags.join('+');
|
|
42
|
+
}
|
|
43
|
+
/** The sorted input-key list for the `Input keys` column. */
|
|
44
|
+
function listInputKeys(schema) {
|
|
45
|
+
if (schema === null || schema === undefined || typeof schema !== 'object') {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
return Object.keys(schema).sort();
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Render the deterministic tool-catalog Markdown (header line + table) for the
|
|
52
|
+
* SKILL.md appendix. Pure: identical input ⇒ identical bytes. The trailing
|
|
53
|
+
* newline matches the generator's `lines.join('\n') + '\n'` contract.
|
|
54
|
+
*/
|
|
55
|
+
export function renderToolCatalogMarkdown(tools, counts) {
|
|
56
|
+
const records = tools
|
|
57
|
+
.map((t) => ({
|
|
58
|
+
name: String(t.name ?? ''),
|
|
59
|
+
description: String(t.description ?? '').replace(/\s+/g, ' ').trim(),
|
|
60
|
+
kind: describeAnnotations(t.annotations),
|
|
61
|
+
inputKeys: listInputKeys(t.inputSchema),
|
|
62
|
+
}))
|
|
63
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
64
|
+
const l1 = counts.essentialCount;
|
|
65
|
+
const l3 = counts.directCount;
|
|
66
|
+
const gateway = counts.gatewayCount ?? 2;
|
|
67
|
+
const advertised = l1 + l3 + gateway;
|
|
68
|
+
const advanced = records.length - l1 - l3;
|
|
69
|
+
const callable = records.length + gateway;
|
|
70
|
+
const lines = [
|
|
71
|
+
`**${records.length} catalogued tools** plus the \`yootheme_builder_advanced\` (write) + \`yootheme_builder_advanced_read\` (read-only) gateways = **${callable} reachable via \`tools/list\`** (${l1} L1 + ${l3} L3 + ${gateway} gateways = ${advertised} advertised; the gateways route to ${advanced} additional advanced tools, bringing the total to ${callable} callable). Generated by \`scripts/extract-tools.mjs\` from the compiled \`buildAllTools()\` registry. Do not hand-edit this section; re-run \`npm run build && node scripts/extract-tools.mjs\` after changing tool definitions.`,
|
|
72
|
+
'',
|
|
73
|
+
'| Tool | Kind | Input keys | Description |',
|
|
74
|
+
'| --- | --- | --- | --- |',
|
|
75
|
+
];
|
|
76
|
+
for (const r of records) {
|
|
77
|
+
const keys = r.inputKeys.length === 0 ? '_(none)_' : '`' + r.inputKeys.join('`, `') + '`';
|
|
78
|
+
// Escape pipe chars in the description so the table doesn't break.
|
|
79
|
+
const desc = r.description.replace(/\|/g, '\\|');
|
|
80
|
+
lines.push(`| \`${r.name}\` | ${r.kind} | ${keys} | ${desc} |`);
|
|
81
|
+
}
|
|
82
|
+
return lines.join('\n') + '\n';
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=tool-catalog-markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-catalog-markdown.js","sourceRoot":"","sources":["../../src/catalog/tool-catalog-markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAqCH;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,CAAqD;IAC9E,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC;IAC1E,MAAM,KAAK,GAAa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,CAAC,GAAG,IAAI,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Env var name the parent stamps on the re-exec'd child to break the loop. */
|
|
2
|
+
export declare const CA_REEXEC_SENTINEL = "YTB_MCP_CA_REEXEC";
|
|
3
|
+
/** The Node flag we re-exec with — adds the OS trust store, never disables TLS. */
|
|
4
|
+
export declare const USE_SYSTEM_CA_FLAG = "--use-system-ca";
|
|
5
|
+
/**
|
|
6
|
+
* Is `--use-system-ca` already active for THIS process — either passed on the
|
|
7
|
+
* command line (surfaces in `process.execArgv`) or carried in `NODE_OPTIONS`?
|
|
8
|
+
*
|
|
9
|
+
* Both inputs are matched as whitespace-delimited tokens so a longer flag that
|
|
10
|
+
* merely CONTAINS the substring (none exists today, but defensively) cannot
|
|
11
|
+
* produce a false positive. `execArgv` entries are already individual tokens;
|
|
12
|
+
* `NODE_OPTIONS` is a single space-separated string, so it is split first.
|
|
13
|
+
*
|
|
14
|
+
* @param execArgv `process.execArgv` (Node-level flags, one per element).
|
|
15
|
+
* @param nodeOptions the `NODE_OPTIONS` env value (or undefined when unset).
|
|
16
|
+
*/
|
|
17
|
+
export declare function isSystemCaActive(execArgv: readonly string[], nodeOptions: string | undefined): boolean;
|
|
18
|
+
/** Inputs to {@link decideCaReexec} — every signal is passed in (no globals). */
|
|
19
|
+
export interface CaReexecInputs {
|
|
20
|
+
/** `process.version`, e.g. "v22.17.0". */
|
|
21
|
+
readonly nodeVersion: string;
|
|
22
|
+
/** `process.execArgv` — Node flags this process was launched with. */
|
|
23
|
+
readonly execArgv: readonly string[];
|
|
24
|
+
/** The `NODE_OPTIONS` env value, or undefined when unset. */
|
|
25
|
+
readonly nodeOptions: string | undefined;
|
|
26
|
+
/** The loop-guard sentinel env value ({@link CA_REEXEC_SENTINEL}), or undefined. */
|
|
27
|
+
readonly sentinel: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Should the server bin re-exec itself WITH `--use-system-ca`?
|
|
31
|
+
*
|
|
32
|
+
* Returns `true` iff ALL hold:
|
|
33
|
+
* 1. this Node can read the OS trust store ({@link supportsSystemCa}: ≥ 22.15.0),
|
|
34
|
+
* 2. `--use-system-ca` is NOT already active ({@link isSystemCaActive}),
|
|
35
|
+
* 3. the loop-guard sentinel is NOT set.
|
|
36
|
+
*
|
|
37
|
+
* Any of: Node too old, flag already active, or sentinel set → `false`
|
|
38
|
+
* (proceed in-process). Pure: depends only on its arguments.
|
|
39
|
+
*/
|
|
40
|
+
export declare function decideCaReexec(inputs: CaReexecInputs): boolean;
|
|
41
|
+
//# sourceMappingURL=ca-reexec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ca-reexec.d.ts","sourceRoot":"","sources":["../../src/diagnostics/ca-reexec.ts"],"names":[],"mappings":"AAoCA,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAEtD,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,WAAW,EAAE,MAAM,GAAG,SAAS,GAChC,OAAO,CAaT;AAED,iFAAiF;AACjF,MAAM,WAAW,cAAc;IAC3B,0CAA0C;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,oFAAoF;IACpF,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAe9D"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// packages/mcp/src/diagnostics/ca-reexec.ts
|
|
2
|
+
/**
|
|
3
|
+
* Pure decision core for the runtime `--use-system-ca` SELF-HEAL re-exec in
|
|
4
|
+
* `bin/yt-builder-mcp.js` (server branch only).
|
|
5
|
+
*
|
|
6
|
+
* THE PROBLEM IT SOLVES — env-clobber regression (Glöckle v1.6, 2026-06):
|
|
7
|
+
* corporate-CA trust depended ENTIRELY on `NODE_OPTIONS=--use-system-ca` being
|
|
8
|
+
* present in the MCP client config env BEFORE Node booted. On the Glöckle
|
|
9
|
+
* install that value got wiped, so Node fell back to its bundled Mozilla CA set,
|
|
10
|
+
* could not build the corporate TLS-inspection chain, and the `/mcp` handshake
|
|
11
|
+
* hung for 30s. `mergeServerEnv` (clients/index.ts) is correct; the robust fix
|
|
12
|
+
* is to STOP depending on the config carrying the flag and have the SERVER
|
|
13
|
+
* self-heal at launch by re-exec'ing itself WITH `--use-system-ca`.
|
|
14
|
+
*
|
|
15
|
+
* WHY `--use-system-ca` IS SAFE TO APPLY UNCONDITIONALLY (on a supporting Node):
|
|
16
|
+
* the flag only ADDS the OS trust store (Windows CryptoAPI / macOS Keychain) to
|
|
17
|
+
* Node's bundled Mozilla CAs. It never DISABLES TLS verification. For a
|
|
18
|
+
* non-corporate user it is a harmless superset; for a corporate user it is the
|
|
19
|
+
* whole fix.
|
|
20
|
+
*
|
|
21
|
+
* THE LOOP-GUARD (critical): a re-exec that itself re-execs is an infinite fork
|
|
22
|
+
* bomb. {@link decideCaReexec} returns `false` whenever the flag is ALREADY
|
|
23
|
+
* active (in `process.execArgv` OR the `NODE_OPTIONS` env) OR a sentinel env var
|
|
24
|
+
* (set by the parent on the child it spawns) is present. The shim sets the
|
|
25
|
+
* sentinel on the child, so the child's own `decideCaReexec` returns `false` and
|
|
26
|
+
* proceeds in-process.
|
|
27
|
+
*
|
|
28
|
+
* The bin shim is a thin, un-typed JS file; the decision logic lives here, in a
|
|
29
|
+
* typed + unit-tested module, exactly like `cli/invocation-decision.ts`.
|
|
30
|
+
*
|
|
31
|
+
* @license MIT
|
|
32
|
+
*/
|
|
33
|
+
import { supportsSystemCa } from './ca-trust.js';
|
|
34
|
+
/** Env var name the parent stamps on the re-exec'd child to break the loop. */
|
|
35
|
+
export const CA_REEXEC_SENTINEL = 'YTB_MCP_CA_REEXEC';
|
|
36
|
+
/** The Node flag we re-exec with — adds the OS trust store, never disables TLS. */
|
|
37
|
+
export const USE_SYSTEM_CA_FLAG = '--use-system-ca';
|
|
38
|
+
/**
|
|
39
|
+
* Is `--use-system-ca` already active for THIS process — either passed on the
|
|
40
|
+
* command line (surfaces in `process.execArgv`) or carried in `NODE_OPTIONS`?
|
|
41
|
+
*
|
|
42
|
+
* Both inputs are matched as whitespace-delimited tokens so a longer flag that
|
|
43
|
+
* merely CONTAINS the substring (none exists today, but defensively) cannot
|
|
44
|
+
* produce a false positive. `execArgv` entries are already individual tokens;
|
|
45
|
+
* `NODE_OPTIONS` is a single space-separated string, so it is split first.
|
|
46
|
+
*
|
|
47
|
+
* @param execArgv `process.execArgv` (Node-level flags, one per element).
|
|
48
|
+
* @param nodeOptions the `NODE_OPTIONS` env value (or undefined when unset).
|
|
49
|
+
*/
|
|
50
|
+
export function isSystemCaActive(execArgv, nodeOptions) {
|
|
51
|
+
if (execArgv.includes(USE_SYSTEM_CA_FLAG)) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
if (typeof nodeOptions === 'string') {
|
|
55
|
+
// NODE_OPTIONS is a space-separated flag list; tokenise before matching
|
|
56
|
+
// so we compare whole flags, never a substring of one.
|
|
57
|
+
const tokens = nodeOptions.split(/\s+/).filter((t) => t.length > 0);
|
|
58
|
+
if (tokens.includes(USE_SYSTEM_CA_FLAG)) {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Should the server bin re-exec itself WITH `--use-system-ca`?
|
|
66
|
+
*
|
|
67
|
+
* Returns `true` iff ALL hold:
|
|
68
|
+
* 1. this Node can read the OS trust store ({@link supportsSystemCa}: ≥ 22.15.0),
|
|
69
|
+
* 2. `--use-system-ca` is NOT already active ({@link isSystemCaActive}),
|
|
70
|
+
* 3. the loop-guard sentinel is NOT set.
|
|
71
|
+
*
|
|
72
|
+
* Any of: Node too old, flag already active, or sentinel set → `false`
|
|
73
|
+
* (proceed in-process). Pure: depends only on its arguments.
|
|
74
|
+
*/
|
|
75
|
+
export function decideCaReexec(inputs) {
|
|
76
|
+
const { nodeVersion, execArgv, nodeOptions, sentinel } = inputs;
|
|
77
|
+
// Loop-guard: a child we already re-exec'd carries the sentinel. Never re-exec it.
|
|
78
|
+
if (sentinel !== undefined && sentinel !== '') {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
// Node too old to read the OS trust store — re-exec would be a no-op flag.
|
|
82
|
+
if (!supportsSystemCa(nodeVersion)) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
// Already running with the flag (execArgv or NODE_OPTIONS) — nothing to heal.
|
|
86
|
+
if (isSystemCaActive(execArgv, nodeOptions)) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=ca-reexec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ca-reexec.js","sourceRoot":"","sources":["../../src/diagnostics/ca-reexec.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAEtD,mFAAmF;AACnF,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAC5B,QAA2B,EAC3B,WAA+B;IAE/B,IAAI,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;QAClC,wEAAwE;QACxE,uDAAuD;QACvD,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACpE,IAAI,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAcD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,MAAsB;IACjD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAChE,mFAAmF;IACnF,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,2EAA2E;IAC3E,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,CAAC;QACjC,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,8EAA8E;IAC9E,IAAI,gBAAgB,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -5,6 +5,17 @@
|
|
|
5
5
|
* same walker + code set as {@link diagnoseNetworkError}.
|
|
6
6
|
*/
|
|
7
7
|
export declare function isCaTrustError(err: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* True when `err` (or anything in its `.cause` / `AggregateError.errors`
|
|
10
|
+
* chain) carries a connection/handshake timeout code — the OPAQUE form a
|
|
11
|
+
* corporate TLS-inspection proxy takes when the cert chain can't be built and
|
|
12
|
+
* the handshake hangs instead of failing with a clean CA-trust code. Pure;
|
|
13
|
+
* reuses the same walker + canonical {@link TIMEOUT_CODES} set as
|
|
14
|
+
* {@link diagnoseNetworkError} (no duplicate classifier). The wizard uses this
|
|
15
|
+
* to attempt the OS-trust-store (`--use-system-ca`) recovery on a timeout —
|
|
16
|
+
* safe because `--use-system-ca` only ADDS the OS store and never disables TLS.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isTimeoutError(err: unknown): boolean;
|
|
8
19
|
/** Node version that first reads the OS trust store via `--use-system-ca`. */
|
|
9
20
|
export declare const SYSTEM_CA_NODE_FLOOR: readonly [number, number, number];
|
|
10
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ca-trust.d.ts","sourceRoot":"","sources":["../../src/diagnostics/ca-trust.ts"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAe,CAAC;AAQnF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,GAAE,MAAwB,GAAG,OAAO,CAS/E"}
|
|
1
|
+
{"version":3,"file":"ca-trust.d.ts","sourceRoot":"","sources":["../../src/diagnostics/ca-trust.ts"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAe,CAAC;AAQnF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,GAAE,MAAwB,GAAG,OAAO,CAS/E"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* 22.15.0. Below that floor, a corporate CA must be supplied as a `.pem`
|
|
16
16
|
* via NODE_EXTRA_CA_CERTS. Neither path ever disables TLS verification.
|
|
17
17
|
*/
|
|
18
|
-
import { CA_TRUST_CODES, collectCodes } from './diagnose-network-error.js';
|
|
18
|
+
import { CA_TRUST_CODES, collectCodes, TIMEOUT_CODES } from './diagnose-network-error.js';
|
|
19
19
|
/**
|
|
20
20
|
* True when `err` (or anything in its `.cause` / `AggregateError.errors`
|
|
21
21
|
* chain) carries a TLS chain-of-trust failure code — the signature of a
|
|
@@ -25,6 +25,19 @@ import { CA_TRUST_CODES, collectCodes } from './diagnose-network-error.js';
|
|
|
25
25
|
export function isCaTrustError(err) {
|
|
26
26
|
return collectCodes(err).some((c) => CA_TRUST_CODES.has(c));
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* True when `err` (or anything in its `.cause` / `AggregateError.errors`
|
|
30
|
+
* chain) carries a connection/handshake timeout code — the OPAQUE form a
|
|
31
|
+
* corporate TLS-inspection proxy takes when the cert chain can't be built and
|
|
32
|
+
* the handshake hangs instead of failing with a clean CA-trust code. Pure;
|
|
33
|
+
* reuses the same walker + canonical {@link TIMEOUT_CODES} set as
|
|
34
|
+
* {@link diagnoseNetworkError} (no duplicate classifier). The wizard uses this
|
|
35
|
+
* to attempt the OS-trust-store (`--use-system-ca`) recovery on a timeout —
|
|
36
|
+
* safe because `--use-system-ca` only ADDS the OS store and never disables TLS.
|
|
37
|
+
*/
|
|
38
|
+
export function isTimeoutError(err) {
|
|
39
|
+
return collectCodes(err).some((c) => TIMEOUT_CODES.has(c));
|
|
40
|
+
}
|
|
28
41
|
/** Node version that first reads the OS trust store via `--use-system-ca`. */
|
|
29
42
|
export const SYSTEM_CA_NODE_FLOOR = [22, 15, 0];
|
|
30
43
|
function parseNodeVersion(v) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ca-trust.js","sourceRoot":"","sources":["../../src/diagnostics/ca-trust.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"ca-trust.js","sourceRoot":"","sources":["../../src/diagnostics/ca-trust.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACvC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACvC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAsC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAEnF,SAAS,gBAAgB,CAAC,CAAS;IAC/B,MAAM,CAAC,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC5B,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,cAAsB,OAAO,CAAC,OAAO;IAClE,MAAM,CAAC,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACxC,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC7B,MAAM,KAAK,GAAG,oBAAoB,CAAC;IACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACzB,IAAI,CAAC,CAAC,CAAC,CAAE,GAAG,KAAK,CAAC,CAAC,CAAE;YAAE,OAAO,IAAI,CAAC;QACnC,IAAI,CAAC,CAAC,CAAC,CAAE,GAAG,KAAK,CAAC,CAAC,CAAE;YAAE,OAAO,KAAK,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC,CAAC,6BAA6B;AAC9C,CAAC"}
|
|
@@ -22,6 +22,17 @@ export interface NetworkDiagnosis {
|
|
|
22
22
|
* definition of "this is a TLS-inspection CA problem" in the package.
|
|
23
23
|
*/
|
|
24
24
|
export declare const CA_TRUST_CODES: ReadonlySet<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Connection/handshake timeout signatures.
|
|
27
|
+
*
|
|
28
|
+
* Exported so the wizard's timeout-detection path (`isTimeoutError`) classifies
|
|
29
|
+
* an outbound failure against the SAME canonical set — there is exactly one
|
|
30
|
+
* definition of "this connection timed out" in the package. A TLS-inspecting
|
|
31
|
+
* corporate proxy whose root CA can't be built can manifest as one of these
|
|
32
|
+
* opaque timeouts (the handshake hangs) rather than a clean CA-trust code, which
|
|
33
|
+
* is why the wizard now attempts `--use-system-ca` on a timeout too.
|
|
34
|
+
*/
|
|
35
|
+
export declare const TIMEOUT_CODES: ReadonlySet<string>;
|
|
25
36
|
/**
|
|
26
37
|
* Walk `err`, its `.cause` chain, and any `AggregateError.errors`, collecting
|
|
27
38
|
* every `.code` string. A Node global-fetch failure (`TypeError: fetch failed`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnose-network-error.d.ts","sourceRoot":"","sources":["../../src/diagnostics/diagnose-network-error.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC7B,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iFAAiF;IACjF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAO7C,CAAC;
|
|
1
|
+
{"version":3,"file":"diagnose-network-error.d.ts","sourceRoot":"","sources":["../../src/diagnostics/diagnose-network-error.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC7B,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iFAAiF;IACjF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAO7C,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAK5C,CAAC;AA4BH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,MAAM,EAAE,CAa9D;AAOD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAChC,GAAG,EAAE,OAAO,EACZ,GAAG,GAAE,MAAM,CAAC,UAAwB,GACrC,gBAAgB,GAAG,IAAI,CA2FzB"}
|
|
@@ -14,7 +14,17 @@ export const CA_TRUST_CODES = new Set([
|
|
|
14
14
|
'SELF_SIGNED_CERT',
|
|
15
15
|
'CERT_UNTRUSTED',
|
|
16
16
|
]);
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Connection/handshake timeout signatures.
|
|
19
|
+
*
|
|
20
|
+
* Exported so the wizard's timeout-detection path (`isTimeoutError`) classifies
|
|
21
|
+
* an outbound failure against the SAME canonical set — there is exactly one
|
|
22
|
+
* definition of "this connection timed out" in the package. A TLS-inspecting
|
|
23
|
+
* corporate proxy whose root CA can't be built can manifest as one of these
|
|
24
|
+
* opaque timeouts (the handshake hangs) rather than a clean CA-trust code, which
|
|
25
|
+
* is why the wizard now attempts `--use-system-ca` on a timeout too.
|
|
26
|
+
*/
|
|
27
|
+
export const TIMEOUT_CODES = new Set([
|
|
18
28
|
'UND_ERR_CONNECT_TIMEOUT',
|
|
19
29
|
'ETIMEDOUT',
|
|
20
30
|
'UND_ERR_HEADERS_TIMEOUT',
|
|
@@ -133,16 +143,21 @@ export function diagnoseNetworkError(err, env = process.env) {
|
|
|
133
143
|
}
|
|
134
144
|
const timeoutCode = has(TIMEOUT_CODES);
|
|
135
145
|
if (timeoutCode !== null) {
|
|
146
|
+
// A TLS-inspecting corporate CA can hang the handshake into an opaque
|
|
147
|
+
// timeout (not a clean cert code), so the CA path is named alongside the
|
|
148
|
+
// proxy/VPN guidance — setup now retries with --use-system-ca on a
|
|
149
|
+
// timeout automatically; if it still fails, pin the corporate root CA.
|
|
150
|
+
const caHint = ' If your network uses TLS inspection / a self-signed corporate CA, setup now retries with --use-system-ca automatically (Node ≥ 22.15); if it still fails, re-run setup with `--ca <corp-root-ca.pem>`. Never disable TLS verification.';
|
|
136
151
|
return proxy !== null
|
|
137
152
|
? {
|
|
138
153
|
code: timeoutCode,
|
|
139
154
|
summary: `The connection through the proxy (${proxy}) timed out.`,
|
|
140
|
-
fix: `Confirm HTTPS_PROXY=${proxy} can reach the site, and set NO_PROXY for internal hosts. Run \`… doctor
|
|
155
|
+
fix: `Confirm HTTPS_PROXY=${proxy} can reach the site, and set NO_PROXY for internal hosts. Run \`… doctor\`.${caHint}`,
|
|
141
156
|
}
|
|
142
157
|
: {
|
|
143
158
|
code: timeoutCode,
|
|
144
159
|
summary: 'The connection timed out.',
|
|
145
|
-
fix:
|
|
160
|
+
fix: `The site may be internal (VPN needed) or require a proxy (set HTTPS_PROXY). Run \`npx -y @wootsup/yt-builder-mcp doctor\` to diagnose.${caHint}`,
|
|
146
161
|
};
|
|
147
162
|
}
|
|
148
163
|
const dnsCode = has(DNS_CODES);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnose-network-error.js","sourceRoot":"","sources":["../../src/diagnostics/diagnose-network-error.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAmBzD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IACvD,2BAA2B;IAC3B,6BAA6B;IAC7B,iCAAiC;IACjC,mCAAmC;IACnC,kBAAkB;IAClB,gBAAgB;CACnB,CAAC,CAAC;AAEH,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"diagnose-network-error.js","sourceRoot":"","sources":["../../src/diagnostics/diagnose-network-error.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAmBzD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IACvD,2BAA2B;IAC3B,6BAA6B;IAC7B,iCAAiC;IACjC,mCAAmC;IACnC,kBAAkB;IAClB,gBAAgB;CACnB,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAC;IACtD,yBAAyB;IACzB,WAAW;IACX,yBAAyB;IACzB,sBAAsB;CACzB,CAAC,CAAC;AAEH,MAAM,SAAS,GAAwB,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AAE3E,MAAM,MAAM,GACR,qHAAqH;IACrH,uH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B,CAAC,CAAC;gBACI,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,qCAAqC,KAAK,cAAc;gBACjE,GAAG,EAAE,uBAAuB,KAAK,8EAA8E,MAAM,EAAE;aAC1H;YACH,CAAC,CAAC;gBACI,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,2BAA2B;gBACpC,GAAG,EAAE,yIAAyI,MAAM,EAAE;aACzJ,CAAC;IACZ,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/B,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO;YACH,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,sCAAsC;YAC/C,GAAG,EAAE,qGAAqG;SAC7G,CAAC;IACN,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { loadConfig, loadRegistry, isTestMode, ENV_SITE_URL, ENV_WP_URL, ENV_BEA
|
|
|
18
18
|
export { bootstrapActiveSite } from './sites/bootstrap.js';
|
|
19
19
|
export { ConfigError, RestError, NetworkError } from './errors.js';
|
|
20
20
|
export { buildAllTools } from './tools/index.js';
|
|
21
|
+
export { renderToolCatalogMarkdown, type CatalogToolEntry, type CatalogCounts, } from './catalog/tool-catalog-markdown.js';
|
|
21
22
|
export { ClientPool, NoDefaultSiteError, UnknownSiteError } from './sites/client-pool.js';
|
|
22
23
|
export { SiteRegistry } from './sites/registry.js';
|
|
23
24
|
export { synthesiseFromEnv } from './sites/env-bridge.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAczF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MA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O,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EACH,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,gBAAgB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,aAAa,GACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACH,yBAAyB,EACzB,QAAQ,EACR,KAAK,aAAa,GACrB,MAAM,2BAA2B,CAAC;AAEnC;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACrB,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC;IAC9B,qEAAqE;IACrE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC;CAC3C;AAED,iBAAe,IAAI,CAAC,IAAI,GAAE,QAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAoJtD;AAkBD,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,10 @@ export { loadConfig, loadRegistry, isTestMode, ENV_SITE_URL, ENV_WP_URL, ENV_BEA
|
|
|
31
31
|
export { bootstrapActiveSite } from './sites/bootstrap.js';
|
|
32
32
|
export { ConfigError, RestError, NetworkError } from './errors.js';
|
|
33
33
|
export { buildAllTools } from './tools/index.js';
|
|
34
|
+
// Behavior-Truth ④ — the SINGLE tool-catalog Markdown renderer, shared by the
|
|
35
|
+
// extract-tools generator (via this dist re-export) and the SKILL.md appendix
|
|
36
|
+
// freshness test, so the generated appendix and the drift gate never disagree.
|
|
37
|
+
export { renderToolCatalogMarkdown, } from './catalog/tool-catalog-markdown.js';
|
|
34
38
|
// W6 — multi-site primitives exported for dist consumers (scripts,
|
|
35
39
|
// embedded uses). The `ClientPool` is the new wiring contract.
|
|
36
40
|
export { ClientPool, NoDefaultSiteError, UnknownSiteError } from './sites/client-pool.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAiB,MAAM,qCAAqC,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9E,gFAAgF;AAChF,MAAM,gBAAgB,GAAG,yBAAyB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,a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