@cubis/foundry 0.3.57 → 0.3.60
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 +27 -0
- package/dist/cli/core.js +118 -3
- package/dist/cli/core.js.map +1 -1
- package/package.json +4 -2
- package/src/cli/core.ts +142 -3
- package/workflows/skills/postman/SKILL.md +14 -9
- package/workflows/skills/postman/references/full-mode-setup.md +6 -2
- package/workflows/skills/postman/references/troubleshooting.md +9 -4
- package/workflows/workflows/agent-environment-setup/manifest.json +10 -5
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/postman.toml +11 -0
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/postman.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +1 -0
- package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/postman.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-postman.prompt.md +11 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/code-documenter/references/images/create-key.png +0 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/code-documenter/references/images/dashboard-annotated.png +0 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/documentation-templates/docs/api.md +16 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/documentation-templates/docs/architecture.md +23 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/postman/SKILL.md +14 -9
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/postman/references/full-mode-setup.md +6 -2
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/postman/references/troubleshooting.md +9 -4
- package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/postman.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/code-documenter/references/images/create-key.png +0 -0
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/code-documenter/references/images/dashboard-annotated.png +0 -0
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/documentation-templates/docs/api.md +16 -0
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/documentation-templates/docs/architecture.md +23 -0
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/postman/SKILL.md +14 -9
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/postman/references/full-mode-setup.md +6 -2
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/postman/references/troubleshooting.md +9 -4
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/code-documenter/references/images/create-key.png +0 -0
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/code-documenter/references/images/dashboard-annotated.png +0 -0
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/documentation-templates/docs/api.md +16 -0
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/documentation-templates/docs/architecture.md +23 -0
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/postman/SKILL.md +14 -9
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/postman/references/full-mode-setup.md +6 -2
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/postman/references/troubleshooting.md +9 -4
- package/workflows/workflows/agent-environment-setup/shared/workflows/postman.md +40 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubis/foundry",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.60",
|
|
4
4
|
"description": "Cubis Foundry CLI for workflow-first AI agent environments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -82,8 +82,10 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@inquirer/prompts": "^7.8.6",
|
|
85
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
85
86
|
"commander": "^14.0.1",
|
|
86
|
-
"jsonc-parser": "^3.3.1"
|
|
87
|
+
"jsonc-parser": "^3.3.1",
|
|
88
|
+
"zod": "^3.25.76"
|
|
87
89
|
},
|
|
88
90
|
"devDependencies": {
|
|
89
91
|
"@types/node": "^20.14.0",
|
package/src/cli/core.ts
CHANGED
|
@@ -929,9 +929,35 @@ function buildEngineeringRulesTemplate() {
|
|
|
929
929
|
"## 8) Response Contract (Decision Log Required)",
|
|
930
930
|
"",
|
|
931
931
|
"- For planning/review/execution summaries, use a `Decision Log` structure.",
|
|
932
|
-
"- Each decision entry
|
|
933
|
-
"- Include
|
|
932
|
+
"- Each decision entry must include: `Context`, `Decision`, `Rationale`, `Tradeoffs`, `Validation`.",
|
|
933
|
+
"- Include `Files Used` with labeled keys and full absolute paths (not shorthand names).",
|
|
934
|
+
"- Include `Skills Used` with skill IDs and full skill file paths when skills are loaded.",
|
|
935
|
+
"- Minimum required entries in `Files Used` for project work:",
|
|
936
|
+
" - `active_rules_file`: active platform rules file path (for example `AGENTS.md`, `.agent/rules/GEMINI.md`, or `.github/copilot-instructions.md`)",
|
|
937
|
+
" - `engineering_rules_file`: `/abs/path/ENGINEERING_RULES.md`",
|
|
938
|
+
" - `tech_map_file`: `/abs/path/TECH.md`",
|
|
939
|
+
"- If no skill is loaded, write `Skills Used: none` explicitly.",
|
|
934
940
|
"- Never hide key file paths behind aliases or abbreviated labels.",
|
|
941
|
+
"- A Decision Log without required `Files Used` and `Skills Used` is incomplete and must be corrected before final response.",
|
|
942
|
+
"",
|
|
943
|
+
"Required shape:",
|
|
944
|
+
"",
|
|
945
|
+
"Decision Log",
|
|
946
|
+
"1. Context: ...",
|
|
947
|
+
"Decision: ...",
|
|
948
|
+
"Rationale: ...",
|
|
949
|
+
"Tradeoffs: ...",
|
|
950
|
+
"Validation: ...",
|
|
951
|
+
"",
|
|
952
|
+
"Files Used",
|
|
953
|
+
"- active_rules_file: /abs/path/<platform-rule-file>",
|
|
954
|
+
"- engineering_rules_file: /abs/path/ENGINEERING_RULES.md",
|
|
955
|
+
"- tech_map_file: /abs/path/TECH.md",
|
|
956
|
+
"- implementation_file: /abs/path/other/file.ts (as needed)",
|
|
957
|
+
"",
|
|
958
|
+
"Skills Used",
|
|
959
|
+
"- skill-id: /abs/path/<platform-skills-root>/<skill-id>/SKILL.md",
|
|
960
|
+
"- or: none",
|
|
935
961
|
"",
|
|
936
962
|
"## 9) Keep TECH.md Fresh",
|
|
937
963
|
"",
|
|
@@ -967,7 +993,10 @@ function buildEngineeringRulesManagedBlock({
|
|
|
967
993
|
"3. Apply SOLID pragmatically to reduce change risk, not add ceremony.",
|
|
968
994
|
"4. Use clear naming with focused responsibilities and explicit boundaries.",
|
|
969
995
|
"5. Require validation evidence (lint/types/tests) before merge.",
|
|
970
|
-
"6. Use Decision Log response style
|
|
996
|
+
"6. Use Decision Log response style.",
|
|
997
|
+
"7. Every Decision Log must include both `Files Used` and `Skills Used` sections.",
|
|
998
|
+
"8. `Files Used` must include labeled keys (`active_rules_file`, `engineering_rules_file`, `tech_map_file`) with full absolute paths.",
|
|
999
|
+
"9. If no skill loaded, `Skills Used: none` is mandatory.",
|
|
971
1000
|
"",
|
|
972
1001
|
"<!-- cbx:engineering:auto:end -->",
|
|
973
1002
|
].join("\n");
|
|
@@ -1174,6 +1203,99 @@ function parseTomlSections(content) {
|
|
|
1174
1203
|
return sections;
|
|
1175
1204
|
}
|
|
1176
1205
|
|
|
1206
|
+
function escapeTomlBasicString(value) {
|
|
1207
|
+
return String(value ?? "")
|
|
1208
|
+
.replace(/\\/g, "\\\\")
|
|
1209
|
+
.replace(/"/g, '\\"');
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
async function patchCodexPostmanHttpHeaders({
|
|
1213
|
+
configPath,
|
|
1214
|
+
mcpUrl,
|
|
1215
|
+
bearerToken,
|
|
1216
|
+
dryRun = false,
|
|
1217
|
+
}) {
|
|
1218
|
+
const warnings = [];
|
|
1219
|
+
const normalizedToken = normalizePostmanApiKey(bearerToken);
|
|
1220
|
+
if (!normalizedToken) {
|
|
1221
|
+
return {
|
|
1222
|
+
action: "skipped",
|
|
1223
|
+
warnings: [
|
|
1224
|
+
"Postman API key is unavailable in current environment. Kept bearer_token_env_var wiring in Codex config.",
|
|
1225
|
+
],
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
const configExists = await pathExists(configPath);
|
|
1230
|
+
const original = configExists ? await readFile(configPath, "utf8") : "";
|
|
1231
|
+
const lines = original.split(/\r?\n/);
|
|
1232
|
+
const nextLines = [];
|
|
1233
|
+
|
|
1234
|
+
const headerLine =
|
|
1235
|
+
`http_headers = { Authorization = "Bearer ${escapeTomlBasicString(normalizedToken)}" }`;
|
|
1236
|
+
const serverHeader = "[mcp_servers.postman]";
|
|
1237
|
+
let inPostmanSection = false;
|
|
1238
|
+
let postmanSectionFound = false;
|
|
1239
|
+
let insertedHeaders = false;
|
|
1240
|
+
|
|
1241
|
+
const flushPostmanHeaderIfNeeded = () => {
|
|
1242
|
+
if (inPostmanSection && !insertedHeaders) {
|
|
1243
|
+
nextLines.push(headerLine);
|
|
1244
|
+
insertedHeaders = true;
|
|
1245
|
+
}
|
|
1246
|
+
};
|
|
1247
|
+
|
|
1248
|
+
for (const line of lines) {
|
|
1249
|
+
const sectionMatch = line.match(/^\s*\[([^\]]+)\]\s*$/);
|
|
1250
|
+
if (sectionMatch) {
|
|
1251
|
+
flushPostmanHeaderIfNeeded();
|
|
1252
|
+
const sectionName = sectionMatch[1].trim();
|
|
1253
|
+
inPostmanSection = sectionName === "mcp_servers.postman";
|
|
1254
|
+
if (inPostmanSection) {
|
|
1255
|
+
postmanSectionFound = true;
|
|
1256
|
+
insertedHeaders = false;
|
|
1257
|
+
}
|
|
1258
|
+
nextLines.push(line);
|
|
1259
|
+
continue;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
if (inPostmanSection) {
|
|
1263
|
+
if (
|
|
1264
|
+
/^\s*(bearer_token_env_var|http_headers|env_http_headers)\s*=/.test(
|
|
1265
|
+
line,
|
|
1266
|
+
)
|
|
1267
|
+
) {
|
|
1268
|
+
continue;
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
nextLines.push(line);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
flushPostmanHeaderIfNeeded();
|
|
1275
|
+
|
|
1276
|
+
if (!postmanSectionFound) {
|
|
1277
|
+
if (nextLines.length > 0 && nextLines[nextLines.length - 1].trim() !== "") {
|
|
1278
|
+
nextLines.push("");
|
|
1279
|
+
}
|
|
1280
|
+
nextLines.push(serverHeader);
|
|
1281
|
+
nextLines.push(`url = "${escapeTomlBasicString(mcpUrl || POSTMAN_MCP_URL)}"`);
|
|
1282
|
+
nextLines.push(headerLine);
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
const next = `${nextLines.join("\n").replace(/\n+$/g, "")}\n`;
|
|
1286
|
+
if (next === original) {
|
|
1287
|
+
return { action: "unchanged", warnings };
|
|
1288
|
+
}
|
|
1289
|
+
if (!dryRun) {
|
|
1290
|
+
await mkdir(path.dirname(configPath), { recursive: true });
|
|
1291
|
+
await writeFile(configPath, next, "utf8");
|
|
1292
|
+
}
|
|
1293
|
+
return {
|
|
1294
|
+
action: dryRun ? "would-patch" : "patched",
|
|
1295
|
+
warnings,
|
|
1296
|
+
};
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1177
1299
|
function parsePubspecDependencyNames(content) {
|
|
1178
1300
|
const packages = new Set();
|
|
1179
1301
|
let currentSection = null;
|
|
@@ -5005,6 +5127,23 @@ async function applyPostmanMcpForPlatform({
|
|
|
5005
5127
|
],
|
|
5006
5128
|
{ cwd },
|
|
5007
5129
|
);
|
|
5130
|
+
const postmanToken = normalizePostmanApiKey(
|
|
5131
|
+
process.env[apiKeyEnvVar || POSTMAN_API_KEY_ENV_VAR],
|
|
5132
|
+
);
|
|
5133
|
+
const postmanPatch = await patchCodexPostmanHttpHeaders({
|
|
5134
|
+
configPath: codexConfigPath,
|
|
5135
|
+
mcpUrl,
|
|
5136
|
+
bearerToken: postmanToken,
|
|
5137
|
+
dryRun: false,
|
|
5138
|
+
});
|
|
5139
|
+
if (postmanPatch.action === "patched") {
|
|
5140
|
+
warnings.push(
|
|
5141
|
+
"Codex Postman MCP config patched to static Authorization header for startup reliability.",
|
|
5142
|
+
);
|
|
5143
|
+
}
|
|
5144
|
+
if (postmanPatch.warnings?.length) {
|
|
5145
|
+
warnings.push(...postmanPatch.warnings);
|
|
5146
|
+
}
|
|
5008
5147
|
} catch (error) {
|
|
5009
5148
|
warnings.push(
|
|
5010
5149
|
`Failed to register Postman MCP via Codex CLI. Ensure 'codex' is installed and rerun. (${error.message})`,
|
|
@@ -18,19 +18,20 @@ References:
|
|
|
18
18
|
- Accept both dynamic naming styles from clients:
|
|
19
19
|
- dotted: `postman.<tool>`
|
|
20
20
|
- alias: `postman_<tool>`
|
|
21
|
+
- Never default to raw Postman REST JSON payloads, Newman, or Postman CLI when MCP tools are available.
|
|
21
22
|
- Do not use Newman/Postman CLI fallback unless the user explicitly asks for fallback.
|
|
22
23
|
- If required Postman MCP tools are unavailable, report discovery/remediation steps first.
|
|
23
24
|
|
|
24
25
|
## Setup Baseline
|
|
25
26
|
|
|
26
|
-
1. Install with Postman enabled and explicit full mode:
|
|
27
|
-
- `cbx workflows install --platform <codex|antigravity|copilot> --scope global --bundle agent-environment-setup --postman --postman-mode full --mcp-runtime docker --mcp-fallback local --mcp-tool-sync --yes`
|
|
27
|
+
1. Install with Postman enabled and explicit full mode (use the same scope as your current install):
|
|
28
|
+
- `cbx workflows install --platform <codex|antigravity|copilot> --scope <project|global> --bundle agent-environment-setup --postman --postman-mode full --mcp-runtime docker --mcp-fallback local --mcp-tool-sync --yes`
|
|
28
29
|
2. Persist env aliases once (no per-session re-export):
|
|
29
30
|
- `cbx workflows config keys persist-env --service postman --scope global`
|
|
30
31
|
3. Verify mode/config:
|
|
31
|
-
- `cbx workflows config --scope global --show`
|
|
32
|
-
- `cbx mcp tools sync --service postman --scope global
|
|
33
|
-
- `cbx mcp tools list --service postman --scope global
|
|
32
|
+
- `cbx workflows config --scope <project|global> --show`
|
|
33
|
+
- `cbx mcp tools sync --service postman --scope <project|global>`
|
|
34
|
+
- `cbx mcp tools list --service postman --scope <project|global>`
|
|
34
35
|
|
|
35
36
|
## Preflight
|
|
36
37
|
|
|
@@ -41,6 +42,10 @@ References:
|
|
|
41
42
|
3. Discover upstream tools:
|
|
42
43
|
- Confirm required tools exist before execution (for example workspaces/collections/runs).
|
|
43
44
|
|
|
45
|
+
Execution rule:
|
|
46
|
+
- For Postman requests, call MCP tools directly (`postman.*` or `postman_*`) instead of drafting manual JSON or curl payloads.
|
|
47
|
+
- If the user asks for API payload examples, provide them only as supplemental documentation after MCP execution guidance.
|
|
48
|
+
|
|
44
49
|
## Default Workspace Policy
|
|
45
50
|
|
|
46
51
|
Resolve workspace in this order:
|
|
@@ -52,7 +57,7 @@ Resolve workspace in this order:
|
|
|
52
57
|
4. If multiple workspaces and no default:
|
|
53
58
|
- Ask user to choose one.
|
|
54
59
|
- Recommend persisting it with:
|
|
55
|
-
- `cbx workflows config --scope global --workspace-id <workspace-id>`
|
|
60
|
+
- `cbx workflows config --scope <project|global> --workspace-id <workspace-id>`
|
|
56
61
|
|
|
57
62
|
When a Postman tool requires a workspace argument, always pass the resolved workspace ID explicitly.
|
|
58
63
|
|
|
@@ -75,10 +80,10 @@ If dynamic Postman tools are missing:
|
|
|
75
80
|
|
|
76
81
|
1. Verify env alias expected by config is set.
|
|
77
82
|
2. Resync catalog:
|
|
78
|
-
- `cbx mcp tools sync --service postman --scope global
|
|
79
|
-
- `cbx mcp tools list --service postman --scope global
|
|
83
|
+
- `cbx mcp tools sync --service postman --scope <project|global>`
|
|
84
|
+
- `cbx mcp tools list --service postman --scope <project|global>`
|
|
80
85
|
3. Recreate runtime if needed:
|
|
81
|
-
- `cbx mcp runtime up --scope global --name cbx-mcp --replace --port 3310 --skills-root ~/.agents/skills`
|
|
86
|
+
- `cbx mcp runtime up --scope <project|global> --name cbx-mcp --replace --port 3310 --skills-root ~/.agents/skills`
|
|
82
87
|
|
|
83
88
|
## Security Notes
|
|
84
89
|
|
|
@@ -7,7 +7,7 @@ Use CLI mode flags instead of manual `jq` edits.
|
|
|
7
7
|
```bash
|
|
8
8
|
cbx workflows install \
|
|
9
9
|
--platform codex \
|
|
10
|
-
--scope global \
|
|
10
|
+
--scope <project|global> \
|
|
11
11
|
--bundle agent-environment-setup \
|
|
12
12
|
--postman \
|
|
13
13
|
--postman-mode full \
|
|
@@ -21,7 +21,7 @@ cbx workflows install \
|
|
|
21
21
|
## Change Mode Later
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
cbx workflows config --scope global --platform codex --postman-mode full
|
|
24
|
+
cbx workflows config --scope <project|global> --platform codex --postman-mode full
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
This updates:
|
|
@@ -34,3 +34,7 @@ This updates:
|
|
|
34
34
|
```bash
|
|
35
35
|
cbx workflows config keys persist-env --service postman --scope global
|
|
36
36
|
```
|
|
37
|
+
|
|
38
|
+
Note:
|
|
39
|
+
- `persist-env` writes CBX-managed aliases to `~/.cbx/credentials.env`.
|
|
40
|
+
- Keep MCP target scope (`project` or `global`) aligned with the scope where you installed Postman integration.
|
|
@@ -3,19 +3,24 @@
|
|
|
3
3
|
## Only `postman_get_*` / `postman_set_mode` tools appear
|
|
4
4
|
|
|
5
5
|
1. Confirm active env alias exists in shell (or persisted env file).
|
|
6
|
-
2. Sync catalog:
|
|
6
|
+
2. Sync catalog in the same install scope:
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
cbx mcp tools sync --service postman --scope global
|
|
10
|
-
cbx mcp tools list --service postman --scope global
|
|
9
|
+
cbx mcp tools sync --service postman --scope <project|global>
|
|
10
|
+
cbx mcp tools list --service postman --scope <project|global>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
3. Restart runtime if using Docker:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
cbx mcp runtime up --scope global --name cbx-mcp --replace --port 3310
|
|
16
|
+
cbx mcp runtime up --scope <project|global> --name cbx-mcp --replace --port 3310
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
4. If dynamic Postman tools are still missing, do not fall back to manual JSON/CLI by default:
|
|
20
|
+
- report MCP tool discovery failure
|
|
21
|
+
- ask for remediation approval
|
|
22
|
+
- only use fallback if the user explicitly requests it
|
|
23
|
+
|
|
19
24
|
## Client does not show dotted names
|
|
20
25
|
|
|
21
26
|
Use alias tools (`postman_<tool>`) when dotted names are filtered by client UI.
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"mobile.md",
|
|
23
23
|
"devops.md",
|
|
24
24
|
"qa.md",
|
|
25
|
-
"vercel.md"
|
|
25
|
+
"vercel.md",
|
|
26
|
+
"postman.md"
|
|
26
27
|
],
|
|
27
28
|
"agents": [
|
|
28
29
|
"backend-specialist.md",
|
|
@@ -193,7 +194,8 @@
|
|
|
193
194
|
"mobile.toml",
|
|
194
195
|
"devops.toml",
|
|
195
196
|
"qa.toml",
|
|
196
|
-
"vercel.toml"
|
|
197
|
+
"vercel.toml",
|
|
198
|
+
"postman.toml"
|
|
197
199
|
]
|
|
198
200
|
},
|
|
199
201
|
"codex": {
|
|
@@ -215,7 +217,8 @@
|
|
|
215
217
|
"mobile.md",
|
|
216
218
|
"devops.md",
|
|
217
219
|
"qa.md",
|
|
218
|
-
"vercel.md"
|
|
220
|
+
"vercel.md",
|
|
221
|
+
"postman.md"
|
|
219
222
|
],
|
|
220
223
|
"agents": [
|
|
221
224
|
"backend-specialist.md",
|
|
@@ -388,7 +391,8 @@
|
|
|
388
391
|
"mobile.md",
|
|
389
392
|
"devops.md",
|
|
390
393
|
"qa.md",
|
|
391
|
-
"vercel.md"
|
|
394
|
+
"vercel.md",
|
|
395
|
+
"postman.md"
|
|
392
396
|
],
|
|
393
397
|
"agents": [
|
|
394
398
|
"backend-specialist.md",
|
|
@@ -559,7 +563,8 @@
|
|
|
559
563
|
"workflow-mobile.prompt.md",
|
|
560
564
|
"workflow-devops.prompt.md",
|
|
561
565
|
"workflow-qa.prompt.md",
|
|
562
|
-
"workflow-vercel.prompt.md"
|
|
566
|
+
"workflow-vercel.prompt.md",
|
|
567
|
+
"workflow-postman.prompt.md"
|
|
563
568
|
]
|
|
564
569
|
}
|
|
565
570
|
}
|
package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/postman.toml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
description = "Execute Postman MCP operations for workspaces, collections, environments, and runs."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Follow the /postman workflow from .agent/workflows/postman.md.
|
|
4
|
+
|
|
5
|
+
Execution contract:
|
|
6
|
+
1. Confirm the request fits the workflow's "When to use" section.
|
|
7
|
+
2. Execute according to "Workflow steps" and apply "Context notes".
|
|
8
|
+
3. Complete "Verification" checks and report concrete evidence.
|
|
9
|
+
|
|
10
|
+
If command arguments are provided, treat them as additional user context.
|
|
11
|
+
'''
|
package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/postman.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: "/postman"
|
|
3
|
+
description: "Execute Postman MCP operations for workspaces, collections, environments, and runs."
|
|
4
|
+
triggers: ["postman", "collection", "workspace", "environment", "runcollection", "monitor", "mock", "api test"]
|
|
5
|
+
---
|
|
6
|
+
# Postman Workflow
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
Use this when tasks are primarily about Postman workspaces, collections, environments, monitors, mocks, or collection runs.
|
|
10
|
+
|
|
11
|
+
## Routing
|
|
12
|
+
- Postman operations and execution: `@backend-specialist`
|
|
13
|
+
- Security/compliance checks on test data: `@security-auditor`
|
|
14
|
+
- Validation quality and assertions: `@test-engineer`
|
|
15
|
+
|
|
16
|
+
## Context notes
|
|
17
|
+
- This workflow file, active platform rules, and selected agents/skills guide execution.
|
|
18
|
+
- Resolve and pass workspace IDs explicitly when tools require them.
|
|
19
|
+
- Prefer MCP tools (`postman.*` or `postman_*`) over manual JSON/CLI fallback unless fallback is explicitly requested by the user.
|
|
20
|
+
|
|
21
|
+
## Skill Routing
|
|
22
|
+
- Primary skills: `postman`
|
|
23
|
+
- Supporting skills (optional): `api-designer`, `test-master`
|
|
24
|
+
|
|
25
|
+
## Workflow steps
|
|
26
|
+
1. Load Postman skill and check integration status (`postman_get_status`).
|
|
27
|
+
2. Resolve workspace ID (user-provided, configured default, or explicit selection).
|
|
28
|
+
3. Execute required MCP operations (list/create/update/run) with explicit IDs.
|
|
29
|
+
4. Summarize outcomes, failures, and next actions with exact object identifiers.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
- Confirm requested Postman action completed successfully.
|
|
33
|
+
- Validate response status and key result fields (IDs, counts, failures).
|
|
34
|
+
- Note any skipped steps and required follow-up.
|
|
35
|
+
|
|
36
|
+
## Output Contract
|
|
37
|
+
- Workspace/context used
|
|
38
|
+
- Actions executed and resulting IDs
|
|
39
|
+
- Pass/fail summary for runs
|
|
40
|
+
- Follow-up or remediation steps
|
|
@@ -105,6 +105,7 @@ When user intent includes Postman workflows (for example: workspace, collection,
|
|
|
105
105
|
2. If `postman` skill exists, load `skill_get "postman"` before workflow/agent routing.
|
|
106
106
|
3. Prefer Postman MCP tools (`postman.*`) over Newman/CLI fallback unless the user explicitly asks for fallback.
|
|
107
107
|
4. If `--postman` was installed but `postman` skill cannot be found, report installation drift and suggest reinstall with `cbx workflows install ... --postman`.
|
|
108
|
+
5. Do not default to raw Postman REST JSON payloads or curl for execution when Postman MCP tools are available.
|
|
108
109
|
|
|
109
110
|
**Hard rules:**
|
|
110
111
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: "/postman"
|
|
3
|
+
description: "Execute Postman MCP operations for workspaces, collections, environments, and runs."
|
|
4
|
+
triggers: ["postman", "collection", "workspace", "environment", "runcollection", "monitor", "mock", "api test"]
|
|
5
|
+
---
|
|
6
|
+
# Postman Workflow
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
Use this when tasks are primarily about Postman workspaces, collections, environments, monitors, mocks, or collection runs.
|
|
10
|
+
|
|
11
|
+
## Routing
|
|
12
|
+
- Postman operations and execution: `@backend-specialist`
|
|
13
|
+
- Security/compliance checks on test data: `@security-auditor`
|
|
14
|
+
- Validation quality and assertions: `@test-engineer`
|
|
15
|
+
|
|
16
|
+
## Context notes
|
|
17
|
+
- This workflow file, active platform rules, and selected agents/skills guide execution.
|
|
18
|
+
- Resolve and pass workspace IDs explicitly when tools require them.
|
|
19
|
+
- Prefer MCP tools (`postman.*` or `postman_*`) over manual JSON/CLI fallback unless fallback is explicitly requested by the user.
|
|
20
|
+
|
|
21
|
+
## Skill Routing
|
|
22
|
+
- Primary skills: `postman`
|
|
23
|
+
- Supporting skills (optional): `api-designer`, `test-master`
|
|
24
|
+
|
|
25
|
+
## Workflow steps
|
|
26
|
+
1. Load Postman skill and check integration status (`postman_get_status`).
|
|
27
|
+
2. Resolve workspace ID (user-provided, configured default, or explicit selection).
|
|
28
|
+
3. Execute required MCP operations (list/create/update/run) with explicit IDs.
|
|
29
|
+
4. Summarize outcomes, failures, and next actions with exact object identifiers.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
- Confirm requested Postman action completed successfully.
|
|
33
|
+
- Validate response status and key result fields (IDs, counts, failures).
|
|
34
|
+
- Note any skipped steps and required follow-up.
|
|
35
|
+
|
|
36
|
+
## Output Contract
|
|
37
|
+
- Workspace/context used
|
|
38
|
+
- Actions executed and resulting IDs
|
|
39
|
+
- Pass/fail summary for runs
|
|
40
|
+
- Follow-up or remediation steps
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Workflow Prompt: /postman
|
|
2
|
+
|
|
3
|
+
Execute Postman MCP operations for workspaces, collections, environments, and runs.
|
|
4
|
+
|
|
5
|
+
Use this prompt with the matching workflow file:
|
|
6
|
+
- Workflow: ../copilot/workflows/postman.md
|
|
7
|
+
|
|
8
|
+
Execution contract:
|
|
9
|
+
1. Apply workflow sections in order: When to use, Workflow steps, Context notes, Verification.
|
|
10
|
+
2. Route to the workflow's primary specialist and only add supporting specialists when needed.
|
|
11
|
+
3. Return actions taken, verification evidence, and any gaps.
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# API Reference Template
|
|
2
|
+
|
|
3
|
+
Use this file as the canonical entry point for API endpoint documentation.
|
|
4
|
+
|
|
5
|
+
## Endpoint Index
|
|
6
|
+
|
|
7
|
+
- `GET /resource`
|
|
8
|
+
- `POST /resource`
|
|
9
|
+
- `PATCH /resource/{id}`
|
|
10
|
+
- `DELETE /resource/{id}`
|
|
11
|
+
|
|
12
|
+
## Conventions
|
|
13
|
+
|
|
14
|
+
- Include auth requirements per endpoint.
|
|
15
|
+
- Include request/response examples.
|
|
16
|
+
- Include error codes and retry guidance.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Architecture Overview Template
|
|
2
|
+
|
|
3
|
+
Use this file to describe system boundaries and data flow.
|
|
4
|
+
|
|
5
|
+
## Components
|
|
6
|
+
|
|
7
|
+
- API layer
|
|
8
|
+
- Domain/service layer
|
|
9
|
+
- Persistence layer
|
|
10
|
+
- External integrations
|
|
11
|
+
|
|
12
|
+
## Runtime Flow
|
|
13
|
+
|
|
14
|
+
1. Request enters API layer
|
|
15
|
+
2. Domain logic validates and processes
|
|
16
|
+
3. Persistence reads/writes state
|
|
17
|
+
4. Response returns with observability metadata
|
|
18
|
+
|
|
19
|
+
## Non-Functional Notes
|
|
20
|
+
|
|
21
|
+
- Reliability/SLOs
|
|
22
|
+
- Security model
|
|
23
|
+
- Scaling strategy
|
package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/postman/SKILL.md
CHANGED
|
@@ -18,19 +18,20 @@ References:
|
|
|
18
18
|
- Accept both dynamic naming styles from clients:
|
|
19
19
|
- dotted: `postman.<tool>`
|
|
20
20
|
- alias: `postman_<tool>`
|
|
21
|
+
- Never default to raw Postman REST JSON payloads, Newman, or Postman CLI when MCP tools are available.
|
|
21
22
|
- Do not use Newman/Postman CLI fallback unless the user explicitly asks for fallback.
|
|
22
23
|
- If required Postman MCP tools are unavailable, report discovery/remediation steps first.
|
|
23
24
|
|
|
24
25
|
## Setup Baseline
|
|
25
26
|
|
|
26
|
-
1. Install with Postman enabled and explicit full mode:
|
|
27
|
-
- `cbx workflows install --platform <codex|antigravity|copilot> --scope global --bundle agent-environment-setup --postman --postman-mode full --mcp-runtime docker --mcp-fallback local --mcp-tool-sync --yes`
|
|
27
|
+
1. Install with Postman enabled and explicit full mode (use the same scope as your current install):
|
|
28
|
+
- `cbx workflows install --platform <codex|antigravity|copilot> --scope <project|global> --bundle agent-environment-setup --postman --postman-mode full --mcp-runtime docker --mcp-fallback local --mcp-tool-sync --yes`
|
|
28
29
|
2. Persist env aliases once (no per-session re-export):
|
|
29
30
|
- `cbx workflows config keys persist-env --service postman --scope global`
|
|
30
31
|
3. Verify mode/config:
|
|
31
|
-
- `cbx workflows config --scope global --show`
|
|
32
|
-
- `cbx mcp tools sync --service postman --scope global
|
|
33
|
-
- `cbx mcp tools list --service postman --scope global
|
|
32
|
+
- `cbx workflows config --scope <project|global> --show`
|
|
33
|
+
- `cbx mcp tools sync --service postman --scope <project|global>`
|
|
34
|
+
- `cbx mcp tools list --service postman --scope <project|global>`
|
|
34
35
|
|
|
35
36
|
## Preflight
|
|
36
37
|
|
|
@@ -41,6 +42,10 @@ References:
|
|
|
41
42
|
3. Discover upstream tools:
|
|
42
43
|
- Confirm required tools exist before execution (for example workspaces/collections/runs).
|
|
43
44
|
|
|
45
|
+
Execution rule:
|
|
46
|
+
- For Postman requests, call MCP tools directly (`postman.*` or `postman_*`) instead of drafting manual JSON or curl payloads.
|
|
47
|
+
- If the user asks for API payload examples, provide them only as supplemental documentation after MCP execution guidance.
|
|
48
|
+
|
|
44
49
|
## Default Workspace Policy
|
|
45
50
|
|
|
46
51
|
Resolve workspace in this order:
|
|
@@ -52,7 +57,7 @@ Resolve workspace in this order:
|
|
|
52
57
|
4. If multiple workspaces and no default:
|
|
53
58
|
- Ask user to choose one.
|
|
54
59
|
- Recommend persisting it with:
|
|
55
|
-
- `cbx workflows config --scope global --workspace-id <workspace-id>`
|
|
60
|
+
- `cbx workflows config --scope <project|global> --workspace-id <workspace-id>`
|
|
56
61
|
|
|
57
62
|
When a Postman tool requires a workspace argument, always pass the resolved workspace ID explicitly.
|
|
58
63
|
|
|
@@ -75,10 +80,10 @@ If dynamic Postman tools are missing:
|
|
|
75
80
|
|
|
76
81
|
1. Verify env alias expected by config is set.
|
|
77
82
|
2. Resync catalog:
|
|
78
|
-
- `cbx mcp tools sync --service postman --scope global
|
|
79
|
-
- `cbx mcp tools list --service postman --scope global
|
|
83
|
+
- `cbx mcp tools sync --service postman --scope <project|global>`
|
|
84
|
+
- `cbx mcp tools list --service postman --scope <project|global>`
|
|
80
85
|
3. Recreate runtime if needed:
|
|
81
|
-
- `cbx mcp runtime up --scope global --name cbx-mcp --replace --port 3310 --skills-root ~/.agents/skills`
|
|
86
|
+
- `cbx mcp runtime up --scope <project|global> --name cbx-mcp --replace --port 3310 --skills-root ~/.agents/skills`
|
|
82
87
|
|
|
83
88
|
## Security Notes
|
|
84
89
|
|
|
@@ -7,7 +7,7 @@ Use CLI mode flags instead of manual `jq` edits.
|
|
|
7
7
|
```bash
|
|
8
8
|
cbx workflows install \
|
|
9
9
|
--platform codex \
|
|
10
|
-
--scope global \
|
|
10
|
+
--scope <project|global> \
|
|
11
11
|
--bundle agent-environment-setup \
|
|
12
12
|
--postman \
|
|
13
13
|
--postman-mode full \
|
|
@@ -21,7 +21,7 @@ cbx workflows install \
|
|
|
21
21
|
## Change Mode Later
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
cbx workflows config --scope global --platform codex --postman-mode full
|
|
24
|
+
cbx workflows config --scope <project|global> --platform codex --postman-mode full
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
This updates:
|
|
@@ -34,3 +34,7 @@ This updates:
|
|
|
34
34
|
```bash
|
|
35
35
|
cbx workflows config keys persist-env --service postman --scope global
|
|
36
36
|
```
|
|
37
|
+
|
|
38
|
+
Note:
|
|
39
|
+
- `persist-env` writes CBX-managed aliases to `~/.cbx/credentials.env`.
|
|
40
|
+
- Keep MCP target scope (`project` or `global`) aligned with the scope where you installed Postman integration.
|
|
@@ -3,19 +3,24 @@
|
|
|
3
3
|
## Only `postman_get_*` / `postman_set_mode` tools appear
|
|
4
4
|
|
|
5
5
|
1. Confirm active env alias exists in shell (or persisted env file).
|
|
6
|
-
2. Sync catalog:
|
|
6
|
+
2. Sync catalog in the same install scope:
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
cbx mcp tools sync --service postman --scope global
|
|
10
|
-
cbx mcp tools list --service postman --scope global
|
|
9
|
+
cbx mcp tools sync --service postman --scope <project|global>
|
|
10
|
+
cbx mcp tools list --service postman --scope <project|global>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
3. Restart runtime if using Docker:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
cbx mcp runtime up --scope global --name cbx-mcp --replace --port 3310
|
|
16
|
+
cbx mcp runtime up --scope <project|global> --name cbx-mcp --replace --port 3310
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
4. If dynamic Postman tools are still missing, do not fall back to manual JSON/CLI by default:
|
|
20
|
+
- report MCP tool discovery failure
|
|
21
|
+
- ask for remediation approval
|
|
22
|
+
- only use fallback if the user explicitly requests it
|
|
23
|
+
|
|
19
24
|
## Client does not show dotted names
|
|
20
25
|
|
|
21
26
|
Use alias tools (`postman_<tool>`) when dotted names are filtered by client UI.
|