@cubis/foundry 0.3.53 → 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.
Files changed (72) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +108 -3
  3. package/bin/cubis.js +5 -10286
  4. package/dist/cli/commands/register.js +87 -0
  5. package/dist/cli/commands/register.js.map +1 -0
  6. package/dist/cli/config/index.js +2 -0
  7. package/dist/cli/config/index.js.map +1 -0
  8. package/dist/cli/constants.js +4 -0
  9. package/dist/cli/constants.js.map +1 -0
  10. package/dist/cli/core.js +9141 -0
  11. package/dist/cli/core.js.map +1 -0
  12. package/dist/cli/index.js +3 -0
  13. package/dist/cli/index.js.map +1 -0
  14. package/dist/cli/init/banner.js +21 -0
  15. package/dist/cli/init/banner.js.map +1 -0
  16. package/dist/cli/init/execute.js +60 -0
  17. package/dist/cli/init/execute.js.map +1 -0
  18. package/dist/cli/init/index.js +5 -0
  19. package/dist/cli/init/index.js.map +1 -0
  20. package/dist/cli/init/prompts.js +122 -0
  21. package/dist/cli/init/prompts.js.map +1 -0
  22. package/dist/cli/init/types.js +2 -0
  23. package/dist/cli/init/types.js.map +1 -0
  24. package/dist/cli/io.js +2 -0
  25. package/dist/cli/io.js.map +1 -0
  26. package/dist/cli/mcp/commands.js +67 -0
  27. package/dist/cli/mcp/commands.js.map +1 -0
  28. package/dist/cli/mcp/index.js +2 -0
  29. package/dist/cli/mcp/index.js.map +1 -0
  30. package/dist/cli/pathing.js +51 -0
  31. package/dist/cli/pathing.js.map +1 -0
  32. package/dist/cli/platforms.js +2 -0
  33. package/dist/cli/platforms.js.map +1 -0
  34. package/dist/cli/rules/commands.js +26 -0
  35. package/dist/cli/rules/commands.js.map +1 -0
  36. package/dist/cli/rules/index.js +2 -0
  37. package/dist/cli/rules/index.js.map +1 -0
  38. package/dist/cli/tech/index.js +2 -0
  39. package/dist/cli/tech/index.js.map +1 -0
  40. package/dist/cli/types.js +2 -0
  41. package/dist/cli/types.js.map +1 -0
  42. package/dist/cli/workflows/commands.js +74 -0
  43. package/dist/cli/workflows/commands.js.map +1 -0
  44. package/dist/cli/workflows/index.js +2 -0
  45. package/dist/cli/workflows/index.js.map +1 -0
  46. package/package.json +17 -6
  47. package/src/cli/commands/register.ts +159 -0
  48. package/src/cli/config/index.ts +1 -0
  49. package/src/cli/constants.ts +3 -0
  50. package/src/cli/core.ts +11283 -0
  51. package/src/cli/index.ts +3 -0
  52. package/src/cli/init/banner.ts +20 -0
  53. package/src/cli/init/execute.ts +83 -0
  54. package/src/cli/init/index.ts +4 -0
  55. package/src/cli/init/prompts.ts +163 -0
  56. package/src/cli/init/types.ts +42 -0
  57. package/src/cli/io.ts +1 -0
  58. package/src/cli/mcp/commands.ts +131 -0
  59. package/src/cli/mcp/index.ts +1 -0
  60. package/src/cli/pathing.ts +50 -0
  61. package/src/cli/platforms.ts +1 -0
  62. package/src/cli/rules/commands.ts +40 -0
  63. package/src/cli/rules/index.ts +1 -0
  64. package/src/cli/tech/index.ts +1 -0
  65. package/src/cli/types.ts +15 -0
  66. package/src/cli/workflows/commands.ts +163 -0
  67. package/src/cli/workflows/index.ts +1 -0
  68. package/tsconfig.cli.json +19 -0
  69. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +18 -40
  70. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +18 -41
  71. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +18 -40
  72. 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 {};
@@ -0,0 +1,3 @@
1
+ export const CLI_NAME = "cbx";
2
+ export const AGENT_ASSETS_SUBDIR = "workflows";
3
+ export const DEFAULT_SKILL_PROFILE = "core";