harness-dispatch 0.4.0 → 0.6.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/CHANGELOG.md +152 -0
- package/README.md +232 -87
- package/config.default.yaml +416 -397
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +2 -2
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +35 -4
- package/dist/billing.d.ts.map +1 -1
- package/dist/billing.js +48 -17
- package/dist/billing.js.map +1 -1
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +147 -91
- package/dist/bin.js.map +1 -1
- package/dist/breaker-store.d.ts +60 -9
- package/dist/breaker-store.d.ts.map +1 -1
- package/dist/breaker-store.js +246 -50
- package/dist/breaker-store.js.map +1 -1
- package/dist/circuit-breaker.d.ts +35 -0
- package/dist/circuit-breaker.d.ts.map +1 -1
- package/dist/circuit-breaker.js +68 -11
- package/dist/circuit-breaker.js.map +1 -1
- package/dist/config/coercions.d.ts +31 -0
- package/dist/config/coercions.d.ts.map +1 -0
- package/dist/config/coercions.js +169 -0
- package/dist/config/coercions.js.map +1 -0
- package/dist/config/env-interpolation.d.ts +36 -0
- package/dist/config/env-interpolation.d.ts.map +1 -0
- package/dist/config/env-interpolation.js +73 -0
- package/dist/config/env-interpolation.js.map +1 -0
- package/dist/config/protocol.d.ts +51 -0
- package/dist/config/protocol.d.ts.map +1 -0
- package/dist/config/protocol.js +300 -0
- package/dist/config/protocol.js.map +1 -0
- package/dist/config/route-fields.d.ts +72 -0
- package/dist/config/route-fields.d.ts.map +1 -0
- package/dist/config/route-fields.js +128 -0
- package/dist/config/route-fields.js.map +1 -0
- package/dist/config/validation.d.ts +72 -0
- package/dist/config/validation.d.ts.map +1 -0
- package/dist/config/validation.js +189 -0
- package/dist/config/validation.js.map +1 -0
- package/dist/config.d.ts +19 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +214 -635
- package/dist/config.js.map +1 -1
- package/dist/configure-yaml.d.ts +23 -0
- package/dist/configure-yaml.d.ts.map +1 -0
- package/dist/configure-yaml.js +193 -0
- package/dist/configure-yaml.js.map +1 -0
- package/dist/dispatch-log.d.ts.map +1 -1
- package/dist/dispatch-log.js +2 -3
- package/dist/dispatch-log.js.map +1 -1
- package/dist/dispatchers/base.d.ts +3 -0
- package/dist/dispatchers/base.d.ts.map +1 -1
- package/dist/dispatchers/base.js.map +1 -1
- package/dist/dispatchers/generic-cli.d.ts +15 -1
- package/dist/dispatchers/generic-cli.d.ts.map +1 -1
- package/dist/dispatchers/generic-cli.js +69 -5
- package/dist/dispatchers/generic-cli.js.map +1 -1
- package/dist/dispatchers/openai-compatible.d.ts.map +1 -1
- package/dist/dispatchers/openai-compatible.js +70 -2
- package/dist/dispatchers/openai-compatible.js.map +1 -1
- package/dist/dispatchers/shared/kill-tree.d.ts +17 -4
- package/dist/dispatchers/shared/kill-tree.d.ts.map +1 -1
- package/dist/dispatchers/shared/kill-tree.js +28 -4
- package/dist/dispatchers/shared/kill-tree.js.map +1 -1
- package/dist/dispatchers/shared/rate-limit-headers.d.ts +17 -0
- package/dist/dispatchers/shared/rate-limit-headers.d.ts.map +1 -1
- package/dist/dispatchers/shared/rate-limit-headers.js +27 -0
- package/dist/dispatchers/shared/rate-limit-headers.js.map +1 -1
- package/dist/dispatchers/shared/stream-subprocess.d.ts +11 -0
- package/dist/dispatchers/shared/stream-subprocess.d.ts.map +1 -1
- package/dist/dispatchers/shared/stream-subprocess.js +62 -35
- package/dist/dispatchers/shared/stream-subprocess.js.map +1 -1
- package/dist/dispatchers/shared/subprocess.d.ts.map +1 -1
- package/dist/dispatchers/shared/subprocess.js +3 -0
- package/dist/dispatchers/shared/subprocess.js.map +1 -1
- package/dist/dispatchers/shared/which-available.d.ts.map +1 -1
- package/dist/dispatchers/shared/which-available.js +16 -2
- package/dist/dispatchers/shared/which-available.js.map +1 -1
- package/dist/file-lock.d.ts +17 -0
- package/dist/file-lock.d.ts.map +1 -0
- package/dist/file-lock.js +143 -0
- package/dist/file-lock.js.map +1 -0
- package/dist/http/parse.d.ts +64 -0
- package/dist/http/parse.d.ts.map +1 -0
- package/dist/http/parse.js +230 -0
- package/dist/http/parse.js.map +1 -0
- package/dist/http/server.d.ts +2 -0
- package/dist/http/server.d.ts.map +1 -1
- package/dist/http/server.js +249 -286
- package/dist/http/server.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/job-runner.js +23 -5
- package/dist/job-runner.js.map +1 -1
- package/dist/jobs/context.d.ts +17 -0
- package/dist/jobs/context.d.ts.map +1 -0
- package/dist/jobs/context.js +84 -0
- package/dist/jobs/context.js.map +1 -0
- package/dist/jobs/store.d.ts +80 -0
- package/dist/jobs/store.d.ts.map +1 -0
- package/dist/jobs/store.js +279 -0
- package/dist/jobs/store.js.map +1 -0
- package/dist/jobs/types.d.ts +135 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +11 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs.d.ts +165 -85
- package/dist/jobs.d.ts.map +1 -1
- package/dist/jobs.js +824 -208
- package/dist/jobs.js.map +1 -1
- package/dist/leaderboard.d.ts +24 -1
- package/dist/leaderboard.d.ts.map +1 -1
- package/dist/leaderboard.js +94 -2
- package/dist/leaderboard.js.map +1 -1
- package/dist/mcp/config-hot-reload.d.ts.map +1 -1
- package/dist/mcp/config-hot-reload.js +1 -1
- package/dist/mcp/config-hot-reload.js.map +1 -1
- package/dist/mcp/dispatcher-factory.d.ts +16 -1
- package/dist/mcp/dispatcher-factory.d.ts.map +1 -1
- package/dist/mcp/dispatcher-factory.js +41 -3
- package/dist/mcp/dispatcher-factory.js.map +1 -1
- package/dist/mcp/tool-schemas.d.ts +194 -0
- package/dist/mcp/tool-schemas.d.ts.map +1 -0
- package/dist/mcp/tool-schemas.js +311 -0
- package/dist/mcp/tool-schemas.js.map +1 -0
- package/dist/mcp/tools.d.ts +26 -51
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +122 -151
- package/dist/mcp/tools.js.map +1 -1
- package/dist/observability/index.d.ts +16 -3
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +23 -7
- package/dist/observability/index.js.map +1 -1
- package/dist/observability/spans.d.ts.map +1 -1
- package/dist/observability/spans.js +4 -1
- package/dist/observability/spans.js.map +1 -1
- package/dist/quota.d.ts +106 -22
- package/dist/quota.d.ts.map +1 -1
- package/dist/quota.js +198 -58
- package/dist/quota.js.map +1 -1
- package/dist/route-policy.d.ts.map +1 -1
- package/dist/route-policy.js +13 -3
- package/dist/route-policy.js.map +1 -1
- package/dist/router.d.ts +29 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +102 -40
- package/dist/router.js.map +1 -1
- package/dist/safety.d.ts.map +1 -1
- package/dist/safety.js +11 -2
- package/dist/safety.js.map +1 -1
- package/dist/state-dir.d.ts +17 -0
- package/dist/state-dir.d.ts.map +1 -0
- package/dist/state-dir.js +21 -0
- package/dist/state-dir.js.map +1 -0
- package/dist/status.d.ts +49 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +67 -4
- package/dist/status.js.map +1 -1
- package/dist/types.d.ts +74 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/working-dir.d.ts +13 -0
- package/dist/working-dir.d.ts.map +1 -1
- package/dist/working-dir.js +27 -0
- package/dist/working-dir.js.map +1 -1
- package/dist/workspace-lock.d.ts +40 -0
- package/dist/workspace-lock.d.ts.map +1 -0
- package/dist/workspace-lock.js +258 -0
- package/dist/workspace-lock.js.map +1 -0
- package/dist/workspace-resolve.d.ts +98 -0
- package/dist/workspace-resolve.d.ts.map +1 -0
- package/dist/workspace-resolve.js +382 -0
- package/dist/workspace-resolve.js.map +1 -0
- package/dist/workspaces.d.ts +16 -0
- package/dist/workspaces.d.ts.map +1 -1
- package/dist/workspaces.js +166 -22
- package/dist/workspaces.js.map +1 -1
- package/package.json +99 -96
- package/dist/dashboard/live.d.ts +0 -49
- package/dist/dashboard/live.d.ts.map +0 -1
- package/dist/dashboard/live.js +0 -149
- package/dist/dashboard/live.js.map +0 -1
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsing an OpenAI-style request into something the router can act on.
|
|
3
|
+
*
|
|
4
|
+
* Split out of http/server.ts, which mixed this with transport wiring. The
|
|
5
|
+
* separation is worth making because this file is the HTTP surface's half of
|
|
6
|
+
* the safety boundary, and it has repeatedly been the half that drifted: the
|
|
7
|
+
* MCP tool rejected an unknown fanout target by name while this one silently
|
|
8
|
+
* returned fewer arms, capped context files while this one accepted an
|
|
9
|
+
* unbounded list, and rejected misplaced hint keys while this one ignored
|
|
10
|
+
* them. Every one of those was found as "same input, two answers".
|
|
11
|
+
*
|
|
12
|
+
* Anything rejected here must be rejected the same way the MCP schema
|
|
13
|
+
* rejects it (see mcp/tool-schemas.ts). BadRequestError is what maps a
|
|
14
|
+
* refusal to HTTP 400 rather than letting it fail later as a 500.
|
|
15
|
+
*/
|
|
16
|
+
import { randomUUID } from "node:crypto";
|
|
17
|
+
import { resolveWorkingDir, validateWorkingDir, workingDirWarning } from "../working-dir.js";
|
|
18
|
+
/** Raised for anything the caller can fix; mapped to HTTP 400 by the server. */
|
|
19
|
+
export class PayloadTooLargeError extends Error {
|
|
20
|
+
}
|
|
21
|
+
// Local-only server, but still worth bounding: an unbounded body read lets
|
|
22
|
+
// any authorized (or, if --host is opened beyond loopback, network-adjacent)
|
|
23
|
+
// caller exhaust process memory with one oversized POST.
|
|
24
|
+
export const MAX_REQUEST_BODY_BYTES = 10 * 1024 * 1024;
|
|
25
|
+
/**
|
|
26
|
+
* A request the CALLER can fix — malformed JSON, a missing required field, a
|
|
27
|
+
* working directory that does not exist.
|
|
28
|
+
*
|
|
29
|
+
* Everything except the 413 was returned as 500. PRODUCT.md names CI and cron
|
|
30
|
+
* as consumers of this surface, and retry-on-5xx will happily retry a request
|
|
31
|
+
* that can never succeed. A 4xx says "stop and fix the request", which is the
|
|
32
|
+
* true statement.
|
|
33
|
+
*/
|
|
34
|
+
export class BadRequestError extends Error {
|
|
35
|
+
}
|
|
36
|
+
/** Mirrors MAX_CONTEXT_FILES in mcp/tools.ts — the two surfaces must agree. */
|
|
37
|
+
export const MAX_CONTEXT_FILES_HTTP = 64;
|
|
38
|
+
export async function readJson(req, maxBytes = MAX_REQUEST_BODY_BYTES) {
|
|
39
|
+
const chunks = [];
|
|
40
|
+
let total = 0;
|
|
41
|
+
for await (const chunk of req) {
|
|
42
|
+
const buf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
43
|
+
total += buf.length;
|
|
44
|
+
if (total > maxBytes) {
|
|
45
|
+
// Don't destroy() the socket here — that races with the 413 response
|
|
46
|
+
// write and the client sees a connection reset instead of a clean
|
|
47
|
+
// status code. Just stop buffering (the memory-exhaustion risk this
|
|
48
|
+
// guards against) and let the normal response path write the 413.
|
|
49
|
+
throw new PayloadTooLargeError(`request body exceeds ${maxBytes} bytes`);
|
|
50
|
+
}
|
|
51
|
+
chunks.push(buf);
|
|
52
|
+
}
|
|
53
|
+
const text = Buffer.concat(chunks).toString("utf-8");
|
|
54
|
+
if (!text.trim())
|
|
55
|
+
return {};
|
|
56
|
+
try {
|
|
57
|
+
return JSON.parse(text);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
throw new BadRequestError(`request body is not valid JSON: ${err instanceof Error ? err.message : String(err)}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function contentToText(content) {
|
|
64
|
+
if (typeof content === "string")
|
|
65
|
+
return content;
|
|
66
|
+
if (Array.isArray(content)) {
|
|
67
|
+
return content
|
|
68
|
+
.map((part) => {
|
|
69
|
+
if (typeof part === "string")
|
|
70
|
+
return part;
|
|
71
|
+
if (part && typeof part === "object" && "text" in part) {
|
|
72
|
+
const text = part.text;
|
|
73
|
+
return typeof text === "string" ? text : "";
|
|
74
|
+
}
|
|
75
|
+
return "";
|
|
76
|
+
})
|
|
77
|
+
.filter(Boolean)
|
|
78
|
+
.join("\n");
|
|
79
|
+
}
|
|
80
|
+
return "";
|
|
81
|
+
}
|
|
82
|
+
function messagesToPrompt(messages) {
|
|
83
|
+
if (!Array.isArray(messages))
|
|
84
|
+
return "";
|
|
85
|
+
return messages
|
|
86
|
+
.map((message) => {
|
|
87
|
+
const role = typeof message.role === "string" ? message.role : "user";
|
|
88
|
+
const text = contentToText(message.content);
|
|
89
|
+
return text ? `${role}: ${text}` : "";
|
|
90
|
+
})
|
|
91
|
+
.filter(Boolean)
|
|
92
|
+
.join("\n\n");
|
|
93
|
+
}
|
|
94
|
+
function parseHints(body) {
|
|
95
|
+
const hints = {};
|
|
96
|
+
if (typeof body.model === "string" && body.model !== "")
|
|
97
|
+
hints.model = body.model;
|
|
98
|
+
if (body.safetyProfile === "read_only" ||
|
|
99
|
+
body.safetyProfile === "workspace_edit" ||
|
|
100
|
+
body.safetyProfile === "full_auto") {
|
|
101
|
+
hints.safetyProfile = body.safetyProfile;
|
|
102
|
+
}
|
|
103
|
+
if (body.hints && typeof body.hints === "object") {
|
|
104
|
+
const raw = body.hints;
|
|
105
|
+
if (typeof raw.model === "string")
|
|
106
|
+
hints.model = raw.model;
|
|
107
|
+
if (raw.taskType === "execute" ||
|
|
108
|
+
raw.taskType === "plan" ||
|
|
109
|
+
raw.taskType === "review" ||
|
|
110
|
+
raw.taskType === "local") {
|
|
111
|
+
hints.taskType = raw.taskType;
|
|
112
|
+
}
|
|
113
|
+
if (typeof raw.preferLargeContext === "boolean") {
|
|
114
|
+
hints.preferLargeContext = raw.preferLargeContext;
|
|
115
|
+
}
|
|
116
|
+
if (raw.safetyProfile === "read_only" ||
|
|
117
|
+
raw.safetyProfile === "workspace_edit" ||
|
|
118
|
+
raw.safetyProfile === "full_auto") {
|
|
119
|
+
hints.safetyProfile = raw.safetyProfile;
|
|
120
|
+
}
|
|
121
|
+
if (raw.workspacePolicy === "shared" ||
|
|
122
|
+
raw.workspacePolicy === "shared_locked" ||
|
|
123
|
+
raw.workspacePolicy === "copy" ||
|
|
124
|
+
raw.workspacePolicy === "git_worktree") {
|
|
125
|
+
hints.workspacePolicy = raw.workspacePolicy;
|
|
126
|
+
}
|
|
127
|
+
// routePolicy was never read here at all. evaluateRoutePolicy implements
|
|
128
|
+
// local_only, approval_required and blocked in full, and on this surface
|
|
129
|
+
// they were wired to nothing: POST {"hints":{"routePolicy":"blocked"}}
|
|
130
|
+
// returned 200 and dispatched. PRODUCT.md names CI and cron as this
|
|
131
|
+
// surface's consumers, and calls a guarantee that reads correctly and does
|
|
132
|
+
// nothing at runtime its own counter-signal.
|
|
133
|
+
if (raw.routePolicy === "local_only" ||
|
|
134
|
+
raw.routePolicy === "approval_required" ||
|
|
135
|
+
raw.routePolicy === "blocked") {
|
|
136
|
+
hints.routePolicy = raw.routePolicy;
|
|
137
|
+
}
|
|
138
|
+
if (typeof raw.timeoutMs === "number" && Number.isFinite(raw.timeoutMs)) {
|
|
139
|
+
hints.timeoutMs = raw.timeoutMs;
|
|
140
|
+
}
|
|
141
|
+
// Unknown keys are REJECTED, matching the MCP surface. The whole point of
|
|
142
|
+
// making hints strict there was that `safety_profile` (the config
|
|
143
|
+
// spelling) silently disabled a safety limit; accepting it here left the
|
|
144
|
+
// identical typo failing open on the other surface.
|
|
145
|
+
const known = new Set([
|
|
146
|
+
"model",
|
|
147
|
+
"taskType",
|
|
148
|
+
"preferLargeContext",
|
|
149
|
+
"safetyProfile",
|
|
150
|
+
"workspacePolicy",
|
|
151
|
+
"routePolicy",
|
|
152
|
+
"timeoutMs",
|
|
153
|
+
]);
|
|
154
|
+
const unknown = Object.keys(raw).filter((k) => !known.has(k));
|
|
155
|
+
if (unknown.length > 0) {
|
|
156
|
+
throw new BadRequestError(`unknown hints key(s): ${unknown.join(", ")}. Valid: ${[...known].join(", ")}.`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (body.workspacePolicy === "shared" ||
|
|
160
|
+
body.workspacePolicy === "shared_locked" ||
|
|
161
|
+
body.workspacePolicy === "copy" ||
|
|
162
|
+
body.workspacePolicy === "git_worktree") {
|
|
163
|
+
hints.workspacePolicy = body.workspacePolicy;
|
|
164
|
+
}
|
|
165
|
+
return hints;
|
|
166
|
+
}
|
|
167
|
+
export function parseChatRequest(raw) {
|
|
168
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
169
|
+
// Was a plain Error, so `null`, `"hello"` and `42` all returned 500. The
|
|
170
|
+
// BadRequestError mapping was added for JSON PARSE failures only — same
|
|
171
|
+
// fix, one of two paths, which is the pattern this file keeps repeating.
|
|
172
|
+
throw new BadRequestError("request body must be a JSON object");
|
|
173
|
+
}
|
|
174
|
+
const body = raw;
|
|
175
|
+
const prompt = typeof body.prompt === "string" && body.prompt.trim()
|
|
176
|
+
? body.prompt
|
|
177
|
+
: messagesToPrompt(body.messages);
|
|
178
|
+
if (!prompt.trim())
|
|
179
|
+
throw new BadRequestError("messages or prompt is required");
|
|
180
|
+
// MCP validates this; HTTP did not, so `workingDir: "Z:/nope"` surfaced as
|
|
181
|
+
// `spawn node.EXE ENOENT` — verbatim the wrong-cause error working-dir.ts
|
|
182
|
+
// exists to prevent, on the surface CI uses.
|
|
183
|
+
const workingDirError = validateWorkingDir(typeof body.workingDir === "string"
|
|
184
|
+
? body.workingDir
|
|
185
|
+
: undefined);
|
|
186
|
+
if (workingDirError !== undefined)
|
|
187
|
+
throw new BadRequestError(workingDirError);
|
|
188
|
+
// Same cap as the MCP surface, and for the same reason: each file's parent
|
|
189
|
+
// directory becomes an --add-dir grant on CLI routes, so an unbounded list
|
|
190
|
+
// is an unbounded set of directories handed to a coding agent. The cap was
|
|
191
|
+
// added at the MCP boundary only; this surface accepted 500.
|
|
192
|
+
if (Array.isArray(body.files) && body.files.length > MAX_CONTEXT_FILES_HTTP) {
|
|
193
|
+
throw new BadRequestError(`files: ${body.files.length} entries exceeds the maximum of ${MAX_CONTEXT_FILES_HTTP}.`);
|
|
194
|
+
}
|
|
195
|
+
const files = Array.isArray(body.files)
|
|
196
|
+
? body.files.filter((v) => typeof v === "string")
|
|
197
|
+
: [];
|
|
198
|
+
const models = Array.isArray(body.models)
|
|
199
|
+
? body.models.filter((v) => typeof v === "string")
|
|
200
|
+
: [];
|
|
201
|
+
const resolvedWorkingDir = resolveWorkingDir(typeof body.workingDir === "string" ? body.workingDir : undefined);
|
|
202
|
+
const warning = workingDirWarning(resolvedWorkingDir);
|
|
203
|
+
return {
|
|
204
|
+
prompt,
|
|
205
|
+
files,
|
|
206
|
+
workingDir: resolvedWorkingDir.workingDir,
|
|
207
|
+
...(warning !== undefined ? { workingDirWarning: warning } : {}),
|
|
208
|
+
stream: body.stream === true,
|
|
209
|
+
mode: body.mode === "fanout" ? "fanout" : "single",
|
|
210
|
+
models,
|
|
211
|
+
hints: parseHints(body),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
export function completionEnvelope(content, model, extra) {
|
|
215
|
+
return {
|
|
216
|
+
id: `chatcmpl-${randomUUID()}`,
|
|
217
|
+
object: "chat.completion",
|
|
218
|
+
created: Math.floor(Date.now() / 1000),
|
|
219
|
+
model,
|
|
220
|
+
choices: [
|
|
221
|
+
{
|
|
222
|
+
index: 0,
|
|
223
|
+
message: { role: "assistant", content },
|
|
224
|
+
finish_reason: "stop",
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
...extra,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=parse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/http/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB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MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,IAAI;QAC5B,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QAClD,MAAM;QACN,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC;KACxB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,OAAe,EACf,KAAa,EACb,KAA8B;IAE9B,OAAO;QACL,EAAE,EAAE,YAAY,UAAU,EAAE,EAAE;QAC9B,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;QACtC,KAAK;QACL,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,CAAC;gBACR,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE;gBACvC,aAAa,EAAE,MAAM;aACtB;SACF;QACD,GAAG,KAAK;KACT,CAAC;AACJ,CAAC"}
|
package/dist/http/server.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/http/server.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/http/server.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EACL,eAAe,EAKhB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,eAAe,EAAE,CAAC;AAG3B,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AA4UD,wBAAsB,eAAe,CAAC,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAgN5F;AAED,eAAO,MAAM,kBAAkB,wBAAkB,CAAC"}
|