@ait-co/devtools 0.1.21 → 0.1.23
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.en.md +115 -5
- package/README.md +125 -5
- package/dist/in-app/index.d.ts +136 -0
- package/dist/in-app/index.d.ts.map +1 -0
- package/dist/in-app/index.js +163 -0
- package/dist/in-app/index.js.map +1 -0
- package/dist/mcp/cli.d.ts +20 -0
- package/dist/mcp/cli.d.ts.map +1 -0
- package/dist/mcp/cli.js +930 -0
- package/dist/mcp/cli.js.map +1 -0
- package/dist/mcp/server.d.ts +79 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +285 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/panel/index.d.ts.map +1 -1
- package/dist/panel/index.js +20 -4
- package/dist/panel/index.js.map +1 -1
- package/dist/unplugin/index.cjs +64 -20
- package/dist/unplugin/index.cjs.map +1 -1
- package/dist/unplugin/index.d.cts +11 -0
- package/dist/unplugin/index.d.cts.map +1 -1
- package/dist/unplugin/index.d.ts +11 -0
- package/dist/unplugin/index.d.ts.map +1 -1
- package/dist/unplugin/index.js +64 -20
- package/dist/unplugin/index.js.map +1 -1
- package/package.json +23 -2
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
//#region src/in-app/gate.ts
|
|
2
|
+
/**
|
|
3
|
+
* Pure function that evaluates the 3-layer debug activation gate.
|
|
4
|
+
*
|
|
5
|
+
* Has no side effects. All inputs are explicit. Returns a discriminated union
|
|
6
|
+
* so callers can pattern-match on `result.attach`.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const result = evaluateDebugGate({
|
|
11
|
+
* isDebugBuild: __DEBUG_BUILD__,
|
|
12
|
+
* searchParams: new URLSearchParams(window.location.search),
|
|
13
|
+
* });
|
|
14
|
+
* if (result.attach) {
|
|
15
|
+
* // Proceed to load Chii client
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
function evaluateDebugGate(input) {
|
|
20
|
+
if (!input.isDebugBuild) return {
|
|
21
|
+
attach: false,
|
|
22
|
+
reason: "build"
|
|
23
|
+
};
|
|
24
|
+
const deploymentId = input.searchParams.get("_deploymentId") ?? "";
|
|
25
|
+
if (deploymentId === "") return {
|
|
26
|
+
attach: false,
|
|
27
|
+
reason: "entry"
|
|
28
|
+
};
|
|
29
|
+
if (input.searchParams.get("debug") !== "1") return {
|
|
30
|
+
attach: false,
|
|
31
|
+
reason: "opt-in"
|
|
32
|
+
};
|
|
33
|
+
const relayRaw = input.searchParams.get("relay") ?? "";
|
|
34
|
+
if (relayRaw === "") return {
|
|
35
|
+
attach: false,
|
|
36
|
+
reason: "invalid-relay"
|
|
37
|
+
};
|
|
38
|
+
let relayUrl;
|
|
39
|
+
try {
|
|
40
|
+
relayUrl = new URL(relayRaw);
|
|
41
|
+
} catch {
|
|
42
|
+
return {
|
|
43
|
+
attach: false,
|
|
44
|
+
reason: "invalid-relay"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
if (relayUrl.protocol !== "wss:") return {
|
|
48
|
+
attach: false,
|
|
49
|
+
reason: "invalid-relay"
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
attach: true,
|
|
53
|
+
relayUrl: relayUrl.href,
|
|
54
|
+
deploymentId
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/in-app/attach.ts
|
|
59
|
+
/**
|
|
60
|
+
* In-app Chii target injection for the debug attach flow.
|
|
61
|
+
*
|
|
62
|
+
* Spec: docs/superpowers/specs/2026-05-18-in-app-debug-mcp.md
|
|
63
|
+
* "MCP attach" topology section — Phase 1 browser-side implementation.
|
|
64
|
+
*
|
|
65
|
+
* This module bridges the 3-layer gate result to a Chii `target.js` script
|
|
66
|
+
* injection. The Chii npm package is the relay SERVER — the in-app side is
|
|
67
|
+
* a plain `<script src="…/target.js">` pointing at the relay host. No chii
|
|
68
|
+
* npm dependency is needed here.
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* Converts a validated `wss:` relay URL into the Chii `target.js` script URL.
|
|
72
|
+
*
|
|
73
|
+
* Scheme is mapped `wss:` → `https:`. Host and port are preserved.
|
|
74
|
+
* Pathname is set to `/target.js` regardless of the relay path.
|
|
75
|
+
* Query params and hash from the relay URL are dropped — the target script
|
|
76
|
+
* URL is a static asset path on the same host.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* deriveTargetScriptUrl('wss://abc.trycloudflare.com/relay')
|
|
80
|
+
* // → 'https://abc.trycloudflare.com/target.js'
|
|
81
|
+
*
|
|
82
|
+
* deriveTargetScriptUrl('wss://h.example.com:9100/')
|
|
83
|
+
* // → 'https://h.example.com:9100/target.js'
|
|
84
|
+
*/
|
|
85
|
+
function deriveTargetScriptUrl(relayUrl) {
|
|
86
|
+
const u = new URL(relayUrl);
|
|
87
|
+
u.protocol = "https:";
|
|
88
|
+
u.pathname = "/target.js";
|
|
89
|
+
u.search = "";
|
|
90
|
+
u.hash = "";
|
|
91
|
+
return u.toString();
|
|
92
|
+
}
|
|
93
|
+
/** Module-level guard against double-injection within a page lifecycle. */
|
|
94
|
+
let attached = false;
|
|
95
|
+
/**
|
|
96
|
+
* Evaluates the 3-layer debug gate and, if the gate passes, injects the Chii
|
|
97
|
+
* `target.js` script into `document.head`.
|
|
98
|
+
*
|
|
99
|
+
* Idempotent — calling more than once is safe. The second call is a no-op if
|
|
100
|
+
* a script with the same `src` is already present in the document, and the
|
|
101
|
+
* module-level `attached` flag prevents redundant DOM queries after the first
|
|
102
|
+
* successful injection.
|
|
103
|
+
*
|
|
104
|
+
* Safe to call even if `document` is somehow unavailable (defensive boundary
|
|
105
|
+
* guard — in practice this always runs in a real WebView).
|
|
106
|
+
*
|
|
107
|
+
* @param gateResult - Optional pre-evaluated gate result for testability.
|
|
108
|
+
* Defaults to `checkDebugGate()` which reads the current page URL and the
|
|
109
|
+
* `__DEBUG_BUILD__` compile-time constant. Passing a custom value avoids
|
|
110
|
+
* the need to manipulate `window.location` in tests.
|
|
111
|
+
*/
|
|
112
|
+
function maybeAttach(gateResult = checkDebugGate()) {
|
|
113
|
+
if (!gateResult.attach) {
|
|
114
|
+
console.debug(`[@ait-co/devtools] debug attach skipped — gate blocked (reason: ${gateResult.reason})`);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (attached) return;
|
|
118
|
+
if (typeof document === "undefined") return;
|
|
119
|
+
const src = deriveTargetScriptUrl(gateResult.relayUrl);
|
|
120
|
+
if (document.querySelector(`script[src="${src}"]`) !== null) {
|
|
121
|
+
attached = true;
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const script = document.createElement("script");
|
|
125
|
+
script.src = src;
|
|
126
|
+
script.async = true;
|
|
127
|
+
(document.head ?? document.documentElement).appendChild(script);
|
|
128
|
+
attached = true;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/in-app/index.ts
|
|
132
|
+
/**
|
|
133
|
+
* @ait-co/devtools/in-app entry point.
|
|
134
|
+
*
|
|
135
|
+
* Spec: docs/superpowers/specs/2026-05-18-in-app-debug-mcp.md
|
|
136
|
+
*
|
|
137
|
+
* Phase 1 — gate + browser-side Chii target injection.
|
|
138
|
+
* WebSocket relay, QR/paste UI, and AI-host MCP bin are later phases that
|
|
139
|
+
* require real-device validation and are not included here.
|
|
140
|
+
*
|
|
141
|
+
* This thin entry reads `__DEBUG_BUILD__` and `window.location`, then calls
|
|
142
|
+
* the pure {@link evaluateDebugGate} function. All testable logic lives in
|
|
143
|
+
* `./gate.ts` and `./attach.ts`, not here.
|
|
144
|
+
*/
|
|
145
|
+
/**
|
|
146
|
+
* Evaluates the 3-layer debug activation gate against the current page URL.
|
|
147
|
+
*
|
|
148
|
+
* Returns the gate result. Callers can check `result.attach` to decide whether
|
|
149
|
+
* to proceed with debug surface attachment.
|
|
150
|
+
*
|
|
151
|
+
* This function reads `window.location` and the `__DEBUG_BUILD__` compile-time
|
|
152
|
+
* constant. It has no other side effects.
|
|
153
|
+
*/
|
|
154
|
+
function checkDebugGate() {
|
|
155
|
+
return evaluateDebugGate({
|
|
156
|
+
isDebugBuild: false,
|
|
157
|
+
searchParams: new URLSearchParams(window.location.search)
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
export { checkDebugGate, deriveTargetScriptUrl, evaluateDebugGate, maybeAttach };
|
|
162
|
+
|
|
163
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/in-app/gate.ts","../../src/in-app/attach.ts","../../src/in-app/index.ts"],"sourcesContent":["/**\n * 3-layer activation gate for the in-app debug surface.\n *\n * Spec: docs/superpowers/specs/2026-05-18-in-app-debug-mcp.md\n * \"3-layer activation gate\" — Phase 1 implementation (gate logic only).\n * Chii client, WebSocket transport, and QR UI are later phases.\n *\n * Decision matrix:\n *\n * build channel | _deploymentId | debug=1 | result\n * release | (any) | (any) | BLOCKED (Layer A — code absent via DCE)\n * dogfood | absent | (any) | BLOCKED (Layer B — entry gate)\n * dogfood | present | absent | BLOCKED (Layer C — opt-in gate)\n * dogfood | present | present | ATTACH\n */\n\n/** Shape returned when the gate allows attachment. */\nexport interface GateResultAttach {\n readonly attach: true;\n /** The validated `wss:` relay URL from the `relay` query param. */\n readonly relayUrl: string;\n /** The deployment ID extracted from the `_deploymentId` query param. */\n readonly deploymentId: string;\n}\n\n/** Shape returned when the gate blocks attachment, with a reason code. */\nexport interface GateResultBlocked {\n readonly attach: false;\n /**\n * - `'build'` Layer A: `__DEBUG_BUILD__` is false (release build).\n * - `'entry'` Layer B: `_deploymentId` param is absent or empty.\n * - `'opt-in'` Layer C: `debug=1` param is absent.\n * - `'invalid-relay'` Layer C: `relay` param is absent, empty, or not a `wss:` URL.\n */\n readonly reason: 'build' | 'entry' | 'opt-in' | 'invalid-relay';\n}\n\nexport type GateResult = GateResultAttach | GateResultBlocked;\n\n/**\n * Input for {@link evaluateDebugGate}.\n *\n * Keeping each field explicit makes the function trivially testable without\n * needing to manipulate `window.location`.\n */\nexport interface GateInput {\n /**\n * Whether this is a debug build. Corresponds to the `__DEBUG_BUILD__`\n * compile-time constant injected by tsdown.\n *\n * In source code consumed via `@ait-co/devtools/in-app`, the thin\n * `src/in-app/index.ts` entry reads `__DEBUG_BUILD__` and passes it here.\n * Tests supply it directly.\n */\n readonly isDebugBuild: boolean;\n\n /**\n * The URL search params to inspect for gate signals.\n *\n * Prefer `URLSearchParams` so callers can pass `new URLSearchParams(location.search)`\n * without coupling the pure function to `window`.\n *\n * Layer B open seam (spec open question 2): if the Toss SDK ever exposes\n * `getEntryScheme()` or a similar API that reliably signals a dogfood entry,\n * that signal should be checked before `_deploymentId` here. For now only the\n * `_deploymentId` query param fallback is implemented. Pass a custom\n * `URLSearchParams` to inject the SDK signal at the call site without\n * modifying this function.\n */\n readonly searchParams: URLSearchParams;\n}\n\n/**\n * Pure function that evaluates the 3-layer debug activation gate.\n *\n * Has no side effects. All inputs are explicit. Returns a discriminated union\n * so callers can pattern-match on `result.attach`.\n *\n * @example\n * ```ts\n * const result = evaluateDebugGate({\n * isDebugBuild: __DEBUG_BUILD__,\n * searchParams: new URLSearchParams(window.location.search),\n * });\n * if (result.attach) {\n * // Proceed to load Chii client\n * }\n * ```\n */\nexport function evaluateDebugGate(input: GateInput): GateResult {\n // Layer A — build-time gate.\n // When false, the entire in-app entry + Chii imports are dead-code-eliminated\n // by the bundler (tsdown/Rolldown constant folding). Release builds never\n // contain this branch at all.\n if (!input.isDebugBuild) {\n return { attach: false, reason: 'build' };\n }\n\n // Layer B — runtime entry scheme gate.\n // `_deploymentId` must be present and non-empty. The `intoss-private://`\n // scheme used for dogfood entries includes this param; general user entry\n // paths do not.\n //\n // Open seam (spec open question 2): if the Toss SDK exposes getEntryScheme()\n // or similar, that should be the 1st-priority signal checked here, with\n // `_deploymentId` as fallback. Extend this check at the call site by\n // pre-populating `searchParams` with the SDK signal, or add an optional\n // `entryScheme` field to `GateInput` in a later phase.\n const deploymentId = input.searchParams.get('_deploymentId') ?? '';\n if (deploymentId === '') {\n return { attach: false, reason: 'entry' };\n }\n\n // Layer C — explicit opt-in gate.\n // Require `debug=1` so that an operator who opens a dogfood URL by accident\n // does not inadvertently trigger the debug surface.\n const debugParam = input.searchParams.get('debug');\n if (debugParam !== '1') {\n return { attach: false, reason: 'opt-in' };\n }\n\n // Layer C continued — relay URL validation.\n // `relay=<wss-url>` must be present and must use the `wss:` scheme.\n // Plain `ws:` is rejected (no TLS). `http:`/`https:` are rejected.\n const relayRaw = input.searchParams.get('relay') ?? '';\n if (relayRaw === '') {\n return { attach: false, reason: 'invalid-relay' };\n }\n\n let relayUrl: URL;\n try {\n relayUrl = new URL(relayRaw);\n } catch {\n return { attach: false, reason: 'invalid-relay' };\n }\n\n if (relayUrl.protocol !== 'wss:') {\n return { attach: false, reason: 'invalid-relay' };\n }\n\n return { attach: true, relayUrl: relayUrl.href, deploymentId };\n}\n","/**\n * In-app Chii target injection for the debug attach flow.\n *\n * Spec: docs/superpowers/specs/2026-05-18-in-app-debug-mcp.md\n * \"MCP attach\" topology section — Phase 1 browser-side implementation.\n *\n * This module bridges the 3-layer gate result to a Chii `target.js` script\n * injection. The Chii npm package is the relay SERVER — the in-app side is\n * a plain `<script src=\"…/target.js\">` pointing at the relay host. No chii\n * npm dependency is needed here.\n */\n\nimport { checkDebugGate, type GateResult } from './index.js';\n\n/**\n * Converts a validated `wss:` relay URL into the Chii `target.js` script URL.\n *\n * Scheme is mapped `wss:` → `https:`. Host and port are preserved.\n * Pathname is set to `/target.js` regardless of the relay path.\n * Query params and hash from the relay URL are dropped — the target script\n * URL is a static asset path on the same host.\n *\n * @example\n * deriveTargetScriptUrl('wss://abc.trycloudflare.com/relay')\n * // → 'https://abc.trycloudflare.com/target.js'\n *\n * deriveTargetScriptUrl('wss://h.example.com:9100/')\n * // → 'https://h.example.com:9100/target.js'\n */\nexport function deriveTargetScriptUrl(relayUrl: string): string {\n const u = new URL(relayUrl);\n u.protocol = 'https:';\n u.pathname = '/target.js';\n u.search = '';\n u.hash = '';\n return u.toString();\n}\n\n/** Module-level guard against double-injection within a page lifecycle. */\nlet attached = false;\n\n/**\n * Evaluates the 3-layer debug gate and, if the gate passes, injects the Chii\n * `target.js` script into `document.head`.\n *\n * Idempotent — calling more than once is safe. The second call is a no-op if\n * a script with the same `src` is already present in the document, and the\n * module-level `attached` flag prevents redundant DOM queries after the first\n * successful injection.\n *\n * Safe to call even if `document` is somehow unavailable (defensive boundary\n * guard — in practice this always runs in a real WebView).\n *\n * @param gateResult - Optional pre-evaluated gate result for testability.\n * Defaults to `checkDebugGate()` which reads the current page URL and the\n * `__DEBUG_BUILD__` compile-time constant. Passing a custom value avoids\n * the need to manipulate `window.location` in tests.\n */\nexport function maybeAttach(gateResult: GateResult = checkDebugGate()): void {\n if (!gateResult.attach) {\n console.debug(\n `[@ait-co/devtools] debug attach skipped — gate blocked (reason: ${gateResult.reason})`,\n );\n return;\n }\n\n // Guard against double-injection across repeated calls.\n if (attached) {\n return;\n }\n\n // Defensive: if document is not available (unusual, but possible in some\n // SSR-adjacent edge cases), bail silently rather than throwing.\n if (typeof document === 'undefined') {\n return;\n }\n\n const src = deriveTargetScriptUrl(gateResult.relayUrl);\n\n // Also guard against a script with the same src already in the DOM\n // (e.g. injected by a different code path or a page reload within SPA).\n const existing = document.querySelector<HTMLScriptElement>(`script[src=\"${src}\"]`);\n if (existing !== null) {\n attached = true;\n return;\n }\n\n const script = document.createElement('script');\n script.src = src;\n script.async = true;\n (document.head ?? document.documentElement).appendChild(script);\n\n attached = true;\n}\n","/**\n * @ait-co/devtools/in-app entry point.\n *\n * Spec: docs/superpowers/specs/2026-05-18-in-app-debug-mcp.md\n *\n * Phase 1 — gate + browser-side Chii target injection.\n * WebSocket relay, QR/paste UI, and AI-host MCP bin are later phases that\n * require real-device validation and are not included here.\n *\n * This thin entry reads `__DEBUG_BUILD__` and `window.location`, then calls\n * the pure {@link evaluateDebugGate} function. All testable logic lives in\n * `./gate.ts` and `./attach.ts`, not here.\n */\n\nimport { evaluateDebugGate, type GateResult } from './gate.js';\n\nexport { deriveTargetScriptUrl, maybeAttach } from './attach.js';\nexport type { GateInput, GateResult, GateResultAttach, GateResultBlocked } from './gate.js';\nexport { evaluateDebugGate } from './gate.js';\n\n/**\n * Evaluates the 3-layer debug activation gate against the current page URL.\n *\n * Returns the gate result. Callers can check `result.attach` to decide whether\n * to proceed with debug surface attachment.\n *\n * This function reads `window.location` and the `__DEBUG_BUILD__` compile-time\n * constant. It has no other side effects.\n */\nexport function checkDebugGate(): GateResult {\n return evaluateDebugGate({\n isDebugBuild: __DEBUG_BUILD__,\n searchParams: new URLSearchParams(window.location.search),\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyFA,SAAgB,kBAAkB,OAA8B;AAK9D,KAAI,CAAC,MAAM,aACT,QAAO;EAAE,QAAQ;EAAO,QAAQ;EAAS;CAa3C,MAAM,eAAe,MAAM,aAAa,IAAI,gBAAgB,IAAI;AAChE,KAAI,iBAAiB,GACnB,QAAO;EAAE,QAAQ;EAAO,QAAQ;EAAS;AAO3C,KADmB,MAAM,aAAa,IAAI,QAAQ,KAC/B,IACjB,QAAO;EAAE,QAAQ;EAAO,QAAQ;EAAU;CAM5C,MAAM,WAAW,MAAM,aAAa,IAAI,QAAQ,IAAI;AACpD,KAAI,aAAa,GACf,QAAO;EAAE,QAAQ;EAAO,QAAQ;EAAiB;CAGnD,IAAI;AACJ,KAAI;AACF,aAAW,IAAI,IAAI,SAAS;SACtB;AACN,SAAO;GAAE,QAAQ;GAAO,QAAQ;GAAiB;;AAGnD,KAAI,SAAS,aAAa,OACxB,QAAO;EAAE,QAAQ;EAAO,QAAQ;EAAiB;AAGnD,QAAO;EAAE,QAAQ;EAAM,UAAU,SAAS;EAAM;EAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/GhE,SAAgB,sBAAsB,UAA0B;CAC9D,MAAM,IAAI,IAAI,IAAI,SAAS;AAC3B,GAAE,WAAW;AACb,GAAE,WAAW;AACb,GAAE,SAAS;AACX,GAAE,OAAO;AACT,QAAO,EAAE,UAAU;;;AAIrB,IAAI,WAAW;;;;;;;;;;;;;;;;;;AAmBf,SAAgB,YAAY,aAAyB,gBAAgB,EAAQ;AAC3E,KAAI,CAAC,WAAW,QAAQ;AACtB,UAAQ,MACN,mEAAmE,WAAW,OAAO,GACtF;AACD;;AAIF,KAAI,SACF;AAKF,KAAI,OAAO,aAAa,YACtB;CAGF,MAAM,MAAM,sBAAsB,WAAW,SAAS;AAKtD,KADiB,SAAS,cAAiC,eAAe,IAAI,IAAI,KACjE,MAAM;AACrB,aAAW;AACX;;CAGF,MAAM,SAAS,SAAS,cAAc,SAAS;AAC/C,QAAO,MAAM;AACb,QAAO,QAAQ;AACf,EAAC,SAAS,QAAQ,SAAS,iBAAiB,YAAY,OAAO;AAE/D,YAAW;;;;;;;;;;;;;;;;;;;;;;;;;;AC/Db,SAAgB,iBAA6B;AAC3C,QAAO,kBAAkB;EACvB,cAAA;EACA,cAAc,IAAI,gBAAgB,OAAO,SAAS,OAAO;EAC1D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/mcp/cli.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* `devtools-mcp` bin entry.
|
|
5
|
+
*
|
|
6
|
+
* Single bin, two transports selected by `--mode`:
|
|
7
|
+
* - (default, no flag) debug mode — CDP/Chii relay + cloudflared quick tunnel.
|
|
8
|
+
* Attach a running mini-app (real Toss WebView or a browser) and read its
|
|
9
|
+
* console + network over CDP without a human watching a phone.
|
|
10
|
+
* - `--mode=dev` — dev mode — reads the live browser mock state from a running
|
|
11
|
+
* Vite dev server (the devtools#130 `devtools_get_mock_state` surface).
|
|
12
|
+
*
|
|
13
|
+
* Node-only stdio process.
|
|
14
|
+
*/
|
|
15
|
+
type Mode = 'debug' | 'dev';
|
|
16
|
+
/** Parses `--mode=<value>` / `--mode <value>` from argv; default `debug`. */
|
|
17
|
+
declare function parseMode(argv: readonly string[]): Mode;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { parseMode };
|
|
20
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","names":[],"sources":["../../src/mcp/cli.ts"],"mappings":";;;;;;;AAsBA;;;;;;;KAHK,IAAA;;iBAGW,SAAA,CAAU,IAAA,sBAA0B,IAAA"}
|