@cubis/foundry 0.3.52 → 0.3.54
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 +45 -0
- package/README.md +108 -3
- package/bin/cubis.js +5 -10286
- package/dist/cli/commands/register.js +87 -0
- package/dist/cli/commands/register.js.map +1 -0
- package/dist/cli/config/index.js +2 -0
- package/dist/cli/config/index.js.map +1 -0
- package/dist/cli/constants.js +4 -0
- package/dist/cli/constants.js.map +1 -0
- package/dist/cli/core.js +9141 -0
- package/dist/cli/core.js.map +1 -0
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init/banner.js +21 -0
- package/dist/cli/init/banner.js.map +1 -0
- package/dist/cli/init/execute.js +60 -0
- package/dist/cli/init/execute.js.map +1 -0
- package/dist/cli/init/index.js +5 -0
- package/dist/cli/init/index.js.map +1 -0
- package/dist/cli/init/prompts.js +122 -0
- package/dist/cli/init/prompts.js.map +1 -0
- package/dist/cli/init/types.js +2 -0
- package/dist/cli/init/types.js.map +1 -0
- package/dist/cli/io.js +2 -0
- package/dist/cli/io.js.map +1 -0
- package/dist/cli/mcp/commands.js +67 -0
- package/dist/cli/mcp/commands.js.map +1 -0
- package/dist/cli/mcp/index.js +2 -0
- package/dist/cli/mcp/index.js.map +1 -0
- package/dist/cli/pathing.js +51 -0
- package/dist/cli/pathing.js.map +1 -0
- package/dist/cli/platforms.js +2 -0
- package/dist/cli/platforms.js.map +1 -0
- package/dist/cli/rules/commands.js +26 -0
- package/dist/cli/rules/commands.js.map +1 -0
- package/dist/cli/rules/index.js +2 -0
- package/dist/cli/rules/index.js.map +1 -0
- package/dist/cli/tech/index.js +2 -0
- package/dist/cli/tech/index.js.map +1 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/workflows/commands.js +74 -0
- package/dist/cli/workflows/commands.js.map +1 -0
- package/dist/cli/workflows/index.js +2 -0
- package/dist/cli/workflows/index.js.map +1 -0
- package/package.json +17 -6
- package/src/cli/commands/register.ts +159 -0
- package/src/cli/config/index.ts +1 -0
- package/src/cli/constants.ts +3 -0
- package/src/cli/core.ts +11283 -0
- package/src/cli/index.ts +3 -0
- package/src/cli/init/banner.ts +20 -0
- package/src/cli/init/execute.ts +83 -0
- package/src/cli/init/index.ts +4 -0
- package/src/cli/init/prompts.ts +163 -0
- package/src/cli/init/types.ts +42 -0
- package/src/cli/io.ts +1 -0
- package/src/cli/mcp/commands.ts +131 -0
- package/src/cli/mcp/index.ts +1 -0
- package/src/cli/pathing.ts +50 -0
- package/src/cli/platforms.ts +1 -0
- package/src/cli/rules/commands.ts +40 -0
- package/src/cli/rules/index.ts +1 -0
- package/src/cli/tech/index.ts +1 -0
- package/src/cli/types.ts +15 -0
- package/src/cli/workflows/commands.ts +163 -0
- package/src/cli/workflows/index.ts +1 -0
- package/tsconfig.cli.json +19 -0
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +18 -40
- package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +18 -41
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +18 -40
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +18 -40
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import type {
|
|
3
|
+
CommandDecorator,
|
|
4
|
+
WorkflowAction,
|
|
5
|
+
WorkflowDoctorAction,
|
|
6
|
+
WorkflowTargetAction,
|
|
7
|
+
} from "../types.js";
|
|
8
|
+
import { registerWorkflowCommands } from "../workflows/commands.js";
|
|
9
|
+
import { registerMcpCommands } from "../mcp/commands.js";
|
|
10
|
+
import { registerRulesCommands } from "../rules/commands.js";
|
|
11
|
+
|
|
12
|
+
export interface CliRegistrationDeps {
|
|
13
|
+
cliVersion: string;
|
|
14
|
+
printPlatforms: () => void;
|
|
15
|
+
withInstallOptions: CommandDecorator;
|
|
16
|
+
withWorkflowBaseOptions: CommandDecorator;
|
|
17
|
+
registerConfigKeysSubcommands: (configCommand: Command) => void;
|
|
18
|
+
runWorkflowInstall: WorkflowAction;
|
|
19
|
+
runWorkflowRemove: WorkflowTargetAction;
|
|
20
|
+
runWorkflowRemoveAll: WorkflowAction;
|
|
21
|
+
runWorkflowPruneSkills: WorkflowAction;
|
|
22
|
+
runWorkflowSyncRules: WorkflowAction;
|
|
23
|
+
runWorkflowDoctor: WorkflowDoctorAction;
|
|
24
|
+
runWorkflowConfig: WorkflowAction;
|
|
25
|
+
runInitWizard: WorkflowAction;
|
|
26
|
+
defaultSkillProfile: string;
|
|
27
|
+
runMcpServe: WorkflowAction;
|
|
28
|
+
runMcpToolsSync: WorkflowAction;
|
|
29
|
+
runMcpToolsList: WorkflowAction;
|
|
30
|
+
runMcpRuntimeStatus: WorkflowAction;
|
|
31
|
+
runMcpRuntimeUp: WorkflowAction;
|
|
32
|
+
runMcpRuntimeDown: WorkflowAction;
|
|
33
|
+
defaultMcpDockerContainerName: string;
|
|
34
|
+
runRulesInit: WorkflowAction;
|
|
35
|
+
runRulesTechMd: WorkflowAction;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function registerCommands(deps: CliRegistrationDeps) {
|
|
39
|
+
const program = new Command();
|
|
40
|
+
program
|
|
41
|
+
.name("cbx")
|
|
42
|
+
.description("Cubis Foundry CLI for workflow-first AI agent environments")
|
|
43
|
+
.version(deps.cliVersion);
|
|
44
|
+
|
|
45
|
+
program
|
|
46
|
+
.command("init")
|
|
47
|
+
.description("Run guided interactive install wizard")
|
|
48
|
+
.option("-y, --yes", "accept defaults and apply without confirmation")
|
|
49
|
+
.option("--dry-run", "preview wizard execution without writing files")
|
|
50
|
+
.option("--target <path>", "run against target project directory")
|
|
51
|
+
.option("--bundle <bundleId>", "workflow bundle id")
|
|
52
|
+
.option(
|
|
53
|
+
"--platforms <items>",
|
|
54
|
+
"comma-separated platforms: codex,antigravity,copilot",
|
|
55
|
+
)
|
|
56
|
+
.option(
|
|
57
|
+
"--skill-profile <profile>",
|
|
58
|
+
"skills profile: core|web-backend|full",
|
|
59
|
+
)
|
|
60
|
+
.option(
|
|
61
|
+
"--skills-scope <scope>",
|
|
62
|
+
"scope for skills install: global|project",
|
|
63
|
+
)
|
|
64
|
+
.option("--mcp-scope <scope>", "scope for MCP config: global|project")
|
|
65
|
+
.option(
|
|
66
|
+
"--mcps <items>",
|
|
67
|
+
"comma-separated MCP selections: cubis-foundry,postman,stitch",
|
|
68
|
+
)
|
|
69
|
+
.option("--postman-mode <mode>", "Postman mode: full|minimal")
|
|
70
|
+
.option("--mcp-runtime <runtime>", "MCP runtime: docker|local")
|
|
71
|
+
.option(
|
|
72
|
+
"--mcp-build-local",
|
|
73
|
+
"when MCP runtime is docker, build image locally instead of pulling",
|
|
74
|
+
)
|
|
75
|
+
.option("--no-banner", "skip init welcome banner")
|
|
76
|
+
.option("--json", "print machine-readable final summary")
|
|
77
|
+
.action(deps.runInitWizard);
|
|
78
|
+
|
|
79
|
+
registerWorkflowCommands(program, {
|
|
80
|
+
printPlatforms: deps.printPlatforms,
|
|
81
|
+
withInstallOptions: deps.withInstallOptions,
|
|
82
|
+
withWorkflowBaseOptions: deps.withWorkflowBaseOptions,
|
|
83
|
+
registerConfigKeysSubcommands: deps.registerConfigKeysSubcommands,
|
|
84
|
+
runWorkflowInstall: deps.runWorkflowInstall,
|
|
85
|
+
runWorkflowRemove: deps.runWorkflowRemove,
|
|
86
|
+
runWorkflowRemoveAll: deps.runWorkflowRemoveAll,
|
|
87
|
+
runWorkflowPruneSkills: deps.runWorkflowPruneSkills,
|
|
88
|
+
runWorkflowSyncRules: deps.runWorkflowSyncRules,
|
|
89
|
+
runWorkflowDoctor: deps.runWorkflowDoctor,
|
|
90
|
+
runWorkflowConfig: deps.runWorkflowConfig,
|
|
91
|
+
defaultSkillProfile: deps.defaultSkillProfile,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
registerMcpCommands(program, {
|
|
95
|
+
runMcpServe: deps.runMcpServe,
|
|
96
|
+
runMcpToolsSync: deps.runMcpToolsSync,
|
|
97
|
+
runMcpToolsList: deps.runMcpToolsList,
|
|
98
|
+
runMcpRuntimeStatus: deps.runMcpRuntimeStatus,
|
|
99
|
+
runMcpRuntimeUp: deps.runMcpRuntimeUp,
|
|
100
|
+
runMcpRuntimeDown: deps.runMcpRuntimeDown,
|
|
101
|
+
defaultMcpDockerContainerName: deps.defaultMcpDockerContainerName,
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
registerRulesCommands(program, {
|
|
105
|
+
runRulesInit: deps.runRulesInit,
|
|
106
|
+
runRulesTechMd: deps.runRulesTechMd,
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const agentsCommand = program
|
|
110
|
+
.command("agents")
|
|
111
|
+
.description("Cubis Agent Bot commands");
|
|
112
|
+
|
|
113
|
+
const removeCommand = program
|
|
114
|
+
.command("remove")
|
|
115
|
+
.description("Cleanup CBX-managed generated artifacts");
|
|
116
|
+
removeCommand
|
|
117
|
+
.command("all")
|
|
118
|
+
.description(
|
|
119
|
+
"Remove all CBX-managed generated artifacts (workflows/agents/skills/rules/MCP config)",
|
|
120
|
+
)
|
|
121
|
+
.option(
|
|
122
|
+
"-p, --platform <platform>",
|
|
123
|
+
"target platform id or 'all' (default: all)",
|
|
124
|
+
"all",
|
|
125
|
+
)
|
|
126
|
+
.option(
|
|
127
|
+
"--scope <scope>",
|
|
128
|
+
"target scope: project|global|all (default: all)",
|
|
129
|
+
"all",
|
|
130
|
+
)
|
|
131
|
+
.option(
|
|
132
|
+
"--target <path>",
|
|
133
|
+
"remove project-scope artifacts from target project directory",
|
|
134
|
+
)
|
|
135
|
+
.option(
|
|
136
|
+
"--include-credentials",
|
|
137
|
+
"also remove ~/.cbx/credentials.env when scope includes global",
|
|
138
|
+
)
|
|
139
|
+
.option("--dry-run", "preview remove operations without writing files")
|
|
140
|
+
.option("-y, --yes", "skip interactive confirmation")
|
|
141
|
+
.action(deps.runWorkflowRemoveAll);
|
|
142
|
+
removeCommand.action(() => {
|
|
143
|
+
removeCommand.help();
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
agentsCommand
|
|
147
|
+
.command("status")
|
|
148
|
+
.description("Show Cubis Agent Bot availability")
|
|
149
|
+
.action(() => {
|
|
150
|
+
console.log("Cubis Agent Bot is planned but not wired yet.");
|
|
151
|
+
console.log("Use `cbx workflows` to install and manage workflow bundles.");
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
agentsCommand.action(() => {
|
|
155
|
+
agentsCommand.help();
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
return program;
|
|
159
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|