@bluelibs/runner-dev 4.0.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.
Files changed (215) hide show
  1. package/AI.md +411 -0
  2. package/README.md +1103 -0
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.js +58 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/client/documentation.d.ts +8 -0
  7. package/dist/client/documentation.js +144 -0
  8. package/dist/client/documentation.js.map +1 -0
  9. package/dist/components/Documentation/Documentation.d.ts +8 -0
  10. package/dist/components/Documentation/Documentation.js +283 -0
  11. package/dist/components/Documentation/Documentation.js.map +1 -0
  12. package/dist/components/Documentation/components/DiagnosticsPanel.d.ts +7 -0
  13. package/dist/components/Documentation/components/DiagnosticsPanel.js +126 -0
  14. package/dist/components/Documentation/components/DiagnosticsPanel.js.map +1 -0
  15. package/dist/components/Documentation/components/EventCard.d.ts +8 -0
  16. package/dist/components/Documentation/components/EventCard.js +164 -0
  17. package/dist/components/Documentation/components/EventCard.js.map +1 -0
  18. package/dist/components/Documentation/components/HookCard.d.ts +8 -0
  19. package/dist/components/Documentation/components/HookCard.js +111 -0
  20. package/dist/components/Documentation/components/HookCard.js.map +1 -0
  21. package/dist/components/Documentation/components/MiddlewareCard.d.ts +8 -0
  22. package/dist/components/Documentation/components/MiddlewareCard.js +159 -0
  23. package/dist/components/Documentation/components/MiddlewareCard.js.map +1 -0
  24. package/dist/components/Documentation/components/ResourceCard.d.ts +8 -0
  25. package/dist/components/Documentation/components/ResourceCard.js +94 -0
  26. package/dist/components/Documentation/components/ResourceCard.js.map +1 -0
  27. package/dist/components/Documentation/components/Sidebar.d.ts +13 -0
  28. package/dist/components/Documentation/components/Sidebar.js +129 -0
  29. package/dist/components/Documentation/components/Sidebar.js.map +1 -0
  30. package/dist/components/Documentation/components/TagCard.d.ts +7 -0
  31. package/dist/components/Documentation/components/TagCard.js +75 -0
  32. package/dist/components/Documentation/components/TagCard.js.map +1 -0
  33. package/dist/components/Documentation/components/TaskCard.d.ts +8 -0
  34. package/dist/components/Documentation/components/TaskCard.js +77 -0
  35. package/dist/components/Documentation/components/TaskCard.js.map +1 -0
  36. package/dist/components/Documentation/index.d.ts +2 -0
  37. package/dist/components/Documentation/index.js +6 -0
  38. package/dist/components/Documentation/index.js.map +1 -0
  39. package/dist/components/Documentation/utils/formatting.d.ts +8 -0
  40. package/dist/components/Documentation/utils/formatting.js +84 -0
  41. package/dist/components/Documentation/utils/formatting.js.map +1 -0
  42. package/dist/components/ExampleComponent.d.ts +10 -0
  43. package/dist/components/ExampleComponent.js +48 -0
  44. package/dist/components/ExampleComponent.js.map +1 -0
  45. package/dist/generated/resolvers-types.d.ts +1523 -0
  46. package/dist/generated/resolvers-types.js +3 -0
  47. package/dist/generated/resolvers-types.js.map +1 -0
  48. package/dist/index.d.ts +61 -0
  49. package/dist/index.js +22 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/main.d.ts +1 -0
  52. package/dist/main.js +3 -0
  53. package/dist/main.js.map +1 -0
  54. package/dist/mcp/env.d.ts +5 -0
  55. package/dist/mcp/env.js +42 -0
  56. package/dist/mcp/env.js.map +1 -0
  57. package/dist/mcp/format.d.ts +50 -0
  58. package/dist/mcp/format.js +249 -0
  59. package/dist/mcp/format.js.map +1 -0
  60. package/dist/mcp/help.d.ts +20 -0
  61. package/dist/mcp/help.js +121 -0
  62. package/dist/mcp/help.js.map +1 -0
  63. package/dist/mcp/http.d.ts +6 -0
  64. package/dist/mcp/http.js +47 -0
  65. package/dist/mcp/http.js.map +1 -0
  66. package/dist/mcp/projectOverview.d.ts +2 -0
  67. package/dist/mcp/projectOverview.js +210 -0
  68. package/dist/mcp/projectOverview.js.map +1 -0
  69. package/dist/mcp/schema.d.ts +1 -0
  70. package/dist/mcp/schema.js +17 -0
  71. package/dist/mcp/schema.js.map +1 -0
  72. package/dist/mcp/tools/graphql.introspect.d.ts +2 -0
  73. package/dist/mcp/tools/graphql.introspect.js +19 -0
  74. package/dist/mcp/tools/graphql.introspect.js.map +1 -0
  75. package/dist/mcp/tools/graphql.mutation.d.ts +2 -0
  76. package/dist/mcp/tools/graphql.mutation.js +43 -0
  77. package/dist/mcp/tools/graphql.mutation.js.map +1 -0
  78. package/dist/mcp/tools/graphql.ping.d.ts +2 -0
  79. package/dist/mcp/tools/graphql.ping.js +23 -0
  80. package/dist/mcp/tools/graphql.ping.js.map +1 -0
  81. package/dist/mcp/tools/graphql.query.d.ts +2 -0
  82. package/dist/mcp/tools/graphql.query.js +42 -0
  83. package/dist/mcp/tools/graphql.query.js.map +1 -0
  84. package/dist/mcp/tools/graphql.schemaSdl.d.ts +2 -0
  85. package/dist/mcp/tools/graphql.schemaSdl.js +15 -0
  86. package/dist/mcp/tools/graphql.schemaSdl.js.map +1 -0
  87. package/dist/mcp/tools/help.read.d.ts +2 -0
  88. package/dist/mcp/tools/help.read.js +67 -0
  89. package/dist/mcp/tools/help.read.js.map +1 -0
  90. package/dist/mcp/tools/help.runner.d.ts +2 -0
  91. package/dist/mcp/tools/help.runner.js +55 -0
  92. package/dist/mcp/tools/help.runner.js.map +1 -0
  93. package/dist/mcp/tools/help.runnerDev.d.ts +2 -0
  94. package/dist/mcp/tools/help.runnerDev.js +56 -0
  95. package/dist/mcp/tools/help.runnerDev.js.map +1 -0
  96. package/dist/mcp.d.ts +1 -0
  97. package/dist/mcp.js +75 -0
  98. package/dist/mcp.js.map +1 -0
  99. package/dist/resources/dev.resource.d.ts +5 -0
  100. package/dist/resources/dev.resource.js +26 -0
  101. package/dist/resources/dev.resource.js.map +1 -0
  102. package/dist/resources/docs.generator.resource.d.ts +17 -0
  103. package/dist/resources/docs.generator.resource.js +230 -0
  104. package/dist/resources/docs.generator.resource.js.map +1 -0
  105. package/dist/resources/graphql-accumulator.resource.d.ts +7 -0
  106. package/dist/resources/graphql-accumulator.resource.js +41 -0
  107. package/dist/resources/graphql-accumulator.resource.js.map +1 -0
  108. package/dist/resources/introspector.resource.d.ts +129 -0
  109. package/dist/resources/introspector.resource.js +266 -0
  110. package/dist/resources/introspector.resource.js.map +1 -0
  111. package/dist/resources/introspector.tools.d.ts +47 -0
  112. package/dist/resources/introspector.tools.js +505 -0
  113. package/dist/resources/introspector.tools.js.map +1 -0
  114. package/dist/resources/live.resource.d.ts +80 -0
  115. package/dist/resources/live.resource.js +231 -0
  116. package/dist/resources/live.resource.js.map +1 -0
  117. package/dist/resources/server.resource.d.ts +38 -0
  118. package/dist/resources/server.resource.js +106 -0
  119. package/dist/resources/server.resource.js.map +1 -0
  120. package/dist/resources/swap.resource.d.ts +43 -0
  121. package/dist/resources/swap.resource.js +251 -0
  122. package/dist/resources/swap.resource.js.map +1 -0
  123. package/dist/resources/swap.tools.d.ts +31 -0
  124. package/dist/resources/swap.tools.js +207 -0
  125. package/dist/resources/swap.tools.js.map +1 -0
  126. package/dist/resources/telemetry.chain.d.ts +13 -0
  127. package/dist/resources/telemetry.chain.js +32 -0
  128. package/dist/resources/telemetry.chain.js.map +1 -0
  129. package/dist/resources/telemetry.resource.d.ts +1 -0
  130. package/dist/resources/telemetry.resource.js +90 -0
  131. package/dist/resources/telemetry.resource.js.map +1 -0
  132. package/dist/schema/context.d.ts +11 -0
  133. package/dist/schema/context.js +3 -0
  134. package/dist/schema/context.js.map +1 -0
  135. package/dist/schema/index.d.ts +7 -0
  136. package/dist/schema/index.js +72 -0
  137. package/dist/schema/index.js.map +1 -0
  138. package/dist/schema/model.d.ts +97 -0
  139. package/dist/schema/model.js +5 -0
  140. package/dist/schema/model.js.map +1 -0
  141. package/dist/schema/mutation.d.ts +3 -0
  142. package/dist/schema/mutation.js +112 -0
  143. package/dist/schema/mutation.js.map +1 -0
  144. package/dist/schema/query.d.ts +3 -0
  145. package/dist/schema/query.js +295 -0
  146. package/dist/schema/query.js.map +1 -0
  147. package/dist/schema/types/AllType.d.ts +3 -0
  148. package/dist/schema/types/AllType.js +149 -0
  149. package/dist/schema/types/AllType.js.map +1 -0
  150. package/dist/schema/types/BaseElementCommon.d.ts +11 -0
  151. package/dist/schema/types/BaseElementCommon.js +61 -0
  152. package/dist/schema/types/BaseElementCommon.js.map +1 -0
  153. package/dist/schema/types/DiagnosticsType.d.ts +2 -0
  154. package/dist/schema/types/DiagnosticsType.js +15 -0
  155. package/dist/schema/types/DiagnosticsType.js.map +1 -0
  156. package/dist/schema/types/EventType.d.ts +4 -0
  157. package/dist/schema/types/EventType.js +97 -0
  158. package/dist/schema/types/EventType.js.map +1 -0
  159. package/dist/schema/types/HookType.d.ts +4 -0
  160. package/dist/schema/types/HookType.js +123 -0
  161. package/dist/schema/types/HookType.js.map +1 -0
  162. package/dist/schema/types/LiveType.d.ts +33 -0
  163. package/dist/schema/types/LiveType.js +553 -0
  164. package/dist/schema/types/LiveType.js.map +1 -0
  165. package/dist/schema/types/MetaType.d.ts +3 -0
  166. package/dist/schema/types/MetaType.js +31 -0
  167. package/dist/schema/types/MetaType.js.map +1 -0
  168. package/dist/schema/types/MiddlewareType.d.ts +4 -0
  169. package/dist/schema/types/MiddlewareType.js +26 -0
  170. package/dist/schema/types/MiddlewareType.js.map +1 -0
  171. package/dist/schema/types/ResourceType.d.ts +2 -0
  172. package/dist/schema/types/ResourceType.js +145 -0
  173. package/dist/schema/types/ResourceType.js.map +1 -0
  174. package/dist/schema/types/RunTypes.d.ts +7 -0
  175. package/dist/schema/types/RunTypes.js +95 -0
  176. package/dist/schema/types/RunTypes.js.map +1 -0
  177. package/dist/schema/types/SwapType.d.ts +5 -0
  178. package/dist/schema/types/SwapType.js +42 -0
  179. package/dist/schema/types/SwapType.js.map +1 -0
  180. package/dist/schema/types/TagType.d.ts +6 -0
  181. package/dist/schema/types/TagType.js +48 -0
  182. package/dist/schema/types/TagType.js.map +1 -0
  183. package/dist/schema/types/TaskLikeCommon.d.ts +7 -0
  184. package/dist/schema/types/TaskLikeCommon.js +86 -0
  185. package/dist/schema/types/TaskLikeCommon.js.map +1 -0
  186. package/dist/schema/types/TaskType.d.ts +11 -0
  187. package/dist/schema/types/TaskType.js +188 -0
  188. package/dist/schema/types/TaskType.js.map +1 -0
  189. package/dist/schema/types/index.d.ts +13 -0
  190. package/dist/schema/types/index.js +44 -0
  191. package/dist/schema/types/index.js.map +1 -0
  192. package/dist/schema/types/middleware/UsageTypes.d.ts +3 -0
  193. package/dist/schema/types/middleware/UsageTypes.js +23 -0
  194. package/dist/schema/types/middleware/UsageTypes.js.map +1 -0
  195. package/dist/schema/types/middleware/common.d.ts +6 -0
  196. package/dist/schema/types/middleware/common.js +156 -0
  197. package/dist/schema/types/middleware/common.js.map +1 -0
  198. package/dist/schema/utils.d.ts +12 -0
  199. package/dist/schema/utils.js +35 -0
  200. package/dist/schema/utils.js.map +1 -0
  201. package/dist/ui/index.html +20 -0
  202. package/dist/ui/static/index-D-NS5aw1.js +40 -0
  203. package/dist/utils/json-schema-to-readable.d.ts +1 -0
  204. package/dist/utils/json-schema-to-readable.js +256 -0
  205. package/dist/utils/json-schema-to-readable.js.map +1 -0
  206. package/dist/utils/path.d.ts +16 -0
  207. package/dist/utils/path.js +101 -0
  208. package/dist/utils/path.js.map +1 -0
  209. package/dist/utils/react-ssr.d.ts +9 -0
  210. package/dist/utils/react-ssr.js +36 -0
  211. package/dist/utils/react-ssr.js.map +1 -0
  212. package/dist/utils/zod.d.ts +6 -0
  213. package/dist/utils/zod.js +39 -0
  214. package/dist/utils/zod.js.map +1 -0
  215. package/package.json +83 -0
