callman-mcp 0.1.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 (244) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE +21 -0
  3. package/README.md +203 -0
  4. package/dist/client/api.d.ts +109 -0
  5. package/dist/client/api.d.ts.map +1 -0
  6. package/dist/client/api.js +180 -0
  7. package/dist/client/api.js.map +1 -0
  8. package/dist/client/errors.d.ts +27 -0
  9. package/dist/client/errors.d.ts.map +1 -0
  10. package/dist/client/errors.js +98 -0
  11. package/dist/client/errors.js.map +1 -0
  12. package/dist/client/http.d.ts +34 -0
  13. package/dist/client/http.d.ts.map +1 -0
  14. package/dist/client/http.js +121 -0
  15. package/dist/client/http.js.map +1 -0
  16. package/dist/client/types.d.ts +327 -0
  17. package/dist/client/types.d.ts.map +1 -0
  18. package/dist/client/types.js +5 -0
  19. package/dist/client/types.js.map +1 -0
  20. package/dist/config.d.ts +20 -0
  21. package/dist/config.d.ts.map +1 -0
  22. package/dist/config.js +69 -0
  23. package/dist/config.js.map +1 -0
  24. package/dist/context.d.ts +35 -0
  25. package/dist/context.d.ts.map +1 -0
  26. package/dist/context.js +91 -0
  27. package/dist/context.js.map +1 -0
  28. package/dist/domain/diagram/build.d.ts +260 -0
  29. package/dist/domain/diagram/build.d.ts.map +1 -0
  30. package/dist/domain/diagram/build.js +160 -0
  31. package/dist/domain/diagram/build.js.map +1 -0
  32. package/dist/domain/diagram/layout.d.ts +17 -0
  33. package/dist/domain/diagram/layout.d.ts.map +1 -0
  34. package/dist/domain/diagram/layout.js +61 -0
  35. package/dist/domain/diagram/layout.js.map +1 -0
  36. package/dist/domain/diagram/patch.d.ts +330 -0
  37. package/dist/domain/diagram/patch.d.ts.map +1 -0
  38. package/dist/domain/diagram/patch.js +176 -0
  39. package/dist/domain/diagram/patch.js.map +1 -0
  40. package/dist/domain/diagram/summarize.d.ts +41 -0
  41. package/dist/domain/diagram/summarize.d.ts.map +1 -0
  42. package/dist/domain/diagram/summarize.js +47 -0
  43. package/dist/domain/diagram/summarize.js.map +1 -0
  44. package/dist/domain/importDetect.d.ts +6 -0
  45. package/dist/domain/importDetect.d.ts.map +1 -0
  46. package/dist/domain/importDetect.js +32 -0
  47. package/dist/domain/importDetect.js.map +1 -0
  48. package/dist/domain/requestShape.d.ts +796 -0
  49. package/dist/domain/requestShape.d.ts.map +1 -0
  50. package/dist/domain/requestShape.js +250 -0
  51. package/dist/domain/requestShape.js.map +1 -0
  52. package/dist/domain/resolve.d.ts +30 -0
  53. package/dist/domain/resolve.d.ts.map +1 -0
  54. package/dist/domain/resolve.js +56 -0
  55. package/dist/domain/resolve.js.map +1 -0
  56. package/dist/domain/scenario/build.d.ts +270 -0
  57. package/dist/domain/scenario/build.d.ts.map +1 -0
  58. package/dist/domain/scenario/build.js +135 -0
  59. package/dist/domain/scenario/build.js.map +1 -0
  60. package/dist/domain/scenario/summarize.d.ts +206 -0
  61. package/dist/domain/scenario/summarize.d.ts.map +1 -0
  62. package/dist/domain/scenario/summarize.js +138 -0
  63. package/dist/domain/scenario/summarize.js.map +1 -0
  64. package/dist/index.d.ts +3 -0
  65. package/dist/index.d.ts.map +1 -0
  66. package/dist/index.js +142 -0
  67. package/dist/index.js.map +1 -0
  68. package/dist/lib/cache.d.ts +12 -0
  69. package/dist/lib/cache.d.ts.map +1 -0
  70. package/dist/lib/cache.js +40 -0
  71. package/dist/lib/cache.js.map +1 -0
  72. package/dist/lib/ids.d.ts +5 -0
  73. package/dist/lib/ids.d.ts.map +1 -0
  74. package/dist/lib/ids.js +19 -0
  75. package/dist/lib/ids.js.map +1 -0
  76. package/dist/lib/log.d.ts +10 -0
  77. package/dist/lib/log.d.ts.map +1 -0
  78. package/dist/lib/log.js +25 -0
  79. package/dist/lib/log.js.map +1 -0
  80. package/dist/lib/mask.d.ts +24 -0
  81. package/dist/lib/mask.d.ts.map +1 -0
  82. package/dist/lib/mask.js +63 -0
  83. package/dist/lib/mask.js.map +1 -0
  84. package/dist/lib/pagination.d.ts +21 -0
  85. package/dist/lib/pagination.d.ts.map +1 -0
  86. package/dist/lib/pagination.js +40 -0
  87. package/dist/lib/pagination.js.map +1 -0
  88. package/dist/lib/truncate.d.ts +25 -0
  89. package/dist/lib/truncate.d.ts.map +1 -0
  90. package/dist/lib/truncate.js +45 -0
  91. package/dist/lib/truncate.js.map +1 -0
  92. package/dist/main.d.ts +9 -0
  93. package/dist/main.d.ts.map +1 -0
  94. package/dist/main.js +12 -0
  95. package/dist/main.js.map +1 -0
  96. package/dist/prompts/index.d.ts +4 -0
  97. package/dist/prompts/index.d.ts.map +1 -0
  98. package/dist/prompts/index.js +72 -0
  99. package/dist/prompts/index.js.map +1 -0
  100. package/dist/resources/docs/diagramSchema.d.ts +2 -0
  101. package/dist/resources/docs/diagramSchema.d.ts.map +1 -0
  102. package/dist/resources/docs/diagramSchema.js +65 -0
  103. package/dist/resources/docs/diagramSchema.js.map +1 -0
  104. package/dist/resources/docs/overview.d.ts +2 -0
  105. package/dist/resources/docs/overview.d.ts.map +1 -0
  106. package/dist/resources/docs/overview.js +46 -0
  107. package/dist/resources/docs/overview.js.map +1 -0
  108. package/dist/resources/docs/requestSchema.d.ts +2 -0
  109. package/dist/resources/docs/requestSchema.d.ts.map +1 -0
  110. package/dist/resources/docs/requestSchema.js +70 -0
  111. package/dist/resources/docs/requestSchema.js.map +1 -0
  112. package/dist/resources/generated/aiPacks.d.ts +3 -0
  113. package/dist/resources/generated/aiPacks.d.ts.map +1 -0
  114. package/dist/resources/generated/aiPacks.js +11 -0
  115. package/dist/resources/generated/aiPacks.js.map +1 -0
  116. package/dist/resources/index.d.ts +4 -0
  117. package/dist/resources/index.d.ts.map +1 -0
  118. package/dist/resources/index.js +114 -0
  119. package/dist/resources/index.js.map +1 -0
  120. package/dist/run/executeCollection.d.ts +19 -0
  121. package/dist/run/executeCollection.d.ts.map +1 -0
  122. package/dist/run/executeCollection.js +89 -0
  123. package/dist/run/executeCollection.js.map +1 -0
  124. package/dist/run/loadBundle.d.ts +9 -0
  125. package/dist/run/loadBundle.d.ts.map +1 -0
  126. package/dist/run/loadBundle.js +242 -0
  127. package/dist/run/loadBundle.js.map +1 -0
  128. package/dist/run/resolveTemplate.d.ts +2 -0
  129. package/dist/run/resolveTemplate.d.ts.map +1 -0
  130. package/dist/run/resolveTemplate.js +12 -0
  131. package/dist/run/resolveTemplate.js.map +1 -0
  132. package/dist/run/summarize.d.ts +73 -0
  133. package/dist/run/summarize.d.ts.map +1 -0
  134. package/dist/run/summarize.js +69 -0
  135. package/dist/run/summarize.js.map +1 -0
  136. package/dist/run/types.d.ts +46 -0
  137. package/dist/run/types.d.ts.map +1 -0
  138. package/dist/run/types.js +2 -0
  139. package/dist/run/types.js.map +1 -0
  140. package/dist/server.d.ts +23 -0
  141. package/dist/server.d.ts.map +1 -0
  142. package/dist/server.js +25 -0
  143. package/dist/server.js.map +1 -0
  144. package/dist/tools/catalog.d.ts +18 -0
  145. package/dist/tools/catalog.d.ts.map +1 -0
  146. package/dist/tools/catalog.js +66 -0
  147. package/dist/tools/catalog.js.map +1 -0
  148. package/dist/tools/collections.d.ts +4 -0
  149. package/dist/tools/collections.d.ts.map +1 -0
  150. package/dist/tools/collections.js +201 -0
  151. package/dist/tools/collections.js.map +1 -0
  152. package/dist/tools/diagrams.d.ts +4 -0
  153. package/dist/tools/diagrams.d.ts.map +1 -0
  154. package/dist/tools/diagrams.js +226 -0
  155. package/dist/tools/diagrams.js.map +1 -0
  156. package/dist/tools/environments.d.ts +4 -0
  157. package/dist/tools/environments.d.ts.map +1 -0
  158. package/dist/tools/environments.js +150 -0
  159. package/dist/tools/environments.js.map +1 -0
  160. package/dist/tools/import.d.ts +6 -0
  161. package/dist/tools/import.d.ts.map +1 -0
  162. package/dist/tools/import.js +144 -0
  163. package/dist/tools/import.js.map +1 -0
  164. package/dist/tools/index.d.ts +5 -0
  165. package/dist/tools/index.d.ts.map +1 -0
  166. package/dist/tools/index.js +26 -0
  167. package/dist/tools/index.js.map +1 -0
  168. package/dist/tools/lookups.d.ts +33 -0
  169. package/dist/tools/lookups.d.ts.map +1 -0
  170. package/dist/tools/lookups.js +132 -0
  171. package/dist/tools/lookups.js.map +1 -0
  172. package/dist/tools/meta.d.ts +4 -0
  173. package/dist/tools/meta.d.ts.map +1 -0
  174. package/dist/tools/meta.js +78 -0
  175. package/dist/tools/meta.js.map +1 -0
  176. package/dist/tools/requests.d.ts +4 -0
  177. package/dist/tools/requests.d.ts.map +1 -0
  178. package/dist/tools/requests.js +247 -0
  179. package/dist/tools/requests.js.map +1 -0
  180. package/dist/tools/run.d.ts +4 -0
  181. package/dist/tools/run.d.ts.map +1 -0
  182. package/dist/tools/run.js +167 -0
  183. package/dist/tools/run.js.map +1 -0
  184. package/dist/tools/scenarios.d.ts +4 -0
  185. package/dist/tools/scenarios.d.ts.map +1 -0
  186. package/dist/tools/scenarios.js +242 -0
  187. package/dist/tools/scenarios.js.map +1 -0
  188. package/dist/tools/shared.d.ts +20 -0
  189. package/dist/tools/shared.d.ts.map +1 -0
  190. package/dist/tools/shared.js +74 -0
  191. package/dist/tools/shared.js.map +1 -0
  192. package/dist/tools/workspaces.d.ts +4 -0
  193. package/dist/tools/workspaces.d.ts.map +1 -0
  194. package/dist/tools/workspaces.js +80 -0
  195. package/dist/tools/workspaces.js.map +1 -0
  196. package/dist-cjs/client/api.js +183 -0
  197. package/dist-cjs/client/errors.js +104 -0
  198. package/dist-cjs/client/http.js +124 -0
  199. package/dist-cjs/client/types.js +5 -0
  200. package/dist-cjs/config.js +73 -0
  201. package/dist-cjs/context.js +94 -0
  202. package/dist-cjs/domain/diagram/build.js +164 -0
  203. package/dist-cjs/domain/diagram/layout.js +98 -0
  204. package/dist-cjs/domain/diagram/patch.js +179 -0
  205. package/dist-cjs/domain/diagram/summarize.js +52 -0
  206. package/dist-cjs/domain/importDetect.js +40 -0
  207. package/dist-cjs/domain/requestShape.js +260 -0
  208. package/dist-cjs/domain/resolve.js +63 -0
  209. package/dist-cjs/domain/scenario/build.js +140 -0
  210. package/dist-cjs/domain/scenario/summarize.js +144 -0
  211. package/dist-cjs/lib/cache.js +43 -0
  212. package/dist-cjs/lib/ids.js +24 -0
  213. package/dist-cjs/lib/log.js +28 -0
  214. package/dist-cjs/lib/mask.js +72 -0
  215. package/dist-cjs/lib/pagination.js +48 -0
  216. package/dist-cjs/lib/truncate.js +52 -0
  217. package/dist-cjs/main.js +31 -0
  218. package/dist-cjs/package.json +3 -0
  219. package/dist-cjs/prompts/index.js +75 -0
  220. package/dist-cjs/resources/docs/diagramSchema.js +67 -0
  221. package/dist-cjs/resources/docs/overview.js +48 -0
  222. package/dist-cjs/resources/docs/requestSchema.js +72 -0
  223. package/dist-cjs/resources/generated/aiPacks.js +13 -0
  224. package/dist-cjs/resources/index.js +117 -0
  225. package/dist-cjs/run/executeCollection.js +93 -0
  226. package/dist-cjs/run/loadBundle.js +246 -0
  227. package/dist-cjs/run/resolveTemplate.js +15 -0
  228. package/dist-cjs/run/summarize.js +73 -0
  229. package/dist-cjs/run/types.js +2 -0
  230. package/dist-cjs/server.js +28 -0
  231. package/dist-cjs/tools/catalog.js +69 -0
  232. package/dist-cjs/tools/collections.js +204 -0
  233. package/dist-cjs/tools/diagrams.js +229 -0
  234. package/dist-cjs/tools/environments.js +153 -0
  235. package/dist-cjs/tools/import.js +147 -0
  236. package/dist-cjs/tools/index.js +31 -0
  237. package/dist-cjs/tools/lookups.js +149 -0
  238. package/dist-cjs/tools/meta.js +81 -0
  239. package/dist-cjs/tools/requests.js +250 -0
  240. package/dist-cjs/tools/run.js +203 -0
  241. package/dist-cjs/tools/scenarios.js +245 -0
  242. package/dist-cjs/tools/shared.js +81 -0
  243. package/dist-cjs/tools/workspaces.js +83 -0
  244. package/package.json +80 -0
