llm-mock-server 1.0.0 → 1.0.2

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.
Files changed (179) hide show
  1. package/.claude/skills/desloppify/SKILL.md +308 -0
  2. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000801.json +242 -0
  3. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000905.json +248 -0
  4. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000917.json +248 -0
  5. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000950.json +311 -0
  6. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/claude_launch_prompt.md +17 -0
  7. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.json +255 -0
  8. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.template.json +22 -0
  9. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/reviewer_instructions.md +20 -0
  10. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/session.json +20 -0
  11. package/.desloppify/query.json +284 -0
  12. package/.desloppify/review_packet_blind.json +1303 -0
  13. package/.desloppify/review_packets/holistic_packet_20260315_000339.json +1471 -0
  14. package/.desloppify/state-typescript.json +5114 -0
  15. package/.desloppify/state-typescript.json.bak +5108 -0
  16. package/dist/cli-validators.d.ts +7 -0
  17. package/dist/cli-validators.d.ts.map +1 -0
  18. package/dist/cli-validators.js +51 -0
  19. package/dist/cli-validators.js.map +1 -0
  20. package/dist/cli.d.ts +3 -0
  21. package/dist/cli.d.ts.map +1 -0
  22. package/dist/cli.js +106 -0
  23. package/dist/cli.js.map +1 -0
  24. package/dist/formats/anthropic/index.d.ts +3 -0
  25. package/dist/formats/anthropic/index.d.ts.map +1 -0
  26. package/dist/formats/anthropic/index.js +13 -0
  27. package/dist/formats/anthropic/index.js.map +1 -0
  28. package/dist/formats/anthropic/parse.d.ts +4 -0
  29. package/dist/formats/anthropic/parse.d.ts.map +1 -0
  30. package/dist/formats/anthropic/parse.js +47 -0
  31. package/dist/formats/anthropic/parse.js.map +1 -0
  32. package/dist/formats/anthropic/schema.d.ts +75 -0
  33. package/dist/formats/anthropic/schema.d.ts.map +1 -0
  34. package/dist/formats/anthropic/schema.js +50 -0
  35. package/dist/formats/anthropic/schema.js.map +1 -0
  36. package/dist/formats/anthropic/serialize.d.ts +10 -0
  37. package/dist/formats/anthropic/serialize.d.ts.map +1 -0
  38. package/dist/formats/anthropic/serialize.js +73 -0
  39. package/dist/formats/anthropic/serialize.js.map +1 -0
  40. package/dist/formats/openai/index.d.ts +3 -0
  41. package/dist/formats/openai/index.d.ts.map +1 -0
  42. package/dist/formats/openai/index.js +13 -0
  43. package/dist/formats/openai/index.js.map +1 -0
  44. package/dist/formats/openai/parse.d.ts +4 -0
  45. package/dist/formats/openai/parse.d.ts.map +1 -0
  46. package/dist/formats/openai/parse.js +33 -0
  47. package/dist/formats/openai/parse.js.map +1 -0
  48. package/dist/formats/openai/schema.d.ts +93 -0
  49. package/dist/formats/openai/schema.d.ts.map +1 -0
  50. package/dist/formats/openai/schema.js +68 -0
  51. package/dist/formats/openai/schema.js.map +1 -0
  52. package/dist/formats/openai/serialize.d.ts +10 -0
  53. package/dist/formats/openai/serialize.d.ts.map +1 -0
  54. package/dist/formats/openai/serialize.js +70 -0
  55. package/dist/formats/openai/serialize.js.map +1 -0
  56. package/dist/formats/parse-helpers.d.ts +24 -0
  57. package/dist/formats/parse-helpers.d.ts.map +1 -0
  58. package/dist/formats/parse-helpers.js +52 -0
  59. package/dist/formats/parse-helpers.js.map +1 -0
  60. package/dist/formats/request-helpers.d.ts +13 -0
  61. package/dist/formats/request-helpers.d.ts.map +1 -0
  62. package/dist/formats/request-helpers.js +28 -0
  63. package/dist/formats/request-helpers.js.map +1 -0
  64. package/dist/formats/responses/index.d.ts +3 -0
  65. package/dist/formats/responses/index.d.ts.map +1 -0
  66. package/dist/formats/responses/index.js +13 -0
  67. package/dist/formats/responses/index.js.map +1 -0
  68. package/dist/formats/responses/parse.d.ts +4 -0
  69. package/dist/formats/responses/parse.d.ts.map +1 -0
  70. package/dist/formats/responses/parse.js +51 -0
  71. package/dist/formats/responses/parse.js.map +1 -0
  72. package/dist/formats/responses/schema.d.ts +103 -0
  73. package/dist/formats/responses/schema.d.ts.map +1 -0
  74. package/dist/formats/responses/schema.js +61 -0
  75. package/dist/formats/responses/schema.js.map +1 -0
  76. package/dist/formats/responses/serialize.d.ts +10 -0
  77. package/dist/formats/responses/serialize.d.ts.map +1 -0
  78. package/dist/formats/responses/serialize.js +108 -0
  79. package/dist/formats/responses/serialize.js.map +1 -0
  80. package/dist/formats/serialize-helpers.d.ts +14 -0
  81. package/dist/formats/serialize-helpers.d.ts.map +1 -0
  82. package/dist/formats/serialize-helpers.js +25 -0
  83. package/dist/formats/serialize-helpers.js.map +1 -0
  84. package/dist/formats/types.d.ts +20 -0
  85. package/dist/formats/types.d.ts.map +1 -0
  86. package/dist/formats/types.js +2 -0
  87. package/dist/formats/types.js.map +1 -0
  88. package/dist/history.d.ts +38 -0
  89. package/dist/history.d.ts.map +1 -0
  90. package/dist/history.js +48 -0
  91. package/dist/history.js.map +1 -0
  92. package/dist/index.d.ts +21 -0
  93. package/dist/index.d.ts.map +1 -0
  94. package/dist/index.js +20 -0
  95. package/dist/index.js.map +1 -0
  96. package/dist/loader.d.ts +9 -0
  97. package/dist/loader.d.ts.map +1 -0
  98. package/dist/loader.js +169 -0
  99. package/dist/loader.js.map +1 -0
  100. package/dist/logger.d.ts +21 -0
  101. package/dist/logger.d.ts.map +1 -0
  102. package/dist/logger.js +42 -0
  103. package/dist/logger.js.map +1 -0
  104. package/dist/mock-server.d.ts +102 -0
  105. package/dist/mock-server.d.ts.map +1 -0
  106. package/dist/mock-server.js +195 -0
  107. package/dist/mock-server.js.map +1 -0
  108. package/dist/route-handler.d.ts +16 -0
  109. package/dist/route-handler.d.ts.map +1 -0
  110. package/dist/route-handler.js +75 -0
  111. package/dist/route-handler.js.map +1 -0
  112. package/dist/rule-engine.d.ts +24 -0
  113. package/dist/rule-engine.d.ts.map +1 -0
  114. package/dist/rule-engine.js +129 -0
  115. package/dist/rule-engine.js.map +1 -0
  116. package/dist/sse-writer.d.ts +5 -0
  117. package/dist/sse-writer.d.ts.map +1 -0
  118. package/dist/sse-writer.js +23 -0
  119. package/dist/sse-writer.js.map +1 -0
  120. package/{src/types/index.ts → dist/types/index.d.ts} +1 -0
  121. package/dist/types/index.d.ts.map +1 -0
  122. package/dist/types/index.js +2 -0
  123. package/dist/types/index.js.map +1 -0
  124. package/dist/types/reply.d.ts +45 -0
  125. package/dist/types/reply.d.ts.map +1 -0
  126. package/dist/types/reply.js +2 -0
  127. package/dist/types/reply.js.map +1 -0
  128. package/dist/types/request.d.ts +39 -0
  129. package/dist/types/request.d.ts.map +1 -0
  130. package/dist/types/request.js +2 -0
  131. package/dist/types/request.js.map +1 -0
  132. package/dist/types/rule.d.ts +57 -0
  133. package/dist/types/rule.d.ts.map +1 -0
  134. package/dist/types/rule.js +2 -0
  135. package/dist/types/rule.js.map +1 -0
  136. package/dist/types.d.ts +4 -0
  137. package/dist/types.d.ts.map +1 -0
  138. package/dist/types.js +2 -0
  139. package/dist/types.js.map +1 -0
  140. package/package.json +2 -1
  141. package/scorecard.png +0 -0
  142. package/src/cli-validators.ts +3 -0
  143. package/src/cli.ts +6 -2
  144. package/src/formats/anthropic/index.ts +1 -1
  145. package/src/formats/anthropic/parse.ts +4 -4
  146. package/src/formats/anthropic/schema.ts +1 -68
  147. package/src/formats/anthropic/serialize.ts +9 -5
  148. package/src/formats/openai/index.ts +1 -1
  149. package/src/formats/openai/parse.ts +1 -1
  150. package/src/formats/openai/schema.ts +1 -69
  151. package/src/formats/openai/serialize.ts +15 -17
  152. package/src/formats/{parse-helpers.ts → request-helpers.ts} +2 -31
  153. package/src/formats/responses/index.ts +1 -1
  154. package/src/formats/responses/parse.ts +1 -1
  155. package/src/formats/responses/schema.ts +1 -72
  156. package/src/formats/responses/serialize.ts +9 -5
  157. package/src/formats/serialize-helpers.ts +30 -0
  158. package/src/formats/types.ts +3 -3
  159. package/src/loader.ts +7 -11
  160. package/src/logger.ts +19 -25
  161. package/src/mock-server.ts +10 -14
  162. package/src/route-handler.ts +1 -1
  163. package/src/rule-engine.ts +23 -1
  164. package/src/types/reply.ts +6 -10
  165. package/src/types/request.ts +7 -11
  166. package/src/types/rule.ts +3 -10
  167. package/src/types.ts +3 -5
  168. package/test/formats/anthropic.test.ts +4 -4
  169. package/test/formats/parse-helpers.test.ts +275 -0
  170. package/test/formats/responses.test.ts +4 -4
  171. package/test/helpers/make-req.ts +18 -0
  172. package/test/history.test.ts +348 -0
  173. package/test/loader.test.ts +11 -27
  174. package/test/logger.test.ts +294 -0
  175. package/test/mock-server.test.ts +1 -1
  176. package/test/rule-engine.test.ts +8 -22
  177. package/test/formats/anthropic-schema.test.ts +0 -192
  178. package/test/formats/openai-schema.test.ts +0 -105
  179. package/test/formats/responses-schema.test.ts +0 -114