package/AI.md ADDED
@@ -0,0 +1,411 @@
1
+ # Runner-Dev AI Assistant Guide
2
+
3
+ This document provides AI assistants with comprehensive guidance on using Runner-Dev's introspection and development tools.
4
+
5
+ ## What is Runner-Dev?
6
+
7
+ Runner-Dev is a powerful development toolkit for applications built with the **@bluelibs/runner** framework. It provides:
8
+
9
+ - **Live Introspection**: Query your running application's architecture
10
+ - **Hot-Swapping**: Modify tasks at runtime with TypeScript/JavaScript
11
+ - **Real-time Telemetry**: Monitor logs, events, errors, and performance
12
+ - **GraphQL API**: Comprehensive query interface for all system data
13
+ - **MCP Integration**: AI-native development environment
14
+ - **Tags (first-class)**: Discover Tag objects and reverse usage via GraphQL (`tags`, `tag(id)`).
15
+
16
+ ## Available GraphQL Queries
17
+
18
+ ### System Architecture Queries
19
+
20
+ ```graphql
21
+ # Get all elements (tasks, resources, events, middleware, hooks)
22
+ query SystemOverview {
23
+ all {
24
+ id
25
+ meta {
26
+ title
27
+ description
28
+ }
29
+ filePath
30
+ }
31
+ }
32
+
33
+ # Get specific element types
34
+ query Architecture {
35
+ tasks {
36
+ id
37
+ meta {
38
+ title
39
+ description
40
+ }
41
+ dependsOn
42
+ emits
43
+ }
44
+ resources {
45
+ id
46
+ meta {
47
+ title
48
+ description
49
+ }
50
+ dependsOn
51
+ registers
52
+ overrides
53
+ usedBy
54
+ }
55
+ events {
56
+ id
57
+ emittedBy
58
+ listenedToBy
59
+ }
60
+ middlewares {
61
+ id
62
+ meta {
63
+ title
64
+ description
65
+ }
66
+ usedByTasks
67
+ }
68
+ hooks {
69
+ id
70
+ meta {
71
+ title
72
+ description
73
+ }
74
+ event
75
+ }
76
+ }
77
+ ```
78
+
79
+ ### Live Telemetry Queries
80
+
81
+ ```graphql
82
+ # Real-time system monitoring
83
+ query LiveTelemetry {
84
+ live {
85
+ memory {
86
+ heapUsed
87
+ heapTotal
88
+ rss
89
+ }
90
+ cpu {
91
+ usage
92
+ loadAverage
93
+ }
94
+ eventLoop {
95
+ lag
96
+ }
97
+ gc {
98
+ collections
99
+ duration
100
+ }
101
+
102
+ # Recent activity (use 'last' parameter to limit)
103
+ logs(last: 10) {
104
+ timestampMs
105
+ level
106
+ message
107
+ correlationId
108
+ }
109
+ emissions(last: 10) {
110
+ timestampMs
111
+ eventId
112
+ emitterId
113
+ correlationId
114
+ }
115
+ errors(last: 10) {
116
+ timestampMs
117
+ sourceKind
118
+ message
119
+ correlationId
120
+ }
121
+ runs(last: 10) {
122
+ timestampMs
123
+ nodeId
124
+ nodeKind
125
+ durationMs
126
+ ok
127
+ correlationId
128
+ }
129
+ }
130
+ }
131
+ ```
132
+
133
+ ### Diagnostics & Health
134
+
135
+ ```graphql
136
+ # System diagnostics and issues
137
+ query SystemHealth {
138
+ diagnostics {
139
+ severity
140
+ code
141
+ message
142
+ nodeId
143
+ nodeKind
144
+ }
145
+ }
146
+ ```
147
+
148
+ ## Available GraphQL Mutations
149
+
150
+ ### Hot-Swapping Tasks
151
+
152
+ ```graphql
153
+ # Swap a task's implementation at runtime
154
+ mutation SwapTask($taskId: ID!, $runCode: String!) {
155
+ swapTask(taskId: $taskId, runCode: $runCode) {
156
+ success
157
+ error
158
+ taskId
159
+ }
160
+ }
161
+
162
+ # Restore original implementation
163
+ mutation UnswapTask($taskId: ID!) {
164
+ unswapTask(taskId: $taskId) {
165
+ success
166
+ error
167
+ taskId
168
+ }
169
+ }
170
+
171
+ # Restore all tasks
172
+ mutation UnswapAllTasks {
173
+ unswapAllTasks {
174
+ success
175
+ error
176
+ taskId
177
+ }
178
+ }
179
+ ```
180
+
181
+ ### Task Invocation
182
+
183
+ ```graphql
184
+ # Invoke a task remotely
185
+ mutation InvokeTask(
186
+ $taskId: ID!
187
+ $inputJson: String
188
+ $pure: Boolean
189
+ $evalInput: Boolean
190
+ ) {
191
+ invokeTask(
192
+ taskId: $taskId
193
+ inputJson: $inputJson
194
+ pure: $pure # bypass middleware
195
+ evalInput: $evalInput # evaluate input as JavaScript
196
+ ) {
197
+ success
198
+ error
199
+ result
200
+ executionTimeMs
201
+ invocationId
202
+ }
203
+ }
204
+ ```
205
+
206
+ ### Code Evaluation
207
+
208
+ ```graphql
209
+ # Execute arbitrary code on the server (DEV ONLY)
210
+ mutation EvalCode($code: String!, $inputJson: String, $evalInput: Boolean) {
211
+ eval(code: $code, inputJson: $inputJson, evalInput: $evalInput) {
212
+ success
213
+ error
214
+ result
215
+ executionTimeMs
216
+ invocationId
217
+ }
218
+ }
219
+ ```
220
+
221
+ ## MCP Tools Available
222
+
223
+ ### GraphQL Operations
224
+
225
+ - `graphql_query` - Execute read-only GraphQL queries
226
+ - `graphql_mutation` - Execute GraphQL mutations (if ALLOW_MUTATIONS=true)
227
+ - `graphql.introspect` - Get full schema introspection
228
+ - `graphql.schemaSdl` - Get schema as SDL string
229
+ - `graphql.ping` - Test connectivity
230
+
231
+ ### Documentation
232
+
233
+ - `help.read` - Read local docs (README.md, AI.md) or package docs
234
+ - `help.runner` - Read @bluelibs/runner framework documentation
235
+ - `help.runnerDev` - Read Runner-Dev application documentation (README + AI guide)
236
+ - `project.overview` - Generate dynamic project overview
237
+
238
+ **🎯 Pro Tip: Array-Based Heading Filtering**
239
+ All documentation tools support powerful array-based heading filtering:
240
+
241
+ ```typescript
242
+ // Single heading (traditional)
243
+ headingIncludes: "installation";
244
+
245
+ // Multiple headings (NEW!) - Get comprehensive context in one call
246
+ headingIncludes: ["installation", "configuration", "troubleshooting"];
247
+ headingIncludes: ["tasks", "resources", "events", "middleware"];
248
+ headingIncludes: ["hot-swapping", "live telemetry", "debugging"];
249
+ ```
250
+
251
+ This enables gathering related information efficiently instead of making multiple sequential requests. The output shows exactly what sections were found and combines them with clear separators.
252
+
253
+ **Example Usage:**
254
+
255
+ ```typescript
256
+ // Get comprehensive Runner framework understanding
257
+ help.runner({
258
+ headingIncludes: ["tasks", "resources", "events", "middleware"],
259
+ });
260
+
261
+ // Understand development workflow
262
+ help.runner_dev({
263
+ headingIncludes: ["hot-swapping", "live telemetry", "debugging"],
264
+ });
265
+
266
+ // Compare installation methods
267
+ help.read({ headingIncludes: ["installation", "setup", "configuration"] });
268
+ ```
269
+
270
+ ## Common Use Cases
271
+
272
+ ### 1. Understanding System Architecture
273
+
274
+ ```graphql
275
+ query UnderstandSystem {
276
+ tasks {
277
+ id
278
+ meta {
279
+ title
280
+ description
281
+ }
282
+ dependsOn
283
+ emits
284
+ filePath
285
+ }
286
+ resources {
287
+ id
288
+ meta {
289
+ title
290
+ description
291
+ }
292
+ registers
293
+ filePath
294
+ }
295
+ }
296
+ ```
297
+
298
+ ### 2. Debugging Issues
299
+
300
+ ```graphql
301
+ query DebuggingInfo {
302
+ diagnostics {
303
+ severity
304
+ code
305
+ message
306
+ nodeId
307
+ }
308
+ live {
309
+ errors(last: 20) {
310
+ timestampMs
311
+ sourceKind
312
+ message
313
+ stack
314
+ correlationId
315
+ }
316
+ }
317
+ }
318
+ ```
319
+
320
+ ### 3. Performance Monitoring
321
+
322
+ ```graphql
323
+ query Performance {
324
+ live {
325
+ memory {
326
+ heapUsed
327
+ heapTotal
328
+ rss
329
+ }
330
+ cpu {
331
+ usage
332
+ loadAverage
333
+ }
334
+ eventLoop {
335
+ lag
336
+ }
337
+ runs(last: 50, filter: { ok: false }) {
338
+ nodeId
339
+ durationMs
340
+ error
341
+ timestampMs
342
+ }
343
+ }
344
+ }
345
+ ```
346
+
347
+ ### 4. Hot Development Workflow
348
+
349
+ ```graphql
350
+ # 1. Check current swapped tasks
351
+ query CheckSwapped {
352
+ swappedTasks {
353
+ taskId
354
+ swappedAt
355
+ }
356
+ }
357
+
358
+ # 2. Swap a task
359
+ mutation DevSwap {
360
+ swapTask(
361
+ taskId: "my.task"
362
+ runCode: "async function run(input, deps) { return { message: 'Updated!' }; }"
363
+ ) {
364
+ success
365
+ error
366
+ }
367
+ }
368
+
369
+ # 3. Test the task
370
+ mutation TestTask {
371
+ invokeTask(taskId: "my.task", inputJson: "{\"test\": true}", pure: true) {
372
+ success
373
+ result
374
+ executionTimeMs
375
+ }
376
+ }
377
+ ```
378
+
379
+ ## Best Practices for AI Assistants
380
+
381
+ ### Documentation & Information Gathering
382
+
383
+ 1. **Use Array-Based Heading Filters**: Get comprehensive context efficiently with `headingIncludes: ["topic1", "topic2", "topic3"]`
384
+ 2. **Start with TOC**: Use `toc: true` to understand document structure before diving deep
385
+ 3. **Choose Right Documentation Tool**:
386
+ - `help.runner` for framework concepts
387
+ - `help.runner-dev` for application-specific features
388
+ - `help.read` for custom package docs
389
+ 4. **Combine Related Topics**: Instead of multiple calls, use arrays like `["tasks", "resources", "events"]`
390
+
391
+ ### System Operations
392
+
393
+ 5. **Start with Overview**: Use `project.overview` to understand the system
394
+ 6. **Use Correlation IDs**: Track related operations across logs/runs/errors
395
+ 7. **Limit Results**: Always use `last` parameter for live queries to avoid overwhelming responses
396
+ 8. **Check Diagnostics**: Look for warnings/errors that might indicate issues
397
+ 9. **Use Markdown Format**: Request `format: "markdown"` for better readability
398
+ 10. **Hot-Swap Safely**: Test swapped code with `pure: true` before production use
399
+
400
+ ## Environment Variables
401
+
402
+ - `ENDPOINT` - GraphQL endpoint (default: http://localhost:1337/graphql)
403
+ - `ALLOW_MUTATIONS` - Enable mutations in MCP (default: false)
404
+ - `RUNNER_DEV_EVAL` - Enable eval mutation (default: false, DEV ONLY)
405
+
406
+ ## Security Notes
407
+
408
+ - Mutations are disabled by default in production
409
+ - Eval is extremely dangerous and should only be used in development
410
+ - Hot-swapping affects the running system - use with caution
411
+ - All operations are logged with correlation IDs for traceability