@bluelibs/runner-dev 5.3.0 → 6.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 (139) hide show
  1. package/AI.md +25 -3
  2. package/README.md +153 -18
  3. package/dist/cli/generators/scaffold/templates/package.json.d.ts +2 -2
  4. package/dist/cli/generators/scaffold/templates/package.json.js +2 -2
  5. package/dist/cli/generators/scaffold.js +1 -135
  6. package/dist/cli/generators/scaffold.js.map +1 -1
  7. package/dist/cli/generators/templates.js +2 -1
  8. package/dist/cli/generators/templates.js.map +1 -1
  9. package/dist/generated/resolvers-types.d.ts +376 -144
  10. package/dist/index.d.ts +39 -43
  11. package/dist/resources/cli.config.resource.d.ts +1 -1
  12. package/dist/resources/cli.config.resource.js +2 -2
  13. package/dist/resources/cli.config.resource.js.map +1 -1
  14. package/dist/resources/coverage.resource.d.ts +2 -2
  15. package/dist/resources/coverage.resource.js +3 -3
  16. package/dist/resources/coverage.resource.js.map +1 -1
  17. package/dist/resources/dev.resource.d.ts +1 -1
  18. package/dist/resources/dev.resource.js +2 -2
  19. package/dist/resources/dev.resource.js.map +1 -1
  20. package/dist/resources/docs.generator.resource.d.ts +4 -4
  21. package/dist/resources/docs.generator.resource.js +2 -2
  22. package/dist/resources/docs.generator.resource.js.map +1 -1
  23. package/dist/resources/graphql-accumulator.resource.d.ts +2 -2
  24. package/dist/resources/graphql-accumulator.resource.js +6 -3
  25. package/dist/resources/graphql-accumulator.resource.js.map +1 -1
  26. package/dist/resources/graphql.cli.resource.d.ts +1 -1
  27. package/dist/resources/graphql.cli.resource.js +2 -2
  28. package/dist/resources/graphql.cli.resource.js.map +1 -1
  29. package/dist/resources/graphql.query.cli.task.d.ts +14 -16
  30. package/dist/resources/graphql.query.cli.task.js +3 -3
  31. package/dist/resources/graphql.query.cli.task.js.map +1 -1
  32. package/dist/resources/graphql.query.task.d.ts +18 -20
  33. package/dist/resources/graphql.query.task.js +4 -4
  34. package/dist/resources/graphql.query.task.js.map +1 -1
  35. package/dist/resources/http.tag.d.ts +1 -1
  36. package/dist/resources/http.tag.js +2 -2
  37. package/dist/resources/http.tag.js.map +1 -1
  38. package/dist/resources/introspector.cli.resource.d.ts +2 -2
  39. package/dist/resources/introspector.cli.resource.js +14 -6
  40. package/dist/resources/introspector.cli.resource.js.map +1 -1
  41. package/dist/resources/introspector.resource.d.ts +3 -3
  42. package/dist/resources/introspector.resource.js +4 -5
  43. package/dist/resources/introspector.resource.js.map +1 -1
  44. package/dist/resources/live.resource.d.ts +4 -6
  45. package/dist/resources/live.resource.js +38 -25
  46. package/dist/resources/live.resource.js.map +1 -1
  47. package/dist/resources/models/Introspector.d.ts +28 -14
  48. package/dist/resources/models/Introspector.js +334 -161
  49. package/dist/resources/models/Introspector.js.map +1 -1
  50. package/dist/resources/models/durable.runtime.js +36 -10
  51. package/dist/resources/models/durable.runtime.js.map +1 -1
  52. package/dist/resources/models/durable.tools.d.ts +1 -1
  53. package/dist/resources/models/durable.tools.js +6 -3
  54. package/dist/resources/models/durable.tools.js.map +1 -1
  55. package/dist/resources/models/initializeFromStore.js +54 -21
  56. package/dist/resources/models/initializeFromStore.js.map +1 -1
  57. package/dist/resources/models/initializeFromStore.utils.d.ts +7 -6
  58. package/dist/resources/models/initializeFromStore.utils.js +302 -25
  59. package/dist/resources/models/initializeFromStore.utils.js.map +1 -1
  60. package/dist/resources/models/introspector.tools.js +18 -6
  61. package/dist/resources/models/introspector.tools.js.map +1 -1
  62. package/dist/resources/routeHandlers/getDocsData.d.ts +4 -0
  63. package/dist/resources/routeHandlers/getDocsData.js +28 -0
  64. package/dist/resources/routeHandlers/getDocsData.js.map +1 -1
  65. package/dist/resources/routeHandlers/registerHttpRoutes.hook.d.ts +26 -25
  66. package/dist/resources/routeHandlers/registerHttpRoutes.hook.js +10 -9
  67. package/dist/resources/routeHandlers/registerHttpRoutes.hook.js.map +1 -1
  68. package/dist/resources/server.resource.d.ts +20 -22
  69. package/dist/resources/server.resource.js +6 -6
  70. package/dist/resources/server.resource.js.map +1 -1
  71. package/dist/resources/swap.cli.resource.d.ts +4 -4
  72. package/dist/resources/swap.cli.resource.js +2 -2
  73. package/dist/resources/swap.cli.resource.js.map +1 -1
  74. package/dist/resources/swap.resource.d.ts +7 -7
  75. package/dist/resources/swap.resource.js +188 -38
  76. package/dist/resources/swap.resource.js.map +1 -1
  77. package/dist/resources/swap.tools.d.ts +3 -2
  78. package/dist/resources/swap.tools.js +27 -27
  79. package/dist/resources/swap.tools.js.map +1 -1
  80. package/dist/resources/telemetry.resource.d.ts +1 -1
  81. package/dist/resources/telemetry.resource.js +46 -43
  82. package/dist/resources/telemetry.resource.js.map +1 -1
  83. package/dist/runner-compat.d.ts +85 -0
  84. package/dist/runner-compat.js +178 -0
  85. package/dist/runner-compat.js.map +1 -0
  86. package/dist/runner-node-compat.d.ts +2 -0
  87. package/dist/runner-node-compat.js +28 -0
  88. package/dist/runner-node-compat.js.map +1 -0
  89. package/dist/schema/index.js +4 -8
  90. package/dist/schema/index.js.map +1 -1
  91. package/dist/schema/model.d.ts +80 -23
  92. package/dist/schema/model.js.map +1 -1
  93. package/dist/schema/query.js +2 -1
  94. package/dist/schema/query.js.map +1 -1
  95. package/dist/schema/types/AllType.js +6 -3
  96. package/dist/schema/types/AllType.js.map +1 -1
  97. package/dist/schema/types/BaseElementCommon.js +2 -2
  98. package/dist/schema/types/ErrorType.js +1 -1
  99. package/dist/schema/types/ErrorType.js.map +1 -1
  100. package/dist/schema/types/EventType.js +19 -2
  101. package/dist/schema/types/EventType.js.map +1 -1
  102. package/dist/schema/types/LaneSummaryTypes.d.ts +3 -0
  103. package/dist/schema/types/LaneSummaryTypes.js +19 -0
  104. package/dist/schema/types/LaneSummaryTypes.js.map +1 -0
  105. package/dist/schema/types/LiveType.js +67 -0
  106. package/dist/schema/types/LiveType.js.map +1 -1
  107. package/dist/schema/types/ResourceType.js +100 -19
  108. package/dist/schema/types/ResourceType.js.map +1 -1
  109. package/dist/schema/types/RunOptionsType.js +41 -5
  110. package/dist/schema/types/RunOptionsType.js.map +1 -1
  111. package/dist/schema/types/TagType.js +35 -4
  112. package/dist/schema/types/TagType.js.map +1 -1
  113. package/dist/schema/types/TaskType.js +5 -0
  114. package/dist/schema/types/TaskType.js.map +1 -1
  115. package/dist/schema/types/index.d.ts +2 -2
  116. package/dist/schema/types/index.js +6 -7
  117. package/dist/schema/types/index.js.map +1 -1
  118. package/dist/schema/types/middleware/common.d.ts +3 -2
  119. package/dist/schema/types/middleware/common.js +19 -13
  120. package/dist/schema/types/middleware/common.js.map +1 -1
  121. package/dist/ui/.vite/manifest.json +2 -2
  122. package/dist/ui/assets/docs-Btkv97Ls.js +302 -0
  123. package/dist/ui/assets/docs-Btkv97Ls.js.map +1 -0
  124. package/dist/ui/assets/docs-CipvKUxZ.css +1 -0
  125. package/dist/utils/lane-resources.d.ts +55 -0
  126. package/dist/utils/lane-resources.js +143 -0
  127. package/dist/utils/lane-resources.js.map +1 -0
  128. package/dist/utils/zod.js +36 -3
  129. package/dist/utils/zod.js.map +1 -1
  130. package/dist/version.d.ts +1 -1
  131. package/dist/version.js +1 -1
  132. package/package.json +4 -4
  133. package/readmes/runner-AI.md +740 -0
  134. package/readmes/runner-durable-workflows.md +2247 -0
  135. package/readmes/runner-full-guide.md +5869 -0
  136. package/readmes/runner-remote-lanes.md +909 -0
  137. package/dist/ui/assets/docs-BhRuaJ5l.css +0 -1
  138. package/dist/ui/assets/docs-H4oDZj7p.js +0 -302
  139. package/dist/ui/assets/docs-H4oDZj7p.js.map +0 -1
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RPC_LANES_RESOURCE_TAG_ID = exports.RPC_LANES_RESOURCE_ID = exports.EVENT_LANES_RESOURCE_TAG_ID = exports.EVENT_LANES_RESOURCE_ID = exports.RPC_LANE_TAG_ID = exports.EVENT_LANE_TAG_ID = void 0;
4
+ exports.isEventLanesResource = isEventLanesResource;
5
+ exports.isRpcLanesResource = isRpcLanesResource;
6
+ exports.parseRpcLanesResourceConfig = parseRpcLanesResourceConfig;
7
+ exports.extractLaneId = extractLaneId;
8
+ exports.extractCommunicatorId = extractCommunicatorId;
9
+ exports.collectRpcLaneIds = collectRpcLaneIds;
10
+ exports.collectRpcLaneIdsFromResourceConfig = collectRpcLaneIdsFromResourceConfig;
11
+ exports.getRpcLaneBindings = getRpcLaneBindings;
12
+ exports.getRpcLaneProfiles = getRpcLaneProfiles;
13
+ exports.collectRpcCommunicatorIds = collectRpcCommunicatorIds;
14
+ exports.EVENT_LANE_TAG_ID = "runner.tags.eventLane";
15
+ exports.RPC_LANE_TAG_ID = "runner.tags.rpcLane";
16
+ exports.EVENT_LANES_RESOURCE_ID = "runner.node.eventLanes";
17
+ exports.EVENT_LANES_RESOURCE_TAG_ID = "runner.tags.eventLanes";
18
+ exports.RPC_LANES_RESOURCE_ID = "platform.node.resources.rpcLanes";
19
+ exports.RPC_LANES_RESOURCE_TAG_ID = "runner.tags.rpcLanes";
20
+ function hasTag(tags, tagId) {
21
+ if (!Array.isArray(tags))
22
+ return false;
23
+ return tags.some((candidate) => candidate === tagId);
24
+ }
25
+ function isEventLanesResource(resource) {
26
+ return (resource.id === exports.EVENT_LANES_RESOURCE_ID ||
27
+ hasTag(resource.tags, exports.EVENT_LANES_RESOURCE_TAG_ID));
28
+ }
29
+ function isRpcLanesResource(resource) {
30
+ return (resource.id === exports.RPC_LANES_RESOURCE_ID ||
31
+ hasTag(resource.tags, exports.RPC_LANES_RESOURCE_TAG_ID));
32
+ }
33
+ function parseRpcLanesResourceConfig(resourceConfig) {
34
+ if (!resourceConfig)
35
+ return null;
36
+ try {
37
+ return JSON.parse(resourceConfig);
38
+ }
39
+ catch {
40
+ return null;
41
+ }
42
+ }
43
+ function extractLaneId(laneLike) {
44
+ if (typeof laneLike === "string") {
45
+ const laneId = laneLike.trim();
46
+ return laneId.length > 0 ? laneId : null;
47
+ }
48
+ if (!laneLike || typeof laneLike !== "object")
49
+ return null;
50
+ const candidateId = laneLike.id;
51
+ if (typeof candidateId !== "string")
52
+ return null;
53
+ const laneId = candidateId.trim();
54
+ return laneId.length > 0 ? laneId : null;
55
+ }
56
+ function extractCommunicatorId(communicatorLike) {
57
+ if (typeof communicatorLike === "string") {
58
+ const communicatorId = communicatorLike.trim();
59
+ return communicatorId.length > 0 ? communicatorId : null;
60
+ }
61
+ if (!communicatorLike || typeof communicatorLike !== "object")
62
+ return null;
63
+ const candidateId = communicatorLike.id;
64
+ if (typeof candidateId !== "string")
65
+ return null;
66
+ const communicatorId = candidateId.trim();
67
+ return communicatorId.length > 0 ? communicatorId : null;
68
+ }
69
+ function collectRpcLaneIds(config) {
70
+ const laneIds = new Set();
71
+ if (!config)
72
+ return laneIds;
73
+ const bindings = config.topology?.bindings;
74
+ if (Array.isArray(bindings)) {
75
+ for (const binding of bindings) {
76
+ const laneId = extractLaneId(binding?.lane);
77
+ if (laneId)
78
+ laneIds.add(laneId);
79
+ }
80
+ }
81
+ const profiles = config.topology?.profiles;
82
+ if (profiles && typeof profiles === "object") {
83
+ for (const profile of Object.values(profiles)) {
84
+ const servedLanes = profile?.serve;
85
+ if (!Array.isArray(servedLanes))
86
+ continue;
87
+ for (const servedLane of servedLanes) {
88
+ const laneId = extractLaneId(servedLane);
89
+ if (laneId)
90
+ laneIds.add(laneId);
91
+ }
92
+ }
93
+ }
94
+ return laneIds;
95
+ }
96
+ function collectRpcLaneIdsFromResourceConfig(resourceConfig) {
97
+ const config = parseRpcLanesResourceConfig(resourceConfig);
98
+ return collectRpcLaneIds(config);
99
+ }
100
+ function getRpcLaneBindings(config) {
101
+ const bindings = config?.topology?.bindings;
102
+ if (!Array.isArray(bindings))
103
+ return [];
104
+ return bindings.map((binding) => ({
105
+ laneId: extractLaneId(binding?.lane) ?? "unknown",
106
+ communicatorId: binding?.communicatorId ?? extractCommunicatorId(binding?.communicator),
107
+ }));
108
+ }
109
+ function getRpcLaneProfiles(config) {
110
+ const rawProfiles = config?.topology?.profiles;
111
+ if (!rawProfiles || typeof rawProfiles !== "object")
112
+ return [];
113
+ return Object.entries(rawProfiles).map(([profileId, profile]) => ({
114
+ profileId,
115
+ serveLaneIds: Array.isArray(profile?.serve)
116
+ ? profile.serve.map((lane) => extractLaneId(lane) ?? "unknown")
117
+ : [],
118
+ communicatorId: profile?.communicatorId ?? extractCommunicatorId(profile?.communicator),
119
+ }));
120
+ }
121
+ function collectRpcCommunicatorIds(config, bindings = getRpcLaneBindings(config), profiles = getRpcLaneProfiles(config)) {
122
+ const communicatorIds = new Set();
123
+ const topLevelCommunicator = extractCommunicatorId(config?.communicator);
124
+ if (topLevelCommunicator)
125
+ communicatorIds.add(topLevelCommunicator);
126
+ if (Array.isArray(config?.communicators)) {
127
+ for (const communicator of config.communicators) {
128
+ const communicatorId = extractCommunicatorId(communicator);
129
+ if (communicatorId)
130
+ communicatorIds.add(communicatorId);
131
+ }
132
+ }
133
+ for (const binding of bindings) {
134
+ if (binding.communicatorId)
135
+ communicatorIds.add(binding.communicatorId);
136
+ }
137
+ for (const profile of profiles) {
138
+ if (profile.communicatorId)
139
+ communicatorIds.add(profile.communicatorId);
140
+ }
141
+ return Array.from(communicatorIds);
142
+ }
143
+ //# sourceMappingURL=lane-resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lane-resources.js","sourceRoot":"","sources":["../../src/utils/lane-resources.ts"],"names":[],"mappings":";;;AAuDA,oDAKC;AAED,gDAKC;AAED,kEASC;AAED,sCAYC;AAED,sDAcC;AAED,8CA2BC;AAED,kFAKC;AAED,gDAWC;AAED,gDAcC;AAED,8DA0BC;AAzMY,QAAA,iBAAiB,GAAG,uBAAuB,CAAC;AAC5C,QAAA,eAAe,GAAG,qBAAqB,CAAC;AACxC,QAAA,uBAAuB,GAAG,wBAAwB,CAAC;AACnD,QAAA,2BAA2B,GAAG,wBAAwB,CAAC;AACvD,QAAA,qBAAqB,GAAG,kCAAkC,CAAC;AAC3D,QAAA,yB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,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,OAAO,CAAC,cAAc;YAAE,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1E,CAAC;IAED,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,OAAO,CAAC,cAAc;YAAE,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC"}
package/dist/utils/zod.js CHANGED
@@ -17,6 +17,32 @@ function isZodSchema(value) {
17
17
  function isZ4(schema) {
18
18
  return "transformAsync" in schema;
19
19
  }
20
+ function hasToJSONSchema(value) {
21
+ return (typeof value === "object" &&
22
+ value !== null &&
23
+ typeof value.toJSONSchema === "function");
24
+ }
25
+ function isPromiseLike(value) {
26
+ return (typeof value === "object" &&
27
+ value !== null &&
28
+ typeof value.then === "function");
29
+ }
30
+ function stringifyJsonSchema(value) {
31
+ const stringified = JSON.stringify(value, null, 2);
32
+ return typeof stringified === "string" ? stringified : null;
33
+ }
34
+ function formatSchemaFromToJSONSchema(schema) {
35
+ try {
36
+ const jsonSchema = schema.toJSONSchema();
37
+ if (isPromiseLike(jsonSchema)) {
38
+ return null;
39
+ }
40
+ return stringifyJsonSchema(jsonSchema);
41
+ }
42
+ catch {
43
+ return null;
44
+ }
45
+ }
20
46
  function formatZodSchemaNicely(schema) {
21
47
  try {
22
48
  const jsonSchema = isZ4(schema)
@@ -31,12 +57,19 @@ function formatZodSchemaNicely(schema) {
31
57
  }
32
58
  function formatSchemaIfZod(value) {
33
59
  try {
60
+ if (hasToJSONSchema(value)) {
61
+ const formatted = formatSchemaFromToJSONSchema(value);
62
+ if (formatted) {
63
+ return formatted;
64
+ }
65
+ // Had toJSONSchema but it failed/returned async — use generic fallback
66
+ return '{ "type": "object" }';
67
+ }
34
68
  if (isZodSchema(value)) {
35
69
  return formatZodSchemaNicely(value);
36
70
  }
37
- else {
38
- return '{ "type": "object" }';
39
- }
71
+ // Not a recognized schema format — return null instead of a misleading fallback
72
+ return null;
40
73
  }
41
74
  catch {
42
75
  // ignore
@@ -1 +1 @@
1
- {"version":3,"file":"zod.js","sourceRoot":"","sources":["../../src/utils/zod.ts"],"names":[],"mappings":";;AAOA,kCAOC;AAMD,sDAWC;AAED,8CAWC;AAED,kEAMC;AAnDD,+BAAiC;AACjC,2DAAqD;AACrD,uEAAqE;AAIrE,SAAgB,WAAW,CAAC,KAAc;IACxC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACb,KAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;IACjD,4DAA4D;KAC7D,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,MAAkB;IAC9B,OAAO,gBAAgB,IAAI,MAAM,CAAC;AACpC,CAAC;AAED,SAAgB,qBAAqB,CAAC,MAAkB;IACtD,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC;YAC7B,CAAC,CAAC,MAAE,CAAC,YAAY,CAAC,MAAa,CAAC;YAChC,CAAC,CAAC,IAAA,oCAAe,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEhD,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,6BAA6B;QAC7B,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED,SAAgB,iBAAiB,CAAC,KAAc;IAC9C,IAAI,CAAC;QACH,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,OAAO,sBAAsB,CAAC;QACh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AAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAEM,KAAK,UAAU,2BAA2B,CAC/C,gBAA2C;IAE3C,IAAI,CAAC,gBAAgB;QAAE,OAAO,IAAI,CAAC;IAEnC,OAAO,IAAA,kDAAwB,EAAC,gBAAgB,CAAC,CAAC;AACpD,CAAC"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const v = "5.3.0";
1
+ declare const v = "6.0.0";
2
2
  export default v;
package/dist/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // Auto-generated by scripts/sync-version.ts. Do not edit manually.
4
- const v = "5.3.0";
4
+ const v = "6.0.0";
5
5
  exports.default = v;
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluelibs/runner-dev",
3
- "version": "5.3.0",
3
+ "version": "6.0.0",
4
4
  "description": "BlueLibs Runner DevTools",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -13,7 +13,7 @@
13
13
  "clean": "rm -rf dist",
14
14
  "cli": "ts-node --project config/ts/tsconfig.json src/cli.ts",
15
15
  "start": "node dist/main.js",
16
- "dev": "npm run build && npm run start",
16
+ "dev": "ts-node-dev --project config/ts/tsconfig.json --respawn --transpile-only --watch src --watch scripts src/main.ts",
17
17
  "build:ui": "cd src/ui && vite build",
18
18
  "dev:ui": "cd src/ui && vite",
19
19
  "preview:ui": "cd src/ui && vite preview --port 5173",
@@ -38,7 +38,7 @@
38
38
  "demo:ping": "ENDPOINT=http://localhost:31337/graphql node dist/cli.js ping",
39
39
  "demo:query": "ENDPOINT=http://localhost:31337/graphql node dist/cli.js query 'query { tasks { id } }' --format pretty",
40
40
  "demo:overview": "ENDPOINT=http://localhost:31337/graphql node dist/cli.js overview --details 5",
41
- "fetch:ai": "node scripts/fetch-runner-ai.js"
41
+ "sync:docs": "ts-node --project config/ts/tsconfig.json scripts/sync-docs.ts"
42
42
  },
43
43
  "bin": {
44
44
  "runner-dev": "dist/cli.js"
@@ -104,7 +104,7 @@
104
104
  "@adobe/jsonschema2md": "^8.0.5",
105
105
  "@apollo/server": "^5.0.0",
106
106
  "@as-integrations/express5": "^1.1.2",
107
- "@bluelibs/runner": "^5.5.0",
107
+ "@bluelibs/runner": "^6.0.0",
108
108
  "@bluelibs/smart": "^2.2.1",
109
109
  "@modelcontextprotocol/sdk": "^1.17.2",
110
110
  "@types/prismjs": "^1.26.5",