@@ -0,0 +1,20 @@
1
+ # External Blind Review Session
2
+
3
+ Session id: ext_20260315_000339_a6cdc3e6
4
+ Session token: 4c9efbdef15e9ddaee7ea148169a4635
5
+ Blind packet: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/review_packet_blind.json
6
+ Template output: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.template.json
7
+ Claude launch prompt: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/claude_launch_prompt.md
8
+ Expected reviewer output: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.json
9
+
10
+ Happy path:
11
+ 1. Open the Claude launch prompt file and paste it into a context-isolated subagent task.
12
+ 2. Reviewer writes JSON output to the expected reviewer output path.
13
+ 3. Submit with the printed --external-submit command.
14
+
15
+ Reviewer output requirements:
16
+ 1. Return JSON with top-level keys: session, assessments, findings.
17
+ 2. session.id must be `ext_20260315_000339_a6cdc3e6`.
18
+ 3. session.token must be `4c9efbdef15e9ddaee7ea148169a4635`.
19
+ 4. Include findings with required schema fields (dimension/identifier/summary/related_files/evidence/suggestion/confidence).
20
+ 5. Use the blind packet only (no score targets or prior context).
@@ -0,0 +1,20 @@
1
+ {
2
+ "session_id": "ext_20260315_000339_a6cdc3e6",
3
+ "status": "submitted",
4
+ "runner": "claude",
5
+ "created_at": "2026-03-15T00:03:39+00:00",
6
+ "expires_at": "2026-03-16T00:03:39+00:00",
7
+ "ttl_hours": 24,
8
+ "token": "4c9efbdef15e9ddaee7ea148169a4635",
9
+ "attest": "I validated this review was completed without awareness of overall score and is unbiased.",
10
+ "packet_path": "/Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/review_packets/holistic_packet_20260315_000339.json",
11
+ "blind_packet_path": "/Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/review_packet_blind.json",
12
+ "packet_sha256": "61563983650626757ab21c4b1e8ea4db0d723c4ce1fde659f2bbff0a59e56044",
13
+ "template_path": "/Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.template.json",
14
+ "launch_prompt_path": "/Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/claude_launch_prompt.md",
15
+ "instructions_path": "/Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/reviewer_instructions.md",
16
+ "expected_output_path": "/Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.json",
17
+ "submitted_at": "2026-03-15T00:09:50+00:00",
18
+ "submitted_input_file": "/Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.json",
19
+ "submitted_canonical_file": "/Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000950.json"
20
+ }
@@ -0,0 +1,284 @@
1
+ {
2
+ "command": "resolve",
3
+ "patterns": [
4
+ "structural::test/mock-server.test.ts"
5
+ ],
6
+ "status": "wontfix",
7
+ "resolved": [
8
+ "structural::test/mock-server.test.ts"
9
+ ],
10
+ "count": 1,
11
+ "next_command": "desloppify scan",
12
+ "overall_score": 94.0,
13
+ "objective_score": 100.0,
14
+ "strict_score": 88.6,
15
+ "verified_strict_score": 86.5,
16
+ "prev_overall_score": 94.0,
17
+ "prev_objective_score": 100.0,
18
+ "prev_strict_score": 88.6,
19
+ "prev_verified_strict_score": 86.5,
20
+ "attestation": "I have actually reviewed the test file structure and confirmed it is organized into clear describe blocks and I am not gaming the score.",
21
+ "narrative": {
22
+ "phase": "stagnation",
23
+ "headline": "All T1 and T2 items cleared!",
24
+ "dimensions": {
25
+ "lowest_dimensions": [
26
+ {
27
+ "name": "Test health",
28
+ "strict": 65.8,
29
+ "issues": 0,
30
+ "impact": 0.0
31
+ },
32
+ {
33
+ "name": "AI generated debt",
34
+ "strict": 82.0,
35
+ "issues": 0,
36
+ "impact": 0.0,
37
+ "subjective": true,
38
+ "impact_description": "re-review to improve"
39
+ },
40
+ {
41
+ "name": "Error consistency",
42
+ "strict": 84.0,
43
+ "issues": 0,
44
+ "impact": 0.0,
45
+ "subjective": true,
46
+ "impact_description": "re-review to improve"
47
+ }
48
+ ],
49
+ "biggest_gap_dimensions": [
50
+ {
51
+ "name": "Test health",
52
+ "lenient": 100.0,
53
+ "strict": 65.8,
54
+ "gap": 34.2,
55
+ "wontfix_count": 9
56
+ },
57
+ {
58
+ "name": "Code quality",
59
+ "lenient": 100.0,
60
+ "strict": 96.4,
61
+ "gap": 3.6,
62
+ "wontfix_count": 20
63
+ }
64
+ ],
65
+ "stagnant_dimensions": [
66
+ {
67
+ "name": "File health",
68
+ "strict": 100.0,
69
+ "stuck_scans": 5
70
+ },
71
+ {
72
+ "name": "Duplication",
73
+ "strict": 100.0,
74
+ "stuck_scans": 5
75
+ },
76
+ {
77
+ "name": "Security",
78
+ "strict": 100.0,
79
+ "stuck_scans": 5
80
+ },
81
+ {
82
+ "name": "Error consistency",
83
+ "strict": 84.0,
84
+ "stuck_scans": 5
85
+ },
86
+ {
87
+ "name": "Abstraction fit",
88
+ "strict": 93.0,
89
+ "stuck_scans": 5
90
+ },
91
+ {
92
+ "name": "AI generated debt",
93
+ "strict": 82.0,
94
+ "stuck_scans": 5
95
+ },
96
+ {
97
+ "name": "High elegance",
98
+ "strict": 93.0,
99
+ "stuck_scans": 5
100
+ },
101
+ {
102
+ "name": "Mid elegance",
103
+ "strict": 90.0,
104
+ "stuck_scans": 5
105
+ },
106
+ {
107
+ "name": "Low elegance",
108
+ "strict": 87.0,
109
+ "stuck_scans": 5
110
+ },
111
+ {
112
+ "name": "Cross-module arch",
113
+ "strict": 92.0,
114
+ "stuck_scans": 5
115
+ },
116
+ {
117
+ "name": "Convention drift",
118
+ "strict": 88.5,
119
+ "stuck_scans": 5
120
+ },
121
+ {
122
+ "name": "API coherence",
123
+ "strict": 86.0,
124
+ "stuck_scans": 5
125
+ },
126
+ {
127
+ "name": "Auth consistency",
128
+ "strict": 100.0,
129
+ "stuck_scans": 5
130
+ },
131
+ {
132
+ "name": "Stale migration",
133
+ "strict": 97.0,
134
+ "stuck_scans": 5
135
+ },
136
+ {
137
+ "name": "Structure nav",
138
+ "strict": 93.0,
139
+ "stuck_scans": 5
140
+ },
141
+ {
142
+ "name": "Design coherence",
143
+ "strict": 84.0,
144
+ "stuck_scans": 5
145
+ }
146
+ ]
147
+ },
148
+ "actions": [
149
+ {
150
+ "type": "debt_review",
151
+ "detector": null,
152
+ "description": "2.1 pts of wontfix debt \u2014 review stale decisions",
153
+ "command": "desloppify show --status wontfix",
154
+ "gap": 2.1,
155
+ "priority": 1,
156
+ "lane": "debt_review"
157
+ }
158
+ ],
159
+ "strategy": {
160
+ "fixer_leverage": {
161
+ "auto_fixable_count": 0,
162
+ "total_count": 0,
163
+ "coverage": 0.0,
164
+ "impact_ratio": 0.0,
165
+ "recommendation": "none"
166
+ },
167
+ "lanes": {
168
+ "debt_review": {
169
+ "actions": [
170
+ 1
171
+ ],
172
+ "file_count": 0,
173
+ "total_impact": 0.0,
174
+ "automation": "manual",
175
+ "run_first": false
176
+ }
177
+ },
178
+ "can_parallelize": false,
179
+ "hint": "Try a different dimension to break the plateau."
180
+ },
181
+ "tools": {
182
+ "fixers": [],
183
+ "move": {
184
+ "available": true,
185
+ "relevant": false,
186
+ "reason": null,
187
+ "usage": "desloppify move <source> <dest> [--dry-run]"
188
+ },
189
+ "plan": {
190
+ "command": "desloppify plan",
191
+ "description": "Generate prioritized markdown cleanup plan"
192
+ },
193
+ "badge": {
194
+ "generated": true,
195
+ "in_readme": false,
196
+ "path": "scorecard.png",
197
+ "recommendation": "Add to README: <img src=\"scorecard.png\" width=\"100%\">"
198
+ }
199
+ },
200
+ "debt": {
201
+ "overall_gap": 2.1,
202
+ "wontfix_count": 31,
203
+ "worst_dimension": "Test health",
204
+ "worst_gap": 34.2,
205
+ "trend": "growing"
206
+ },
207
+ "milestone": "All T1 and T2 items cleared!",
208
+ "primary_action": {
209
+ "command": "desloppify show --status wontfix",
210
+ "description": "2.1 pts of wontfix debt \u2014 review stale decisions"
211
+ },
212
+ "why_now": "Try a different dimension to break the plateau.",
213
+ "verification_step": {
214
+ "command": "desloppify scan",
215
+ "reason": "revalidate after changes"
216
+ },
217
+ "risk_flags": [
218
+ {
219
+ "type": "wontfix_gap",
220
+ "severity": "medium",
221
+ "message": "Strict/lenient gap is 2.1 pts with 31 wontfix findings"
222
+ }
223
+ ],
224
+ "strict_target": {
225
+ "target": 95.0,
226
+ "current": 88.6,
227
+ "gap": 6.4,
228
+ "state": "below",
229
+ "warning": null
230
+ },
231
+ "reminders": [
232
+ {
233
+ "type": "rereview_needed",
234
+ "message": "Subjective results may be stale after resolve. Re-run `desloppify review --prepare` to refresh, or reset with `desloppify scan --reset-subjective` before a clean rerun.",
235
+ "command": "desloppify review --prepare",
236
+ "priority": 1,
237
+ "severity": "high"
238
+ },
239
+ {
240
+ "type": "rescan_needed",
241
+ "message": "Rescan to verify \u2014 cascading effects may create new findings.",
242
+ "command": "desloppify scan",
243
+ "priority": 1,
244
+ "severity": "high"
245
+ },
246
+ {
247
+ "type": "wontfix_growing",
248
+ "message": "Wontfix debt is growing. Review stale decisions: `desloppify show --status wontfix`.",
249
+ "command": "desloppify show --status wontfix",
250
+ "priority": 2,
251
+ "severity": "medium"
252
+ }
253
+ ],
254
+ "reminder_history": {
255
+ "zone_classification": 3,
256
+ "report_scores": 6,
257
+ "feedback_nudge": 3,
258
+ "review_findings_pending": 2,
259
+ "stagnant_nudge": 4,
260
+ "review_not_run": 3,
261
+ "wontfix_growing": 2,
262
+ "rereview_needed": 1,
263
+ "rescan_needed": 1
264
+ }
265
+ },
266
+ "config": {
267
+ "target_strict_score": 95,
268
+ "review_max_age_days": 30,
269
+ "review_batch_max_files": 80,
270
+ "holistic_max_age_days": 30,
271
+ "generate_scorecard": true,
272
+ "badge_path": "scorecard.png",
273
+ "exclude": [],
274
+ "ignore": [],
275
+ "ignore_metadata": {},
276
+ "zone_overrides": {},
277
+ "review_dimensions": [],
278
+ "large_files_threshold": 0,
279
+ "props_threshold": 0,
280
+ "finding_noise_budget": 10,
281
+ "finding_noise_global_budget": 0,
282
+ "languages": {}
283
+ }
284
+ }