callman-mcp 0.7.0 → 0.8.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.
- package/CHANGELOG.md +26 -0
- package/README.md +27 -7
- package/dist/client/api.d.ts +59 -1
- package/dist/client/api.d.ts.map +1 -1
- package/dist/client/api.js +67 -0
- package/dist/client/api.js.map +1 -1
- package/dist/client/errors.d.ts.map +1 -1
- package/dist/client/errors.js +18 -11
- package/dist/client/errors.js.map +1 -1
- package/dist/client/types.d.ts +105 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +8 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +1 -0
- package/dist/context.js.map +1 -1
- package/dist/domain/requestShape.d.ts +4 -4
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/resources/docs/mocks.d.ts +2 -0
- package/dist/resources/docs/mocks.d.ts.map +1 -0
- package/dist/resources/docs/mocks.js +210 -0
- package/dist/resources/docs/mocks.js.map +1 -0
- package/dist/resources/docs/overview.d.ts +1 -1
- package/dist/resources/docs/overview.d.ts.map +1 -1
- package/dist/resources/docs/overview.js +7 -1
- package/dist/resources/docs/overview.js.map +1 -1
- package/dist/resources/generated/aiPacks.d.ts +1 -1
- package/dist/resources/generated/aiPacks.js +2 -2
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +2 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/run/executeCollection.d.ts.map +1 -1
- package/dist/run/executeCollection.js +5 -1
- package/dist/run/executeCollection.js.map +1 -1
- package/dist/run/loadBundle.d.ts.map +1 -1
- package/dist/run/loadBundle.js +49 -2
- package/dist/run/loadBundle.js.map +1 -1
- package/dist/run/summarize.d.ts +28 -4
- package/dist/run/summarize.d.ts.map +1 -1
- package/dist/run/summarize.js +19 -1
- package/dist/run/summarize.js.map +1 -1
- package/dist/run/types.d.ts +2 -1
- package/dist/run/types.d.ts.map +1 -1
- package/dist/server.d.ts +6 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +16 -4
- package/dist/server.js.map +1 -1
- package/dist/tools/catalog.d.ts +1 -1
- package/dist/tools/catalog.d.ts.map +1 -1
- package/dist/tools/catalog.js +18 -0
- package/dist/tools/catalog.js.map +1 -1
- package/dist/tools/index.d.ts +9 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +27 -3
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/meta.d.ts.map +1 -1
- package/dist/tools/meta.js +29 -2
- package/dist/tools/meta.js.map +1 -1
- package/dist/tools/mockShared.d.ts +983 -0
- package/dist/tools/mockShared.d.ts.map +1 -0
- package/dist/tools/mockShared.js +387 -0
- package/dist/tools/mockShared.js.map +1 -0
- package/dist/tools/mocks.d.ts +4 -0
- package/dist/tools/mocks.d.ts.map +1 -0
- package/dist/tools/mocks.js +331 -0
- package/dist/tools/mocks.js.map +1 -0
- package/dist/tools/mocksLocal.d.ts +24 -0
- package/dist/tools/mocksLocal.d.ts.map +1 -0
- package/dist/tools/mocksLocal.js +169 -0
- package/dist/tools/mocksLocal.js.map +1 -0
- package/dist/tools/run.d.ts +0 -1
- package/dist/tools/run.d.ts.map +1 -1
- package/dist/tools/run.js +7 -26
- package/dist/tools/run.js.map +1 -1
- package/dist-cjs/client/api.js +67 -0
- package/dist-cjs/client/errors.js +18 -11
- package/dist-cjs/config.js +5 -1
- package/dist-cjs/context.js +1 -0
- package/dist-cjs/resources/docs/mocks.js +212 -0
- package/dist-cjs/resources/docs/overview.js +7 -1
- package/dist-cjs/resources/generated/aiPacks.js +2 -2
- package/dist-cjs/resources/index.js +2 -0
- package/dist-cjs/run/executeCollection.js +5 -1
- package/dist-cjs/run/loadBundle.js +49 -2
- package/dist-cjs/run/summarize.js +19 -1
- package/dist-cjs/server.js +16 -4
- package/dist-cjs/tools/catalog.js +18 -0
- package/dist-cjs/tools/index.js +30 -6
- package/dist-cjs/tools/meta.js +28 -1
- package/dist-cjs/tools/mockShared.js +414 -0
- package/dist-cjs/tools/mocks.js +334 -0
- package/dist-cjs/tools/mocksLocal.js +179 -0
- package/dist-cjs/tools/run.js +7 -26
- package/package.json +2 -2
package/dist/tools/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/tools/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxE,OAAO,EAAE,yBAAyB,EAAsB,MAAM,sBAAsB,CAAC;AAErF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAiB1D,UAAU,WAAW;IACnB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,WAAW,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,KAAK,CAAC,CAAC;IACjE,WAAW,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACjD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/tools/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxE,OAAO,EAAE,yBAAyB,EAAsB,MAAM,sBAAsB,CAAC;AAErF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAiB1D,UAAU,WAAW;IACnB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,WAAW,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,KAAK,CAAC,CAAC;IACjE,WAAW,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACjD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,eAAe,CAAC;CAC5B;AAiBD,eAAO,MAAM,UAAU,GAAU,KAAK,WAAW,EAAE,IAAI,MAAM,EAAE,cAAc,MAAM,EAAE,gBAAgB,MAAM,GAAG,SAAS,KAAG,OAAO,CAAC,WAAW,CAkC5I,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,EAAE,KAAK,WAAW,KAAG,IAyJtE,CAAC"}
|
package/dist/tools/run.js
CHANGED
|
@@ -16,14 +16,12 @@ import { guarded, ok, refArg, RUN, workspaceArg } from "./shared.js";
|
|
|
16
16
|
// {{key}}). One run at a time.
|
|
17
17
|
// What a local run does NOT do, stated up front so a model does not read a
|
|
18
18
|
// missing check as a pass.
|
|
19
|
-
const LOCAL_RUN_LIMITS = "Local-run limits:
|
|
19
|
+
const LOCAL_RUN_LIMITS = "Local-run limits: no cookie jar between requests; no client certificates (mTLS); each request times out after 30 s. Database and Redis steps run when the collection's runnerSettings allow them and the connection is usable from this machine; the request's DB and Redis assertions are then evaluated like the desktop does (one that cannot be checked, e.g. an unreachable connection, FAILS).";
|
|
20
20
|
const maxBodyArg = z.number().int().min(256).max(LIMITS.RUN_BODY_MAX).optional().describe("Response body preview cap in bytes (default 16 KB)");
|
|
21
|
-
// apiKey auth names its own header / query parameter — mask those too
|
|
22
|
-
// note the steps a local run skips.
|
|
21
|
+
// apiKey auth names its own header / query parameter — mask those too.
|
|
23
22
|
const inspectBundle = (rawCollection) => {
|
|
24
23
|
const secretHeaders = new Set();
|
|
25
24
|
const secretQuery = new Set();
|
|
26
|
-
const skipped = new Map();
|
|
27
25
|
const requests = rawCollection?.requests;
|
|
28
26
|
for (const raw of Array.isArray(requests) ? requests : []) {
|
|
29
27
|
const request = raw;
|
|
@@ -31,13 +29,8 @@ const inspectBundle = (rawCollection) => {
|
|
|
31
29
|
if (auth && (auth.type === "apikey" || auth.type === "apiKey") && typeof auth.apiKeyKey === "string" && auth.apiKeyKey.trim()) {
|
|
32
30
|
(auth.apiKeyLocation === "query" ? secretQuery : secretHeaders).add(auth.apiKeyKey.trim());
|
|
33
31
|
}
|
|
34
|
-
const notes = [];
|
|
35
|
-
if (Array.isArray(request.dbAssertions) && request.dbAssertions.length > 0)
|
|
36
|
-
notes.push("DB assertions (desktop only)");
|
|
37
|
-
if (typeof request.id === "string" && notes.length > 0)
|
|
38
|
-
skipped.set(request.id, notes);
|
|
39
32
|
}
|
|
40
|
-
return { redaction: { secretHeaders, secretQuery }
|
|
33
|
+
return { redaction: { secretHeaders, secretQuery } };
|
|
41
34
|
};
|
|
42
35
|
export const prepareRun = async (ctx, ws, collectionId, environmentRef) => {
|
|
43
36
|
const environment = environmentRef ? (await resolveEnvironment(ctx, ws, environmentRef)).item : null;
|
|
@@ -63,7 +56,7 @@ export const prepareRun = async (ctx, ws, collectionId, environmentRef) => {
|
|
|
63
56
|
const { map, skipped } = buildConnectionRuntimeMap(bundle.connections);
|
|
64
57
|
if (skipped.length > 0)
|
|
65
58
|
warnings.push(`Connections not usable in a local run: ${skipped.join(", ")}`);
|
|
66
|
-
const { redaction
|
|
59
|
+
const { redaction } = inspectBundle(bundle.collection);
|
|
67
60
|
return {
|
|
68
61
|
collection,
|
|
69
62
|
env: { ...(bundle.environment?.variables ?? {}) },
|
|
@@ -72,20 +65,8 @@ export const prepareRun = async (ctx, ws, collectionId, environmentRef) => {
|
|
|
72
65
|
environment: bundle.environment ? { id: bundle.environment.id, name: bundle.environment.name } : null,
|
|
73
66
|
warnings,
|
|
74
67
|
redaction,
|
|
75
|
-
skipped: skippedSteps,
|
|
76
68
|
};
|
|
77
69
|
};
|
|
78
|
-
// Warnings for the requests actually run.
|
|
79
|
-
const skippedWarnings = (prepared, ids) => {
|
|
80
|
-
const out = [];
|
|
81
|
-
const names = new Map(prepared.collection.requests.map((request) => [request.id, request.name]));
|
|
82
|
-
for (const id of ids) {
|
|
83
|
-
const notes = prepared.skipped.get(id);
|
|
84
|
-
if (notes)
|
|
85
|
-
out.push(`${names.get(id) ?? id}: not run locally — ${notes.join(", ")}.`);
|
|
86
|
-
}
|
|
87
|
-
return out;
|
|
88
|
-
};
|
|
89
70
|
export const registerRunTools = (server, ctx) => {
|
|
90
71
|
server.registerTool("run_request", {
|
|
91
72
|
title: "Run a request locally",
|
|
@@ -139,7 +120,7 @@ export const registerRunTools = (server, ctx) => {
|
|
|
139
120
|
environment: prepared.environment,
|
|
140
121
|
availableVariableKeys: Object.keys(env),
|
|
141
122
|
unresolvedVariables: unresolved([runnable.url, ...Object.values(runnable.headers ?? {}), ...Object.values(runnable.query ?? {}), safeStringify(runnable.body ?? "")], env),
|
|
142
|
-
warnings:
|
|
123
|
+
warnings: prepared.warnings,
|
|
143
124
|
...(runnable.isEnabledInRunner === false ? { note: "This request is switched off for the collection runner; run_request still runs it." } : {}),
|
|
144
125
|
});
|
|
145
126
|
}
|
|
@@ -156,7 +137,7 @@ export const registerRunTools = (server, ctx) => {
|
|
|
156
137
|
collection: { id: found.collectionId },
|
|
157
138
|
workspace: workspaceTag(ws),
|
|
158
139
|
environment: prepared.environment,
|
|
159
|
-
warnings:
|
|
140
|
+
warnings: prepared.warnings,
|
|
160
141
|
...(annotation ? { resolved: [{ input: request, matched: found.name, id: found.id, note: annotation }] } : {}),
|
|
161
142
|
}, prepared.redaction);
|
|
162
143
|
return ok({ ...summary, result: summary.results[0] ?? null });
|
|
@@ -206,7 +187,7 @@ export const registerRunTools = (server, ctx) => {
|
|
|
206
187
|
collection: { id: resolved.item.id, name: resolved.item.name },
|
|
207
188
|
workspace: workspaceTag(ws),
|
|
208
189
|
environment: prepared.environment,
|
|
209
|
-
warnings:
|
|
190
|
+
warnings: prepared.warnings,
|
|
210
191
|
resolved: [resolvedSummary(collection, resolved)],
|
|
211
192
|
}, prepared.redaction));
|
|
212
193
|
}));
|
package/dist/tools/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/tools/run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAwB,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1J,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAA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AK,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AACtB,CAAC,CAAC"}
|
package/dist-cjs/client/api.js
CHANGED
|
@@ -347,6 +347,73 @@ class CallmanApi {
|
|
|
347
347
|
importUiTests(ws, body) {
|
|
348
348
|
return this.http.request("POST", "/import/ui-tests", { workspaceId: ws, body, timeoutMs: 120_000 });
|
|
349
349
|
}
|
|
350
|
+
// ── mock APIs (server) ──────────────────────────────────────────────
|
|
351
|
+
// Mocks are addressed by their slug (`mockId`), not the database id.
|
|
352
|
+
listMocks(ws, page = 1, search) {
|
|
353
|
+
return this.http.request("GET", "/mocks", { workspaceId: ws, query: { page, limit: 100, search } });
|
|
354
|
+
}
|
|
355
|
+
async listAllMocks(ws) {
|
|
356
|
+
const out = [];
|
|
357
|
+
for (let page = 1; page <= 20; page += 1) {
|
|
358
|
+
const result = await this.listMocks(ws, page);
|
|
359
|
+
out.push(...result.items);
|
|
360
|
+
if (page >= result.pagination.totalPages || result.items.length === 0)
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
return out;
|
|
364
|
+
}
|
|
365
|
+
getMock(ws, mockId, includeSecrets = false) {
|
|
366
|
+
return this.http.request("GET", `/mocks/${encodeURIComponent(mockId)}`, { workspaceId: ws, query: includeSecrets ? { includeSecrets: "true" } : {} });
|
|
367
|
+
}
|
|
368
|
+
createMock(ws, body) {
|
|
369
|
+
return this.http.request("POST", "/mocks", { workspaceId: ws, body });
|
|
370
|
+
}
|
|
371
|
+
updateMock(ws, mockId, body) {
|
|
372
|
+
return this.http.request("PATCH", `/mocks/${encodeURIComponent(mockId)}`, { workspaceId: ws, body });
|
|
373
|
+
}
|
|
374
|
+
deleteMock(ws, mockId) {
|
|
375
|
+
return this.http.request("DELETE", `/mocks/${encodeURIComponent(mockId)}`, { workspaceId: ws });
|
|
376
|
+
}
|
|
377
|
+
addMockRoute(ws, mockId, body) {
|
|
378
|
+
return this.http.request("POST", `/mocks/${encodeURIComponent(mockId)}/routes`, { workspaceId: ws, body });
|
|
379
|
+
}
|
|
380
|
+
updateMockRoute(ws, mockId, routeId, body) {
|
|
381
|
+
return this.http.request("PATCH", `/mocks/${encodeURIComponent(mockId)}/routes/${encodeURIComponent(routeId)}`, { workspaceId: ws, body });
|
|
382
|
+
}
|
|
383
|
+
deleteMockRoute(ws, mockId, routeId) {
|
|
384
|
+
return this.http.request("DELETE", `/mocks/${encodeURIComponent(mockId)}/routes/${encodeURIComponent(routeId)}`, { workspaceId: ws });
|
|
385
|
+
}
|
|
386
|
+
reorderMockRoutes(ws, mockId, routeIds) {
|
|
387
|
+
return this.http.request("POST", `/mocks/${encodeURIComponent(mockId)}/routes/reorder`, { workspaceId: ws, body: { routeIds } });
|
|
388
|
+
}
|
|
389
|
+
getMockState(ws, mockId) {
|
|
390
|
+
return this.http.request("GET", `/mocks/${encodeURIComponent(mockId)}/state`, { workspaceId: ws });
|
|
391
|
+
}
|
|
392
|
+
replaceMockState(ws, mockId, state) {
|
|
393
|
+
return this.http.request("PUT", `/mocks/${encodeURIComponent(mockId)}/state`, { workspaceId: ws, body: state });
|
|
394
|
+
}
|
|
395
|
+
replaceMockInitialState(ws, mockId, initialState) {
|
|
396
|
+
return this.http.request("PUT", `/mocks/${encodeURIComponent(mockId)}/initial-state`, { workspaceId: ws, body: initialState });
|
|
397
|
+
}
|
|
398
|
+
resetMockState(ws, mockId) {
|
|
399
|
+
return this.http.request("POST", `/mocks/${encodeURIComponent(mockId)}/state/reset`, { workspaceId: ws, body: {} });
|
|
400
|
+
}
|
|
401
|
+
getMockStats(ws, mockId) {
|
|
402
|
+
return this.http.request("GET", `/mocks/${encodeURIComponent(mockId)}/stats`, { workspaceId: ws });
|
|
403
|
+
}
|
|
404
|
+
listMockLogs(ws, mockId, query) {
|
|
405
|
+
return this.http.request("GET", `/mocks/${encodeURIComponent(mockId)}/logs`, { workspaceId: ws, query });
|
|
406
|
+
}
|
|
407
|
+
// ── local mocks (the desktop app's own mock servers, via the relay) ─────
|
|
408
|
+
listLocalMockAgents(ws) {
|
|
409
|
+
return this.http.request("GET", "/local-mock-agents", { workspaceId: ws });
|
|
410
|
+
}
|
|
411
|
+
queueLocalMockCommand(ws, body) {
|
|
412
|
+
return this.http.request("POST", "/local-mock-commands", { workspaceId: ws, body });
|
|
413
|
+
}
|
|
414
|
+
getLocalMockCommand(ws, id) {
|
|
415
|
+
return this.http.request("GET", `/local-mock-commands/${encodeURIComponent(id)}`, { workspaceId: ws, retries: 0 });
|
|
416
|
+
}
|
|
350
417
|
// ── local run bundle ────────────────────────────────────────────────
|
|
351
418
|
pipelineBundle(ws, collectionId, environmentId) {
|
|
352
419
|
return this.http.request("GET", "/pipeline/bundle", {
|
|
@@ -50,15 +50,17 @@ const SCOPE_HINT = "Create a token with that permission in the Callman desktop a
|
|
|
50
50
|
const validationHint = (path) => {
|
|
51
51
|
const doc = /\/(ui-test|import\/ui-tests|export\/ui-tests)/.test(path)
|
|
52
52
|
? "callman://docs/ui-tests (steps: callman://docs/ui-test-steps)"
|
|
53
|
-
: /\/(
|
|
54
|
-
? "callman://docs/
|
|
55
|
-
: /\/
|
|
56
|
-
? "callman://docs/
|
|
57
|
-
: /\/
|
|
58
|
-
? "callman://docs/
|
|
59
|
-
: /\/(
|
|
60
|
-
?
|
|
61
|
-
:
|
|
53
|
+
: /\/(mocks|local-mock-)/.test(path)
|
|
54
|
+
? "callman://docs/mocks"
|
|
55
|
+
: /\/(scenarios|scenario-folders)/.test(path)
|
|
56
|
+
? "callman://docs/scenario-nodes"
|
|
57
|
+
: /\/diagrams/.test(path)
|
|
58
|
+
? "callman://docs/diagram-schema"
|
|
59
|
+
: /\/(contract-rules|data-contracts)/.test(path)
|
|
60
|
+
? "callman://docs/contracts"
|
|
61
|
+
: /\/(environments|variables)/.test(path)
|
|
62
|
+
? null
|
|
63
|
+
: "callman://docs/request-schema";
|
|
62
64
|
return `The server rejected the input — check the fields listed in details${doc ? ` against ${doc}` : " (keys 1–100 chars, values ≤ 5000)"}.`;
|
|
63
65
|
};
|
|
64
66
|
const hintFor = (error) => {
|
|
@@ -68,12 +70,17 @@ const hintFor = (error) => {
|
|
|
68
70
|
? (error.details.required ?? []).join(" or ")
|
|
69
71
|
: "an additional scope";
|
|
70
72
|
const uiTests = /ui_tests:/.test(required) ? " UI tests have their own permissions: ui_tests:read (list, read, reports), ui_tests:write (create, edit, folders, schedules, review), ui_tests:run (run, cancel), ui_tests:delete." : "";
|
|
71
|
-
|
|
73
|
+
const mocks = /mocks:/.test(required) ? " Mock APIs have their own permissions: mocks:read (list, read, logs, state), mocks:write (create, edit, routes, state, start/stop local mocks), mocks:delete." : "";
|
|
74
|
+
return `The token lacks the permission ${required}.${uiTests}${mocks} ${SCOPE_HINT}`;
|
|
72
75
|
}
|
|
73
76
|
case "PAT_ROUTE_FORBIDDEN":
|
|
74
77
|
return /\/(ui-test|import\/ui-tests|export\/ui-tests)/.test(error.path)
|
|
75
78
|
? "This server does not open UI tests to AI tools yet — update callman-backend to a version with the ui_tests:* token permissions."
|
|
76
|
-
:
|
|
79
|
+
: /\/(mocks|local-mock-)/.test(error.path)
|
|
80
|
+
? "This server does not open mock APIs to AI tools yet — update callman-backend to a version with the mocks:* token permissions."
|
|
81
|
+
: "This area of Callman is not available to AI tools (request history, API-scenario schedules, connection editing, admin). Use the desktop app for it.";
|
|
82
|
+
case "LOCAL_MOCK_DESKTOP_OFFLINE":
|
|
83
|
+
return "No Callman desktop app of yours is online to manage local mocks. Open the Callman desktop app, sign in, and turn on Settings → AI tools → \"Let AI tools manage local mock APIs on this computer\". Then try again — or use target: \"server\" for a mock on the Callman server with a public URL.";
|
|
77
84
|
case "UI_TEST_DESKTOP_OFFLINE":
|
|
78
85
|
return "No Callman desktop app of yours is online to run this. Open the Callman desktop app, sign in, and turn on Settings → AI tools → \"Let AI tools run UI tests on this computer\"; for Android/iOS connect a device or start an emulator/simulator. Then run again (list_ui_test_devices shows what is connected). Web flows can also run on the server runner when the installation has one.";
|
|
79
86
|
case "UI_TEST_DESKTOP_PLATFORM_UNAVAILABLE":
|
package/dist-cjs/config.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
// CALLMAN_TOKEN_FILE alternative: path of a file holding the token
|
|
12
12
|
// CALLMAN_WORKSPACE_ID default workspace (optional — tools resolve it)
|
|
13
13
|
// CALLMAN_ALLOW_RUN "0"/"false" disables local request execution
|
|
14
|
+
// CALLMAN_HIDE_UNAVAILABLE_TOOLS "0"/"false" lists every tool even when the token lacks its scope (default: hide)
|
|
14
15
|
// CALLMAN_LOG_LEVEL silent | error | warn | info | debug (stderr)
|
|
15
16
|
// CALLMAN_TIMEOUT_MS per API call (default 30s)
|
|
16
17
|
// CALLMAN_RUN_TIMEOUT_MS whole local run (default 10 min)
|
|
@@ -50,7 +51,8 @@ const normalizeApiUrl = (raw) => {
|
|
|
50
51
|
};
|
|
51
52
|
exports.normalizeApiUrl = normalizeApiUrl;
|
|
52
53
|
const resolveConfig = ({ env, readTokenFile }) => {
|
|
53
|
-
const
|
|
54
|
+
const configuredApiUrl = pick(env.CALLMAN_API_URL);
|
|
55
|
+
const apiUrl = (0, exports.normalizeApiUrl)(configuredApiUrl ?? exports.DEFAULT_CLOUD_API_URL);
|
|
54
56
|
let token = pick(env.CALLMAN_TOKEN);
|
|
55
57
|
const tokenFile = pick(env.CALLMAN_TOKEN_FILE);
|
|
56
58
|
if (!token && tokenFile) {
|
|
@@ -62,9 +64,11 @@ const resolveConfig = ({ env, readTokenFile }) => {
|
|
|
62
64
|
const logLevel = LOG_LEVELS.includes(logLevelRaw) ? logLevelRaw : "warn";
|
|
63
65
|
return Object.freeze({
|
|
64
66
|
apiUrl,
|
|
67
|
+
apiUrlIsDefault: configuredApiUrl === null,
|
|
65
68
|
token,
|
|
66
69
|
defaultWorkspaceId: pick(env.CALLMAN_WORKSPACE_ID),
|
|
67
70
|
allowLocalRun: boolOr(env.CALLMAN_ALLOW_RUN, true),
|
|
71
|
+
hideUnavailableTools: boolOr(env.CALLMAN_HIDE_UNAVAILABLE_TOOLS, true),
|
|
68
72
|
logLevel,
|
|
69
73
|
timeoutMs: numberOr(env.CALLMAN_TIMEOUT_MS, 30_000, 1_000, 600_000),
|
|
70
74
|
runTimeoutMs: numberOr(env.CALLMAN_RUN_TIMEOUT_MS, 600_000, 1_000, 3_600_000),
|
package/dist-cjs/context.js
CHANGED
|
@@ -93,6 +93,7 @@ const createToolContext = (options) => {
|
|
|
93
93
|
},
|
|
94
94
|
invalidate: (prefix) => (prefix ? cache.delete(prefix) : cache.clear()),
|
|
95
95
|
pollDelaysMs: options.pollDelaysMs ?? { fast: 2000, slow: 5000 },
|
|
96
|
+
localMockPoll: options.localMockPoll ?? { intervalMs: 1000, timeoutMs: 25_000 },
|
|
96
97
|
};
|
|
97
98
|
};
|
|
98
99
|
exports.createToolContext = createToolContext;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MOCKS_DOC = void 0;
|
|
4
|
+
exports.MOCKS_DOC = `# Mock APIs through MCP
|
|
5
|
+
|
|
6
|
+
A mock API is a fake HTTP API that answers with the responses you describe. Use it when a user says
|
|
7
|
+
*"I need an API that returns …"* — to build a front end before the backend exists, to test a client
|
|
8
|
+
against errors and slow answers, or to give a test a stable dependency. You create it with a few tool
|
|
9
|
+
calls and hand the user a URL.
|
|
10
|
+
|
|
11
|
+
## Two places a mock can live (\`target\`)
|
|
12
|
+
|
|
13
|
+
| | \`target: "server"\` (default) | \`target: "desktop"\` |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| Where | On the Callman server | Inside the user's Callman desktop app |
|
|
16
|
+
| URL | \`<server>/mock/<slug>/…\` — public, reachable by anyone with the URL (or the token) | \`http://127.0.0.1:<port>/…\` — this computer only |
|
|
17
|
+
| Responses | static, **template** ({{…}}), **builder** presets, **variants**, request validation, delay | **static only** + delay |
|
|
18
|
+
| State | yes (builder routes read and write it) | no |
|
|
19
|
+
| Lifetime | expires after 1 / 6 / 24 / 48 h (default 48) | until deleted; lives while the app is open |
|
|
20
|
+
| Needs | token with \`mocks:*\` | token with \`mocks:*\` **and** the desktop app open, signed in, with Settings → AI tools → "Let AI tools manage local mock APIs on this computer" on |
|
|
21
|
+
| Routes are edited with | add_mock_route / update_mock_route / delete_mock_route | \`update_mock { routes }\` — REPLACES all routes |
|
|
22
|
+
| Always on? | yes (no start/stop) | start_mock / stop_mock |
|
|
23
|
+
|
|
24
|
+
If the server's \`publicUrl\` does not answer from your machine (an installation that never set its public address announces a host nobody can reach), use \`alternativeUrl\` from the same result — it is the API address plus \`/mock/<slug>\`.
|
|
25
|
+
|
|
26
|
+
Pick **server** unless the user wants it on their own machine, needs no network exposure, or a tool on
|
|
27
|
+
their computer must call it at localhost. Desktop calls go through a relay: the app picks the request up
|
|
28
|
+
within a few seconds. If it answers \`LOCAL_MOCK_DESKTOP_OFFLINE\`, tell the user to open the app and
|
|
29
|
+
switch the setting on (or fall back to a server mock).
|
|
30
|
+
|
|
31
|
+
## From a user's request to routes
|
|
32
|
+
|
|
33
|
+
1. List first (\`list_mocks\`) — reuse or extend a mock that already fits instead of creating a duplicate.
|
|
34
|
+
2. For each endpoint the user needs, decide: **method + path**, the **status code** and the **body**.
|
|
35
|
+
Use real-looking data; ask only when the contract is truly unknown.
|
|
36
|
+
3. A fixed answer → a static response. Values taken from the request (the id in the path, a field of the
|
|
37
|
+
body) or random data → a template. A small CRUD API that remembers what was created → builder
|
|
38
|
+
routes over state. Different answers for different inputs (a 401 for a bad header, a 404 for one id)
|
|
39
|
+
→ variants.
|
|
40
|
+
4. Call \`create_mock\` with all routes at once. The result has the URL and a \`curl\` line per route —
|
|
41
|
+
give them to the user, and try one if you can.
|
|
42
|
+
5. Iterate with \`update_mock_route\` / \`add_mock_route\`; read what real clients sent with \`get_mock_logs\`.
|
|
43
|
+
|
|
44
|
+
\`\`\`json
|
|
45
|
+
create_mock {
|
|
46
|
+
"name": "Orders API", "slug": "orders-api", "ttlHours": 24,
|
|
47
|
+
"routes": [
|
|
48
|
+
{ "method": "GET", "path": "/orders", "statusCode": 200, "body": [{ "id": 1, "status": "NEW" }, { "id": 2, "status": "PAID" }] },
|
|
49
|
+
{ "method": "GET", "path": "/orders/:id", "response": { "type": "template", "statusCode": 200, "body": { "id": "{{request.params.id}}", "status": "NEW", "createdAt": "{{now}}" } } },
|
|
50
|
+
{ "method": "POST", "path": "/orders", "statusCode": 201, "body": { "id": "{{faker.uuid}}" }, "delay": { "mode": "fixed", "ms": 300 } }
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
\`\`\`
|
|
54
|
+
|
|
55
|
+
## A route
|
|
56
|
+
|
|
57
|
+
\`\`\`
|
|
58
|
+
{ method, path, name?, response | (statusCode?, headers?, body?), variants?, delay?, requestValidation? }
|
|
59
|
+
\`\`\`
|
|
60
|
+
|
|
61
|
+
- **method**: GET POST PUT DELETE PATCH or ANY (any method that no specific route takes).
|
|
62
|
+
- **path**: starts with \`/\`; letters, digits and \`/ _ - : * .\`; no \`..\`; at most 256 characters.
|
|
63
|
+
\`:name\` is a path parameter (letters, digits, underscore: \`:userId\`, not \`:user-id\`). A trailing
|
|
64
|
+
\`/*\` (or a \`*\` segment) matches everything below. The most specific route wins (literal segment >
|
|
65
|
+
parameter > wildcard); a trailing slash is ignored. One route per method + path.
|
|
66
|
+
- **response**: the full shape below. **Shorthand** for the common case: \`statusCode\` (default 200),
|
|
67
|
+
\`headers\`, \`body\` directly on the route = a static response. Don't mix the two.
|
|
68
|
+
- **name**: a label (shown in lists; usable as a reference).
|
|
69
|
+
- **delay**: \`{ mode: "none" }\`, \`{ mode: "fixed", ms }\` or \`{ mode: "random", minMs, maxMs }\` — the
|
|
70
|
+
answer is held back that long (server ≤ 60 000 ms, desktop ≤ 30 000 ms). Use it to test timeouts and spinners.
|
|
71
|
+
|
|
72
|
+
### Responses (server)
|
|
73
|
+
|
|
74
|
+
\`\`\`
|
|
75
|
+
{ "type": "static", "statusCode": 200, "headers": { "X-Foo": "1" }, "body": <any JSON> }
|
|
76
|
+
{ "type": "template", "statusCode": 200, "headers": {}, "body": <JSON with {{expressions}}> }
|
|
77
|
+
{ "type": "builder", "preset": "list|detail|create|update|delete|echo|custom", "config": { "preset": <same>, … } }
|
|
78
|
+
\`\`\`
|
|
79
|
+
|
|
80
|
+
- **body**: any JSON value. An object/array is sent as JSON (\`content-type: application/json\` unless you
|
|
81
|
+
set one); a *string* is sent as is (\`text/plain\` unless you set a content type — for XML/HTML put
|
|
82
|
+
the text in \`body\` and set \`headers\`). No body = empty response (use for 204).
|
|
83
|
+
- **template** — every string in the body may contain \`{{expression}}\`. A string that is *only* one
|
|
84
|
+
expression keeps its type (number, boolean, object); inside longer text the value becomes text.
|
|
85
|
+
Unknown expressions become \`null\` (whole) or empty (inline).
|
|
86
|
+
- \`request.params.<name>\`, \`request.query.<name>\`, \`request.headers.<name>\` (case-insensitive),
|
|
87
|
+
\`request.body.<dotted.path>\`, \`request.method\`
|
|
88
|
+
- \`state.<key>\` — the mock's state (see below)
|
|
89
|
+
- \`faker.email|uuid|fullName|firstName|lastName|phone|address|company|lorem|boolean|int\`
|
|
90
|
+
- \`random.int(min,max)\`, \`random.float(min,max)\`, \`random.boolean\`
|
|
91
|
+
- \`now\`, \`now+5m\`, \`now-2d\` (units s m h d) → ISO timestamps
|
|
92
|
+
- Example: \`{ "id": "{{request.params.id}}", "email": "{{faker.email}}", "age": "{{random.int(18,65)}}" }\`
|
|
93
|
+
(\`age\` becomes a number).
|
|
94
|
+
|
|
95
|
+
### Builder presets (server)
|
|
96
|
+
|
|
97
|
+
A builder route does the work of a REST endpoint over **state** (arrays of objects, stored per mock).
|
|
98
|
+
\`config.preset\` must equal \`preset\`. Required keys are marked; the rest have defaults.
|
|
99
|
+
|
|
100
|
+
| preset | config | what it does |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| \`list\` | **source**: \`{kind:"static",data:[…]}\` or \`{kind:"state",stateKey}\`; \`filtering:{enabled,rules:[{queryParam,field,operator:equals\\|contains\\|startsWith\\|in}]}\`; \`sorting:{enabled,sortByParam:"sortBy",orderParam:"order",allowedFields:[…]}\`; \`pagination:{enabled,strategy:page\\|offset\\|cursor,defaultPageSize:20,maxPageSize:100,envelope:standard\\|data-meta\\|raw}\`; \`statusCode\`, \`headers\` | filter by query params, sort, paginate (\`?page=&limit=\`, \`?offset=&limit=\`, \`?cursor=<last id>&limit=\`). Envelopes: standard \`{items,total,page,totalPages}\`, data-meta \`{data,meta:{total,page,limit}}\`, raw array |
|
|
103
|
+
| \`detail\` | **source**, **notFoundBehavior**:\`{statusCode:404,body?}\`, \`paramName:"id"\`, \`lookupField:"id"\` | the item whose \`lookupField\` equals the path parameter; otherwise the not-found answer |
|
|
104
|
+
| \`create\` | **stateKey**, \`autoGenerate:{id:"uuid"\\|"incremental",createdAt,updatedAt}\`, \`requiredFields:[…]\` (missing → 400), \`responseBehavior:return-created\\|return-id\\|status-only\`, \`statusCode:201\` | appends the request body (plus generated fields) to \`state[stateKey]\` |
|
|
105
|
+
| \`update\` | **stateKey**, **notFoundBehavior**, \`paramName\`, \`lookupField\`, \`mergeStrategy:partial\\|full\`, \`autoUpdateUpdatedAt:true\`, \`statusCode:200\` | replaces/merges the matching item with the request body |
|
|
106
|
+
| \`delete\` | **stateKey**, **notFoundBehavior**, \`paramName\`, \`lookupField\`, \`responseBehavior:204\\|return-deleted\\|success-message\`, \`statusCode:204\` | removes the matching item |
|
|
107
|
+
| \`echo\` | \`statusCode\`, \`headers\` | answers with the request: \`{method,params,query,headers,body}\` — handy to see what a client sends |
|
|
108
|
+
| \`custom\` | \`statusCode\`, \`headers\`, \`body\` | a fixed answer through the builder |
|
|
109
|
+
|
|
110
|
+
A full CRUD mock over one \`users\` collection (the path parameter name must match \`paramName\`):
|
|
111
|
+
|
|
112
|
+
\`\`\`json
|
|
113
|
+
create_mock { "name": "Users", "slug": "users-api", "routes": [
|
|
114
|
+
{ "method": "GET", "path": "/users", "response": { "type": "builder", "preset": "list", "config": { "preset": "list", "source": { "kind": "state", "stateKey": "users" }, "pagination": { "enabled": true } } } },
|
|
115
|
+
{ "method": "GET", "path": "/users/:id", "response": { "type": "builder", "preset": "detail", "config": { "preset": "detail", "source": { "kind": "state", "stateKey": "users" }, "notFoundBehavior": { "statusCode": 404 } } } },
|
|
116
|
+
{ "method": "POST", "path": "/users", "response": { "type": "builder", "preset": "create", "config": { "preset": "create", "stateKey": "users", "autoGenerate": { "id": "incremental", "createdAt": true }, "requiredFields": ["name"] } } },
|
|
117
|
+
{ "method": "PATCH", "path": "/users/:id", "response": { "type": "builder", "preset": "update", "config": { "preset": "update", "stateKey": "users", "notFoundBehavior": { "statusCode": 404 } } } },
|
|
118
|
+
{ "method": "DELETE", "path": "/users/:id", "response": { "type": "builder", "preset": "delete", "config": { "preset": "delete", "stateKey": "users", "notFoundBehavior": { "statusCode": 404 } } } }
|
|
119
|
+
] }
|
|
120
|
+
set_mock_state { "mock": "users-api", "initialState": { "users": [{ "id": 1, "name": "Ada" }] }, "state": { "users": [{ "id": 1, "name": "Ada" }] } }
|
|
121
|
+
\`\`\`
|
|
122
|
+
|
|
123
|
+
### State
|
|
124
|
+
|
|
125
|
+
State is a JSON object per mock (limit 1 MB). Builder \`create\`/\`update\`/\`delete\` change it as requests
|
|
126
|
+
arrive (a missing array is created by the first \`create\`); \`list\`/\`detail\` with \`source.kind: "state"\` and
|
|
127
|
+
\`{{state.key}}\` templates read it. \`get_mock_state\` shows \`state\` (live) and \`initialState\`;
|
|
128
|
+
\`set_mock_state\` replaces either wholesale; \`reset_mock_state\` copies \`initialState\` back into \`state\`
|
|
129
|
+
(do that between test runs). Seed *both* when you want a reset to return to the seed data.
|
|
130
|
+
|
|
131
|
+
### Variants — different answers for different requests (server)
|
|
132
|
+
|
|
133
|
+
A route can carry up to 20 variants. Each has \`priority\` (lower is checked first), a \`condition\` and a
|
|
134
|
+
\`response\` (same shapes as above). The first variant whose condition matches answers; otherwise the
|
|
135
|
+
route's own \`response\` does.
|
|
136
|
+
|
|
137
|
+
\`\`\`json
|
|
138
|
+
{ "method": "GET", "path": "/profile",
|
|
139
|
+
"response": { "type": "static", "statusCode": 200, "body": { "name": "Ada" } },
|
|
140
|
+
"variants": [
|
|
141
|
+
{ "priority": 1, "condition": { "type": "all", "rules": [{ "field": "headers.authorization", "operator": "not-exists" }] },
|
|
142
|
+
"response": { "type": "static", "statusCode": 401, "body": { "error": "unauthorized" } } },
|
|
143
|
+
{ "priority": 2, "condition": { "type": "any", "rules": [{ "field": "query.fail", "operator": "equals", "value": "1" }] },
|
|
144
|
+
"response": { "type": "static", "statusCode": 500, "body": { "error": "boom" } } } ] }
|
|
145
|
+
\`\`\`
|
|
146
|
+
|
|
147
|
+
- \`condition.type\`: \`all\` (every rule) or \`any\` (at least one); 1–20 rules.
|
|
148
|
+
- \`field\`: \`headers.<name>\`, \`params.<name>\`, \`query.<name>\`, \`body.<dotted.path>\`.
|
|
149
|
+
- \`operator\`: exists, not-exists (null and empty count as missing), equals, not-equals, contains,
|
|
150
|
+
starts-with, matches (a regular expression in \`value\`; an invalid one never matches). Values are compared as text.
|
|
151
|
+
|
|
152
|
+
### Request validation (server)
|
|
153
|
+
|
|
154
|
+
\`requestValidation: { "mode": "schema", "schema": { …JSON Schema draft-07… } }\` makes the route reject a
|
|
155
|
+
body that does not match with **400** and the list of invalid fields — to let a client team verify what
|
|
156
|
+
they send. Checked on POST, PUT and PATCH requests. \`mode: "any"\` (default) accepts anything. An invalid
|
|
157
|
+
schema is refused when you save the route. \`update_mock_route\` with \`requestValidation: null\` removes the gate.
|
|
158
|
+
|
|
159
|
+
### Auth (server)
|
|
160
|
+
|
|
161
|
+
\`auth: "public"\` (default) — anyone with the URL. \`auth: "token"\` — callers must send
|
|
162
|
+
\`X-Mock-Token: <token>\` (else 401). The token is generated by the server and returned **once**, in the
|
|
163
|
+
create_mock / update_mock result; \`get_mock\` keeps it masked unless the token holds \`environments:reveal\`
|
|
164
|
+
and you pass \`reveal: true\`. Never put it into places the user did not ask for.
|
|
165
|
+
|
|
166
|
+
## Limits (server defaults; an installation may change them)
|
|
167
|
+
|
|
168
|
+
20 mocks per workspace · 50 routes per mock · response body ≤ 100 KB · request body ≤ 1 MB ·
|
|
169
|
+
state ≤ 1 MB · 20 000 requests in total per mock, then 429 · 30 requests per second per mock, then 429 ·
|
|
170
|
+
the 500 newest request logs are kept · slugs: 3–48 chars, lowercase letters/digits/single dashes, start
|
|
171
|
+
with a letter, a few reserved words (api, mock, admin …) refused · lifetime 1/6/24/48 h, then **410 Gone**.
|
|
172
|
+
Local (desktop): response body ≤ 256 KB, ports 1024–65535 (omit \`port\` and the app picks a free one),
|
|
173
|
+
the mock listens on 127.0.0.1 only.
|
|
174
|
+
|
|
175
|
+
## Desktop (local) mocks
|
|
176
|
+
|
|
177
|
+
\`create_mock { target: "desktop", name, port?, autoStart?, routes? }\` creates a local mock in the user's
|
|
178
|
+
app and starts it (\`start: false\` to skip). Routes are static: \`{ method, path, name?, statusCode, headers, body, delay }\`
|
|
179
|
+
(or \`response: { type: "static", … }\` — the same route object you would give a server mock works as
|
|
180
|
+
long as it is static; \`variants\`, \`requestValidation\`, template and builder responses are refused
|
|
181
|
+
with LOCAL_MOCK_FEATURE_UNSUPPORTED). \`body\` is text: a string is sent verbatim, anything else is
|
|
182
|
+
sent as formatted JSON. \`:param\` segments and a trailing \`/*\` work; every request is logged
|
|
183
|
+
(\`get_mock_logs { target: "desktop" }\`, the latest requests only, kept until the app quits).
|
|
184
|
+
To change routes: \`get_mock { target: "desktop" }\`, edit, \`update_mock { routes: [...all of them] }\`.
|
|
185
|
+
\`start_mock\` / \`stop_mock\` / \`delete_mock\` act on one by name or id. Mocks the AI created carry an "AI"
|
|
186
|
+
badge in the app. The mock is only reachable from the user's computer — don't hand out the URL to others.
|
|
187
|
+
|
|
188
|
+
## Tools
|
|
189
|
+
|
|
190
|
+
| Tool | Scope | |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| list_mocks, get_mock, get_mock_logs | mocks:read | \`target\` server/desktop |
|
|
193
|
+
| get_mock_stats, get_mock_state | mocks:read | server |
|
|
194
|
+
| create_mock, update_mock | mocks:write | \`target\` server/desktop |
|
|
195
|
+
| add_mock_route, update_mock_route, reorder_mock_routes, set_mock_state, reset_mock_state | mocks:write | server |
|
|
196
|
+
| start_mock, stop_mock | mocks:write | desktop |
|
|
197
|
+
| delete_mock | mocks:delete (+ \`confirm: true\`) | \`target\` server/desktop |
|
|
198
|
+
| delete_mock_route | mocks:delete (+ \`confirm: true\`) | server |
|
|
199
|
+
|
|
200
|
+
\`mock\` is the name, the slug or the id. A route is referenced by routeId, \`"GET /users/:id"\`, its path
|
|
201
|
+
(when unique) or its name. If \`create_mock\` fails on a route, the new mock is deleted again (needs
|
|
202
|
+
mocks:delete; otherwise the result says it is kept) and the error names the failing route and why.
|
|
203
|
+
|
|
204
|
+
## Errors you may meet
|
|
205
|
+
|
|
206
|
+
\`PAT_SCOPE_MISSING\` (token lacks mocks:read/write/delete) · \`FEATURE_DISABLED\` (mocks switched off for the
|
|
207
|
+
account) · \`MOCK_SLUG_TAKEN\` (pick another slug) · \`MOCK_LIMIT_REACHED\` (delete an old mock) ·
|
|
208
|
+
\`ROUTE_PATH_CONFLICT\` (the method + path exists) · \`MOCK_ROUTE_LIMIT_REACHED\` · \`VALIDATION_ERROR\`
|
|
209
|
+
(details name the field) · \`LOCAL_MOCK_DESKTOP_OFFLINE\` (open the desktop app and switch the setting on) ·
|
|
210
|
+
\`LOCAL_MOCK_TIMEOUT\` (the app did not answer; check with list_mocks before repeating a create) ·
|
|
211
|
+
\`LOCAL_MOCK_FEATURE_UNSUPPORTED\` (use a server mock).
|
|
212
|
+
`;
|
|
@@ -4,7 +4,7 @@ exports.OVERVIEW_DOC = void 0;
|
|
|
4
4
|
exports.OVERVIEW_DOC = `# Working with Callman through MCP
|
|
5
5
|
|
|
6
6
|
Callman is an API client and test platform (collections of HTTP requests, environments,
|
|
7
|
-
multi-step API test scenarios, UI tests for web / Android / iOS, system-design diagrams). This
|
|
7
|
+
multi-step API test scenarios, UI tests for web / Android / iOS, system-design diagrams, mock APIs). This
|
|
8
8
|
server exposes it to you through tools; everything you do goes to the same server the Callman desktop app uses, as the user
|
|
9
9
|
whose token is configured, limited to that token's permissions and the user's workspace role.
|
|
10
10
|
|
|
@@ -74,6 +74,12 @@ web without a runner) run on the user's own Callman desktop app, which must be o
|
|
|
74
74
|
"Let AI tools run UI tests on this computer" on — \`list_ui_test_devices\` shows what is
|
|
75
75
|
available. Runs return per-step results; screenshots come back as images on request.
|
|
76
76
|
|
|
77
|
+
## Mock APIs
|
|
78
|
+
When a user needs an API that does not exist (yet), create a mock: \`create_mock\` with its routes gives a
|
|
79
|
+
public URL (\`target: "server"\`, default) or a local one on the user's computer (\`target: "desktop"\`, needs
|
|
80
|
+
the desktop app open with "Let AI tools manage local mock APIs on this computer" on). Responses can be
|
|
81
|
+
static, templated or backed by state; read \`callman://docs/mocks\` first. Server mocks expire (1–48 h).
|
|
82
|
+
|
|
77
83
|
## Diagrams
|
|
78
84
|
System-design diagrams use a fixed component catalog — \`callman://diagram/components\`.
|
|
79
85
|
Build with \`create_diagram\` (auto layout), edit with \`patch_diagram\`, share with
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AI_PACKS = exports.AI_PACKS_CORE_VERSION = void 0;
|
|
4
|
-
// GENERATED by scripts/build-static-resources.mjs from callman-core@1.
|
|
5
|
-
exports.AI_PACKS_CORE_VERSION = "1.
|
|
4
|
+
// GENERATED by scripts/build-static-resources.mjs from callman-core@1.38.0 ai-packs — do not edit.
|
|
5
|
+
exports.AI_PACKS_CORE_VERSION = "1.38.0";
|
|
6
6
|
exports.AI_PACKS = {
|
|
7
7
|
"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\"`. The command text is MongoDB Extended JSON (relaxed): `{ \"$oid\": \"…\" }`, `{ \"$date\": \"2026-01-01T00:00:00Z\" }`, `{ \"$numberDecimal\": \"9.99\" }` and `{ \"$numberLong\": \"…\" }` become real BSON values anywhere in the command; a 24-hex string in a filter is also coerced to ObjectId. 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",
|
|
8
8
|
"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",
|