@@ -0,0 +1,65 @@
1
+ export const DIAGRAM_SCHEMA_DOC = `# Diagrams (create_diagram, update_diagram, patch_diagram)
2
+
3
+ A diagram is a **DiagramDocument** (schemaVersion 1): typed nodes with positions and sizes,
4
+ edges between nodes, a title. You write the compact form below; the server assigns ids,
5
+ sizes from the component catalog, edge styles from the semantic, and lays the nodes out.
6
+
7
+ ## Compact input
8
+ \`\`\`jsonc
9
+ {
10
+ "name": "Order platform", // library entry name
11
+ "title": "Order platform — runtime view",
12
+ "nodes": [
13
+ { "id": "gw", "type": "net.gateway", "label": "API Gateway" },
14
+ { "id": "orders","type": "net.service", "label": "Orders service", "parent": "k8s" },
15
+ { "id": "k8s", "type": "net.zone", "label": "Kubernetes" }, // a container
16
+ { "id": "db", "type": "db.postgres", "label": "orders db" },
17
+ { "id": "bus", "type": "mq.kafka", "label": "events" }
18
+ ],
19
+ "edges": [
20
+ { "source": "gw", "target": "orders", "label": "REST", "semantic": "sync" },
21
+ { "source": "orders", "target": "db", "semantic": "sync" },
22
+ { "source": "orders", "target": "bus", "label": "OrderCreated" } // → bus automatically
23
+ ]
24
+ }
25
+ \`\`\`
26
+
27
+ - \`type\` MUST be a catalog type — read \`callman://diagram/components\` (or one category:
28
+ \`callman://diagram/components/aws\`). Unknown types are rejected with suggestions; pass
29
+ \`strictTypes: false\` to draw them as plain rectangles instead.
30
+ - \`parent\` puts a node inside a container node (zones, frames, pools). Declare the
31
+ container as a node too.
32
+ - Edge \`semantic\`: \`sync\` (solid — request/response, default), \`async\` (dashed — event,
33
+ callback), \`fallback\` (dotted — retry / optional path), \`bus\` (heavy — message bus /
34
+ stream; automatic when an endpoint is a messaging component).
35
+ - Positions are optional; when any node lacks one the whole diagram is laid out
36
+ (\`direction\`: DOWN, RIGHT, UP, LEFT). Give explicit \`position: {x,y}\` only when the user
37
+ asks for a specific arrangement.
38
+ - Keep diagrams readable: 8–25 nodes, labels of 1–3 words, one edge per relationship.
39
+
40
+ ## Editing: patch_diagram ops
41
+ \`\`\`jsonc
42
+ { "op": "addNode", "node": { "type": "db.redis", "label": "cache" } }
43
+ { "op": "updateNode", "id": "orders", "changes": { "label": "Orders API" } }
44
+ { "op": "removeNode", "id": "bus" } // its edges are removed too
45
+ { "op": "addEdge", "edge": { "source": "orders", "target": "n6", "semantic": "async" } }
46
+ { "op": "updateEdge", "id": "e2", "changes": { "label": "gRPC" } }
47
+ { "op": "removeEdge", "id": "e3" }
48
+ { "op": "setTitle", "title": "New title" }
49
+ \`\`\`
50
+ \`relayout\`: \`new\` (default — only new nodes get a place), \`all\` (re-run layout), \`none\`.
51
+
52
+ ## Stored document (get_diagram view: "full")
53
+ \`\`\`ts
54
+ interface DiagramDocument {
55
+ schemaVersion: 1; id: string;
56
+ meta: { title: string; createdAt: string; updatedAt: string };
57
+ canvas?: { background?: "grid" | "dots" | "blank"; gridSize?: number };
58
+ nodes: { id; type; position: {x,y}; size: {width,height}; label?; parentId?; style?; data? }[];
59
+ edges: { id; source?; target?; label?; routing?; style?; markerEnd?; waypoints? }[];
60
+ }
61
+ \`\`\`
62
+ Edge meaning is derived from \`style\` (dashed + dashPattern + strokeWidth) — you never set
63
+ style directly; use \`semantic\`.
64
+ `;
65
+ //# sourceMappingURL=diagramSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagramSchema.js","sourceRoot":"","sources":["../../../src/resources/docs/diagramSchema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DjC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const OVERVIEW_DOC = "# Working with Callman through MCP\n\nCallman is an API client and test platform (collections of HTTP requests, environments,\nmulti-step test scenarios, system-design diagrams). This server exposes it to you through\ntools; everything you do goes to the same server the Callman desktop app uses, as the user\nwhose token is configured, limited to that token's permissions and the user's workspace role.\n\n## Start here\n1. `whoami` \u2014 proves the connection and tells you the workspaces, features and which tools\n this token can use. If several workspaces exist and none is default, pass `workspace`\n to workspace-scoped tools (or ask the user which one).\n2. Look before you create: `list_collections` / `get_collection_tree` / `search_requests`.\n Creating a collection whose name exists is refused on purpose.\n3. Names work as references everywhere an id does (collection, folder, request, environment,\n scenario, diagram, workspace). Ambiguous names come back as a candidate list \u2014 pick one.\n4. Preview big writes with `dryRun: true` (bulk create, imports, scenarios, diagrams).\n5. Deletions need `confirm: true`. Ask the user unless they explicitly requested the deletion.\n\n## Requests\n- Use `{{variable}}` for hosts and secrets (`{{baseUrl}}/users`) and put the values in an\n environment (`create_environment` / `set_environment_variables`). Use `:id` for path\n variables. See `callman://docs/request-schema`.\n- Bodies: a JSON value, a raw string, or `{ mode: raw|formdata|urlencoded }`.\n- Scripts run in a sandbox with the `pm.*` API \u2014 `callman://docs/scripting/pm-api`.\n- `run_request` / `run_collection` execute on the user's machine with real variable values;\n you only get results and the names of variables scripts changed.\n\n## Secrets\nEnvironment values come back masked (`\u2022\u2022\u2022\u2022ab`) unless the token holds `environments:reveal`\nand you ask for `reveal: true`. Never write a masked value back \u2014 the server refuses it.\n\n## Scenarios\nMulti-step flows as a graph of typed nodes (request, condition, assertion, set-vars, poll,\ndb, kafka, script, wait, end \u2026). Read `callman://docs/scenario-nodes` before building one;\npartial node configs are merged over defaults. Runs happen on the server (`run_scenario`).\n\n## Diagrams\nSystem-design diagrams use a fixed component catalog \u2014 `callman://diagram/components`.\nBuild with `create_diagram` (auto layout), edit with `patch_diagram`, share with\n`share_diagram`. See `callman://docs/diagram-schema`.\n\n## After writing\nThe desktop app refreshes when the user switches back to it. Tell the user what you created\nand where (collection / folder names).\n";
2
+ //# sourceMappingURL=overview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview.d.ts","sourceRoot":"","sources":["../../../src/resources/docs/overview.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,4oFA4CxB,CAAC"}
@@ -0,0 +1,46 @@
1
+ export const OVERVIEW_DOC = `# Working with Callman through MCP
2
+
3
+ Callman is an API client and test platform (collections of HTTP requests, environments,
4
+ multi-step test scenarios, system-design diagrams). This server exposes it to you through
5
+ tools; everything you do goes to the same server the Callman desktop app uses, as the user
6
+ whose token is configured, limited to that token's permissions and the user's workspace role.
7
+
8
+ ## Start here
9
+ 1. \`whoami\` — proves the connection and tells you the workspaces, features and which tools
10
+ this token can use. If several workspaces exist and none is default, pass \`workspace\`
11
+ to workspace-scoped tools (or ask the user which one).
12
+ 2. Look before you create: \`list_collections\` / \`get_collection_tree\` / \`search_requests\`.
13
+ Creating a collection whose name exists is refused on purpose.
14
+ 3. Names work as references everywhere an id does (collection, folder, request, environment,
15
+ scenario, diagram, workspace). Ambiguous names come back as a candidate list — pick one.
16
+ 4. Preview big writes with \`dryRun: true\` (bulk create, imports, scenarios, diagrams).
17
+ 5. Deletions need \`confirm: true\`. Ask the user unless they explicitly requested the deletion.
18
+
19
+ ## Requests
20
+ - Use \`{{variable}}\` for hosts and secrets (\`{{baseUrl}}/users\`) and put the values in an
21
+ environment (\`create_environment\` / \`set_environment_variables\`). Use \`:id\` for path
22
+ variables. See \`callman://docs/request-schema\`.
23
+ - Bodies: a JSON value, a raw string, or \`{ mode: raw|formdata|urlencoded }\`.
24
+ - Scripts run in a sandbox with the \`pm.*\` API — \`callman://docs/scripting/pm-api\`.
25
+ - \`run_request\` / \`run_collection\` execute on the user's machine with real variable values;
26
+ you only get results and the names of variables scripts changed.
27
+
28
+ ## Secrets
29
+ Environment values come back masked (\`••••ab\`) unless the token holds \`environments:reveal\`
30
+ and you ask for \`reveal: true\`. Never write a masked value back — the server refuses it.
31
+
32
+ ## Scenarios
33
+ Multi-step flows as a graph of typed nodes (request, condition, assertion, set-vars, poll,
34
+ db, kafka, script, wait, end …). Read \`callman://docs/scenario-nodes\` before building one;
35
+ partial node configs are merged over defaults. Runs happen on the server (\`run_scenario\`).
36
+
37
+ ## Diagrams
38
+ System-design diagrams use a fixed component catalog — \`callman://diagram/components\`.
39
+ Build with \`create_diagram\` (auto layout), edit with \`patch_diagram\`, share with
40
+ \`share_diagram\`. See \`callman://docs/diagram-schema\`.
41
+
42
+ ## After writing
43
+ The desktop app refreshes when the user switches back to it. Tell the user what you created
44
+ and where (collection / folder names).
45
+ `;
46
+ //# sourceMappingURL=overview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview.js","sourceRoot":"","sources":["../../../src/resources/docs/overview.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4C3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const REQUEST_SCHEMA_DOC = "# Request input (create_request, create_requests_bulk, update_request)\n\n```jsonc\n{\n \"name\": \"Create order\", // 1\u2013120 chars, shown in the sidebar\n \"method\": \"POST\", // GET POST PUT PATCH DELETE HEAD OPTIONS TRACE\n \"url\": \"{{baseUrl}}/orders/:orderId\", // {{var}} = environment/global variable, :name = path variable\n \"headers\": [{ \"key\": \"Content-Type\", \"value\": \"application/json\" }],\n \"query\": [{ \"key\": \"expand\", \"value\": \"items\", \"enabled\": true }],\n \"pathVariables\": [{ \"key\": \"orderId\", \"value\": \"123\" }],\n \"body\": { \"sku\": \"A1\", \"qty\": 2 }, // see Body\n \"auth\": { \"type\": \"bearer\", \"token\": \"{{accessToken}}\" }, // see Auth\n \"preRequestScript\": \"\", // pm.* script before sending\n \"postResponseScript\": \"pm.test('created', () => pm.response.to.have.status(201));\\npm.environment.set('orderId', pm.response.json().id);\",\n \"testsScript\": \"\", // legacy tests script (same API)\n \"folder\": \"Orders/Write\", // folder id, name or path (create_request / existing collection)\n \"folderKey\": \"orders\" // create_requests_bulk with collectionName: key from `folders`\n}\n```\n\n## Body\n| You send | Stored as |\n|---|---|\n| a JSON object / array / number / boolean | that JSON value (JSON tab in the editor) |\n| a string | parsed as JSON when valid; otherwise raw text/xml/html by sniffing |\n| `{ \"mode\": \"raw\", \"raw\": \"<xml/>\", \"language\": \"xml\" }` | raw body with that language (json, xml, text, html) |\n| `{ \"mode\": \"formdata\", \"entries\": [{ \"key\": \"file\", \"value\": \"a.txt\" }] }` | multipart form |\n| `{ \"mode\": \"urlencoded\", \"entries\": [ \u2026 ] }` | x-www-form-urlencoded |\n| `{ \"mode\": \"none\" }` or omitted | no body |\n\nSet `Content-Type` yourself for raw non-JSON bodies; JSON gets it automatically at send time.\n\n## Auth\n```jsonc\n{ \"type\": \"none\" }\n{ \"type\": \"bearer\", \"token\": \"{{accessToken}}\" }\n{ \"type\": \"basic\", \"username\": \"{{user}}\", \"password\": \"{{pass}}\" }\n{ \"type\": \"apiKey\", \"key\": \"X-API-Key\", \"value\": \"{{apiKey}}\", \"location\": \"header\" } // or \"query\"\n{ \"type\": \"oauth2\", \"grantType\": \"client_credentials\", \"tokenUrl\": \"{{authUrl}}/token\",\n \"clientId\": \"{{clientId}}\", \"clientSecret\": \"{{clientSecret}}\", \"scope\": \"read write\" }\n```\nPrefer `{{variables}}` over literal secrets \u2014 the environment keeps them out of the request.\n\n## Variables\n- `{{name}}` resolves from the active environment, then global variables, then values set\n by scripts during a run (`pm.environment.set`).\n- Dynamic values: `{{$uuid}}`, `{{$timestamp}}`, `{{$randomInt}}`, `{{$randomEmail}}` \u2026 \u2014\n see `callman://docs/scripting/templating`.\n- Data-driven rows: `{{data.column}}`.\n\n## Scripts (pm.* API)\n`pm.test(name, fn)`, `pm.expect(value)`, `pm.response.json()` / `.code` / `.headers`,\n`pm.environment.set/get`, `pm.globals`, `pm.variables`, `pm.request`, `pm.sendRequest`,\n`pm.db.query` (when a DB connection is attached). Full reference:\n`callman://docs/scripting/pm-api`; sandbox limits: `callman://docs/scripting/sandbox`.\n\n## Folder skeleton (create_requests_bulk with collectionName)\n```jsonc\n{\n \"collectionName\": \"Users API\",\n \"folders\": [\n { \"key\": \"users\", \"name\": \"Users\" },\n { \"key\": \"users-admin\", \"name\": \"Admin\", \"parentKey\": \"users\" }\n ],\n \"requests\": [ { \"name\": \"List users\", \"method\": \"GET\", \"url\": \"{{baseUrl}}/users\", \"folderKey\": \"users\" } ]\n}\n```\nThe whole payload is created atomically (all or nothing).\n";
2
+ //# sourceMappingURL=requestSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestSchema.d.ts","sourceRoot":"","sources":["../../../src/resources/docs/requestSchema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,osHAoE9B,CAAC"}
@@ -0,0 +1,70 @@
1
+ export const REQUEST_SCHEMA_DOC = `# Request input (create_request, create_requests_bulk, update_request)
2
+
3
+ \`\`\`jsonc
4
+ {
5
+ "name": "Create order", // 1–120 chars, shown in the sidebar
6
+ "method": "POST", // GET POST PUT PATCH DELETE HEAD OPTIONS TRACE
7
+ "url": "{{baseUrl}}/orders/:orderId", // {{var}} = environment/global variable, :name = path variable
8
+ "headers": [{ "key": "Content-Type", "value": "application/json" }],
9
+ "query": [{ "key": "expand", "value": "items", "enabled": true }],
10
+ "pathVariables": [{ "key": "orderId", "value": "123" }],
11
+ "body": { "sku": "A1", "qty": 2 }, // see Body
12
+ "auth": { "type": "bearer", "token": "{{accessToken}}" }, // see Auth
13
+ "preRequestScript": "", // pm.* script before sending
14
+ "postResponseScript": "pm.test('created', () => pm.response.to.have.status(201));\\npm.environment.set('orderId', pm.response.json().id);",
15
+ "testsScript": "", // legacy tests script (same API)
16
+ "folder": "Orders/Write", // folder id, name or path (create_request / existing collection)
17
+ "folderKey": "orders" // create_requests_bulk with collectionName: key from \`folders\`
18
+ }
19
+ \`\`\`
20
+
21
+ ## Body
22
+ | You send | Stored as |
23
+ |---|---|
24
+ | a JSON object / array / number / boolean | that JSON value (JSON tab in the editor) |
25
+ | a string | parsed as JSON when valid; otherwise raw text/xml/html by sniffing |
26
+ | \`{ "mode": "raw", "raw": "<xml/>", "language": "xml" }\` | raw body with that language (json, xml, text, html) |
27
+ | \`{ "mode": "formdata", "entries": [{ "key": "file", "value": "a.txt" }] }\` | multipart form |
28
+ | \`{ "mode": "urlencoded", "entries": [ … ] }\` | x-www-form-urlencoded |
29
+ | \`{ "mode": "none" }\` or omitted | no body |
30
+
31
+ Set \`Content-Type\` yourself for raw non-JSON bodies; JSON gets it automatically at send time.
32
+
33
+ ## Auth
34
+ \`\`\`jsonc
35
+ { "type": "none" }
36
+ { "type": "bearer", "token": "{{accessToken}}" }
37
+ { "type": "basic", "username": "{{user}}", "password": "{{pass}}" }
38
+ { "type": "apiKey", "key": "X-API-Key", "value": "{{apiKey}}", "location": "header" } // or "query"
39
+ { "type": "oauth2", "grantType": "client_credentials", "tokenUrl": "{{authUrl}}/token",
40
+ "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}", "scope": "read write" }
41
+ \`\`\`
42
+ Prefer \`{{variables}}\` over literal secrets — the environment keeps them out of the request.
43
+
44
+ ## Variables
45
+ - \`{{name}}\` resolves from the active environment, then global variables, then values set
46
+ by scripts during a run (\`pm.environment.set\`).
47
+ - Dynamic values: \`{{$uuid}}\`, \`{{$timestamp}}\`, \`{{$randomInt}}\`, \`{{$randomEmail}}\` … —
48
+ see \`callman://docs/scripting/templating\`.
49
+ - Data-driven rows: \`{{data.column}}\`.
50
+
51
+ ## Scripts (pm.* API)
52
+ \`pm.test(name, fn)\`, \`pm.expect(value)\`, \`pm.response.json()\` / \`.code\` / \`.headers\`,
53
+ \`pm.environment.set/get\`, \`pm.globals\`, \`pm.variables\`, \`pm.request\`, \`pm.sendRequest\`,
54
+ \`pm.db.query\` (when a DB connection is attached). Full reference:
55
+ \`callman://docs/scripting/pm-api\`; sandbox limits: \`callman://docs/scripting/sandbox\`.
56
+
57
+ ## Folder skeleton (create_requests_bulk with collectionName)
58
+ \`\`\`jsonc
59
+ {
60
+ "collectionName": "Users API",
61
+ "folders": [
62
+ { "key": "users", "name": "Users" },
63
+ { "key": "users-admin", "name": "Admin", "parentKey": "users" }
64
+ ],
65
+ "requests": [ { "name": "List users", "method": "GET", "url": "{{baseUrl}}/users", "folderKey": "users" } ]
66
+ }
67
+ \`\`\`
68
+ The whole payload is created atomically (all or nothing).
69
+ `;
70
+ //# sourceMappingURL=requestSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestSchema.js","sourceRoot":"","sources":["../../../src/resources/docs/requestSchema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEjC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const AI_PACKS_CORE_VERSION = "1.28.0";
2
+ export declare const AI_PACKS: Record<string, string>;
3
+ //# sourceMappingURL=aiPacks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aiPacks.d.ts","sourceRoot":"","sources":["../../../src/resources/generated/aiPacks.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAO3C,CAAC"}
@@ -0,0 +1,11 @@
1
+ // GENERATED by scripts/build-static-resources.mjs from callman-core@1.28.0 ai-packs — do not edit.
2
+ export const AI_PACKS_CORE_VERSION = "1.28.0";
3
+ export const AI_PACKS = {
4
+ "db-queries": "<!-- GENERATED FILE — do not edit by hand. Source: callman_core (npm run ai:packs). -->\n\n# Callman data access from scripts (`pm.db.query` / `pm.redis.command`)\n\n`pm.db.query({ connectionId, query })` — ALWAYS `await`. `query` is coerced to a string, `{{tokens}}` are resolved, then dispatched by the connection's type. `connectionId` may be omitted to use the request's configured DB connection. IMPORTANT: `pm.db.query` does NOT accept a `params`/bind array — inline values (quote strings) or use `{{env.X}}` tokens; SQL placeholders like `$1` or `?` are NOT bound.\n\n## MongoDB\n`query` MUST be a JSON STRING of a command object (use `JSON.stringify`), NOT a `db.coll.find(...)` shell string. The match key is `filter` (a top-level `query` key is rejected).\n\n```js\nconst body = pm.response.json();\nconst res = await pm.db.query({\n connectionId: \"…\",\n query: JSON.stringify({\n collection: \"users\",\n operation: \"findOne\", // find | findOne | aggregate | countDocuments | insertOne | insertMany | updateOne | updateMany | deleteOne | deleteMany | findOneAndUpdate | findOneAndReplace | findOneAndDelete\n filter: { email: body.data.user.email },\n }),\n});\npm.expect(res.rowCount).to.be.above(0); // existence check\n```\n\nPer-operation fields: `find`/`findOne` use `filter` (+ optional `projection`,`sort`,`limit`,`skip`); `aggregate` uses `pipeline` (array); `insertOne` uses `document`, `insertMany` uses `documents`; `updateOne`/`updateMany`/`findOneAndUpdate` use `filter`+`update` (Mongo update operators, e.g. `{ $set: { … } }`); `deleteOne`/`deleteMany` use `filter`; `findOneAndUpdate`/`findOneAndReplace` accept `returnDocument: \"before\"|\"after\"`. A 24-hex string in a filter is auto-coerced to ObjectId (or use `{ \"$oid\": \"…\" }`). Rows are in `res.rows`; write ops surface counts in `res.rowCount`.\n\n## PostgreSQL / MySQL / Oracle (SQL)\n`query` is plain SQL text. Because `pm.db.query` binds no params, inline the value and quote strings yourself (or use a `{{token}}`):\n\n```js\nconst email = pm.response.json().data.user.email;\nconst res = await pm.db.query({\n connectionId: \"…\",\n query: `SELECT id FROM users WHERE email = '${email}'`,\n});\npm.expect(res.rowCount).to.be.above(0);\n```\n\nNotes: a trailing `;` is stripped (except Oracle PL/SQL blocks, which keep it). **Oracle** returns column names UPPERCASE — read `res.rows[0].EMAIL`, not `.email`. `res.rowCount` is the row count for SELECT and the affected-row count for INSERT/UPDATE/DELETE.\n\n## SQL Server (mssql)\nSingle statement per query; a trailing `;` is stripped; `GO` batch separators are REJECTED (client-tool syntax, not T-SQL). Positional params bind as named inputs: `params[0]` → `@p1`, `params[1]` → `@p2`… (scenario db node only — `pm.db.query` has no params).\n\n```sql\nSELECT TOP 1 id, amount FROM dbo.orders WHERE customer_id = @p1 ORDER BY created_at DESC\n```\n\n## Redis (`pm.redis.command`)\n`command` is a single string. Supported commands: **GET, SET, DEL, EXISTS, TTL, HGET, HSET, HGETALL, HDEL, LPUSH, RPUSH, LRANGE, LLEN, SADD, SMEMBERS, SISMEMBER, INCR, DECR, INCRBY, EXPIRE, PERSIST, TYPE, ZADD, ZRANGE, ZSCORE, SCAN**. Quote a value that contains spaces.\n\nStructured replies land in `res.result` as real values: `HGETALL` → object, `LRANGE`/`SMEMBERS`/`ZRANGE` → array, `EXISTS`/`SISMEMBER`/`EXPIRE`/`PERSIST` → boolean; `res.resultText` is the stringified form. `SCAN pattern [count]` is Callman-managed: the cursor loop runs internally (capped at 1000 keys / 100 iterations) and returns `{ keys, count, truncated }` — no raw cursors.\n\n```js\nconst res = await pm.redis.command({ connectionId: \"…\", command: `GET session:${id}` });\npm.expect(res.success).to.be.true;\n// res.result / res.resultText hold the value; res.commandName, res.key are set.\n```\n",
5
+ "diagram-components": "<!-- GENERATED FILE — do not edit by hand. Source: callman_core (npm run ai:packs). -->\n\n# Diagram components and edge notation\n\nA diagram node's `type` MUST be one of the keys below (`callman-core` `DIAGRAM_COMPONENT_CATALOG`). Sizes are the defaults the studio uses; `container` types hold children via `parentId`.\n\n## Edge notation\n\n| Semantic | Meaning | Style tuple |\n| --- | --- | --- |\n| `sync` | Request / response call | dashed=false, strokeWidth=1.5 |\n| `async` | Fire-and-forget, event or callback | dashed=true, dashPattern=\"6 4\", strokeWidth=1.5 |\n| `fallback` | Retry, fallback or optional path | dashed=true, dashPattern=\"1 3\", strokeWidth=1.25 |\n| `bus` | Message bus or stream | dashed=false, strokeWidth=3 |\n\n## Generic (`generic`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `line` | Line | 160×0 | connector, edge, link |\n| `arrow` | Arrow | 160×0 | connector, directed, link |\n| `line.dashed` | Dashed Line | 160×0 | dotted, connector |\n| `rect` | Rectangle | 140×64 | box, card |\n| `square` | Square | 90×90 | |\n| `ellipse` | Ellipse | 140×64 | oval |\n| `circle` | Circle | 90×90 | |\n| `diamond` | Diamond | 140×64 | rhombus |\n| `triangle` | Triangle | 140×64 | |\n| `hexagon` | Hexagon | 140×64 | |\n| `pentagon` | Pentagon | 140×64 | |\n| `octagon` | Octagon | 140×64 | |\n| `parallelogram` | Parallelogram | 140×64 | |\n| `trapezoid` | Trapezoid | 140×64 | |\n| `cylinder` | Cylinder | 140×64 | can, tube |\n| `cloud-shape` | Cloud | 140×64 | |\n| `callout` | Callout | 140×64 | speech, bubble |\n| `text` | Text | 120×36 | |\n| `sticky` | Sticky note | 140×100 | postit, comment |\n| `card` | Card | 140×64 | |\n| `frame` | Frame / Container (container) | 220×160 | group, container, boundary |\n| `pool.horizontal` | Pool (horizontal) (swimlane) | 360×220 | swimlane, lane, container, subsystem |\n| `pool.vertical` | Pool (vertical) (swimlane) | 220×360 | swimlane, lane, container, subsystem |\n| `image` | Image | 140×64 | picture |\n\n## Flowchart (`flowchart`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `flow.process` | Process | 140×64 | step, action |\n| `flow.alt-process` | Alternate Process | 140×64 | |\n| `flow.decision` | Decision | 140×100 | if, branch |\n| `flow.terminator` | Start / End | 130×56 | terminator, begin, stop |\n| `flow.data` | Data (I/O) | 140×64 | input, output, io |\n| `flow.document` | Document | 140×64 | |\n| `flow.multi-document` | Multi-Document | 140×64 | |\n| `flow.predefined` | Predefined Process | 140×64 | subroutine |\n| `flow.manual-input` | Manual Input | 140×64 | |\n| `flow.manual-op` | Manual Operation | 140×64 | |\n| `flow.preparation` | Preparation | 140×64 | |\n| `flow.stored-data` | Stored Data | 140×64 | |\n| `flow.database` | Database | 140×64 | db, store |\n| `flow.display` | Display | 140×64 | |\n| `flow.delay` | Delay | 140×64 | |\n| `flow.merge` | Merge | 140×64 | |\n| `flow.or` | Or | 140×64 | |\n| `flow.connector` | On-page Connector | 48×48 | |\n| `flow.off-page` | Off-page Connector | 140×64 | |\n| `flow.annotation` | Annotation | 140×64 | |\n\n## UML (`uml`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `uml.class` | Class | 140×64 | entity |\n| `uml.abstract` | Abstract Class | 140×64 | |\n| `uml.interface` | Interface | 140×64 | |\n| `uml.enum` | Enum | 140×64 | |\n| `uml.object` | Object | 140×64 | |\n| `uml.package` | Package | 140×64 | |\n| `uml.component` | Component | 140×64 | |\n| `uml.node` | Node / Deployment | 140×64 | |\n| `uml.actor` | Actor | 60×100 | user, role |\n| `uml.usecase` | Use Case | 140×64 | |\n| `uml.boundary` | Boundary | 140×64 | |\n| `uml.control` | Control | 140×64 | |\n| `uml.entity` | Entity | 140×64 | |\n| `uml.state` | State | 140×64 | |\n| `uml.initial` | Initial State | 36×36 | |\n| `uml.final` | Final State | 40×40 | |\n| `uml.decision` | Decision | 60×60 | |\n| `uml.note` | Note / Comment | 140×64 | comment |\n\n## ERD (`erd`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `erd.entity` | Entity | 140×64 | table |\n| `erd.weak-entity` | Weak Entity | 140×64 | |\n| `erd.attribute` | Attribute | 140×64 | |\n| `erd.key-attribute` | Key Attribute | 140×64 | pk, primary key |\n| `erd.multivalued` | Multivalued Attribute | 140×64 | |\n| `erd.derived` | Derived Attribute | 140×64 | |\n| `erd.relationship` | Relationship | 140×64 | |\n| `erd.identifying` | Identifying Relationship | 140×64 | |\n\n## Architecture (`networking`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `net.user` | User / Client | 60×100 | client, person |\n| `net.admin` | Admin | 60×100 | |\n| `net.browser` | Browser | 140×64 | |\n| `net.mobile` | Mobile Device | 90×130 | phone |\n| `net.desktop` | Desktop | 140×64 | |\n| `net.iot` | IoT Device | 140×64 | |\n| `net.server` | Server | 140×64 | |\n| `net.service` | Service | 140×64 | microservice |\n| `net.monolith` | Monolith | 140×64 | |\n| `net.api-gateway` | API Gateway | 140×64 | api, gateway |\n| `net.load-balancer` | Load Balancer | 140×64 | lb |\n| `net.reverse-proxy` | Reverse Proxy | 140×64 | proxy |\n| `net.firewall` | Firewall | 140×64 | waf |\n| `net.router` | Router | 140×64 | |\n| `net.switch` | Switch | 140×64 | |\n| `net.dns` | DNS | 140×64 | |\n| `net.cdn` | CDN | 140×64 | edge |\n| `net.cache` | Cache | 140×64 | |\n| `net.queue` | Queue | 140×64 | mq |\n| `net.websocket` | Web Socket | 140×64 | ws |\n| `net.rest` | REST endpoint | 140×64 | http, api |\n| `net.internet` | Internet / Cloud | 140×64 | wan |\n| `net.datacenter` | Datacenter | 140×64 | |\n| `net.container` | Container | 140×64 | |\n| `net.pod` | Pod | 140×64 | |\n| `net.vm` | Virtual Machine | 140×64 | vm |\n\n## Databases (`database`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `db.postgres` | PostgreSQL | 176×56 | postgres, pg |\n| `db.mysql` | MySQL | 176×56 | |\n| `db.mariadb` | MariaDB | 176×56 | |\n| `db.mongodb` | MongoDB | 176×56 | mongo |\n| `db.redis` | Redis | 176×56 | |\n| `db.sqlite` | SQLite | 176×56 | |\n| `db.mssql` | MS SQL Server | 176×56 | sqlserver, mssql |\n| `db.oracle` | Oracle | 176×56 | |\n| `db.cassandra` | Cassandra | 176×56 | |\n| `db.elasticsearch` | Elasticsearch | 176×56 | elastic, es |\n| `db.neo4j` | Neo4j | 176×56 | graph |\n| `db.couchdb` | CouchDB | 176×56 | couch |\n| `db.couchbase` | Couchbase | 176×56 | |\n| `db.clickhouse` | ClickHouse | 176×56 | |\n| `db.cockroachdb` | CockroachDB | 176×56 | cockroach |\n| `db.influxdb` | InfluxDB | 176×56 | influx, tsdb |\n| `db.snowflake` | Snowflake | 176×56 | |\n| `db.supabase` | Supabase | 176×56 | |\n\n## Messaging (`messaging`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `mq.kafka` | Apache Kafka | 176×56 | kafka |\n| `mq.rabbitmq` | RabbitMQ | 176×56 | rabbit, amqp |\n| `mq.nats` | NATS | 176×56 | |\n| `mq.pulsar` | Apache Pulsar | 176×56 | pulsar |\n| `mq.mqtt` | MQTT | 176×56 | |\n| `mq.pubsub` | Pub/Sub | 176×56 | pubsub |\n| `mq.activemq` | ActiveMQ | 176×56 | jms |\n\n## Languages (`language`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `lang.node` | Node.js | 176×56 | node, js runtime |\n| `lang.python` | Python | 176×56 | py |\n| `lang.java` | Java | 176×56 | jvm |\n| `lang.go` | Go | 176×56 | golang |\n| `lang.rust` | Rust | 176×56 | |\n| `lang.dotnet` | C# / .NET | 176×56 | csharp, c# |\n| `lang.typescript` | TypeScript | 176×56 | ts |\n| `lang.javascript` | JavaScript | 176×56 | js |\n| `lang.ruby` | Ruby | 176×56 | |\n| `lang.php` | PHP | 176×56 | |\n| `lang.kotlin` | Kotlin | 176×56 | |\n| `lang.swift` | Swift | 176×56 | |\n| `lang.scala` | Scala | 176×56 | |\n| `lang.elixir` | Elixir | 176×56 | |\n| `lang.cpp` | C++ | 176×56 | cpp |\n\n## Frameworks (`framework`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `fw.express` | Express | 176×56 | |\n| `fw.nestjs` | NestJS | 176×56 | nest |\n| `fw.spring` | Spring Boot | 176×56 | spring |\n| `fw.django` | Django | 176×56 | |\n| `fw.flask` | Flask | 176×56 | |\n| `fw.fastapi` | FastAPI | 176×56 | |\n| `fw.rails` | Rails | 176×56 | ruby on rails |\n| `fw.laravel` | Laravel | 176×56 | |\n| `fw.dotnet` | .NET | 176×56 | |\n| `fw.react` | React | 176×56 | |\n| `fw.vue` | Vue | 176×56 | vuejs |\n| `fw.angular` | Angular | 176×56 | |\n| `fw.next` | Next.js | 176×56 | nextjs |\n| `fw.nuxt` | Nuxt | 176×56 | nuxtjs |\n| `fw.svelte` | Svelte | 176×56 | sveltekit |\n| `fw.electron` | Electron | 176×56 | |\n| `fw.tailwind` | Tailwind | 176×56 | tailwindcss |\n| `fw.graphql` | GraphQL | 176×56 | |\n\n## DevOps / CI-CD (`devops`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `ops.docker` | Docker | 176×56 | |\n| `ops.k8s` | Kubernetes | 176×56 | k8s |\n| `ops.nginx` | Nginx | 176×56 | |\n| `ops.haproxy` | HAProxy | 176×56 | lb |\n| `ops.traefik` | Traefik | 176×56 | traefik |\n| `ops.terraform` | Terraform | 176×56 | iac |\n| `ops.ansible` | Ansible | 176×56 | |\n| `ops.jenkins` | Jenkins | 176×56 | ci |\n| `ops.gha` | GitHub Actions | 176×56 | ci, actions |\n| `ops.gitlab` | GitLab CI | 176×56 | ci |\n| `ops.argocd` | ArgoCD | 176×56 | gitops |\n| `ops.helm` | Helm | 176×56 | |\n| `ops.istio` | Istio | 176×56 | service mesh |\n| `ops.envoy` | Envoy | 176×56 | proxy |\n| `ops.consul` | Consul | 176×56 | |\n| `ops.vault` | Vault | 176×56 | secrets |\n| `ops.pm2` | PM2 | 176×56 | |\n| `ops.maven` | Maven | 176×56 | build |\n\n## Auth / Identity (`auth`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `auth.oidc` | OpenID Connect | 176×56 | oidc |\n| `auth.jwt` | JWT | 176×56 | token |\n| `auth.keycloak` | Keycloak | 176×56 | |\n| `auth.auth0` | Auth0 | 176×56 | |\n| `auth.okta` | Okta | 176×56 | |\n| `auth.firebase` | Firebase Auth | 176×56 | firebase |\n| `auth.oauth` | OAuth 2.0 | 176×56 | oauth |\n| `auth.saml` | SAML | 176×56 | |\n| `auth.ldap` | LDAP | 176×56 | |\n\n## Observability (`observability`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `obs.prometheus` | Prometheus | 176×56 | metrics |\n| `obs.grafana` | Grafana | 176×56 | dashboard |\n| `obs.datadog` | Datadog | 176×56 | |\n| `obs.sentry` | Sentry | 176×56 | errors |\n| `obs.elasticsearch` | Elasticsearch | 176×56 | elk |\n| `obs.logstash` | Logstash | 176×56 | elk |\n| `obs.kibana` | Kibana | 176×56 | elk |\n| `obs.jaeger` | Jaeger | 176×56 | tracing |\n| `obs.otel` | OpenTelemetry | 176×56 | otel, tracing |\n| `obs.newrelic` | New Relic | 176×56 | |\n\n## AWS (`aws`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `aws.ec2` | EC2 | 176×56 | aws |\n| `aws.lambda` | Lambda | 176×56 | aws |\n| `aws.s3` | S3 | 176×56 | aws |\n| `aws.ebs` | EBS | 176×56 | aws |\n| `aws.efs` | EFS | 176×56 | aws |\n| `aws.rds` | RDS | 176×56 | aws |\n| `aws.aurora` | Aurora | 176×56 | aws |\n| `aws.dynamodb` | DynamoDB | 176×56 | aws |\n| `aws.elasticache` | ElastiCache | 176×56 | aws |\n| `aws.redshift` | Redshift | 176×56 | aws |\n| `aws.vpc` | VPC | 176×56 | aws |\n| `aws.subnet` | Subnet | 176×56 | aws |\n| `aws.internet-gateway` | Internet Gateway | 176×56 | aws |\n| `aws.nat-gateway` | NAT Gateway | 176×56 | aws |\n| `aws.elb` | ELB | 176×56 | aws |\n| `aws.alb` | ALB | 176×56 | aws |\n| `aws.nlb` | NLB | 176×56 | aws |\n| `aws.api-gateway` | API Gateway | 176×56 | aws |\n| `aws.cloudfront` | CloudFront | 176×56 | aws |\n| `aws.route-53` | Route 53 | 176×56 | aws |\n| `aws.sqs` | SQS | 176×56 | aws |\n| `aws.sns` | SNS | 176×56 | aws |\n| `aws.eventbridge` | EventBridge | 176×56 | aws |\n| `aws.kinesis` | Kinesis | 176×56 | aws |\n| `aws.step-functions` | Step Functions | 176×56 | aws |\n| `aws.ecs` | ECS | 176×56 | aws |\n| `aws.eks` | EKS | 176×56 | aws |\n| `aws.fargate` | Fargate | 176×56 | aws |\n| `aws.ecr` | ECR | 176×56 | aws |\n| `aws.iam` | IAM | 176×56 | aws |\n| `aws.cognito` | Cognito | 176×56 | aws |\n| `aws.secrets-manager` | Secrets Manager | 176×56 | aws |\n| `aws.kms` | KMS | 176×56 | aws |\n| `aws.cloudwatch` | CloudWatch | 176×56 | aws |\n| `aws.cloudtrail` | CloudTrail | 176×56 | aws |\n| `aws.glue` | Glue | 176×56 | aws |\n| `aws.athena` | Athena | 176×56 | aws |\n| `aws.sagemaker` | SageMaker | 176×56 | aws |\n| `aws.appsync` | AppSync | 176×56 | aws |\n| `aws.amplify` | Amplify | 176×56 | aws |\n\n## Azure (`azure`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `azure.virtual-machine` | Virtual Machine | 176×56 | azure |\n| `azure.vm-scale-set` | VM Scale Set | 176×56 | azure |\n| `azure.app-service` | App Service | 176×56 | azure |\n| `azure.functions` | Functions | 176×56 | azure |\n| `azure.container-instances` | Container Instances | 176×56 | azure |\n| `azure.aks` | AKS | 176×56 | azure |\n| `azure.container-registry` | Container Registry | 176×56 | azure |\n| `azure.blob-storage` | Blob Storage | 176×56 | azure |\n| `azure.files` | Files | 176×56 | azure |\n| `azure.disk` | Disk | 176×56 | azure |\n| `azure.sql-database` | SQL Database | 176×56 | azure |\n| `azure.cosmos-db` | Cosmos DB | 176×56 | azure |\n| `azure.cache-for-redis` | Cache for Redis | 176×56 | azure |\n| `azure.synapse` | Synapse | 176×56 | azure |\n| `azure.virtual-network` | Virtual Network | 176×56 | azure |\n| `azure.load-balancer` | Load Balancer | 176×56 | azure |\n| `azure.application-gateway` | Application Gateway | 176×56 | azure |\n| `azure.front-door` | Front Door | 176×56 | azure |\n| `azure.service-bus` | Service Bus | 176×56 | azure |\n| `azure.event-hub` | Event Hub | 176×56 | azure |\n| `azure.event-grid` | Event Grid | 176×56 | azure |\n| `azure.key-vault` | Key Vault | 176×56 | azure |\n| `azure.entra-id` | Entra ID | 176×56 | azure |\n| `azure.monitor` | Monitor | 176×56 | azure |\n| `azure.application-insights` | Application Insights | 176×56 | azure |\n| `azure.logic-apps` | Logic Apps | 176×56 | azure |\n| `azure.api-management` | API Management | 176×56 | azure |\n\n## GCP (`gcp`)\n\n| Type | Label | Default size | Aliases |\n| --- | --- | --- | --- |\n| `gcp.compute-engine` | Compute Engine | 176×56 | gcp, google |\n| `gcp.app-engine` | App Engine | 176×56 | gcp, google |\n| `gcp.cloud-functions` | Cloud Functions | 176×56 | gcp, google |\n| `gcp.cloud-run` | Cloud Run | 176×56 | gcp, google |\n| `gcp.gke` | GKE | 176×56 | gcp, google |\n| `gcp.artifact-registry` | Artifact Registry | 176×56 | gcp, google |\n| `gcp.cloud-storage` | Cloud Storage | 176×56 | gcp, google |\n| `gcp.persistent-disk` | Persistent Disk | 176×56 | gcp, google |\n| `gcp.cloud-sql` | Cloud SQL | 176×56 | gcp, google |\n| `gcp.cloud-spanner` | Cloud Spanner | 176×56 | gcp, google |\n| `gcp.firestore` | Firestore | 176×56 | gcp, google |\n| `gcp.bigtable` | Bigtable | 176×56 | gcp, google |\n| `gcp.bigquery` | BigQuery | 176×56 | gcp, google |\n| `gcp.memorystore` | Memorystore | 176×56 | gcp, google |\n| `gcp.vpc` | VPC | 176×56 | gcp, google |\n| `gcp.cloud-load-balancing` | Cloud Load Balancing | 176×56 | gcp, google |\n| `gcp.cloud-cdn` | Cloud CDN | 176×56 | gcp, google |\n| `gcp.cloud-dns` | Cloud DNS | 176×56 | gcp, google |\n| `gcp.pub-sub` | Pub/Sub | 176×56 | gcp, google |\n| `gcp.dataflow` | Dataflow | 176×56 | gcp, google |\n| `gcp.cloud-tasks` | Cloud Tasks | 176×56 | gcp, google |\n| `gcp.iam` | IAM | 176×56 | gcp, google |\n| `gcp.secret-manager` | Secret Manager | 176×56 | gcp, google |\n| `gcp.cloud-kms` | Cloud KMS | 176×56 | gcp, google |\n| `gcp.cloud-monitoring` | Cloud Monitoring | 176×56 | gcp, google |\n| `gcp.vertex-ai` | Vertex AI | 176×56 | gcp, google |\n",
6
+ "feature-policy": "<!-- GENERATED FILE — do not edit by hand. Source: callman_core (npm run ai:packs). -->\n\n# Script feature policy\n\nSome `pm.*` features can be disabled per execution context (ScriptFeaturePolicy). A disabled feature evaluates to `undefined` at top level; inside `pm.test` callbacks it throws so the test reports SKIPPED instead of failing.\n\nCapability-gated members:\n\n## database\n\n- `pm.db.query({ connectionId, query })`\n- `pm.db.pre`\n- `pm.db.post`\n\n## kafka\n\n- `pm.kafka.event()`\n- `pm.kafka.messages()`\n\n## redis\n\n- `pm.redis.command({ connectionId, command })`\n- `pm.redis.get(key)`\n- `pm.redis.results.pre`\n- `pm.redis.results.post`\n\nGeneration guidance: prefer declared pre/post queries and `pm.db.query` only when the user explicitly asks for database work; never assume kafka/redis capabilities exist unless the task mentions them.\n",
7
+ "pm-api": "<!-- GENERATED FILE — do not edit by hand. Source: callman_core (npm run ai:packs). -->\n\n# Callman `pm.*` scripting API\n\nScripts are plain JavaScript (top-level `await` allowed). Use ONLY the API below — anything else (fetch, require, process, Buffer, ...) is blocked by the sandbox.\n\n## pm.test\n\nRegister a named test. The callback's assertion failures mark the test failed without aborting the script.\n\n- `pm.test(name, fn)` — Runs fn (sync or async); pass/fail lands in the run's test results.\n\n## pm.expect\n\nChai-style assertions plus Jest-style matchers.\n\n- `pm.expect(value)` — Assertion chain. Equality: .to.equal(x) (identity), .to.eql(x) / .to.deep.equal(x) / .toEqual(x) (deep). Existence: .to.exist, .toBeDefined(), .toBeNull(). Strings/arrays: .to.include(x) / .toContain(x), .oneOf([..]). Numbers: .toBeGreaterThan / .toBeLessThan / .to.be.above(n) / .to.be.below(n). Types: .to.be.a('string'|'number'|...). Negation: .to.not.<...> / .not.<matcher>. Properties: .to.have.property('name', value?).\n- `pm.expect.fail(message?)` — Fails the surrounding test immediately.\n\n## pm.environment\n\nActive environment variables (alias: pm.env). Writes are scoped to the run and surface as variable mutations.\n\n- `pm.environment.get(key)` — Read a variable (string or undefined).\n- `pm.environment.set(key, value)` — Write a variable for subsequent steps.\n- `pm.environment.unset(key)` — Remove a variable.\n- `pm.environment.has(key)` — true when the key exists.\n- `pm.environment.clear()` — Remove every variable in the scope.\n- `pm.environment.toObject()` — Plain { key: value } snapshot.\n- `pm.environment.replaceIn(template)` — Resolve {{tokens}} inside a string.\n- `pm.environment.name` — Active environment's name.\n\n## pm.globals\n\nWorkspace-level global variables. Same surface as pm.environment.\n\n- `pm.globals.get(key)` — Read a global.\n- `pm.globals.set(key, value)` — Write a global for the run.\n- `pm.globals.unset(key)` — Remove a global.\n- `pm.globals.has(key)` — true when the key exists.\n- `pm.globals.clear()` — Remove every global in the scope.\n- `pm.globals.toObject()` — Plain snapshot.\n- `pm.globals.replaceIn(template)` — Resolve {{tokens}} inside a string.\n\n## pm.collectionVariables\n\nCollection-scoped variables that survive across requests within one collection run iteration.\n\n- `pm.collectionVariables.get(key)` — Read a collection variable.\n- `pm.collectionVariables.set(key, value)` — Write; persists across the iteration.\n- `pm.collectionVariables.unset(key)` — Remove a collection variable.\n- `pm.collectionVariables.has(key)` — true when the key exists.\n- `pm.collectionVariables.clear()` — Remove all collection variables.\n- `pm.collectionVariables.toObject()` — Plain snapshot.\n- `pm.collectionVariables.replaceIn(template)` — Resolve {{tokens}}.\n\n## pm.variables\n\nLayered read across all scopes (per-iteration > environment > globals) plus template resolution.\n\n- `pm.variables.get(key)` — Read through the precedence chain.\n- `pm.variables.set(key, value)` — Write to the run-local layer.\n- `pm.variables.unset(key)` — Remove from the run-local layer.\n- `pm.variables.has(key)` — true when any layer has the key.\n- `pm.variables.toObject()` — Merged snapshot.\n- `pm.variables.replaceIn(template)` — Resolve {{tokens}} in a string.\n- `pm.variables.resolve(template)` — Like replaceIn, but also resolves scenario node-output references.\n\n## pm.request\n\nThe outgoing request. Mutations only have effect in pre-request scripts (the call has not fired yet).\n\n- `pm.request.url` — Resolved URL string.\n- `pm.request.method` — HTTP method.\n- `pm.request.body` — Body snapshot (mode + content).\n- `pm.request.headers` — HeaderList: .all() .get(name) .has(name) .add({key,value}) .upsert({key,value}) .remove(name) .idx(i).\n- `pm.request.query` — Query params as a HeaderList.\n- `pm.request.getHeader(name)` — Read one header value.\n- `pm.request.setHeader(name, value)` — Set/replace a header. _(stages: pre-request, scenario-script)_\n- `pm.request.unsetHeader(name)` — Remove a header. _(stages: pre-request, scenario-script)_\n- `pm.request.getQueryParam(name)` — Read one query param.\n- `pm.request.setQueryParam(name, value)` — Set/replace a query param. _(stages: pre-request, scenario-script)_\n- `pm.request.unsetQueryParam(name)` — Remove a query param. _(stages: pre-request, scenario-script)_\n- `pm.request.setUrl(url)` — Replace the URL. _(stages: pre-request, scenario-script)_\n- `pm.request.setMethod(method)` — Replace the method. _(stages: pre-request, scenario-script)_\n- `pm.request.setRawBody(value)` — Replace the raw body (string or object → JSON). _(stages: pre-request, scenario-script)_\n\n## pm.response\n\nThe received response. Not available in pre-request scripts.\n\n- `pm.response.code` — Status code (number). _(stages: post-response, tests, scenario-script)_\n- `pm.response.status` — Status code (number, alias). _(stages: post-response, tests, scenario-script)_\n- `pm.response.statusText` — Status text. _(stages: post-response, tests, scenario-script)_\n- `pm.response.json()` — Parsed JSON body — call once into a const (`const body = pm.response.json()`); throws on non-JSON, so guard with try/catch or pm.response.to.be.json when the content type is uncertain. _(stages: post-response, tests, scenario-script)_\n- `pm.response.text()` — Raw body as string. _(stages: post-response, tests, scenario-script)_\n- `pm.response.rawBody` — Raw body string. _(stages: post-response, tests, scenario-script)_\n- `pm.response.headers` — Response HeaderList. _(stages: post-response, tests, scenario-script)_\n- `pm.response.responseTime` — Duration in ms. _(stages: post-response, tests, scenario-script)_\n- `pm.response.responseSize` — Body size in bytes. _(stages: post-response, tests, scenario-script)_\n- `pm.response.to.have.status(code)` — Assertion shortcuts; also .to.have.header/.jsonBody/.body and .to.be.ok/.json/.success/.clientError/... plus .to.not.<predicate>. _(stages: post-response, tests, scenario-script)_\n\n## pm.sendRequest\n\nFire an ad-hoc HTTP request from inside a script.\n\n- `pm.sendRequest(urlOrOptions, callback?)` — Options: { url, method, header: {name: value}, body }. Body accepts a plain object (auto-JSON) OR Postman style { mode: 'raw', raw: JSON.stringify({...}) } / { mode: 'urlencoded', urlencoded: [{key, value}] }. Prefer `const res = await pm.sendRequest({...})`; callback form gets (err, res). The response object is { code, status, statusText, headers, body, responseTime, json(), text() } — note it is NOT pm.response.\n\n## pm.db\n\nDatabase access (Oracle / MongoDB / PostgreSQL / MySQL). Disabled by feature policy in some contexts — tests then report SKIP.\n\n- `pm.db.query({ connectionId, query })` — Run an ad-hoc query — ALWAYS await it. SQL connections (Oracle/Postgres/MySQL): `query` is the SQL text. MongoDB: `query` is a JSON STRING of a command object, e.g. `JSON.stringify({ collection: 'users', operation: 'findOne', filter: { email } })` — operation is find|findOne|aggregate|countDocuments|insertOne|updateOne|deleteOne|…, the match key is `filter` (NOT a `db.coll.find(...)` shell string and NOT `query`), and aggregate uses `pipeline`. Resolves to { success, error, rowCount, rows, firstRow(), connectionId, connectionName, connectionType, durationMs, executedAt }. firstRow is a FUNCTION: res.firstRow()?.STATUS (Oracle columns are UPPERCASE); for a Mongo existence check assert rowCount > 0. _(requires the database capability — may be disabled by feature policy)_\n- `pm.db.pre` — Result object of the declared pre-request DB query: { success, error, rowCount, rows, firstRow() }. Not a promise — read directly. _(requires the database capability — may be disabled by feature policy)_\n- `pm.db.post` — Result object of the declared post-response DB query (same shape as pm.db.pre). _(stages: post-response, tests)_ _(requires the database capability — may be disabled by feature policy)_\n\n## pm.kafka\n\nCaptured Kafka events from the request's Kafka tab listener.\n\n- `pm.kafka.event()` — The matched event's parsed payload (or null). _(stages: post-response, tests)_ _(requires the kafka capability — may be disabled by feature policy)_\n- `pm.kafka.messages()` — Every captured message in the listen window. _(stages: post-response, tests)_ _(requires the kafka capability — may be disabled by feature policy)_\n\n## pm.redis\n\nRun ad-hoc Redis commands and read results of declared pre/post commands.\n\n- `pm.redis.command({ connectionId, command })` — Run an ad-hoc Redis command (GET/SET/DEL/EXISTS/TTL) — ALWAYS await it. Resolves to { success, error, result, resultText, commandName, key, connectionId, connectionName, command, resolvedCommand, durationMs, executedAt }. Omit connectionId to use the request's configured Redis connection. _(requires the redis capability — may be disabled by feature policy)_\n- `pm.redis.get(key)` — Read a value already captured by a declared GET. _(requires the redis capability — may be disabled by feature policy)_\n- `pm.redis.results.pre` — Array of pre-stage command results (by line index). _(requires the redis capability — may be disabled by feature policy)_\n- `pm.redis.results.post` — Array of post-stage command results. _(stages: post-response, tests)_ _(requires the redis capability — may be disabled by feature policy)_\n\n## pm.random\n\nDeterministic-format random data generators.\n\n- `pm.random.uuid()` — UUID v4.\n- `pm.random.email()` — Random email address.\n- `pm.random.string(length?)` — Alphanumeric string.\n- `pm.random.int(min, max)` — Integer in range.\n- `pm.random.bigdecimal(min, max, scale)` — Decimal with given scale.\n- `pm.random.boolean()` — true/false.\n- `pm.random.phone()` — Phone number string.\n- `pm.random.name()` — Person name.\n- `pm.random.date(format?)` — Date string.\n\n## pm.counter\n\nMonotonic counter scoped to the run.\n\n- `pm.counter.next()` — Next value (starts at 1).\n- `pm.counter.start(startAt?)` — Counter starting at a custom value.\n\n## pm.info\n\nExecution metadata snapshot.\n\n- `pm.info.eventName` — \"prerequest\" | \"test\".\n- `pm.info.iteration` — Zero-based data-driven iteration index.\n- `pm.info.iterationCount` — Total iterations — only meaningful in collection/data-driven runs. Never use it to gate token/cache logic in single sends.\n- `pm.info.requestName` — Current request's name.\n- `pm.info.requestId` — Current request's id.\n\n## pm.execution\n\nCollection-run flow control.\n\n- `pm.execution.setNextRequest(name)` — Jump to a named request next (collection runs).\n- `pm.execution.skipRequest()` — Skip the current request. _(stages: pre-request)_\n- `pm.execution.location` — Folder path of the current request.\n\n## pm.node\n\nScenario workflow context (only meaningful inside scenario script nodes).\n\n- `pm.node.nodeLabel` — Current node's label. _(stages: scenario-script)_\n- `pm.node.setNextRequest(name)` — Route the workflow to a named node. _(stages: scenario-script)_\n\n## pm.log\n\nStructured logging into the run report.\n\n- `pm.log(...args)` — Like console.log; entries land in the run's log panel.\n\n## CryptoJS\n\ncrypto-js global (NOT under pm.*).\n\n- `CryptoJS.SHA256(msg) / SHA1 / SHA512 / MD5` — Hashes; .toString() or .toString(CryptoJS.enc.Hex).\n- `CryptoJS.HmacSHA256(msg, key)` — HMAC family (SHA1/224/384/512, MD5 variants).\n- `CryptoJS.AES.encrypt(msg, key) / .decrypt(cipher, key)` — AES; decrypt result needs .toString(CryptoJS.enc.Utf8).\n- `CryptoJS.PBKDF2(password, salt, options)` — Key derivation.\n- `CryptoJS.enc.Utf8 / Base64 / Hex / Latin1` — Encoders for .toString(...).\n- `CryptoJS.lib.WordArray.create / random(n)` — Raw word arrays (e.g. random IVs).\n\n## _\n\nlodash global (NOT under pm.*).\n\n- `_.get(obj, path, default?) / _.pick / _.groupBy / _.sortBy / _.uniq / ...` — Full lodash surface for data wrangling.\n\n## timers\n\nSafe per-execution timer wrappers (callbacks never outlive the run).\n\n- `setTimeout(fn, ms) / clearTimeout(id)` — Use with await new Promise(r => setTimeout(r, ms)) for polling loops.\n- `setInterval(fn, ms) / clearInterval(id)` — Interval variant.\n\n## Stage rules\n\n- `pre-request`: runs BEFORE the HTTP call. `pm.response` does not exist; `pm.request` mutations take effect.\n- `post-response` / `tests`: run AFTER the call. `pm.response` is available; `pm.request` mutations have no effect.\n- `scenario-script`: a scenario Script node. Prior node outputs are readable via `pm.variables.resolve(\"{{NodeLabel.path}}\")`; the script's return value becomes the node output.\n- Members without a stage note are available in every stage.\n",
8
+ "sandbox-globals": "<!-- GENERATED FILE — do not edit by hand. Source: callman_core (npm run ai:packs). -->\n\n# Script sandbox — available and blocked globals\n\nThe sandbox is a Node `vm` context. Generated code must never reference a blocked global — the script fails at runtime.\n\n## Available built-ins\n\n`AggregateError`, `Array`, `ArrayBuffer`, `BigInt`, `BigInt64Array`, `BigUint64Array`, `Boolean`, `DataView`, `Date`, `Error`, `EvalError`, `Float32Array`, `Float64Array`, `Infinity`, `Int16Array`, `Int32Array`, `Int8Array`, `JSON`, `Map`, `Math`, `NaN`, `Number`, `Object`, `Promise`, `RangeError`, `ReferenceError`, `RegExp`, `Set`, `String`, `Symbol`, `SyntaxError`, `TextDecoder`, `TextEncoder`, `TypeError`, `URIError`, `URL`, `URLSearchParams`, `Uint16Array`, `Uint32Array`, `Uint8Array`, `Uint8ClampedArray`, `WeakMap`, `WeakSet`, `atob`, `btoa`, `decodeURIComponent`, `encodeURIComponent`, `isFinite`, `isNaN`, `parseFloat`, `parseInt`, `structuredClone`, `undefined`\n\nPlus the injected helpers: `pm`, `console`, `CryptoJS`, `_` (lodash), `setTimeout`/`clearTimeout`/`setInterval`/`clearInterval` (safe per-run wrappers).\n\n## Blocked (never use)\n\n`Buffer`, `Function`, `WebSocket`, `Worker`, `XMLHttpRequest`, `document`, `eval`, `exports`, `fetch`, `global`, `globalThis`, `importScripts`, `module`, `navigator`, `process`, `require`, `self`, `window`\n\nNotes:\n- No `fetch` — use `pm.sendRequest` for HTTP.\n- No `Buffer` — use `atob`/`btoa`/`TextEncoder`/`Uint8Array`.\n- No `require`/`import` — `CryptoJS` and `_` are already in scope.\n",
9
+ "templating": "<!-- GENERATED FILE — do not edit by hand. Source: callman_core (npm run ai:packs). -->\n\n# Template tokens (`{{...}}`)\n\nAnywhere a `{{...}}` is accepted (URLs, headers, bodies, DB queries, Kafka payloads, scenario node configs), substitution is PLAIN TEXT replacement — no quoting, no escaping. Quote SQL strings yourself (`WHERE id = '{{userId}}'`). A missing variable resolves to an empty string.\n\n## Variable lookups\n\n- `{{name}}` — environment → globals lookup.\n- `{{env.name}}` / `{{global.name}}` — forced scope.\n- `{{response.body.<path>}}` — current request's response (request context only; dot-indexed arrays: `items.0.id`).\n- `{{<NodeLabel>.<path>}}` — a prior scenario node's output (scenario context only; bracket-indexed arrays: `rows[0].id`).\n\n## Random generators\n\n| Token | Meaning | Example output |\n| --- | --- | --- |\n| `{{random.email}}` | Random email address | `sam.user42@example.com` |\n| `{{random.string}}` | Random alphanumeric string | `aZ19xPq20LmN` |\n| `{{random.uuid}}` | Random UUID v4 | `1d7fe6b6-6f47-4fa9-b57a-d2e1d285be51` |\n| `{{random.int}}` | Random integer | `48291` |\n| `{{random.bigdecimal}}` | Random decimal number | `1842.552190` |\n| `{{random.boolean}}` | Random boolean | `true` |\n| `{{random.phone}}` | Random phone number | `+15558675309` |\n| `{{random.date(\"YYYY-MM-DD\")}}` | Random date | `2026-04-06` |\n| `{{random.name}}` | Random human name | `Aylin Karimli` |\n\n## Counters\n\n| Token | Meaning | Example output |\n| --- | --- | --- |\n| `{{counter}}` | Incrementing counter per request | `1, 2, 3...` |\n| `{{counter.start(100)}}` | Counter starting at 100 | `100, 101, 102...` |\n\n## Postman-compatible `$` tokens\n\n| Token | Meaning | Example output |\n| --- | --- | --- |\n| `{{$guid}}` | Postman compat — UUID v4 | `1d7fe6b6-6f47-4fa9-b57a-d2e1d285be51` |\n| `{{$randomUUID}}` | Postman compat — UUID v4 | `1d7fe6b6-6f47-4fa9-b57a-d2e1d285be51` |\n| `{{$timestamp}}` | Postman compat — unix seconds | `1718793600` |\n| `{{$isoTimestamp}}` | Postman compat — ISO 8601 | `2026-05-18T10:24:00.123Z` |\n| `{{$randomInt}}` | Postman compat — 0-1000 | `482` |\n| `{{$randomBoolean}}` | Postman compat | `true` |\n| `{{$randomAlphaNumeric}}` | Postman compat — 8 chars | `aZ19xPq2` |\n| `{{$randomHexaDecimal}}` | Postman compat — 0xNNNNNNNN | `0x4f3a1c2d` |\n| `{{$randomString}}` | Postman compat — 12 chars | `aZ19xPq20LmN` |\n| `{{$randomFirstName}}` | Postman compat | `Aylin` |\n| `{{$randomLastName}}` | Postman compat | `Karimov` |\n| `{{$randomFullName}}` | Postman compat | `Aylin Karimov` |\n| `{{$randomUserName}}` | Postman compat | `aylin.karimov42` |\n| `{{$randomNamePrefix}}` | Postman compat | `Dr.` |\n| `{{$randomNameSuffix}}` | Postman compat | `Jr.` |\n| `{{$randomEmail}}` | Postman compat | `sam.user42@example.com` |\n| `{{$randomUrl}}` | Postman compat | `https://acme.io/q1w2e3` |\n| `{{$randomDomainName}}` | Postman compat | `acme.io` |\n| `{{$randomDomainSuffix}}` | Postman compat | `io` |\n| `{{$randomUserAgent}}` | Postman compat | `Mozilla/5.0 (...)` |\n| `{{$randomIP}}` | Postman compat — IPv4 | `192.168.1.42` |\n| `{{$randomIPV4}}` | Postman compat | `192.168.1.42` |\n| `{{$randomIPV6}}` | Postman compat | `fe80::1ff:fe23:4567:890a` |\n| `{{$randomMACAddress}}` | Postman compat | `1A:2B:3C:4D:5E:6F` |\n| `{{$randomPassword}}` | Postman compat | `x4Z9p2Aq!` |\n| `{{$randomSemver}}` | Postman compat | `3.7.42` |\n| `{{$randomPhoneNumber}}` | Postman compat | `+15558675309` |\n| `{{$randomCity}}` | Postman compat | `Baku` |\n| `{{$randomCountry}}` | Postman compat | `Azerbaijan` |\n| `{{$randomCountryCode}}` | Postman compat | `AZ` |\n| `{{$randomStreetAddress}}` | Postman compat | `742 Maple St` |\n| `{{$randomZipCode}}` | Postman compat | `10042` |\n| `{{$randomLatitude}}` | Postman compat | `40.412345` |\n| `{{$randomLongitude}}` | Postman compat | `-74.012345` |\n| `{{$randomCompanyName}}` | Postman compat | `Acme Labs Inc.` |\n| `{{$randomJobTitle}}` | Postman compat | `Senior Software Engineer` |\n| `{{$randomJobArea}}` | Postman compat | `Engineering` |\n| `{{$randomDepartment}}` | Postman compat | `Engineering` |\n| `{{$randomProduct}}` | Postman compat | `Acme Cloud` |\n| `{{$randomCatchPhrase}}` | Postman compat | `Scalable mesh` |\n| `{{$randomCreditCardMask}}` | Postman compat | `****-****-****-4242` |\n| `{{$randomCreditCardNumber}}` | Postman compat | `4242424242424242` |\n| `{{$randomBankAccount}}` | Postman compat | `0123456789` |\n| `{{$randomBankRoutingNumber}}` | Postman compat | `021000089` |\n| `{{$randomCurrencyCode}}` | Postman compat | `USD` |\n| `{{$randomPrice}}` | Postman compat | `42.99` |\n| `{{$randomTransactionType}}` | Postman compat | `payment` |\n| `{{$randomDatetime}}` | Postman compat | `2026-04-06T10:24:00.000Z` |\n| `{{$randomDatePast}}` | Postman compat | `2025-10-12T...` |\n| `{{$randomDateFuture}}` | Postman compat | `2026-11-04T...` |\n| `{{$randomDateRecent}}` | Postman compat — last 7 days | `2026-05-15T...` |\n| `{{$randomDateSoon}}` | Postman compat — next 7 days | `2026-05-22T...` |\n| `{{$randomTime}}` | Postman compat | `14:23:07` |\n| `{{$randomWeekday}}` | Postman compat | `Wednesday` |\n| `{{$randomMonth}}` | Postman compat | `April` |\n| `{{$randomColor}}` | Postman compat | `purple` |\n| `{{$randomHexColor}}` | Postman compat | `#A78BFA` |\n| `{{$randomWord}}` | Postman compat — lorem | `ipsum` |\n| `{{$randomWords}}` | Postman compat — lorem phrase | `lorem ipsum dolor` |\n| `{{$randomSentence}}` | Postman compat | `Lorem ipsum dolor sit amet.` |\n| `{{$randomParagraph}}` | Postman compat | `Lorem ipsum dolor sit amet...` |\n| `{{$randomFileName}}` | Postman compat | `q1w2e3r4.pdf` |\n| `{{$randomFileExt}}` | Postman compat | `json` |\n| `{{$randomFileType}}` | Postman compat | `image` |\n| `{{$randomMimeType}}` | Postman compat | `application/json` |\n| `{{$randomImageUrl}}` | Postman compat | `https://picsum.photos/400/300` |\n"
10
+ };
11
+ //# sourceMappingURL=aiPacks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aiPacks.js","sourceRoot":"","sources":["../../../src/resources/generated/aiPacks.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AAE9C,MAAM,CAAC,MAAM,QAAQ,GAA2B;IAC9C,YAAY,EAAE,wvHAAwvH;IACtwH,oBAAoB,EAAE,84eAA84e;IACp6e,gBAAgB,EAAE,q2BAAq2B;IACv3B,QAAQ,EAAE,+4YAA+4Y;IACz5Y,iBAAiB,EAAE,8gDAA8gD;IACjiD,YAAY,EAAE,u0LAAu0L;CACt1L,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { ToolContext } from "../context.js";
3
+ export declare const registerResources: (server: McpServer, ctx: ToolContext) => void;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,yCAAyC,CAAC;AAa3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAiCjD,eAAO,MAAM,iBAAiB,GAAI,QAAQ,SAAS,EAAE,KAAK,WAAW,KAAG,IA4IvE,CAAC"}
@@ -0,0 +1,114 @@
1
+ import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { buildScenarioSystemPrompt, DIAGRAM_CATEGORY_LABELS, DIAGRAM_CATEGORY_ORDER, diagramComponentsByCategory, renderDbQueryReference, renderPmApiReference, safeParseDiagramDocument, } from "callman-core";
3
+ import { diagramGraphView } from "../domain/diagram/summarize.js";
4
+ import { compactRequestView, requestSummaryView } from "../domain/requestShape.js";
5
+ import { scenarioFullView } from "../domain/scenario/summarize.js";
6
+ import { safeStringify } from "../lib/truncate.js";
7
+ import { loadTree, resolveCollection, resolveDiagram, resolveEnvironment, resolveRequest, resolveScenario } from "../tools/lookups.js";
8
+ import { DIAGRAM_SCHEMA_DOC } from "./docs/diagramSchema.js";
9
+ import { OVERVIEW_DOC } from "./docs/overview.js";
10
+ import { REQUEST_SCHEMA_DOC } from "./docs/requestSchema.js";
11
+ import { AI_PACKS } from "./generated/aiPacks.js";
12
+ // Resources: reference material a model reads on demand (schemas, the
13
+ // scripting API, the scenario node reference, the diagram component catalog
14
+ // — all generated from callman-core so they can never drift from the engine)
15
+ // plus live views of workspace data by URI.
16
+ const text = (uri, body, mimeType = "text/markdown") => ({
17
+ contents: [{ uri: uri.href, mimeType, text: body }],
18
+ });
19
+ const json = (uri, body) => text(uri, safeStringify(body, 2), "application/json");
20
+ // Template variables arrive percent-encoded ("Users%20API") — decode them so a
21
+ // name with spaces works as a reference.
22
+ const variable = (value) => {
23
+ const raw = Array.isArray(value) ? (value[0] ?? "") : (value ?? "");
24
+ try {
25
+ return decodeURIComponent(raw);
26
+ }
27
+ catch {
28
+ return raw;
29
+ }
30
+ };
31
+ export const registerResources = (server, ctx) => {
32
+ // ── static docs ──────────────────────────────────────────────────────
33
+ const staticDocs = [
34
+ { name: "docs-overview", uri: "callman://docs/overview", title: "How to work with Callman", description: "Conventions: whoami first, names as references, dryRun, confirm, secrets, scenarios, diagrams.", body: () => OVERVIEW_DOC },
35
+ { name: "docs-request-schema", uri: "callman://docs/request-schema", title: "Request input schema", description: "The compact request form (body variants, auth, variables, scripts, folder skeleton).", body: () => REQUEST_SCHEMA_DOC },
36
+ { name: "docs-scenario-nodes", uri: "callman://docs/scenario-nodes", title: "Scenario node reference", description: "Every scenario node type with its config fields and defaults, graph rules and examples (from callman-core).", body: () => buildScenarioSystemPrompt() },
37
+ { name: "docs-scripting-pm-api", uri: "callman://docs/scripting/pm-api", title: "Scripting: pm.* API", description: "The pm.* API available in pre-request / post-response / test scripts, per stage.", body: () => renderPmApiReference() },
38
+ { name: "docs-scripting-db-queries", uri: "callman://docs/scripting/db-queries", title: "Scripting: database queries", description: "How pm.db.* queries work per database provider.", body: () => renderDbQueryReference() },
39
+ { name: "docs-scripting-templating", uri: "callman://docs/scripting/templating", title: "Templating: {{variables}} and generators", description: "Variable resolution order and dynamic generators ({{$uuid}}, {{$randomInt}} …).", body: () => AI_PACKS.templating ?? "" },
40
+ { name: "docs-scripting-sandbox", uri: "callman://docs/scripting/sandbox", title: "Scripting: sandbox and feature policy", description: "Globals available in the script sandbox and the feature policy for DB/Kafka capabilities.", body: () => `${AI_PACKS["sandbox-globals"] ?? ""}\n\n${AI_PACKS["feature-policy"] ?? ""}` },
41
+ { name: "docs-diagram-schema", uri: "callman://docs/diagram-schema", title: "Diagram schema", description: "The compact diagram input, edge semantics, patch operations and the stored DiagramDocument.", body: () => DIAGRAM_SCHEMA_DOC },
42
+ ];
43
+ for (const doc of staticDocs) {
44
+ server.registerResource(doc.name, doc.uri, { title: doc.title, description: doc.description, mimeType: "text/markdown" }, async (uri) => text(uri, doc.body()));
45
+ }
46
+ // ── component catalog ────────────────────────────────────────────────
47
+ const catalog = () => {
48
+ const grouped = diagramComponentsByCategory();
49
+ return DIAGRAM_CATEGORY_ORDER.map((category) => ({
50
+ category,
51
+ label: DIAGRAM_CATEGORY_LABELS[category],
52
+ components: grouped[category].map((component) => ({
53
+ type: component.type,
54
+ label: component.label,
55
+ ...(component.aliases?.length ? { aliases: component.aliases } : {}),
56
+ ...(component.container ? { container: true } : {}),
57
+ })),
58
+ }));
59
+ };
60
+ server.registerResource("diagram-components", "callman://diagram/components", { title: "Diagram component catalog", description: "Every component type usable in create_diagram / patch_diagram, grouped by category. Use the `type` values verbatim.", mimeType: "application/json" }, async (uri) => json(uri, { categories: catalog(), note: "Use `type` verbatim as a node's type. Container components take children via `parent`." }));
61
+ server.registerResource("diagram-components-category", new ResourceTemplate("callman://diagram/components/{category}", {
62
+ list: undefined,
63
+ complete: { category: () => [...DIAGRAM_CATEGORY_ORDER] },
64
+ }), { title: "Diagram components in one category", description: `One category of the component catalog: ${DIAGRAM_CATEGORY_ORDER.join(", ")}.`, mimeType: "application/json" }, async (uri, variables) => {
65
+ const category = variable(variables.category);
66
+ const entry = catalog().find((group) => group.category === category);
67
+ if (!entry)
68
+ throw new Error(`Unknown category "${category}". Known: ${DIAGRAM_CATEGORY_ORDER.join(", ")}`);
69
+ return json(uri, entry);
70
+ });
71
+ // ── live workspace data ──────────────────────────────────────────────
72
+ server.registerResource("workspaces", "callman://workspaces", { title: "Your workspaces", description: "The workspaces the token can act in, with your role.", mimeType: "application/json" }, async (uri) => json(uri, { workspaces: await ctx.listWorkspaces() }));
73
+ server.registerResource("workspace-collections", new ResourceTemplate("callman://workspace/{workspace}/collections", { list: undefined }), { title: "Collections of a workspace", description: "Collections (id, name, counts) of a workspace by id or name.", mimeType: "application/json" }, async (uri, variables) => {
74
+ const ws = await ctx.resolveWorkspace(variable(variables.workspace));
75
+ const collections = await ctx.api.listAllCollections(ws.id);
76
+ return json(uri, { workspace: { id: ws.id, name: ws.name }, collections: collections.map((collection) => ({ id: collection.id, name: collection.name, requestCount: collection.requestCount ?? null, folderCount: collection.folderCount ?? null })) });
77
+ });
78
+ server.registerResource("workspace-environments", new ResourceTemplate("callman://workspace/{workspace}/environments", { list: undefined }), { title: "Environments of a workspace", description: "Environments with their variable keys (values masked by the server).", mimeType: "application/json" }, async (uri, variables) => {
79
+ const ws = await ctx.resolveWorkspace(variable(variables.workspace));
80
+ const { items } = await ctx.api.listEnvironments(ws.id);
81
+ return json(uri, { workspace: { id: ws.id, name: ws.name }, environments: items.map((environment) => ({ id: environment.id, name: environment.name, variableKeys: environment.variables.map((entry) => entry.key) })) });
82
+ });
83
+ server.registerResource("collection-tree", new ResourceTemplate("callman://collection/{collection}/tree", { list: undefined }), { title: "A collection's folders and requests", description: "Folders and requests of a collection (id or name) in the default workspace.", mimeType: "application/json" }, async (uri, variables) => {
84
+ const ws = await ctx.resolveWorkspace();
85
+ const resolved = await resolveCollection(ctx, ws.id, variable(variables.collection));
86
+ const tree = await loadTree(ctx, ws.id, resolved.item.id);
87
+ return json(uri, { collection: { id: resolved.item.id, name: resolved.item.name }, folders: tree.folders, requests: tree.requests.map(requestSummaryView) });
88
+ });
89
+ server.registerResource("request", new ResourceTemplate("callman://request/{request}", { list: undefined }), { title: "A saved request", description: "One request (id or unique name) in the default workspace, secrets masked.", mimeType: "application/json" }, async (uri, variables) => {
90
+ const ws = await ctx.resolveWorkspace();
91
+ const { request } = await resolveRequest(ctx, ws.id, variable(variables.request));
92
+ return json(uri, { request: compactRequestView(request, { full: true }) });
93
+ });
94
+ server.registerResource("environment", new ResourceTemplate("callman://environment/{environment}", { list: undefined }), { title: "An environment", description: "One environment (id or name) in the default workspace, values masked by the server.", mimeType: "application/json" }, async (uri, variables) => {
95
+ const ws = await ctx.resolveWorkspace();
96
+ const resolved = await resolveEnvironment(ctx, ws.id, variable(variables.environment));
97
+ const fresh = await ctx.api.getEnvironment(ws.id, resolved.item.id);
98
+ return json(uri, { environment: { id: fresh.id, name: fresh.name, variables: fresh.variables } });
99
+ });
100
+ server.registerResource("scenario", new ResourceTemplate("callman://scenario/{scenario}", { list: undefined }), { title: "A scenario", description: "One scenario (id or name): nodes with configs (clipped, secrets masked) and edges.", mimeType: "application/json" }, async (uri, variables) => {
101
+ const ws = await ctx.resolveWorkspaceOrNull();
102
+ const resolved = await resolveScenario(ctx, ws?.id ?? null, variable(variables.scenario));
103
+ return json(uri, { scenario: scenarioFullView(resolved.item) });
104
+ });
105
+ server.registerResource("diagram", new ResourceTemplate("callman://diagram/{diagram}", { list: undefined }), { title: "A diagram", description: "One diagram (id or name) as nodes/edges with edge semantics.", mimeType: "application/json" }, async (uri, variables) => {
106
+ const ref = variable(variables.diagram);
107
+ const resolved = await resolveDiagram(ctx, ref);
108
+ const parsed = safeParseDiagramDocument(resolved.item.document);
109
+ if (!parsed.ok)
110
+ throw new Error(`Stored diagram is invalid: ${parsed.errors.join("; ")}`);
111
+ return json(uri, { diagram: { id: resolved.item.id, name: resolved.item.name, canEdit: resolved.item.canEdit, ...diagramGraphView(parsed.document) } });
112
+ });
113
+ };
114
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3F,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,GAEzB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAA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AE,CAAC,CAAC;IAClE,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,gBAAgB,CACrB,SAAS,EACT,IAAI,gBAAgB,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EACxE,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,8DAA8D,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EACjI,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE;QACvB,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1F,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1J,CAAC,CACF,CAAC;AAEJ,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { type ConnectionRuntimeMap, type ExecutionResult } from "callman-core";
2
+ import type { RunnableCollection, RunnableRequest, RunOutcome } from "./types.js";
3
+ export interface ExecuteOptions {
4
+ collection: RunnableCollection;
5
+ env: Record<string, unknown>;
6
+ connections?: ConnectionRuntimeMap;
7
+ bail?: boolean;
8
+ only?: string[] | null;
9
+ deadlineMs?: number;
10
+ onProgress?: (input: {
11
+ index: number;
12
+ total: number;
13
+ request: RunnableRequest;
14
+ result: ExecutionResult;
15
+ }) => void;
16
+ }
17
+ export declare const requestFailed: (result: ExecutionResult) => boolean;
18
+ export declare const executeCollection: ({ collection, env, connections, bail, only, deadlineMs, onProgress, }: ExecuteOptions) => Promise<RunOutcome>;
19
+ //# sourceMappingURL=executeCollection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeCollection.d.ts","sourceRoot":"","sources":["../../src/run/executeCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,oBAAoB,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAE5H,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAQlF,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,kBAAkB,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAEvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,eAAe,CAAC;QAAC,MAAM,EAAE,eAAe,CAAA;KAAE,KAAK,IAAI,CAAC;CACnH;AAED,eAAO,MAAM,aAAa,GAAI,QAAQ,eAAe,KAAG,OASvD,CAAC;AASF,eAAO,MAAM,iBAAiB,GAAU,uEAQrC,cAAc,KAAG,OAAO,CAAC,UAAU,CA6ErC,CAAC"}
@@ -0,0 +1,89 @@
1
+ import { EnvStore, runRequest, runRequestWithDataset } from "callman-core";
2
+ export const requestFailed = (result) => {
3
+ if (typeof result.passed === "boolean")
4
+ return !result.passed;
5
+ // Same rule as callme-cli (summary.ts): status 0 = transport failure.
6
+ return (result.status === 0 ||
7
+ result.status >= 400 ||
8
+ result.scriptResults.some((test) => test.status === "FAIL") ||
9
+ result.contractResults.some((test) => test.status === "FAIL"));
10
+ };
11
+ const diffEnv = (before, after, set, unset) => {
12
+ for (const key of Object.keys(after)) {
13
+ if (!(key in before) || before[key] !== after[key])
14
+ set.add(key);
15
+ }
16
+ for (const key of Object.keys(before))
17
+ if (!(key in after))
18
+ unset.add(key);
19
+ };
20
+ export const executeCollection = async ({ collection, env, connections = {}, bail = false, only = null, deadlineMs, onProgress, }) => {
21
+ const envStore = new EnvStore(env);
22
+ const results = [];
23
+ const setKeys = new Set();
24
+ const unsetKeys = new Set();
25
+ const startedAt = Date.now();
26
+ let previousResponse = null;
27
+ let bailed = false;
28
+ const featurePolicy = {
29
+ database: collection.runnerSettings?.database !== false,
30
+ kafka: false,
31
+ };
32
+ const wanted = only ? new Set(only) : null;
33
+ const runnable = collection.requests.filter((request) => request.isEnabledInRunner !== false && (!wanted || wanted.has(request.id)));
34
+ for (const [index, request] of runnable.entries()) {
35
+ if (deadlineMs && Date.now() - startedAt > deadlineMs) {
36
+ bailed = true;
37
+ break;
38
+ }
39
+ const before = envStore.all();
40
+ const rows = request.dataContract?.rows ?? [];
41
+ if (rows.length > 0) {
42
+ const { iterations } = await runRequestWithDataset({ request, env: envStore, previousResponse, connections, featurePolicy }, { requestId: request.id, columns: request.dataContract?.columns ?? [], rows });
43
+ let rowBailed = false;
44
+ for (const iteration of iterations) {
45
+ const result = {
46
+ requestId: request.id,
47
+ requestName: `${request.name} [row ${iteration.rowIndex + 1}]`,
48
+ status: iteration.status,
49
+ duration: iteration.durationMs,
50
+ response: iteration.response ?? null,
51
+ request: iteration.request,
52
+ scriptResults: iteration.scriptResults,
53
+ contractResults: iteration.contractResults,
54
+ passed: iteration.passed,
55
+ };
56
+ results.push(result);
57
+ onProgress?.({ index, total: runnable.length, request, result });
58
+ if (bail && !iteration.passed) {
59
+ rowBailed = true;
60
+ break;
61
+ }
62
+ }
63
+ diffEnv(before, envStore.all(), setKeys, unsetKeys);
64
+ previousResponse = null;
65
+ if (rowBailed) {
66
+ bailed = true;
67
+ break;
68
+ }
69
+ continue;
70
+ }
71
+ const outcome = await runRequest({ request, env: envStore, previousResponse, connections, featurePolicy });
72
+ diffEnv(before, envStore.all(), setKeys, unsetKeys);
73
+ previousResponse = outcome.response;
74
+ results.push(outcome.result);
75
+ onProgress?.({ index, total: runnable.length, request, result: outcome.result });
76
+ if (bail && requestFailed(outcome.result)) {
77
+ bailed = true;
78
+ break;
79
+ }
80
+ }
81
+ const passed = results.filter((result) => !requestFailed(result)).length;
82
+ return {
83
+ results,
84
+ summary: { total: results.length, passed, failed: results.length - passed },
85
+ envChanges: { set: [...setKeys].sort(), unset: [...unsetKeys].sort() },
86
+ bailed,
87
+ };
88
+ };
89
+ //# sourceMappingURL=executeCollection.js.map