@cubis/foundry 0.3.39 → 0.3.40
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/bin/cubis.js +35 -3
- package/package.json +1 -1
- package/workflows/skills/code-documenter/references/images/create-key.png +0 -0
- package/workflows/skills/code-documenter/references/images/dashboard-annotated.png +0 -0
- package/workflows/skills/documentation-templates/docs/api.md +16 -0
- package/workflows/skills/documentation-templates/docs/architecture.md +23 -0
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +7 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +7 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +7 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +7 -1
package/bin/cubis.js
CHANGED
|
@@ -2506,6 +2506,13 @@ function rewriteCodexWorkflowAgentReferences(sourceBody, agentIds) {
|
|
|
2506
2506
|
return rewritten;
|
|
2507
2507
|
}
|
|
2508
2508
|
|
|
2509
|
+
function rewriteCodexAgentSkillReferences(sourceBody) {
|
|
2510
|
+
if (!sourceBody) return sourceBody;
|
|
2511
|
+
// Agent source files live under platforms/*/agents, but wrapper skills live
|
|
2512
|
+
// under .agents/skills/agent-*. Rebase ../skills/<id> links accordingly.
|
|
2513
|
+
return sourceBody.replace(/\(\.\.\/skills\//g, "(../");
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2509
2516
|
async function parseWorkflowMetadata(filePath) {
|
|
2510
2517
|
const raw = await readFile(filePath, "utf8");
|
|
2511
2518
|
const { frontmatter, body } = extractFrontmatter(raw);
|
|
@@ -2730,11 +2737,15 @@ async function generateCodexWrapperSkills({
|
|
|
2730
2737
|
}
|
|
2731
2738
|
|
|
2732
2739
|
const metadata = await parseAgentMetadata(source);
|
|
2740
|
+
const rewrittenBody = rewriteCodexAgentSkillReferences(metadata.body);
|
|
2733
2741
|
const wrapperSkillId = `${CODEX_AGENT_SKILL_PREFIX}${metadata.id}`;
|
|
2734
2742
|
const destinationDir = path.join(skillsDir, wrapperSkillId);
|
|
2735
2743
|
const content = buildCodexAgentWrapperSkillMarkdown(
|
|
2736
2744
|
wrapperSkillId,
|
|
2737
|
-
|
|
2745
|
+
{
|
|
2746
|
+
...metadata,
|
|
2747
|
+
body: rewrittenBody,
|
|
2748
|
+
},
|
|
2738
2749
|
);
|
|
2739
2750
|
|
|
2740
2751
|
const result = await writeGeneratedSkillArtifact({
|
|
@@ -2759,6 +2770,22 @@ async function generateCodexWrapperSkills({
|
|
|
2759
2770
|
};
|
|
2760
2771
|
}
|
|
2761
2772
|
|
|
2773
|
+
async function resolvePlatformAgentSkillDependencies({
|
|
2774
|
+
platformRoot,
|
|
2775
|
+
platformSpec,
|
|
2776
|
+
}) {
|
|
2777
|
+
const dependencyIds = [];
|
|
2778
|
+
|
|
2779
|
+
for (const agentFile of platformSpec.agents || []) {
|
|
2780
|
+
const source = path.join(platformRoot, "agents", agentFile);
|
|
2781
|
+
if (!(await pathExists(source))) continue;
|
|
2782
|
+
const metadata = await parseAgentMetadata(source);
|
|
2783
|
+
dependencyIds.push(...metadata.skills);
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
return unique(dependencyIds.filter(Boolean));
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2762
2789
|
async function collectInstalledWorkflows(
|
|
2763
2790
|
profileId,
|
|
2764
2791
|
scope,
|
|
@@ -4902,9 +4929,13 @@ async function installBundleArtifacts({
|
|
|
4902
4929
|
skipped.push(destination);
|
|
4903
4930
|
else installed.push(destination);
|
|
4904
4931
|
}
|
|
4932
|
+
const agentSkillDependencies = await resolvePlatformAgentSkillDependencies({
|
|
4933
|
+
platformRoot,
|
|
4934
|
+
platformSpec,
|
|
4935
|
+
});
|
|
4905
4936
|
const skillIds = await resolveInstallSkillIds({
|
|
4906
4937
|
platformSpec,
|
|
4907
|
-
extraSkillIds,
|
|
4938
|
+
extraSkillIds: [...extraSkillIds, ...agentSkillDependencies],
|
|
4908
4939
|
skillProfile,
|
|
4909
4940
|
});
|
|
4910
4941
|
for (const skillId of skillIds) {
|
|
@@ -7047,7 +7078,8 @@ async function collectInlineHeaderFindings({
|
|
|
7047
7078
|
const scanFile = async (filePath) => {
|
|
7048
7079
|
if (!(await pathExists(filePath))) return;
|
|
7049
7080
|
const raw = await readFile(filePath, "utf8");
|
|
7050
|
-
const unsafeStitchHeader =
|
|
7081
|
+
const unsafeStitchHeader =
|
|
7082
|
+
/X-Goog-Api-Key:(?!\s*\$\{[A-Za-z_][A-Za-z0-9_]*\})\s*[^"\n]+/i;
|
|
7051
7083
|
const unsafeBearerHeader = /"Authorization"\s*:\s*"Bearer\s+(?!\$\{)[^"]+/i;
|
|
7052
7084
|
if (unsafeStitchHeader.test(raw) || unsafeBearerHeader.test(raw)) {
|
|
7053
7085
|
findings.push(filePath);
|
package/package.json
CHANGED
|
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
|
|
@@ -110,7 +110,13 @@ If Antigravity script harness exists, prefer:
|
|
|
110
110
|
Use these commands to keep this setup healthy:
|
|
111
111
|
|
|
112
112
|
- Install/update bundle:
|
|
113
|
-
`cbx workflows install --platform antigravity --bundle agent-environment-setup --scope global --overwrite`
|
|
113
|
+
`cbx workflows install --platform antigravity --bundle agent-environment-setup --scope global --overwrite --postman --stitch --mcp-runtime docker --mcp-fallback local --mcp-tool-sync`
|
|
114
|
+
- Start MCP Docker runtime:
|
|
115
|
+
`cbx mcp runtime up --scope global --name cbx-mcp --port 3310 --replace`
|
|
116
|
+
- Check MCP Docker runtime:
|
|
117
|
+
`cbx mcp runtime status --scope global --name cbx-mcp`
|
|
118
|
+
- Stop MCP Docker runtime:
|
|
119
|
+
`cbx mcp runtime down --name cbx-mcp`
|
|
114
120
|
- Rebuild managed routing block:
|
|
115
121
|
`cbx workflows sync-rules --platform antigravity --scope project`
|
|
116
122
|
- Diagnose setup issues:
|
|
@@ -100,7 +100,13 @@ Before multi-file or architecture-impacting changes, ask targeted questions when
|
|
|
100
100
|
Use these commands to keep this setup healthy:
|
|
101
101
|
|
|
102
102
|
- Install/update bundle:
|
|
103
|
-
`cbx workflows install --platform codex --bundle agent-environment-setup --scope global --overwrite`
|
|
103
|
+
`cbx workflows install --platform codex --bundle agent-environment-setup --scope global --overwrite --postman --stitch --mcp-runtime docker --mcp-fallback local --mcp-tool-sync`
|
|
104
|
+
- Start MCP Docker runtime:
|
|
105
|
+
`cbx mcp runtime up --scope global --name cbx-mcp --port 3310 --replace`
|
|
106
|
+
- Check MCP Docker runtime:
|
|
107
|
+
`cbx mcp runtime status --scope global --name cbx-mcp`
|
|
108
|
+
- Stop MCP Docker runtime:
|
|
109
|
+
`cbx mcp runtime down --name cbx-mcp`
|
|
104
110
|
- Rebuild managed routing block:
|
|
105
111
|
`cbx workflows sync-rules --platform codex --scope project`
|
|
106
112
|
- Diagnose setup issues:
|
|
@@ -109,7 +109,13 @@ Before multi-file or architecture-impacting changes, ask targeted questions when
|
|
|
109
109
|
Use these commands to keep this setup healthy:
|
|
110
110
|
|
|
111
111
|
- Install/update bundle:
|
|
112
|
-
`cbx workflows install --platform copilot --bundle agent-environment-setup --scope global --overwrite`
|
|
112
|
+
`cbx workflows install --platform copilot --bundle agent-environment-setup --scope global --overwrite --postman --stitch --mcp-runtime docker --mcp-fallback local --mcp-tool-sync`
|
|
113
|
+
- Start MCP Docker runtime:
|
|
114
|
+
`cbx mcp runtime up --scope global --name cbx-mcp --port 3310 --replace`
|
|
115
|
+
- Check MCP Docker runtime:
|
|
116
|
+
`cbx mcp runtime status --scope global --name cbx-mcp`
|
|
117
|
+
- Stop MCP Docker runtime:
|
|
118
|
+
`cbx mcp runtime down --name cbx-mcp`
|
|
113
119
|
- Rebuild managed routing block:
|
|
114
120
|
`cbx workflows sync-rules --platform copilot --scope project`
|
|
115
121
|
- Diagnose setup issues:
|
package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md
CHANGED
|
@@ -108,7 +108,13 @@ Before multi-file or architecture-impacting changes, ask targeted questions when
|
|
|
108
108
|
Use these commands to keep this setup healthy:
|
|
109
109
|
|
|
110
110
|
- Install/update bundle:
|
|
111
|
-
`cbx workflows install --platform copilot --bundle agent-environment-setup --scope global --overwrite`
|
|
111
|
+
`cbx workflows install --platform copilot --bundle agent-environment-setup --scope global --overwrite --postman --stitch --mcp-runtime docker --mcp-fallback local --mcp-tool-sync`
|
|
112
|
+
- Start MCP Docker runtime:
|
|
113
|
+
`cbx mcp runtime up --scope global --name cbx-mcp --port 3310 --replace`
|
|
114
|
+
- Check MCP Docker runtime:
|
|
115
|
+
`cbx mcp runtime status --scope global --name cbx-mcp`
|
|
116
|
+
- Stop MCP Docker runtime:
|
|
117
|
+
`cbx mcp runtime down --name cbx-mcp`
|
|
112
118
|
- Rebuild managed routing block:
|
|
113
119
|
`cbx workflows sync-rules --platform copilot --scope project`
|
|
114
120
|
- Diagnose setup issues:
|