@happyvertical/smrt-dev-mcp 0.47.2 → 0.49.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/AGENTS.md +7 -9
- package/README.md +88 -66
- package/dist/dev-plane.d.ts +48 -0
- package/dist/dev-plane.d.ts.map +1 -0
- package/dist/dev-plane.js +211 -0
- package/dist/dev-plane.js.map +1 -0
- package/dist/http-TeoaK9Xr.js +168 -0
- package/dist/http-TeoaK9Xr.js.map +1 -0
- package/dist/http.d.ts +1 -0
- package/dist/http.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -850
- package/dist/index.js.map +1 -1
- package/dist/knowledge/index.d.ts +27 -1
- package/dist/knowledge/index.d.ts.map +1 -1
- package/dist/{knowledge-CY6sQzpj.js → knowledge-BOsSAdPo.js} +81 -713
- package/dist/knowledge-BOsSAdPo.js.map +1 -0
- package/dist/knowledge.js +2 -2
- package/dist/observation-VJgHaPps.js +802 -0
- package/dist/observation-VJgHaPps.js.map +1 -0
- package/dist/runtime.d.ts +21 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +18 -0
- package/dist/runtime.js.map +1 -0
- package/dist/tool-catalog-Zl-bcimC.js +643 -0
- package/dist/tool-catalog-Zl-bcimC.js.map +1 -0
- package/dist/tool-catalog.d.ts.map +1 -1
- package/dist/tools/introspect-project.d.ts +8 -0
- package/dist/tools/introspect-project.d.ts.map +1 -1
- package/dist/tools/runtime/boot.d.ts +10 -0
- package/dist/tools/runtime/boot.d.ts.map +1 -1
- package/dist/tools/runtime/connection.d.ts +19 -0
- package/dist/tools/runtime/connection.d.ts.map +1 -1
- package/dist/tools/runtime/observation.d.ts +12 -0
- package/dist/tools/runtime/observation.d.ts.map +1 -1
- package/dist/tools/runtime/tools.d.ts.map +1 -1
- package/package.json +13 -5
- package/skills/smrt-code-review/SKILL.md +1 -1
- package/dist/knowledge-CY6sQzpj.js.map +0 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { n as TOOLS } from "./tool-catalog-Zl-bcimC.js";
|
|
2
|
+
import { c as runtimeMigrationStatus, d as runtimeScheduleHealth, l as runtimeRecentChanges, m as bootRuntime, n as runtimeRegistry, o as runtimeDispatchHealth, r as runtimeSchemaDiff, s as runtimeJobHealth, t as runtimeObject, u as runtimeRegistryDrift } from "./observation-VJgHaPps.js";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { Server, createMcpHandler } from "@modelcontextprotocol/server";
|
|
6
|
+
import { dirname, join } from "node:path";
|
|
7
|
+
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
8
|
+
import { createServer } from "node:http";
|
|
9
|
+
import { localhostHostValidation, localhostOriginValidation, toNodeHandler } from "@modelcontextprotocol/node";
|
|
10
|
+
//#region src/server-info.ts
|
|
11
|
+
var SERVER_NAME = "smrt-dev-mcp";
|
|
12
|
+
function readPackageVersion() {
|
|
13
|
+
try {
|
|
14
|
+
const packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
|
|
15
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
16
|
+
return typeof packageJson.version === "string" ? packageJson.version : "0.0.0";
|
|
17
|
+
} catch {
|
|
18
|
+
return "0.0.0";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
var SERVER_VERSION = readPackageVersion();
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/http.ts
|
|
24
|
+
/**
|
|
25
|
+
* Standalone Level 2 runtime dev-plane host (#1831).
|
|
26
|
+
*
|
|
27
|
+
* Serves a *positive* read-only tool catalog over the stateless 2026-07-28
|
|
28
|
+
* Streamable HTTP transport (#2147): `createMcpHandler` with `legacy: 'reject'`
|
|
29
|
+
* and `maxSubscriptions: 0`, adapted to Node with `toNodeHandler`. No SSE,
|
|
30
|
+
* no session header, no sticky routing.
|
|
31
|
+
*
|
|
32
|
+
* Security boundary (development only):
|
|
33
|
+
* - binds loopback only; SDK localhost Host/Origin validation runs first;
|
|
34
|
+
* - every request needs `Authorization: Bearer <token>` (constant-time
|
|
35
|
+
* compare) — from `SMRT_DEV_MCP_TOKEN` or minted per process;
|
|
36
|
+
* - no authenticated principal exists here, so scope stays fail-closed
|
|
37
|
+
* global-only exactly as in Level 1;
|
|
38
|
+
* - the catalog never includes generated CRUD, custom actions, `do()`, or
|
|
39
|
+
* tool-backed `is()`.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* The complete Level 2 catalog. A tool is exposed over HTTP only if it is
|
|
43
|
+
* named here; the static stdio catalog is deliberately not mounted.
|
|
44
|
+
*/
|
|
45
|
+
var RUNTIME_HTTP_TOOL_NAMES = [
|
|
46
|
+
"runtime-registry",
|
|
47
|
+
"runtime-object",
|
|
48
|
+
"runtime-schema-diff",
|
|
49
|
+
"migration-status",
|
|
50
|
+
"job-health",
|
|
51
|
+
"schedule-health",
|
|
52
|
+
"dispatch-health",
|
|
53
|
+
"recent-changes",
|
|
54
|
+
"registry-drift"
|
|
55
|
+
];
|
|
56
|
+
var RUNTIME_HTTP_HANDLERS = {
|
|
57
|
+
"runtime-registry": (args) => runtimeRegistry(args),
|
|
58
|
+
"runtime-object": (args) => runtimeObject(args),
|
|
59
|
+
"runtime-schema-diff": (args) => runtimeSchemaDiff(args),
|
|
60
|
+
"migration-status": (args) => runtimeMigrationStatus(args),
|
|
61
|
+
"job-health": (args) => runtimeJobHealth(args),
|
|
62
|
+
"schedule-health": (args) => runtimeScheduleHealth(args),
|
|
63
|
+
"dispatch-health": (args) => runtimeDispatchHealth(args),
|
|
64
|
+
"recent-changes": (args) => runtimeRecentChanges(args),
|
|
65
|
+
"registry-drift": (args) => runtimeRegistryDrift(args)
|
|
66
|
+
};
|
|
67
|
+
/** Catalog definitions for the HTTP plane, in catalog order. */
|
|
68
|
+
function runtimeHttpTools() {
|
|
69
|
+
const names = new Set(RUNTIME_HTTP_TOOL_NAMES);
|
|
70
|
+
return TOOLS.filter((tool) => names.has(tool.name));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Build a fresh protocol server per request (stateless transport contract).
|
|
74
|
+
* `projectRoot` is fixed at host start; per-request `projectPath` arguments
|
|
75
|
+
* are ignored so a client cannot re-point the booted process.
|
|
76
|
+
*/
|
|
77
|
+
function createRuntimeProtocolServer(projectRoot) {
|
|
78
|
+
const server = new Server({
|
|
79
|
+
name: `${SERVER_NAME}-runtime`,
|
|
80
|
+
version: SERVER_VERSION
|
|
81
|
+
}, { capabilities: { tools: {} } });
|
|
82
|
+
server.setRequestHandler("tools/list", async () => ({ tools: runtimeHttpTools() }));
|
|
83
|
+
server.setRequestHandler("tools/call", async (request) => {
|
|
84
|
+
const name = request.params.name;
|
|
85
|
+
const handler = RUNTIME_HTTP_HANDLERS[name];
|
|
86
|
+
if (typeof handler !== "function") throw new Error(`Unknown runtime tool: ${name}`);
|
|
87
|
+
const { projectPath: _ignored, ...args } = request.params.arguments ?? {};
|
|
88
|
+
const result = await handler({
|
|
89
|
+
...args,
|
|
90
|
+
projectPath: projectRoot
|
|
91
|
+
});
|
|
92
|
+
return {
|
|
93
|
+
content: [{
|
|
94
|
+
type: "text",
|
|
95
|
+
text: JSON.stringify(result, null, 2)
|
|
96
|
+
}],
|
|
97
|
+
structuredContent: result
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
return server;
|
|
101
|
+
}
|
|
102
|
+
var LOOPBACK_HOSTS = /* @__PURE__ */ new Set([
|
|
103
|
+
"127.0.0.1",
|
|
104
|
+
"localhost",
|
|
105
|
+
"::1"
|
|
106
|
+
]);
|
|
107
|
+
function bearerMatches(header, token) {
|
|
108
|
+
if (!header?.startsWith("Bearer ")) return false;
|
|
109
|
+
const presented = Buffer.from(header.slice(7));
|
|
110
|
+
const expected = Buffer.from(token);
|
|
111
|
+
return presented.length === expected.length && timingSafeEqual(presented, expected);
|
|
112
|
+
}
|
|
113
|
+
function deny(res, status, message) {
|
|
114
|
+
res.statusCode = status;
|
|
115
|
+
res.setHeader("content-type", "application/json");
|
|
116
|
+
if (status === 401) res.setHeader("www-authenticate", "Bearer realm=\"smrt-dev-mcp runtime\"");
|
|
117
|
+
res.end(JSON.stringify({ error: message }));
|
|
118
|
+
}
|
|
119
|
+
/** Start the Level 2 host. Boots the confined runtime before listening. */
|
|
120
|
+
async function startRuntimeHttpHost(options = {}) {
|
|
121
|
+
const host = options.host ?? "127.0.0.1";
|
|
122
|
+
if (!LOOPBACK_HOSTS.has(host)) throw new Error("The runtime dev-plane binds loopback only (127.0.0.1, localhost, ::1).");
|
|
123
|
+
const path = options.path ?? "/mcp";
|
|
124
|
+
const token = options.token ?? process.env.SMRT_DEV_MCP_TOKEN?.trim() ?? randomBytes(24).toString("base64url");
|
|
125
|
+
if (!token) throw new Error("SMRT_DEV_MCP_TOKEN must not be empty.");
|
|
126
|
+
const projectRoot = options.projectRoot ?? process.cwd();
|
|
127
|
+
const boot = await bootRuntime({ projectRoot });
|
|
128
|
+
const mcp = toNodeHandler(createMcpHandler(() => createRuntimeProtocolServer(projectRoot), {
|
|
129
|
+
legacy: "reject",
|
|
130
|
+
maxSubscriptions: 0
|
|
131
|
+
}));
|
|
132
|
+
const hostGuard = localhostHostValidation();
|
|
133
|
+
const originGuard = localhostOriginValidation();
|
|
134
|
+
const httpServer = createServer((req, res) => {
|
|
135
|
+
if (!hostGuard(req, res)) return;
|
|
136
|
+
if (!originGuard(req, res)) return;
|
|
137
|
+
if (new URL(req.url ?? "/", "http://localhost").pathname !== path) {
|
|
138
|
+
deny(res, 404, "not found");
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (!bearerMatches(req.headers.authorization, token)) {
|
|
142
|
+
deny(res, 401, "missing or invalid bearer token");
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
mcp(req, res);
|
|
146
|
+
});
|
|
147
|
+
await new Promise((resolve, reject) => {
|
|
148
|
+
httpServer.once("error", reject);
|
|
149
|
+
httpServer.listen(options.port ?? 0, host, () => {
|
|
150
|
+
httpServer.off("error", reject);
|
|
151
|
+
resolve();
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
const address = httpServer.address();
|
|
155
|
+
return {
|
|
156
|
+
url: `http://${address.family === "IPv6" ? `[${address.address}]` : address.address}:${address.port}${path}`,
|
|
157
|
+
token,
|
|
158
|
+
boot,
|
|
159
|
+
close: () => new Promise((resolve, reject) => {
|
|
160
|
+
httpServer.closeAllConnections?.();
|
|
161
|
+
httpServer.close((error) => error ? reject(error) : resolve());
|
|
162
|
+
})
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
export { SERVER_VERSION as i, startRuntimeHttpHost as n, SERVER_NAME as r, bearerMatches as t };
|
|
167
|
+
|
|
168
|
+
//# sourceMappingURL=http-TeoaK9Xr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-TeoaK9Xr.js","names":[],"sources":["../src/server-info.ts","../src/http.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nexport const SERVER_NAME = 'smrt-dev-mcp';\n\nfunction readPackageVersion(): string {\n try {\n const packageRoot = dirname(fileURLToPath(import.meta.url));\n const packageJsonPath = join(packageRoot, '..', 'package.json');\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8')) as {\n version?: unknown;\n };\n return typeof packageJson.version === 'string'\n ? packageJson.version\n : '0.0.0';\n } catch {\n return '0.0.0';\n }\n}\n\nexport const SERVER_VERSION = readPackageVersion();\n","/**\n * Standalone Level 2 runtime dev-plane host (#1831).\n *\n * Serves a *positive* read-only tool catalog over the stateless 2026-07-28\n * Streamable HTTP transport (#2147): `createMcpHandler` with `legacy: 'reject'`\n * and `maxSubscriptions: 0`, adapted to Node with `toNodeHandler`. No SSE,\n * no session header, no sticky routing.\n *\n * Security boundary (development only):\n * - binds loopback only; SDK localhost Host/Origin validation runs first;\n * - every request needs `Authorization: Bearer <token>` (constant-time\n * compare) — from `SMRT_DEV_MCP_TOKEN` or minted per process;\n * - no authenticated principal exists here, so scope stays fail-closed\n * global-only exactly as in Level 1;\n * - the catalog never includes generated CRUD, custom actions, `do()`, or\n * tool-backed `is()`.\n */\n\nimport { randomBytes, timingSafeEqual } from 'node:crypto';\nimport {\n createServer as createHttpServer,\n type Server as HttpServer,\n type IncomingMessage,\n type ServerResponse,\n} from 'node:http';\nimport type { AddressInfo } from 'node:net';\nimport {\n localhostHostValidation,\n localhostOriginValidation,\n toNodeHandler,\n} from '@modelcontextprotocol/node';\nimport type { CallToolResult } from '@modelcontextprotocol/server';\nimport { createMcpHandler, Server } from '@modelcontextprotocol/server';\nimport { SERVER_NAME, SERVER_VERSION } from './server-info.js';\nimport { TOOLS } from './tool-catalog.js';\nimport { bootRuntime, type RuntimeBoot } from './tools/runtime/boot.js';\nimport {\n runtimeObject,\n runtimeRegistry,\n runtimeSchemaDiff,\n} from './tools/runtime/observation.js';\nimport {\n runtimeDispatchHealth,\n runtimeJobHealth,\n runtimeMigrationStatus,\n runtimeRecentChanges,\n runtimeRegistryDrift,\n runtimeScheduleHealth,\n} from './tools/runtime/tools.js';\n\n/**\n * The complete Level 2 catalog. A tool is exposed over HTTP only if it is\n * named here; the static stdio catalog is deliberately not mounted.\n */\nexport const RUNTIME_HTTP_TOOL_NAMES = [\n 'runtime-registry',\n 'runtime-object',\n 'runtime-schema-diff',\n 'migration-status',\n 'job-health',\n 'schedule-health',\n 'dispatch-health',\n 'recent-changes',\n 'registry-drift',\n] as const;\n\nexport type RuntimeHttpToolName = (typeof RUNTIME_HTTP_TOOL_NAMES)[number];\n\nconst RUNTIME_HTTP_HANDLERS: Record<\n RuntimeHttpToolName,\n (args: Record<string, unknown>) => Promise<unknown>\n> = {\n 'runtime-registry': (args) => runtimeRegistry(args as never),\n 'runtime-object': (args) => runtimeObject(args as never),\n 'runtime-schema-diff': (args) => runtimeSchemaDiff(args as never),\n 'migration-status': (args) => runtimeMigrationStatus(args as never),\n 'job-health': (args) => runtimeJobHealth(args as never),\n 'schedule-health': (args) => runtimeScheduleHealth(args as never),\n 'dispatch-health': (args) => runtimeDispatchHealth(args as never),\n 'recent-changes': (args) => runtimeRecentChanges(args as never),\n 'registry-drift': (args) => runtimeRegistryDrift(args as never),\n};\n\n/** Catalog definitions for the HTTP plane, in catalog order. */\nexport function runtimeHttpTools() {\n const names = new Set<string>(RUNTIME_HTTP_TOOL_NAMES);\n return TOOLS.filter((tool) => names.has(tool.name));\n}\n\n/**\n * Build a fresh protocol server per request (stateless transport contract).\n * `projectRoot` is fixed at host start; per-request `projectPath` arguments\n * are ignored so a client cannot re-point the booted process.\n */\nexport function createRuntimeProtocolServer(projectRoot: string): Server {\n const server = new Server(\n { name: `${SERVER_NAME}-runtime`, version: SERVER_VERSION },\n { capabilities: { tools: {} } },\n );\n server.setRequestHandler('tools/list', async () => ({\n tools: runtimeHttpTools(),\n }));\n server.setRequestHandler('tools/call', async (request) => {\n const name = request.params.name as string;\n const handler = (RUNTIME_HTTP_HANDLERS as Record<string, unknown>)[name];\n if (typeof handler !== 'function') {\n throw new Error(`Unknown runtime tool: ${name}`);\n }\n const { projectPath: _ignored, ...args } = (request.params.arguments ??\n {}) as Record<string, unknown>;\n const result = await (\n handler as (a: Record<string, unknown>) => Promise<unknown>\n )({ ...args, projectPath: projectRoot });\n const text = JSON.stringify(result, null, 2);\n return {\n content: [{ type: 'text', text }],\n structuredContent: result as Record<string, unknown>,\n } satisfies CallToolResult;\n });\n return server;\n}\n\nexport interface RuntimeHttpHostOptions {\n projectRoot?: string;\n /** Loopback interface only; anything else is refused at startup. */\n host?: '127.0.0.1' | 'localhost' | '::1';\n /** `0` (default) picks a free port. */\n port?: number;\n /** Bearer token; defaults to `SMRT_DEV_MCP_TOKEN` or a per-process random token. */\n token?: string;\n /** Path the MCP endpoint is mounted on (default `/mcp`). */\n path?: string;\n}\n\nexport interface RuntimeHttpHost {\n url: string;\n token: string;\n boot: RuntimeBoot;\n close(): Promise<void>;\n}\n\nconst LOOPBACK_HOSTS = new Set(['127.0.0.1', 'localhost', '::1']);\n\nexport function bearerMatches(\n header: string | undefined,\n token: string,\n): boolean {\n if (!header?.startsWith('Bearer ')) return false;\n const presented = Buffer.from(header.slice('Bearer '.length));\n const expected = Buffer.from(token);\n return (\n presented.length === expected.length && timingSafeEqual(presented, expected)\n );\n}\n\nfunction deny(res: ServerResponse, status: number, message: string): void {\n res.statusCode = status;\n res.setHeader('content-type', 'application/json');\n if (status === 401) {\n res.setHeader('www-authenticate', 'Bearer realm=\"smrt-dev-mcp runtime\"');\n }\n res.end(JSON.stringify({ error: message }));\n}\n\n/** Start the Level 2 host. Boots the confined runtime before listening. */\nexport async function startRuntimeHttpHost(\n options: RuntimeHttpHostOptions = {},\n): Promise<RuntimeHttpHost> {\n const host = options.host ?? '127.0.0.1';\n if (!LOOPBACK_HOSTS.has(host)) {\n throw new Error(\n 'The runtime dev-plane binds loopback only (127.0.0.1, localhost, ::1).',\n );\n }\n const path = options.path ?? '/mcp';\n const token =\n options.token ??\n process.env.SMRT_DEV_MCP_TOKEN?.trim() ??\n randomBytes(24).toString('base64url');\n if (!token) {\n throw new Error('SMRT_DEV_MCP_TOKEN must not be empty.');\n }\n const projectRoot = options.projectRoot ?? process.cwd();\n const boot = await bootRuntime({ projectRoot });\n\n const mcp = toNodeHandler(\n createMcpHandler(() => createRuntimeProtocolServer(projectRoot), {\n legacy: 'reject',\n maxSubscriptions: 0,\n }),\n );\n const hostGuard = localhostHostValidation();\n const originGuard = localhostOriginValidation();\n\n const httpServer: HttpServer = createHttpServer(\n (req: IncomingMessage, res: ServerResponse) => {\n // Guards answer and end the response themselves when they return false.\n if (!hostGuard(req, res)) return;\n if (!originGuard(req, res)) return;\n const url = new URL(req.url ?? '/', 'http://localhost');\n if (url.pathname !== path) {\n deny(res, 404, 'not found');\n return;\n }\n if (!bearerMatches(req.headers.authorization, token)) {\n deny(res, 401, 'missing or invalid bearer token');\n return;\n }\n void mcp(req, res);\n },\n );\n\n await new Promise<void>((resolve, reject) => {\n httpServer.once('error', reject);\n httpServer.listen(options.port ?? 0, host, () => {\n httpServer.off('error', reject);\n resolve();\n });\n });\n const address = httpServer.address() as AddressInfo;\n const urlHost =\n address.family === 'IPv6' ? `[${address.address}]` : address.address;\n return {\n url: `http://${urlHost}:${address.port}${path}`,\n token,\n boot,\n close: () =>\n new Promise<void>((resolve, reject) => {\n httpServer.closeAllConnections?.();\n httpServer.close((error) => (error ? reject(error) : resolve()));\n }),\n };\n}\n"],"mappings":";;;;;;;;;;AAIA,IAAa,cAAc;AAE3B,SAAS,qBAA6B;CACpC,IAAI;EAEF,MAAM,kBAAkB,KADJ,QAAQ,cAAc,OAAO,KAAK,GAAG,CAC5B,GAAa,MAAM,cAAc;EAC9D,MAAM,cAAc,KAAK,MAAM,aAAa,iBAAiB,OAAO,CAAC;EAGrE,OAAO,OAAO,YAAY,YAAY,WAClC,YAAY,UACZ;CACN,QAAQ;EACN,OAAO;CACT;AACF;AAEA,IAAa,iBAAiB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;ACiCjD,IAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,IAAM,wBAGF;CACF,qBAAqB,SAAS,gBAAgB,IAAa;CAC3D,mBAAmB,SAAS,cAAc,IAAa;CACvD,wBAAwB,SAAS,kBAAkB,IAAa;CAChE,qBAAqB,SAAS,uBAAuB,IAAa;CAClE,eAAe,SAAS,iBAAiB,IAAa;CACtD,oBAAoB,SAAS,sBAAsB,IAAa;CAChE,oBAAoB,SAAS,sBAAsB,IAAa;CAChE,mBAAmB,SAAS,qBAAqB,IAAa;CAC9D,mBAAmB,SAAS,qBAAqB,IAAa;AAChE;;AAGA,SAAgB,mBAAmB;CACjC,MAAM,QAAQ,IAAI,IAAY,uBAAuB;CACrD,OAAO,MAAM,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EtC,GAAG,QAAQ,OAAO;EACzC;EACA;EACA,aACE,IAAI,SAAe,SAAS,WAAW;GACrC,WAAW,sBAAsB;GACjC,WAAW,OAAO,UAAW,QAAQ,OAAO,KAAK,IAAI,QAAQ,CAAE;EACjE,CAAC;CACL;AACF"}
|
package/dist/http.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export interface RuntimeHttpHost {
|
|
|
90
90
|
boot: RuntimeBoot;
|
|
91
91
|
close(): Promise<void>;
|
|
92
92
|
}
|
|
93
|
+
export declare function bearerMatches(header: string | undefined, token: string): boolean;
|
|
93
94
|
/** Start the Level 2 host. Boots the confined runtime before listening. */
|
|
94
95
|
export declare function startRuntimeHttpHost(options?: RuntimeHttpHostOptions): Promise<RuntimeHttpHost>;
|
|
95
96
|
//# sourceMappingURL=http.d.ts.map
|
package/dist/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAgBH,OAAO,EAAoB,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAexE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,oLAU1B,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAiB3E,gEAAgE;AAChE,wBAAgB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG/B;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA0BvE;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,KAAK,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AK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAID,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,KAAK,EAAE,MAAM,GACZ,OAAO,CAOT;AAWD,2EAA2E;AAC3E,wBAAsB,oBAAoB,CACxC,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,eAAe,CAAC,CAiE1B"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAGL,MAAM,EACP,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAGL,MAAM,EACP,MAAM,8BAA8B,CAAC;AAoCtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AA8B1C,wBAAgB,YAAY,IAAI,MAAM,CA4qBrC;AAyND;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IACzD,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAsBA"}
|