@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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.3.60] - 2026-03-05
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed `cbx mcp serve` runtime failure from global npm installs by including required MCP runtime dependencies in the main package (`@modelcontextprotocol/sdk`, `zod`).
|
|
10
|
+
- Improved Codex global Postman MCP startup reliability:
|
|
11
|
+
- after registration, CBX now patches Codex MCP config to use static Authorization headers when a managed Postman key is available
|
|
12
|
+
- avoids startup failures caused by missing shell-exported `POSTMAN_API_KEY_DEFAULT`.
|
|
13
|
+
|
|
14
|
+
## [0.3.59] - 2026-03-05
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Added dedicated Postman workflow routing across supported platforms:
|
|
19
|
+
- new `/postman` workflow definition
|
|
20
|
+
- generated platform assets for Codex, Antigravity, and Copilot
|
|
21
|
+
- generated wrapper skill `workflow-postman` for Codex.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Tightened Postman guidance to be MCP-first:
|
|
26
|
+
- explicitly prefer `postman.*` / `postman_*` tools for execution
|
|
27
|
+
- disallow default fallback to raw JSON/curl/Newman unless explicitly requested.
|
|
28
|
+
- Updated Postman setup/troubleshooting docs to be scope-aware (`project|global`) so project installs stop drifting to global-only guidance.
|
|
29
|
+
- Updated Codex rules template to reinforce no default JSON/curl fallback when Postman MCP tools are available.
|
|
30
|
+
- Updated smoke test expectations from 18 to 19 workflows/prompts/commands where applicable.
|
|
31
|
+
|
|
5
32
|
## [0.3.57] - 2026-03-05
|
|
6
33
|
|
|
7
34
|
### Changed
|
package/dist/cli/core.js
CHANGED
|
@@ -811,9 +811,35 @@ function buildEngineeringRulesTemplate() {
|
|
|
811
811
|
"## 8) Response Contract (Decision Log Required)",
|
|
812
812
|
"",
|
|
813
813
|
"- For planning/review/execution summaries, use a `Decision Log` structure.",
|
|
814
|
-
"- Each decision entry
|
|
815
|
-
"- Include
|
|
814
|
+
"- Each decision entry must include: `Context`, `Decision`, `Rationale`, `Tradeoffs`, `Validation`.",
|
|
815
|
+
"- Include `Files Used` with labeled keys and full absolute paths (not shorthand names).",
|
|
816
|
+
"- Include `Skills Used` with skill IDs and full skill file paths when skills are loaded.",
|
|
817
|
+
"- Minimum required entries in `Files Used` for project work:",
|
|
818
|
+
" - `active_rules_file`: active platform rules file path (for example `AGENTS.md`, `.agent/rules/GEMINI.md`, or `.github/copilot-instructions.md`)",
|
|
819
|
+
" - `engineering_rules_file`: `/abs/path/ENGINEERING_RULES.md`",
|
|
820
|
+
" - `tech_map_file`: `/abs/path/TECH.md`",
|
|
821
|
+
"- If no skill is loaded, write `Skills Used: none` explicitly.",
|
|
816
822
|
"- Never hide key file paths behind aliases or abbreviated labels.",
|
|
823
|
+
"- A Decision Log without required `Files Used` and `Skills Used` is incomplete and must be corrected before final response.",
|
|
824
|
+
"",
|
|
825
|
+
"Required shape:",
|
|
826
|
+
"",
|
|
827
|
+
"Decision Log",
|
|
828
|
+
"1. Context: ...",
|
|
829
|
+
"Decision: ...",
|
|
830
|
+
"Rationale: ...",
|
|
831
|
+
"Tradeoffs: ...",
|
|
832
|
+
"Validation: ...",
|
|
833
|
+
"",
|
|
834
|
+
"Files Used",
|
|
835
|
+
"- active_rules_file: /abs/path/<platform-rule-file>",
|
|
836
|
+
"- engineering_rules_file: /abs/path/ENGINEERING_RULES.md",
|
|
837
|
+
"- tech_map_file: /abs/path/TECH.md",
|
|
838
|
+
"- implementation_file: /abs/path/other/file.ts (as needed)",
|
|
839
|
+
"",
|
|
840
|
+
"Skills Used",
|
|
841
|
+
"- skill-id: /abs/path/<platform-skills-root>/<skill-id>/SKILL.md",
|
|
842
|
+
"- or: none",
|
|
817
843
|
"",
|
|
818
844
|
"## 9) Keep TECH.md Fresh",
|
|
819
845
|
"",
|
|
@@ -842,7 +868,10 @@ function buildEngineeringRulesManagedBlock({ platform, engineeringRulesFilePath,
|
|
|
842
868
|
"3. Apply SOLID pragmatically to reduce change risk, not add ceremony.",
|
|
843
869
|
"4. Use clear naming with focused responsibilities and explicit boundaries.",
|
|
844
870
|
"5. Require validation evidence (lint/types/tests) before merge.",
|
|
845
|
-
"6. Use Decision Log response style
|
|
871
|
+
"6. Use Decision Log response style.",
|
|
872
|
+
"7. Every Decision Log must include both `Files Used` and `Skills Used` sections.",
|
|
873
|
+
"8. `Files Used` must include labeled keys (`active_rules_file`, `engineering_rules_file`, `tech_map_file`) with full absolute paths.",
|
|
874
|
+
"9. If no skill loaded, `Skills Used: none` is mandatory.",
|
|
846
875
|
"",
|
|
847
876
|
"<!-- cbx:engineering:auto:end -->",
|
|
848
877
|
].join("\n");
|
|
@@ -999,6 +1028,79 @@ function parseTomlSections(content) {
|
|
|
999
1028
|
}
|
|
1000
1029
|
return sections;
|
|
1001
1030
|
}
|
|
1031
|
+
function escapeTomlBasicString(value) {
|
|
1032
|
+
return String(value ?? "")
|
|
1033
|
+
.replace(/\\/g, "\\\\")
|
|
1034
|
+
.replace(/"/g, '\\"');
|
|
1035
|
+
}
|
|
1036
|
+
async function patchCodexPostmanHttpHeaders({ configPath, mcpUrl, bearerToken, dryRun = false, }) {
|
|
1037
|
+
const warnings = [];
|
|
1038
|
+
const normalizedToken = normalizePostmanApiKey(bearerToken);
|
|
1039
|
+
if (!normalizedToken) {
|
|
1040
|
+
return {
|
|
1041
|
+
action: "skipped",
|
|
1042
|
+
warnings: [
|
|
1043
|
+
"Postman API key is unavailable in current environment. Kept bearer_token_env_var wiring in Codex config.",
|
|
1044
|
+
],
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
const configExists = await pathExists(configPath);
|
|
1048
|
+
const original = configExists ? await readFile(configPath, "utf8") : "";
|
|
1049
|
+
const lines = original.split(/\r?\n/);
|
|
1050
|
+
const nextLines = [];
|
|
1051
|
+
const headerLine = `http_headers = { Authorization = "Bearer ${escapeTomlBasicString(normalizedToken)}" }`;
|
|
1052
|
+
const serverHeader = "[mcp_servers.postman]";
|
|
1053
|
+
let inPostmanSection = false;
|
|
1054
|
+
let postmanSectionFound = false;
|
|
1055
|
+
let insertedHeaders = false;
|
|
1056
|
+
const flushPostmanHeaderIfNeeded = () => {
|
|
1057
|
+
if (inPostmanSection && !insertedHeaders) {
|
|
1058
|
+
nextLines.push(headerLine);
|
|
1059
|
+
insertedHeaders = true;
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1062
|
+
for (const line of lines) {
|
|
1063
|
+
const sectionMatch = line.match(/^\s*\[([^\]]+)\]\s*$/);
|
|
1064
|
+
if (sectionMatch) {
|
|
1065
|
+
flushPostmanHeaderIfNeeded();
|
|
1066
|
+
const sectionName = sectionMatch[1].trim();
|
|
1067
|
+
inPostmanSection = sectionName === "mcp_servers.postman";
|
|
1068
|
+
if (inPostmanSection) {
|
|
1069
|
+
postmanSectionFound = true;
|
|
1070
|
+
insertedHeaders = false;
|
|
1071
|
+
}
|
|
1072
|
+
nextLines.push(line);
|
|
1073
|
+
continue;
|
|
1074
|
+
}
|
|
1075
|
+
if (inPostmanSection) {
|
|
1076
|
+
if (/^\s*(bearer_token_env_var|http_headers|env_http_headers)\s*=/.test(line)) {
|
|
1077
|
+
continue;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
nextLines.push(line);
|
|
1081
|
+
}
|
|
1082
|
+
flushPostmanHeaderIfNeeded();
|
|
1083
|
+
if (!postmanSectionFound) {
|
|
1084
|
+
if (nextLines.length > 0 && nextLines[nextLines.length - 1].trim() !== "") {
|
|
1085
|
+
nextLines.push("");
|
|
1086
|
+
}
|
|
1087
|
+
nextLines.push(serverHeader);
|
|
1088
|
+
nextLines.push(`url = "${escapeTomlBasicString(mcpUrl || POSTMAN_MCP_URL)}"`);
|
|
1089
|
+
nextLines.push(headerLine);
|
|
1090
|
+
}
|
|
1091
|
+
const next = `${nextLines.join("\n").replace(/\n+$/g, "")}\n`;
|
|
1092
|
+
if (next === original) {
|
|
1093
|
+
return { action: "unchanged", warnings };
|
|
1094
|
+
}
|
|
1095
|
+
if (!dryRun) {
|
|
1096
|
+
await mkdir(path.dirname(configPath), { recursive: true });
|
|
1097
|
+
await writeFile(configPath, next, "utf8");
|
|
1098
|
+
}
|
|
1099
|
+
return {
|
|
1100
|
+
action: dryRun ? "would-patch" : "patched",
|
|
1101
|
+
warnings,
|
|
1102
|
+
};
|
|
1103
|
+
}
|
|
1002
1104
|
function parsePubspecDependencyNames(content) {
|
|
1003
1105
|
const packages = new Set();
|
|
1004
1106
|
let currentSection = null;
|
|
@@ -4194,6 +4296,19 @@ async function applyPostmanMcpForPlatform({ platform, mcpScope, apiKeyEnvVar, mc
|
|
|
4194
4296
|
"--bearer-token-env-var",
|
|
4195
4297
|
apiKeyEnvVar || POSTMAN_API_KEY_ENV_VAR,
|
|
4196
4298
|
], { cwd });
|
|
4299
|
+
const postmanToken = normalizePostmanApiKey(process.env[apiKeyEnvVar || POSTMAN_API_KEY_ENV_VAR]);
|
|
4300
|
+
const postmanPatch = await patchCodexPostmanHttpHeaders({
|
|
4301
|
+
configPath: codexConfigPath,
|
|
4302
|
+
mcpUrl,
|
|
4303
|
+
bearerToken: postmanToken,
|
|
4304
|
+
dryRun: false,
|
|
4305
|
+
});
|
|
4306
|
+
if (postmanPatch.action === "patched") {
|
|
4307
|
+
warnings.push("Codex Postman MCP config patched to static Authorization header for startup reliability.");
|
|
4308
|
+
}
|
|
4309
|
+
if (postmanPatch.warnings?.length) {
|
|
4310
|
+
warnings.push(...postmanPatch.warnings);
|
|
4311
|
+
}
|
|
4197
4312
|
}
|
|
4198
4313
|
catch (error) {
|
|
4199
4314
|
warnings.push(`Failed to register Postman MCP via Codex CLI. Ensure 'codex' is installed and rerun. (${error.message})`);
|