llm-mock-server 1.0.5 → 1.0.7
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/dist/cli/cli.d.ts +3 -0
- package/dist/cli/cli.d.ts.map +1 -0
- package/dist/cli/cli.js +103 -0
- package/dist/cli/cli.js.map +1 -0
- package/dist/cli/validators.d.ts +7 -0
- package/dist/cli/validators.d.ts.map +1 -0
- package/dist/cli/validators.js +53 -0
- package/dist/cli/validators.js.map +1 -0
- package/dist/formats/anthropic/index.d.ts +1 -1
- package/dist/formats/anthropic/index.d.ts.map +1 -1
- package/dist/formats/anthropic/index.js +1 -1
- package/dist/formats/anthropic/index.js.map +1 -1
- package/dist/formats/anthropic/parse.d.ts +2 -2
- package/dist/formats/anthropic/parse.d.ts.map +1 -1
- package/dist/formats/anthropic/parse.js +4 -2
- package/dist/formats/anthropic/parse.js.map +1 -1
- package/dist/formats/anthropic/schema.d.ts +1 -1
- package/dist/formats/anthropic/schema.d.ts.map +1 -1
- package/dist/formats/anthropic/schema.js +9 -4
- package/dist/formats/anthropic/schema.js.map +1 -1
- package/dist/formats/anthropic/serialize.d.ts +2 -2
- package/dist/formats/anthropic/serialize.d.ts.map +1 -1
- package/dist/formats/anthropic/serialize.js +76 -19
- package/dist/formats/anthropic/serialize.js.map +1 -1
- package/dist/formats/openai/chat-completions/index.d.ts +3 -0
- package/dist/formats/openai/chat-completions/index.d.ts.map +1 -0
- package/dist/formats/openai/chat-completions/index.js +13 -0
- package/dist/formats/openai/chat-completions/index.js.map +1 -0
- package/dist/formats/openai/chat-completions/parse.d.ts +4 -0
- package/dist/formats/openai/chat-completions/parse.d.ts.map +1 -0
- package/dist/formats/openai/chat-completions/parse.js +33 -0
- package/dist/formats/openai/chat-completions/parse.js.map +1 -0
- package/dist/formats/openai/chat-completions/schema.d.ts +93 -0
- package/dist/formats/openai/chat-completions/schema.d.ts.map +1 -0
- package/dist/formats/openai/chat-completions/schema.js +74 -0
- package/dist/formats/openai/chat-completions/schema.js.map +1 -0
- package/dist/formats/openai/chat-completions/serialize.d.ts +10 -0
- package/dist/formats/openai/chat-completions/serialize.d.ts.map +1 -0
- package/dist/formats/openai/chat-completions/serialize.js +99 -0
- package/dist/formats/openai/chat-completions/serialize.js.map +1 -0
- package/dist/formats/openai/responses/index.d.ts +3 -0
- package/dist/formats/openai/responses/index.d.ts.map +1 -0
- package/dist/formats/openai/responses/index.js +13 -0
- package/dist/formats/openai/responses/index.js.map +1 -0
- package/dist/formats/openai/responses/parse.d.ts +4 -0
- package/dist/formats/openai/responses/parse.d.ts.map +1 -0
- package/dist/formats/openai/responses/parse.js +51 -0
- package/dist/formats/openai/responses/parse.js.map +1 -0
- package/dist/formats/openai/responses/schema.d.ts +103 -0
- package/dist/formats/openai/responses/schema.d.ts.map +1 -0
- package/dist/formats/openai/responses/schema.js +71 -0
- package/dist/formats/openai/responses/schema.js.map +1 -0
- package/dist/formats/openai/responses/serialize.d.ts +10 -0
- package/dist/formats/openai/responses/serialize.d.ts.map +1 -0
- package/dist/formats/openai/responses/serialize.js +273 -0
- package/dist/formats/openai/responses/serialize.js.map +1 -0
- package/dist/formats/request-helpers.d.ts +1 -1
- package/dist/formats/request-helpers.d.ts.map +1 -1
- package/dist/formats/request-helpers.js.map +1 -1
- package/dist/formats/serialize-helpers.d.ts +1 -1
- package/dist/formats/serialize-helpers.d.ts.map +1 -1
- package/dist/formats/serialize-helpers.js +6 -3
- package/dist/formats/serialize-helpers.js.map +1 -1
- package/dist/formats/types.d.ts +2 -1
- package/dist/formats/types.d.ts.map +1 -1
- package/dist/history.d.ts +6 -2
- package/dist/history.d.ts.map +1 -1
- package/dist/history.js +2 -0
- package/dist/history.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +26 -9
- package/dist/loader.js.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +12 -4
- package/dist/logger.js.map +1 -1
- package/dist/mock-server.d.ts +44 -48
- package/dist/mock-server.d.ts.map +1 -1
- package/dist/mock-server.js +37 -85
- package/dist/mock-server.js.map +1 -1
- package/dist/route-handler.d.ts +1 -1
- package/dist/route-handler.d.ts.map +1 -1
- package/dist/route-handler.js +19 -7
- package/dist/route-handler.js.map +1 -1
- package/dist/rule-builder.d.ts +21 -0
- package/dist/rule-builder.d.ts.map +1 -0
- package/dist/rule-builder.js +58 -0
- package/dist/rule-builder.js.map +1 -0
- package/dist/rule-engine.d.ts +3 -1
- package/dist/rule-engine.d.ts.map +1 -1
- package/dist/rule-engine.js +7 -2
- package/dist/rule-engine.js.map +1 -1
- package/dist/sse-writer.d.ts +1 -1
- package/dist/sse-writer.d.ts.map +1 -1
- package/dist/types/reply.d.ts +51 -8
- package/dist/types/reply.d.ts.map +1 -1
- package/dist/types/request.d.ts +21 -6
- package/dist/types/request.d.ts.map +1 -1
- package/dist/types/rule.d.ts +65 -7
- package/dist/types/rule.d.ts.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +20 -11
- package/.claude/skills/desloppify/SKILL.md +0 -308
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000801.json +0 -242
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000905.json +0 -248
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000917.json +0 -248
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000950.json +0 -311
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/claude_launch_prompt.md +0 -17
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.json +0 -255
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.template.json +0 -22
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/reviewer_instructions.md +0 -20
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/session.json +0 -20
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/canonical_import_20260315_050000.json +0 -286
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/canonical_import_20260315_050028.json +0 -303
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/claude_launch_prompt.md +0 -17
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/review_result.json +0 -297
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/review_result.template.json +0 -22
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/reviewer_instructions.md +0 -20
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/session.json +0 -20
- package/.desloppify/query.json +0 -1312
- package/.desloppify/review_packet_blind.json +0 -1249
- package/.desloppify/review_packets/holistic_packet_20260315_000339.json +0 -1471
- package/.desloppify/review_packets/holistic_packet_20260315_045546.json +0 -1480
- package/.desloppify/review_packets/holistic_packet_20260315_185401.json +0 -1407
- package/.desloppify/review_packets/holistic_packet_20260315_185613.json +0 -1407
- package/.desloppify/state-typescript.json +0 -8438
- package/.desloppify/state-typescript.json.bak +0 -8432
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-1.log +0 -384
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-10.log +0 -484
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-2.log +0 -408
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-3.log +0 -416
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-4.log +0 -360
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-5.log +0 -360
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-6.log +0 -364
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-7.log +0 -428
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-8.log +0 -388
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-9.log +0 -500
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-1.md +0 -83
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-10.md +0 -108
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-2.md +0 -89
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-3.md +0 -91
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-4.md +0 -77
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-5.md +0 -77
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-6.md +0 -78
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-7.md +0 -94
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-8.md +0 -84
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-9.md +0 -112
- package/.desloppify/subagents/runs/20260315_185401/results/batch-1.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-10.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-2.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-3.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-4.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-5.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-6.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-7.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-8.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-9.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/run.log +0 -36
- package/.desloppify/subagents/runs/20260315_185401/run_summary.json +0 -156
- package/.desloppify/subagents/runs/20260315_185613/holistic_findings_merged.json +0 -741
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-1.log +0 -579
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-10.log +0 -1537
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-2.log +0 -829
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-3.log +0 -927
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-4.log +0 -429
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-5.log +0 -276
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-6.log +0 -450
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-7.log +0 -730
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-8.log +0 -698
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-9.log +0 -938
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-1.md +0 -83
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-10.md +0 -108
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-2.md +0 -89
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-3.md +0 -91
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-4.md +0 -77
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-5.md +0 -77
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-6.md +0 -78
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-7.md +0 -94
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-8.md +0 -84
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-9.md +0 -112
- package/.desloppify/subagents/runs/20260315_185613/results/batch-1.raw.txt +0 -78
- package/.desloppify/subagents/runs/20260315_185613/results/batch-10.raw.txt +0 -242
- package/.desloppify/subagents/runs/20260315_185613/results/batch-2.raw.txt +0 -102
- package/.desloppify/subagents/runs/20260315_185613/results/batch-3.raw.txt +0 -94
- package/.desloppify/subagents/runs/20260315_185613/results/batch-4.raw.txt +0 -86
- package/.desloppify/subagents/runs/20260315_185613/results/batch-5.raw.txt +0 -1
- package/.desloppify/subagents/runs/20260315_185613/results/batch-6.raw.txt +0 -87
- package/.desloppify/subagents/runs/20260315_185613/results/batch-7.raw.txt +0 -1
- package/.desloppify/subagents/runs/20260315_185613/results/batch-8.raw.txt +0 -107
- package/.desloppify/subagents/runs/20260315_185613/results/batch-9.raw.txt +0 -67
- package/.desloppify/subagents/runs/20260315_185613/run.log +0 -96
- package/.desloppify/subagents/runs/20260315_185613/run_summary.json +0 -156
- package/.editorconfig +0 -12
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/docs.yml +0 -46
- package/.github/workflows/test.yml +0 -40
- package/.markdownlint.jsonc +0 -11
- package/.node-version +0 -1
- package/.oxfmtrc.json +0 -9
- package/.oxlintrc.json +0 -35
- package/docs/ARCHITECTURE.md +0 -125
- package/scorecard.png +0 -0
- package/src/cli/cli.ts +0 -141
- package/src/cli/validators.ts +0 -68
- package/src/formats/anthropic/index.ts +0 -14
- package/src/formats/anthropic/parse.ts +0 -67
- package/src/formats/anthropic/schema.ts +0 -74
- package/src/formats/anthropic/serialize.ts +0 -179
- package/src/formats/openai/chat-completions/index.ts +0 -14
- package/src/formats/openai/chat-completions/parse.ts +0 -44
- package/src/formats/openai/chat-completions/schema.ts +0 -92
- package/src/formats/openai/chat-completions/serialize.ts +0 -146
- package/src/formats/openai/responses/index.ts +0 -14
- package/src/formats/openai/responses/parse.ts +0 -70
- package/src/formats/openai/responses/schema.ts +0 -86
- package/src/formats/openai/responses/serialize.ts +0 -332
- package/src/formats/request-helpers.ts +0 -56
- package/src/formats/serialize-helpers.ts +0 -43
- package/src/formats/types.ts +0 -26
- package/src/history.ts +0 -70
- package/src/index.ts +0 -46
- package/src/loader.ts +0 -246
- package/src/logger.ts +0 -70
- package/src/mock-server.ts +0 -203
- package/src/route-handler.ts +0 -144
- package/src/rule-builder.ts +0 -73
- package/src/rule-engine.ts +0 -165
- package/src/sse-writer.ts +0 -35
- package/src/types/reply.ts +0 -92
- package/src/types/request.ts +0 -56
- package/src/types/rule.ts +0 -125
- package/src/types.ts +0 -24
- package/test/cli-validators.test.ts +0 -151
- package/test/formats/anthropic.test.ts +0 -336
- package/test/formats/openai.test.ts +0 -316
- package/test/formats/parse-helpers.test.ts +0 -315
- package/test/formats/responses.test.ts +0 -380
- package/test/helpers/make-req.ts +0 -18
- package/test/history.test.ts +0 -361
- package/test/loader.test.ts +0 -333
- package/test/logger.test.ts +0 -344
- package/test/mock-server.test.ts +0 -619
- package/test/rule-engine.test.ts +0 -229
- package/tsconfig.json +0 -26
- package/tsconfig.test.json +0 -11
- package/typedoc.json +0 -9
- package/vitest.config.ts +0 -18
package/dist/sse-writer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sse-writer.d.ts","sourceRoot":"","sources":["../src/sse-writer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sse-writer.d.ts","sourceRoot":"","sources":["../src/sse-writer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAarD,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,SAAS,QAAQ,EAAE,EAC3B,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAef"}
|
package/dist/types/reply.d.ts
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import type { MockRequest } from "./request.js";
|
|
2
2
|
/** A reply is either a plain string (turns into `{ text: "..." }`) or a full reply object. */
|
|
3
3
|
export type Reply = string | ReplyObject;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* A structured reply. Text, reasoning, tool calls, usage, and errors are all optional.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* server.when("hello").reply({ text: "Hi!", reasoning: "Simple greeting." });
|
|
10
|
+
* server.when("weather").reply({
|
|
11
|
+
* tools: [{ name: "get_weather", args: { city: "London" } }],
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
5
15
|
export interface ReplyObject {
|
|
16
|
+
/** Text content to send back. */
|
|
6
17
|
readonly text?: string | undefined;
|
|
7
18
|
/** Extended thinking or chain-of-thought. Works with Anthropic and Responses formats. */
|
|
8
19
|
readonly reasoning?: string | undefined;
|
|
20
|
+
/** Tool calls the model wants to make. */
|
|
9
21
|
readonly tools?: readonly ToolCall[] | undefined;
|
|
10
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Token counts to report.
|
|
24
|
+
* @defaultValue `{ input: 10, output: 5 }`
|
|
25
|
+
*/
|
|
11
26
|
readonly usage?: {
|
|
12
27
|
readonly input: number;
|
|
13
28
|
readonly output: number;
|
|
@@ -17,27 +32,55 @@ export interface ReplyObject {
|
|
|
17
32
|
}
|
|
18
33
|
/** An HTTP error response. The server returns this status code with a format-appropriate body. */
|
|
19
34
|
export interface ErrorReply {
|
|
35
|
+
/** HTTP status code, e.g. `429` or `500`. */
|
|
20
36
|
readonly status: number;
|
|
37
|
+
/** Error message in the response body. */
|
|
21
38
|
readonly message: string;
|
|
22
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Error type string in the response body.
|
|
41
|
+
* @defaultValue Format-specific (e.g. `"server_error"` for OpenAI, `"api_error"` for Anthropic).
|
|
42
|
+
*/
|
|
23
43
|
readonly type?: string | undefined;
|
|
24
44
|
}
|
|
45
|
+
/** A tool call in the mock response. */
|
|
25
46
|
export interface ToolCall {
|
|
26
|
-
/** Auto-generated if omitted. */
|
|
47
|
+
/** Explicit ID for the call. Auto-generated if omitted. */
|
|
27
48
|
readonly id?: string | undefined;
|
|
49
|
+
/** Tool function name. */
|
|
28
50
|
readonly name: string;
|
|
51
|
+
/** Arguments to pass to the tool. */
|
|
29
52
|
readonly args: Readonly<Record<string, unknown>>;
|
|
30
53
|
}
|
|
31
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* A reply value or a function that produces one. Async functions are supported.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* server.when("echo").reply((req) => `You said: ${req.lastMessage}`);
|
|
60
|
+
* server.when("slow").reply(async (req) => {
|
|
61
|
+
* return { text: "Done thinking." };
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
32
65
|
export type Resolver = Reply | ((req: MockRequest) => Reply | Promise<Reply>);
|
|
33
66
|
/** Per-rule streaming options. Merged with server-level defaults, with per-rule values winning. */
|
|
34
67
|
export interface ReplyOptions {
|
|
35
|
-
/** Milliseconds between SSE chunks. */
|
|
68
|
+
/** Milliseconds to wait between SSE chunks. */
|
|
36
69
|
readonly latency?: number | undefined;
|
|
37
|
-
/**
|
|
70
|
+
/** Split text into chunks of this many characters for more realistic streaming. */
|
|
38
71
|
readonly chunkSize?: number | undefined;
|
|
39
72
|
}
|
|
40
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* A single entry in a reply sequence. Can be a plain reply or a reply with per-step options.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* server.when("step").replySequence([
|
|
79
|
+
* "Starting.",
|
|
80
|
+
* { reply: "Done.", options: { latency: 100 } },
|
|
81
|
+
* ]);
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
41
84
|
export type SequenceEntry = Reply | {
|
|
42
85
|
readonly reply: Reply;
|
|
43
86
|
readonly options?: ReplyOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reply.d.ts","sourceRoot":"","sources":["../../src/types/reply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,8FAA8F;AAC9F,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,WAAW,CAAC;AAEzC
|
|
1
|
+
{"version":3,"file":"reply.d.ts","sourceRoot":"","sources":["../../src/types/reply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,8FAA8F;AAC9F,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,WAAW,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,yFAAyF;IACzF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,CAAC;IACjD;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EACX;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GACnD,SAAS,CAAC;IACd,oFAAoF;IACpF,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACzC;AAED,kGAAkG;AAClG,MAAM,WAAW,UAAU;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,wCAAwC;AACxC,MAAM,WAAW,QAAQ;IACvB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,0BAA0B;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAClD;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AAE9E,mGAAmG;AACnG,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,mFAAmF;IACnF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GACrB,KAAK,GACL;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC"}
|
package/dist/types/request.d.ts
CHANGED
|
@@ -1,39 +1,54 @@
|
|
|
1
1
|
/** The LLM API wire format that was detected for a request. */
|
|
2
2
|
export type FormatName = "openai" | "anthropic" | "responses";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* A normalised view of an incoming request, regardless of the original wire format.
|
|
5
|
+
* This is what rule matchers and resolvers receive.
|
|
6
|
+
*/
|
|
4
7
|
export interface MockRequest {
|
|
8
|
+
/** Which API format route the request came in on. */
|
|
5
9
|
readonly format: FormatName;
|
|
10
|
+
/** The model string from the request, e.g. `"gpt-5.4"` or `"claude-sonnet-4-6"`. */
|
|
6
11
|
readonly model: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the client asked for SSE streaming (from the `stream` field).
|
|
14
|
+
* @defaultValue `true`
|
|
15
|
+
*/
|
|
7
16
|
readonly streaming: boolean;
|
|
8
17
|
/** Full conversation, normalised from whatever format came in. */
|
|
9
18
|
readonly messages: readonly Message[];
|
|
10
19
|
/** The last user message's text. This is what most matchers check. */
|
|
11
20
|
readonly lastMessage: string;
|
|
12
|
-
/**
|
|
21
|
+
/** System prompt text, or empty string if there wasn't one. */
|
|
13
22
|
readonly systemMessage: string;
|
|
23
|
+
/** Tool definitions from the request, if any were sent. */
|
|
14
24
|
readonly tools?: readonly ToolDef[] | undefined;
|
|
15
|
-
/**
|
|
25
|
+
/** Tool names pulled out from `tools` for quick lookups via `whenTool()`. */
|
|
16
26
|
readonly toolNames: readonly string[];
|
|
17
|
-
/** Set when the last message was a tool result. */
|
|
27
|
+
/** Set when the last message was a tool result. Used by `whenToolResult()`. */
|
|
18
28
|
readonly lastToolCallId: string | undefined;
|
|
19
29
|
/** The raw request body, for anything we don't extract. */
|
|
20
30
|
readonly raw: unknown;
|
|
31
|
+
/** HTTP headers from the incoming request. */
|
|
21
32
|
readonly headers: Readonly<Record<string, string | undefined>>;
|
|
22
|
-
/** e.g. `/v1/chat/completions
|
|
33
|
+
/** The URL path that was hit, e.g. `/v1/chat/completions`. */
|
|
23
34
|
readonly path: string;
|
|
24
35
|
}
|
|
25
36
|
/** A single conversation message, normalised across all supported formats. */
|
|
26
37
|
export interface Message {
|
|
38
|
+
/** The role of the message sender. */
|
|
27
39
|
readonly role: "system" | "user" | "assistant" | "tool";
|
|
40
|
+
/** The text content of the message. */
|
|
28
41
|
readonly content: string;
|
|
29
42
|
/** Links the result back to its tool call. Only set on `"tool"` messages. */
|
|
30
43
|
readonly toolCallId?: string | undefined;
|
|
31
44
|
}
|
|
32
45
|
/** A tool definition from the request's `tools` array, normalised across formats. */
|
|
33
46
|
export interface ToolDef {
|
|
47
|
+
/** The tool function name. */
|
|
34
48
|
readonly name: string;
|
|
49
|
+
/** A description of what the tool does. */
|
|
35
50
|
readonly description?: string | undefined;
|
|
36
|
-
/** JSON Schema, passed through as-is. */
|
|
51
|
+
/** JSON Schema for the tool's parameters, passed through as-is. */
|
|
37
52
|
readonly parameters?: unknown;
|
|
38
53
|
}
|
|
39
54
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/types/request.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AAE9D
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/types/request.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,sEAAsE;IACtE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,CAAC;IAChD,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,2DAA2D;IAC3D,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAC/D,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,8EAA8E;AAC9E,MAAM,WAAW,OAAO;IACtB,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACxD,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED,qFAAqF;AACrF,MAAM,WAAW,OAAO;IACtB,8BAA8B;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B"}
|
package/dist/types/rule.d.ts
CHANGED
|
@@ -7,44 +7,102 @@ import type { Resolver, ReplyOptions, Reply, SequenceEntry } from "./reply.js";
|
|
|
7
7
|
* A `RegExp` gets tested against the last user message.
|
|
8
8
|
* A `MatchObject` checks multiple fields at once with AND logic.
|
|
9
9
|
* A function receives the normalised request and returns a boolean.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* server.when("hello").reply("Hi!");
|
|
14
|
+
* server.when(/explain (\w+)/i).reply("Here's an explanation.");
|
|
15
|
+
* server.when({ model: /claude/, format: "anthropic" }).reply("Bonjour!");
|
|
16
|
+
* server.when((req) => req.messages.length > 5).reply("Long conversation!");
|
|
17
|
+
* ```
|
|
10
18
|
*/
|
|
11
19
|
export type Match = string | RegExp | MatchObject | ((req: MockRequest) => boolean);
|
|
12
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* A structured matcher. Every field you set must match for the rule to fire.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* server.when({
|
|
26
|
+
* model: /gpt/,
|
|
27
|
+
* format: "openai",
|
|
28
|
+
* system: /translator/i,
|
|
29
|
+
* predicate: (req) => req.messages.length > 2,
|
|
30
|
+
* }).reply("Translated output.");
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
13
33
|
export interface MatchObject {
|
|
34
|
+
/** Substring or regex against the last user message. */
|
|
14
35
|
readonly message?: string | RegExp;
|
|
36
|
+
/** Substring or regex against the model name. */
|
|
15
37
|
readonly model?: string | RegExp;
|
|
38
|
+
/** Substring or regex against the system prompt. */
|
|
16
39
|
readonly system?: string | RegExp;
|
|
40
|
+
/** Only match requests from this API format. */
|
|
17
41
|
readonly format?: FormatName;
|
|
18
42
|
/** Match when the request includes a tool definition with this name. */
|
|
19
43
|
readonly toolName?: string;
|
|
20
44
|
/** Match when the last tool-result message has this `tool_call_id`. */
|
|
21
45
|
readonly toolCallId?: string;
|
|
22
|
-
/** Extra
|
|
46
|
+
/** Extra predicate that runs after all other fields pass. */
|
|
23
47
|
readonly predicate?: (req: MockRequest) => boolean;
|
|
24
48
|
}
|
|
25
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Returned by `when()`. Call `.reply()` or `.replySequence()` on it to complete the rule.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* server.when("hello").reply("Hi!");
|
|
55
|
+
* server.when("step").replySequence(["First.", "Second.", "Done."]);
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
26
58
|
export interface PendingRule {
|
|
59
|
+
/** Set the response for this rule. Accepts a static value, object, or resolver function. */
|
|
27
60
|
reply(response: Resolver, options?: ReplyOptions): RuleHandle;
|
|
28
|
-
/** Each match advances through the array.
|
|
61
|
+
/** Set a sequence of replies. Each match advances through the array. */
|
|
29
62
|
replySequence(entries: readonly SequenceEntry[]): RuleHandle;
|
|
30
63
|
}
|
|
31
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* A handle to a registered rule. All methods return `this` for chaining.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* server.when("hello").reply("Hi!").times(3);
|
|
70
|
+
* server.when("urgent").reply("On it!").first();
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
32
73
|
export interface RuleHandle {
|
|
74
|
+
/** Auto-expire the rule after `n` matches. */
|
|
33
75
|
times(n: number): RuleHandle;
|
|
76
|
+
/** Move this rule to the front of the list so it matches first. */
|
|
34
77
|
first(): RuleHandle;
|
|
35
78
|
}
|
|
36
79
|
/**
|
|
37
80
|
* The shape of a handler file's default export.
|
|
38
81
|
* You can export a single handler or an array of them.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* import type { Handler } from "llm-mock-server";
|
|
86
|
+
* export default {
|
|
87
|
+
* match: (req) => req.lastMessage.includes("echo"),
|
|
88
|
+
* respond: (req) => `Echo: ${req.lastMessage}`,
|
|
89
|
+
* } satisfies Handler;
|
|
90
|
+
* ```
|
|
39
91
|
*/
|
|
40
92
|
export interface Handler {
|
|
93
|
+
/** Return `true` if this handler should respond to the request. */
|
|
41
94
|
match: (req: MockRequest) => boolean;
|
|
95
|
+
/** Produce the reply for a matched request. Can be async. */
|
|
42
96
|
respond: (req: MockRequest) => Reply | Promise<Reply>;
|
|
43
97
|
}
|
|
44
|
-
/** A summary of a registered rule, for inspection. */
|
|
98
|
+
/** A summary of a registered rule, for inspection via `server.rules`. */
|
|
45
99
|
export interface RuleSummary {
|
|
100
|
+
/** Human-readable description of what the rule matches. */
|
|
46
101
|
readonly description: string;
|
|
47
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* How many matches are left.
|
|
104
|
+
* @defaultValue `Infinity` (unlimited)
|
|
105
|
+
*/
|
|
48
106
|
readonly remaining: number;
|
|
49
107
|
}
|
|
50
108
|
export interface Rule {
|
package/dist/types/rule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/types/rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE/E
|
|
1
|
+
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/types/rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE/E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,KAAK,GACb,MAAM,GACN,MAAM,GACN,WAAW,GACX,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC;AAEpC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,oDAAoD;IACpD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,gDAAgD;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC;CACpD;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,4FAA4F;IAC5F,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAC9D,wEAAwE;IACxE,aAAa,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,UAAU,CAAC;CAC9D;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IACzB,8CAA8C;IAC9C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,mEAAmE;IACnE,KAAK,IAAI,UAAU,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,OAAO;IACtB,mEAAmE;IACnE,KAAK,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC;IACrC,6DAA6D;IAC7D,OAAO,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CACvD;AAED,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC;IAC9C,OAAO,EAAE,QAAQ,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { FormatName, MockRequest, Message, ToolDef } from "./types/request.js";
|
|
2
|
-
export type { Reply, ReplyObject, ErrorReply, ToolCall, Resolver, ReplyOptions, SequenceEntry } from "./types/reply.js";
|
|
3
|
-
export type { Match, MatchObject, PendingRule, RuleHandle, RuleSummary, Handler, Rule } from "./types/rule.js";
|
|
1
|
+
export type { FormatName, MockRequest, Message, ToolDef, } from "./types/request.js";
|
|
2
|
+
export type { Reply, ReplyObject, ErrorReply, ToolCall, Resolver, ReplyOptions, SequenceEntry, } from "./types/reply.js";
|
|
3
|
+
export type { Match, MatchObject, PendingRule, RuleHandle, RuleSummary, Handler, Rule, } from "./types/rule.js";
|
|
4
4
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,WAAW,EACX,OAAO,EACP,OAAO,GACR,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,KAAK,EACL,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,OAAO,EACP,IAAI,GACL,MAAM,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-mock-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "A standalone mock LLM server for deterministic testing: OpenAI, Anthropic, and Responses API formats",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
},
|
|
16
16
|
"./package.json": "./package.json"
|
|
17
17
|
},
|
|
18
|
+
"imports": {
|
|
19
|
+
"#/*": {
|
|
20
|
+
"llm-mock-server-dev": "./src/*",
|
|
21
|
+
"default": "./dist/*"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
18
27
|
"bin": {
|
|
19
28
|
"llm-mock-server": "./dist/cli/cli.js"
|
|
20
29
|
},
|
|
@@ -28,7 +37,7 @@
|
|
|
28
37
|
"check": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json && npm run fmt:check && npm run lint && npm test",
|
|
29
38
|
"docs": "typedoc",
|
|
30
39
|
"docs:check": "typedoc --emit none",
|
|
31
|
-
"dev": "tsx src/cli/cli.ts",
|
|
40
|
+
"dev": "tsx -C llm-mock-server-dev src/cli/cli.ts",
|
|
32
41
|
"start": "node dist/cli/cli.js"
|
|
33
42
|
},
|
|
34
43
|
"keywords": [
|
|
@@ -43,21 +52,21 @@
|
|
|
43
52
|
"license": "MIT",
|
|
44
53
|
"dependencies": {
|
|
45
54
|
"commander": "14.0.3",
|
|
46
|
-
"fastify": "5.8.
|
|
55
|
+
"fastify": "5.8.4",
|
|
47
56
|
"json5": "2.2.3",
|
|
48
|
-
"llm-schemas": "1.0.
|
|
57
|
+
"llm-schemas": "1.0.3",
|
|
49
58
|
"picocolors": "1.1.1",
|
|
50
59
|
"zod": "4.3.6"
|
|
51
60
|
},
|
|
52
61
|
"devDependencies": {
|
|
53
|
-
"@types/node": "25.5.
|
|
54
|
-
"@vitest/coverage-v8": "4.1.
|
|
55
|
-
"oxfmt": "0.
|
|
56
|
-
"oxlint": "1.
|
|
62
|
+
"@types/node": "25.5.2",
|
|
63
|
+
"@vitest/coverage-v8": "4.1.4",
|
|
64
|
+
"oxfmt": "0.44.0",
|
|
65
|
+
"oxlint": "1.59.0",
|
|
57
66
|
"tsx": "4.21.0",
|
|
58
|
-
"typedoc": "0.28.
|
|
67
|
+
"typedoc": "0.28.18",
|
|
59
68
|
"typedoc-theme-oxide": "0.2.5",
|
|
60
|
-
"typescript": "
|
|
61
|
-
"vitest": "4.1.
|
|
69
|
+
"typescript": "6.0.2",
|
|
70
|
+
"vitest": "4.1.4"
|
|
62
71
|
}
|
|
63
72
|
}
|