@solidnumber/cli 2.23.0 → 2.24.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 +13 -6
- package/dist/commands/ai.d.ts.map +1 -1
- package/dist/commands/ai.js +83 -1
- package/dist/commands/ai.js.map +1 -1
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +23 -4
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +9 -1
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/context.js +2 -2
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/deploy.js +18 -5
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/domains.d.ts.map +1 -1
- package/dist/commands/domains.js +102 -17
- package/dist/commands/domains.js.map +1 -1
- package/dist/commands/find.d.ts +17 -2
- package/dist/commands/find.d.ts.map +1 -1
- package/dist/commands/find.js +66 -14
- package/dist/commands/find.js.map +1 -1
- package/dist/commands/import.d.ts +12 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +43 -4
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/init.d.ts +22 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +64 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mcp.d.ts +1 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +259 -7
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/onboarding.d.ts +20 -0
- package/dist/commands/onboarding.d.ts.map +1 -1
- package/dist/commands/onboarding.js +160 -32
- package/dist/commands/onboarding.js.map +1 -1
- package/dist/commands/publish.d.ts +41 -3
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +160 -14
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +2 -12
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +2 -1
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/schema.d.ts +5 -4
- package/dist/commands/schema.d.ts.map +1 -1
- package/dist/commands/schema.js +40 -13
- package/dist/commands/schema.js.map +1 -1
- package/dist/commands/switch.d.ts.map +1 -1
- package/dist/commands/switch.js +41 -0
- package/dist/commands/switch.js.map +1 -1
- package/dist/commands/verbs.d.ts.map +1 -1
- package/dist/commands/verbs.js +6 -1
- package/dist/commands/verbs.js.map +1 -1
- package/dist/data/cms-blocks.json +205 -15
- package/dist/index.js +43 -25
- package/dist/index.js.map +1 -1
- package/dist/lib/ai-tool-connect.d.ts +75 -0
- package/dist/lib/ai-tool-connect.d.ts.map +1 -0
- package/dist/lib/ai-tool-connect.js +155 -0
- package/dist/lib/ai-tool-connect.js.map +1 -0
- package/dist/lib/block-schema-source.d.ts +59 -0
- package/dist/lib/block-schema-source.d.ts.map +1 -0
- package/dist/lib/block-schema-source.js +173 -0
- package/dist/lib/block-schema-source.js.map +1 -0
- package/dist/lib/block-types.d.ts +5 -0
- package/dist/lib/block-types.d.ts.map +1 -1
- package/dist/lib/dns-instructions.d.ts +44 -0
- package/dist/lib/dns-instructions.d.ts.map +1 -0
- package/dist/lib/dns-instructions.js +108 -0
- package/dist/lib/dns-instructions.js.map +1 -0
- package/dist/lib/esm-import.js +1 -1
- package/dist/lib/mcp-providers.d.ts +162 -0
- package/dist/lib/mcp-providers.d.ts.map +1 -0
- package/dist/lib/mcp-providers.js +488 -0
- package/dist/lib/mcp-providers.js.map +1 -0
- package/dist/lib/mcp-sync.d.ts +51 -0
- package/dist/lib/mcp-sync.d.ts.map +1 -0
- package/dist/lib/mcp-sync.js +176 -0
- package/dist/lib/mcp-sync.js.map +1 -0
- package/dist/lib/mcp-tenant-check.d.ts +92 -0
- package/dist/lib/mcp-tenant-check.d.ts.map +1 -0
- package/dist/lib/mcp-tenant-check.js +220 -0
- package/dist/lib/mcp-tenant-check.js.map +1 -0
- package/dist/lib/tenant-guard.d.ts +10 -0
- package/dist/lib/tenant-guard.d.ts.map +1 -1
- package/dist/lib/tenant-guard.js +31 -2
- package/dist/lib/tenant-guard.js.map +1 -1
- package/dist/lib/ui.d.ts.map +1 -1
- package/dist/lib/ui.js +26 -2
- package/dist/lib/ui.js.map +1 -1
- package/dist/lib/update-notice.d.ts +30 -0
- package/dist/lib/update-notice.d.ts.map +1 -0
- package/dist/lib/update-notice.js +143 -0
- package/dist/lib/update-notice.js.map +1 -0
- package/dist/lib/verb-metadata.d.ts.map +1 -1
- package/dist/lib/verb-metadata.js +4 -1
- package/dist/lib/verb-metadata.js.map +1 -1
- package/package.json +4 -5
- package/platform-docs/llms.txt +8 -8
|
@@ -7,6 +7,8 @@ export interface BlockDef {
|
|
|
7
7
|
component: string;
|
|
8
8
|
category: string;
|
|
9
9
|
aliases?: string[];
|
|
10
|
+
/** Prop names the backend validator requires (from schemas/block_schema.py). */
|
|
11
|
+
required?: string[];
|
|
10
12
|
props?: Record<string, string>;
|
|
11
13
|
enums?: Record<string, string[]>;
|
|
12
14
|
notes?: string;
|
|
@@ -18,10 +20,13 @@ export interface SchemaDoc {
|
|
|
18
20
|
source: string;
|
|
19
21
|
note: string;
|
|
20
22
|
extracted_from: string;
|
|
23
|
+
synced_at?: string;
|
|
21
24
|
};
|
|
22
25
|
envelope: {
|
|
23
26
|
sections: string;
|
|
24
27
|
notes: string[];
|
|
28
|
+
universal_optional_props?: string[];
|
|
29
|
+
motion_schema?: unknown;
|
|
25
30
|
};
|
|
26
31
|
blocks: BlockDef[];
|
|
27
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-types.d.ts","sourceRoot":"","sources":["../../src/lib/block-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB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E,MAAM,EAAE,CAAC;QAAC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC9G,MAAM,EAAE,QAAQ,EAAE,CAAC;CACpB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DNS instructions + verification details — rendered from what the BACKEND
|
|
3
|
+
* says, never from a CLI-side guess.
|
|
4
|
+
*
|
|
5
|
+
* `POST /api/v1/domains/custom` (and `GET /api/v1/domains/custom` for an
|
|
6
|
+
* unverified domain) return `dns_instructions` built by
|
|
7
|
+
* solid-backend `models/domain.py::dns_instructions_for`:
|
|
8
|
+
*
|
|
9
|
+
* { domain, records: [{type, name, value, ttl, pending?}], instructions: [str] }
|
|
10
|
+
*
|
|
11
|
+
* An apex domain needs an A record + TXT `_solid-verify`; a subdomain needs a
|
|
12
|
+
* CNAME + TXT `_solid-verify.<label>`. The CLI used to print a hard-coded
|
|
13
|
+
* `CNAME → proxy.solidnumber.com` for everything, which is wrong for every
|
|
14
|
+
* apex domain (most registrars reject `CNAME @`). These helpers print the
|
|
15
|
+
* backend's records verbatim, and render any record/detail field they do not
|
|
16
|
+
* know about generically so a new backend field is shown, not dropped.
|
|
17
|
+
*
|
|
18
|
+
* Pure (string[] in, string[] out) so the output is unit-tested.
|
|
19
|
+
*/
|
|
20
|
+
export interface DnsRecord {
|
|
21
|
+
type?: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
value?: string | null;
|
|
24
|
+
ttl?: number | string;
|
|
25
|
+
[extra: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export interface DnsInstructions {
|
|
28
|
+
domain?: string;
|
|
29
|
+
records?: DnsRecord[];
|
|
30
|
+
instructions?: string[];
|
|
31
|
+
[extra: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
/** True when the payload carries at least one record or instruction line. */
|
|
34
|
+
export declare function hasDnsInstructions(instr: unknown): instr is DnsInstructions;
|
|
35
|
+
/** Plain (uncoloured) lines describing every record and step, in backend order. */
|
|
36
|
+
export declare function renderDnsInstructions(instr: DnsInstructions): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Lines for the `details` object a failed `POST /domains/custom/{id}/verify`
|
|
39
|
+
* returns (`verify_dns_records` in solid-backend controllers/domains.py).
|
|
40
|
+
* Every key is shown — including ones added later (e.g. `stray_a_records`) —
|
|
41
|
+
* with `errors[]` expanded one per line.
|
|
42
|
+
*/
|
|
43
|
+
export declare function renderVerifyDetails(details: unknown): string[];
|
|
44
|
+
//# sourceMappingURL=dns-instructions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dns-instructions.d.ts","sourceRoot":"","sources":["../../src/lib/dns-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAWD,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAK3E;AAED,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,EAAE,CA4BtE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAmB9D"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DNS instructions + verification details — rendered from what the BACKEND
|
|
4
|
+
* says, never from a CLI-side guess.
|
|
5
|
+
*
|
|
6
|
+
* `POST /api/v1/domains/custom` (and `GET /api/v1/domains/custom` for an
|
|
7
|
+
* unverified domain) return `dns_instructions` built by
|
|
8
|
+
* solid-backend `models/domain.py::dns_instructions_for`:
|
|
9
|
+
*
|
|
10
|
+
* { domain, records: [{type, name, value, ttl, pending?}], instructions: [str] }
|
|
11
|
+
*
|
|
12
|
+
* An apex domain needs an A record + TXT `_solid-verify`; a subdomain needs a
|
|
13
|
+
* CNAME + TXT `_solid-verify.<label>`. The CLI used to print a hard-coded
|
|
14
|
+
* `CNAME → proxy.solidnumber.com` for everything, which is wrong for every
|
|
15
|
+
* apex domain (most registrars reject `CNAME @`). These helpers print the
|
|
16
|
+
* backend's records verbatim, and render any record/detail field they do not
|
|
17
|
+
* know about generically so a new backend field is shown, not dropped.
|
|
18
|
+
*
|
|
19
|
+
* Pure (string[] in, string[] out) so the output is unit-tested.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.hasDnsInstructions = hasDnsInstructions;
|
|
23
|
+
exports.renderDnsInstructions = renderDnsInstructions;
|
|
24
|
+
exports.renderVerifyDetails = renderVerifyDetails;
|
|
25
|
+
const KNOWN_RECORD_KEYS = new Set(['type', 'name', 'value', 'ttl']);
|
|
26
|
+
const KNOWN_INSTRUCTION_KEYS = new Set(['domain', 'records', 'instructions']);
|
|
27
|
+
function scalar(v) {
|
|
28
|
+
if (v === null || v === undefined)
|
|
29
|
+
return '(none)';
|
|
30
|
+
if (typeof v === 'string')
|
|
31
|
+
return v;
|
|
32
|
+
return JSON.stringify(v);
|
|
33
|
+
}
|
|
34
|
+
/** True when the payload carries at least one record or instruction line. */
|
|
35
|
+
function hasDnsInstructions(instr) {
|
|
36
|
+
if (!instr || typeof instr !== 'object')
|
|
37
|
+
return false;
|
|
38
|
+
const i = instr;
|
|
39
|
+
return (Array.isArray(i.records) && i.records.length > 0)
|
|
40
|
+
|| (Array.isArray(i.instructions) && i.instructions.length > 0);
|
|
41
|
+
}
|
|
42
|
+
/** Plain (uncoloured) lines describing every record and step, in backend order. */
|
|
43
|
+
function renderDnsInstructions(instr) {
|
|
44
|
+
const lines = [];
|
|
45
|
+
const records = Array.isArray(instr.records) ? instr.records : [];
|
|
46
|
+
if (records.length > 0) {
|
|
47
|
+
lines.push('Add these DNS records at your DNS provider:');
|
|
48
|
+
records.forEach((r, idx) => {
|
|
49
|
+
lines.push(` Record ${idx + 1}`);
|
|
50
|
+
lines.push(` Type: ${scalar(r.type)}`);
|
|
51
|
+
lines.push(` Name: ${scalar(r.name)}`);
|
|
52
|
+
lines.push(` Value: ${scalar(r.value)}`);
|
|
53
|
+
if (r.ttl !== undefined)
|
|
54
|
+
lines.push(` TTL: ${scalar(r.ttl)}`);
|
|
55
|
+
for (const [k, v] of Object.entries(r)) {
|
|
56
|
+
if (KNOWN_RECORD_KEYS.has(k))
|
|
57
|
+
continue;
|
|
58
|
+
lines.push(` ${k}: ${scalar(v)}`);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const steps = Array.isArray(instr.instructions) ? instr.instructions : [];
|
|
63
|
+
if (steps.length > 0) {
|
|
64
|
+
if (lines.length > 0)
|
|
65
|
+
lines.push('');
|
|
66
|
+
lines.push('Steps:');
|
|
67
|
+
for (const s of steps)
|
|
68
|
+
lines.push(` ${s}`);
|
|
69
|
+
}
|
|
70
|
+
for (const [k, v] of Object.entries(instr)) {
|
|
71
|
+
if (KNOWN_INSTRUCTION_KEYS.has(k))
|
|
72
|
+
continue;
|
|
73
|
+
lines.push(`${k}: ${scalar(v)}`);
|
|
74
|
+
}
|
|
75
|
+
return lines;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Lines for the `details` object a failed `POST /domains/custom/{id}/verify`
|
|
79
|
+
* returns (`verify_dns_records` in solid-backend controllers/domains.py).
|
|
80
|
+
* Every key is shown — including ones added later (e.g. `stray_a_records`) —
|
|
81
|
+
* with `errors[]` expanded one per line.
|
|
82
|
+
*/
|
|
83
|
+
function renderVerifyDetails(details) {
|
|
84
|
+
if (!details || typeof details !== 'object' || Array.isArray(details))
|
|
85
|
+
return [];
|
|
86
|
+
const lines = [];
|
|
87
|
+
const d = details;
|
|
88
|
+
for (const [k, v] of Object.entries(d)) {
|
|
89
|
+
if (k === 'errors')
|
|
90
|
+
continue;
|
|
91
|
+
if (Array.isArray(v)) {
|
|
92
|
+
lines.push(`${k}: ${v.length === 0 ? '(none)' : ''}`.trimEnd());
|
|
93
|
+
for (const item of v)
|
|
94
|
+
lines.push(` - ${scalar(item)}`);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
lines.push(`${k}: ${scalar(v)}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const errors = Array.isArray(d.errors) ? d.errors : [];
|
|
101
|
+
if (errors.length > 0) {
|
|
102
|
+
lines.push('errors:');
|
|
103
|
+
for (const e of errors)
|
|
104
|
+
lines.push(` - ${scalar(e)}`);
|
|
105
|
+
}
|
|
106
|
+
return lines;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=dns-instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dns-instructions.js","sourceRoot":"","sources":["../../src/lib/dns-instructions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;AA2BH,gDAKC;AAGD,sDA4BC;AAQD,kDAmBC;AAzED,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACpE,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,cA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SAAS,CAAC,CAAC;QACtB,KAAK,MAAM,CAAC,IAAI,MAAM;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/lib/esm-import.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.importESM = importESM;
|
|
|
8
8
|
* `await import('pkg')` into `require('pkg')`. For ESM-only packages (ora-style
|
|
9
9
|
* `"type": "module"` with no `require` export condition) that `require()` throws
|
|
10
10
|
* `ERR_REQUIRE_ESM` on Node < 20.19 — which is exactly what broke `solid audit`
|
|
11
|
-
* (lighthouse)
|
|
11
|
+
* (lighthouse) on older Node.
|
|
12
12
|
*
|
|
13
13
|
* Routing the dynamic import through a `Function` hides it from the TypeScript
|
|
14
14
|
* CommonJS transform, so a *real* ESM `import()` survives to runtime. Importing
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enumerate EVERY Solid# MCP provider an AI on this machine can reach — and
|
|
3
|
+
* decide which company each one will actually serve.
|
|
4
|
+
*
|
|
5
|
+
* ⛔ WHY THIS EXISTS — 2026-09-15, and it is not the bug we already fixed.
|
|
6
|
+
*
|
|
7
|
+
* `mcp-tenant-check.ts` answers "does the local API key match my session?".
|
|
8
|
+
* That was necessary and insufficient, because it can only see credentials that
|
|
9
|
+
* live in a FILE. The failure Adam hit has two providers loaded at once:
|
|
10
|
+
*
|
|
11
|
+
* claude.ai Solid# https://api.solidnumber.com/mcp/connector (account-level)
|
|
12
|
+
* solid npx -y @solidnumber/mcp (local stdio)
|
|
13
|
+
*
|
|
14
|
+
* The first is an account-level connector. Its token was minted on the OAuth
|
|
15
|
+
* consent screen and is pinned to the (user, company_id) captured there; it
|
|
16
|
+
* lives on the backend, NOT in ~/.claude.json. `readMcpApiKey` therefore
|
|
17
|
+
* returns null for it, `checkMcpTenant` returns null, and the old guard
|
|
18
|
+
* concluded "nothing to compare" — the quietest possible answer to the loudest
|
|
19
|
+
* possible problem.
|
|
20
|
+
*
|
|
21
|
+
* Measured on this machine, this session:
|
|
22
|
+
* ~/.solid/config.json company 61 (ANGL, adam@anglebuild.com) ← the CLI
|
|
23
|
+
* claude.ai Solid# company 1 (Solid-dev) ← the AI
|
|
24
|
+
* solid (local stdio) no credential at all — /auth/me 404s
|
|
25
|
+
*
|
|
26
|
+
* Three credentials; the one the agent actually uses is the one the CLI cannot
|
|
27
|
+
* touch. `solid switch` moves the JWT, re-login re-mints the local key, and the
|
|
28
|
+
* agent goes right on reporting company 1. There was no authority deciding
|
|
29
|
+
* which provider wins, so the AI picked, and it picked the remote one.
|
|
30
|
+
*
|
|
31
|
+
* ⛔ THE RULE THIS MODULE ENFORCES: two active Solid# providers is not a
|
|
32
|
+
* preference to resolve, it is a refusal. When we cannot prove which company an
|
|
33
|
+
* agent will act on, we say so and stop — we never launch with a reassuring
|
|
34
|
+
* line. A tenant mix-up that announces itself costs a minute; one that reads
|
|
35
|
+
* correct and coherent about the wrong business costs whatever the agent then
|
|
36
|
+
* writes.
|
|
37
|
+
*/
|
|
38
|
+
import { type McpClient } from './mcp-client-config';
|
|
39
|
+
/** Where a provider is configured — this decides who can change it. */
|
|
40
|
+
export type ProviderScope = 'account' | 'user' | 'project' | 'unknown';
|
|
41
|
+
/** How the provider is reached. */
|
|
42
|
+
export type ProviderTransport = 'stdio' | 'remote';
|
|
43
|
+
export interface SolidProvider {
|
|
44
|
+
/** Server name exactly as the client knows it (`claude mcp remove` needs it). */
|
|
45
|
+
name: string;
|
|
46
|
+
scope: ProviderScope;
|
|
47
|
+
transport: ProviderTransport;
|
|
48
|
+
/** Command line or URL, as reported. */
|
|
49
|
+
target: string;
|
|
50
|
+
/** Health string from `claude mcp list`, when it came from there. */
|
|
51
|
+
health?: string;
|
|
52
|
+
/** False when the client reported it as failed/pending — it serves nothing. */
|
|
53
|
+
active: boolean;
|
|
54
|
+
/** Config file this came from, when it came from a file. */
|
|
55
|
+
configPath?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Which client's config this entry belongs to.
|
|
58
|
+
*
|
|
59
|
+
* ⛔ REQUIRED FOR CORRECTNESS, NOT LABELLING. Every client names its server
|
|
60
|
+
* "solid", so a name is NOT a unique key across configs. Adam's machine had
|
|
61
|
+
* `solid` in BOTH Claude Desktop's config (a stale key on company 1) and
|
|
62
|
+
* ~/.claude.json (no key at all). Merging them by name attributed Desktop's
|
|
63
|
+
* company to the Claude Code entry and printed a company for a server that
|
|
64
|
+
* has no credential — a wrong answer produced by the very tool written to
|
|
65
|
+
* stop wrong answers.
|
|
66
|
+
*/
|
|
67
|
+
client?: McpClient;
|
|
68
|
+
/** Company this provider resolves to. null = we could not determine it. */
|
|
69
|
+
companyId: number | null;
|
|
70
|
+
companyName?: string;
|
|
71
|
+
/** Why companyId is null. Present ONLY when it is null. */
|
|
72
|
+
unresolved?: string;
|
|
73
|
+
/** True when no local action can re-point this provider. */
|
|
74
|
+
cliCanRepoint: boolean;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Is this MCP server one of ours?
|
|
78
|
+
*
|
|
79
|
+
* ⛔ Deliberately narrow. Matching /solid/ anywhere would claim "SolidWorks" or
|
|
80
|
+
* a customer's "solid-state" server and then refuse to launch over it — a false
|
|
81
|
+
* refusal trains people to pass --allow-tenant-mismatch by reflex, which
|
|
82
|
+
* disables the real check. Name must be `solid` as a word, or the target must
|
|
83
|
+
* name our package or our host.
|
|
84
|
+
*/
|
|
85
|
+
export declare function isSolidProvider(name: string, target: string): boolean;
|
|
86
|
+
interface ParsedLine {
|
|
87
|
+
name: string;
|
|
88
|
+
target: string;
|
|
89
|
+
health: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Parse `claude mcp list` stdout.
|
|
93
|
+
*
|
|
94
|
+
* The format is `name: target - health`, and BOTH separators are ambiguous:
|
|
95
|
+
* the target holds `://` and can hold ` - `. So we take the name up to the
|
|
96
|
+
* FIRST `: ` and the health after the LAST ` - `, which is the only split that
|
|
97
|
+
* survives `claude.ai Solid#: https://api.solidnumber.com/mcp/connector - ✔ Connected`.
|
|
98
|
+
*/
|
|
99
|
+
export declare function parseClaudeMcpList(stdout: string): ParsedLine[];
|
|
100
|
+
/** `Scope: claude.ai config` → 'account'. That line is the whole discriminator. */
|
|
101
|
+
export declare function parseScope(getStdout: string): ProviderScope;
|
|
102
|
+
/** A health string that means "this server is serving tools right now". */
|
|
103
|
+
export declare function isActiveHealth(health: string): boolean;
|
|
104
|
+
export interface EnumerateDeps {
|
|
105
|
+
apiUrl: string;
|
|
106
|
+
/** Override for tests. Returns stdout, or throws. */
|
|
107
|
+
runClaude?: (args: string[]) => Promise<string>;
|
|
108
|
+
/** Override for tests. */
|
|
109
|
+
readFileSync?: (p: string) => string;
|
|
110
|
+
existsSync?: (p: string) => boolean;
|
|
111
|
+
clients?: McpClient[];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Ask the `claude` CLI what IT loads. This is the only way to see an
|
|
115
|
+
* account-level connector: it is not in any file on this machine.
|
|
116
|
+
*
|
|
117
|
+
* Returns [] when `claude` is absent or errors — a missing binary is a normal
|
|
118
|
+
* state (Cursor-only machine), not a fault to surface.
|
|
119
|
+
*/
|
|
120
|
+
export declare function providersFromClaudeCli(deps: EnumerateDeps): Promise<SolidProvider[]>;
|
|
121
|
+
/**
|
|
122
|
+
* Solid# providers configured in client config FILES, with their key resolved
|
|
123
|
+
* to a company. Covers Cursor/Windsurf/Desktop, which have no `claude mcp list`.
|
|
124
|
+
*/
|
|
125
|
+
export declare function providersFromConfigFiles(deps: EnumerateDeps): Promise<SolidProvider[]>;
|
|
126
|
+
/**
|
|
127
|
+
* Every Solid# provider reachable from this machine, de-duplicated.
|
|
128
|
+
*
|
|
129
|
+
* When the same server appears both in `claude mcp list` and in a config file,
|
|
130
|
+
* we keep ONE entry and prefer the file's resolved company — the CLI read the
|
|
131
|
+
* actual credential there, where the CLI listing only knows a name.
|
|
132
|
+
*/
|
|
133
|
+
export declare function enumerateSolidProviders(deps: EnumerateDeps): Promise<SolidProvider[]>;
|
|
134
|
+
export type ProviderVerdict = 'ok' | 'none' | 'conflict' | 'mismatch' | 'unverified';
|
|
135
|
+
export interface ProviderAssessment {
|
|
136
|
+
verdict: ProviderVerdict;
|
|
137
|
+
providers: SolidProvider[];
|
|
138
|
+
active: SolidProvider[];
|
|
139
|
+
sessionCompanyId?: number;
|
|
140
|
+
/** One line stating the finding. */
|
|
141
|
+
headline: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Decide whether an AI may be launched.
|
|
145
|
+
*
|
|
146
|
+
* ⛔ ORDER MATTERS, AND IT IS NOT THE OBVIOUS ONE. `conflict` outranks
|
|
147
|
+
* `mismatch`: if two providers are live, a matching company on one of them
|
|
148
|
+
* proves nothing, because nothing guarantees the agent uses that one. Measured
|
|
149
|
+
* on this machine, the agent used the other one.
|
|
150
|
+
*/
|
|
151
|
+
export declare function assessProviders(providers: SolidProvider[], sessionCompanyId?: number): ProviderAssessment;
|
|
152
|
+
/**
|
|
153
|
+
* Render a verdict as operator-readable lines.
|
|
154
|
+
*
|
|
155
|
+
* ⛔ EVERY BRANCH ENDS IN A COMMAND OR A SETTING THE READER CAN ACT ON. The
|
|
156
|
+
* version of this that shipped told people their setup was fine, and the
|
|
157
|
+
* version before that said nothing at all. A diagnostic that names a problem
|
|
158
|
+
* without naming the fix just relocates the confusion.
|
|
159
|
+
*/
|
|
160
|
+
export declare function renderProviderVerdict(a: ProviderAssessment): string[];
|
|
161
|
+
export {};
|
|
162
|
+
//# sourceMappingURL=mcp-providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-providers.d.ts","sourceRoot":"","sources":["../../src/lib/mcp-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAMH,OAAO,EAA0C,KAAK,SAAS,E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