@cubis/foundry 0.3.19 → 0.3.21
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/Ai Agent Workflow/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +1 -1
- package/Ai Agent Workflow/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +1 -1
- package/Ai Agent Workflow/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +1 -1
- package/Ai Agent Workflow/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +1 -1
- package/Ai Agent Workflow/workflows/agent-environment-setup/platforms/cursor/rules/.cursorrules +1 -1
- package/Ai Agent Workflow/workflows/agent-environment-setup/platforms/windsurf/rules/.windsurfrules +1 -1
- package/README.md +18 -8
- package/bin/cubis.js +116 -35
- package/package.json +1 -1
package/Ai Agent Workflow/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md
CHANGED
|
@@ -95,7 +95,7 @@ If Antigravity script harness exists, prefer:
|
|
|
95
95
|
Use these commands to keep this setup healthy:
|
|
96
96
|
|
|
97
97
|
- Install/update bundle:
|
|
98
|
-
`cbx workflows install --platform antigravity --bundle agent-environment-setup --scope
|
|
98
|
+
`cbx workflows install --platform antigravity --bundle agent-environment-setup --scope global --overwrite`
|
|
99
99
|
- Rebuild managed routing block:
|
|
100
100
|
`cbx workflows sync-rules --platform antigravity --scope project`
|
|
101
101
|
- Diagnose setup issues:
|
|
@@ -85,7 +85,7 @@ Before multi-file or architecture-impacting changes, ask targeted questions when
|
|
|
85
85
|
Use these commands to keep this setup healthy:
|
|
86
86
|
|
|
87
87
|
- Install/update bundle:
|
|
88
|
-
`cbx workflows install --platform codex --bundle agent-environment-setup --scope
|
|
88
|
+
`cbx workflows install --platform codex --bundle agent-environment-setup --scope global --overwrite`
|
|
89
89
|
- Rebuild managed routing block:
|
|
90
90
|
`cbx workflows sync-rules --platform codex --scope project`
|
|
91
91
|
- Diagnose setup issues:
|
package/Ai Agent Workflow/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md
CHANGED
|
@@ -94,7 +94,7 @@ Before multi-file or architecture-impacting changes, ask targeted questions when
|
|
|
94
94
|
Use these commands to keep this setup healthy:
|
|
95
95
|
|
|
96
96
|
- Install/update bundle:
|
|
97
|
-
`cbx workflows install --platform copilot --bundle agent-environment-setup --scope
|
|
97
|
+
`cbx workflows install --platform copilot --bundle agent-environment-setup --scope global --overwrite`
|
|
98
98
|
- Rebuild managed routing block:
|
|
99
99
|
`cbx workflows sync-rules --platform copilot --scope project`
|
|
100
100
|
- Diagnose setup issues:
|
|
@@ -94,7 +94,7 @@ Before multi-file or architecture-impacting changes, ask targeted questions when
|
|
|
94
94
|
Use these commands to keep this setup healthy:
|
|
95
95
|
|
|
96
96
|
- Install/update bundle:
|
|
97
|
-
`cbx workflows install --platform copilot --bundle agent-environment-setup --scope
|
|
97
|
+
`cbx workflows install --platform copilot --bundle agent-environment-setup --scope global --overwrite`
|
|
98
98
|
- Rebuild managed routing block:
|
|
99
99
|
`cbx workflows sync-rules --platform copilot --scope project`
|
|
100
100
|
- Diagnose setup issues:
|
package/Ai Agent Workflow/workflows/agent-environment-setup/platforms/cursor/rules/.cursorrules
CHANGED
|
@@ -77,7 +77,7 @@ Before multi-file or architecture-impacting changes, ask targeted questions when
|
|
|
77
77
|
Use these commands to keep this setup healthy:
|
|
78
78
|
|
|
79
79
|
- Install/update bundle:
|
|
80
|
-
`cbx workflows install --platform cursor --bundle agent-environment-setup --scope
|
|
80
|
+
`cbx workflows install --platform cursor --bundle agent-environment-setup --scope global --overwrite`
|
|
81
81
|
- Rebuild managed routing block:
|
|
82
82
|
`cbx workflows sync-rules --platform cursor --scope project`
|
|
83
83
|
- Diagnose setup issues:
|
package/Ai Agent Workflow/workflows/agent-environment-setup/platforms/windsurf/rules/.windsurfrules
CHANGED
|
@@ -77,7 +77,7 @@ Before multi-file or architecture-impacting changes, ask targeted questions when
|
|
|
77
77
|
Use these commands to keep this setup healthy:
|
|
78
78
|
|
|
79
79
|
- Install/update bundle:
|
|
80
|
-
`cbx workflows install --platform windsurf --bundle agent-environment-setup --scope
|
|
80
|
+
`cbx workflows install --platform windsurf --bundle agent-environment-setup --scope global --overwrite`
|
|
81
81
|
- Rebuild managed routing block:
|
|
82
82
|
`cbx workflows sync-rules --platform windsurf --scope project`
|
|
83
83
|
- Diagnose setup issues:
|
package/README.md
CHANGED
|
@@ -60,6 +60,9 @@ cbx workflows install --platform copilot --postman
|
|
|
60
60
|
|
|
61
61
|
Install bootstrap behavior:
|
|
62
62
|
- `cbx workflows install` now also bootstraps `ENGINEERING_RULES.md` and `TECH.md` (creates when missing; keeps existing files unless explicitly regenerated).
|
|
63
|
+
- When install scope is `global` (default), skills/powers install to global paths, while workflows + agents stay in workspace (`project`) paths.
|
|
64
|
+
- Rule sync + engineering artifacts (`AGENTS.md`/`GEMINI.md`/Copilot instructions, `ENGINEERING_RULES.md`, `TECH.md`) are maintained in workspace (`project`) scope.
|
|
65
|
+
- Codex workflow templates are maintained in workspace `.agents/workflows` so workflow-wrapper routing remains discoverable in project rules.
|
|
63
66
|
- Optional `--postman` bootstrap creates `postman_setting.json` and installs/configures the Postman skill/MCP for Codex, Antigravity, and Copilot.
|
|
64
67
|
- Use `cbx rules init --platform <platform> --overwrite` to force-regenerate both files.
|
|
65
68
|
|
|
@@ -176,11 +179,9 @@ Project scope:
|
|
|
176
179
|
- Terminal integration (optional): `.agent/terminal-integration`
|
|
177
180
|
|
|
178
181
|
Global scope:
|
|
179
|
-
- Workflows: `~/.gemini/antigravity/workflows`
|
|
180
|
-
- Agents: `~/.gemini/antigravity/agents`
|
|
181
182
|
- Skills: `~/.gemini/antigravity/skills`
|
|
182
183
|
- Rules: `~/.gemini/GEMINI.md`
|
|
183
|
-
-
|
|
184
|
+
- Workflows/agents/terminal-integration: default install keeps these in workspace (`.agent/...`) paths.
|
|
184
185
|
|
|
185
186
|
### Antigravity Terminal Integration (Optional)
|
|
186
187
|
|
|
@@ -190,7 +191,7 @@ Install-time options:
|
|
|
190
191
|
|
|
191
192
|
Behavior:
|
|
192
193
|
- Interactive installs prompt whether to enable terminal verification integration.
|
|
193
|
-
- If enabled, cbx writes managed scripts/config under `.agent/terminal-integration
|
|
194
|
+
- If enabled, cbx writes managed scripts/config under `.agent/terminal-integration`.
|
|
194
195
|
- cbx also writes a managed terminal verification block into Antigravity rule files so post-task verification commands are explicit.
|
|
195
196
|
- Removing the bundle cleans the managed terminal integration directory and block.
|
|
196
197
|
|
|
@@ -207,9 +208,9 @@ Project scope:
|
|
|
207
208
|
- Example usage: `$workflow-plan`, `$agent-backend-specialist`
|
|
208
209
|
|
|
209
210
|
Global scope:
|
|
210
|
-
- Workflow templates (reference docs): `~/.agents/workflows`
|
|
211
211
|
- Skills: `~/.agents/skills`
|
|
212
212
|
- Rules: `~/.codex/AGENTS.md`
|
|
213
|
+
- Workflow templates (reference docs): default install keeps these in workspace `.agents/workflows`
|
|
213
214
|
- Agents: not installed for Codex runtime
|
|
214
215
|
|
|
215
216
|
Legacy compatibility note:
|
|
@@ -225,10 +226,9 @@ Project scope:
|
|
|
225
226
|
- Skill schema note: `cbx` normalizes Copilot skill frontmatter by removing unsupported top-level keys like `displayName` and `keywords` during install.
|
|
226
227
|
|
|
227
228
|
Global scope:
|
|
228
|
-
- Workflows: `~/.copilot/workflows`
|
|
229
|
-
- Agents: `~/.copilot/agents`
|
|
230
229
|
- Skills: `~/.copilot/skills`
|
|
231
230
|
- Rules: `~/.copilot/copilot-instructions.md`
|
|
231
|
+
- Workflows/agents: default install keeps these in workspace (`.github/...`) paths.
|
|
232
232
|
|
|
233
233
|
## Rule Auto-Sync
|
|
234
234
|
|
|
@@ -252,10 +252,20 @@ Behavior:
|
|
|
252
252
|
## Scope and Detection
|
|
253
253
|
|
|
254
254
|
Default scope:
|
|
255
|
-
-
|
|
255
|
+
- Install/init commands:
|
|
256
|
+
- `cbx workflows install`
|
|
257
|
+
- `cbx workflows init`
|
|
258
|
+
- `cbx skills install`
|
|
259
|
+
- `cbx skills init`
|
|
260
|
+
- `cbx install` (legacy alias)
|
|
261
|
+
- `cbx init` (legacy alias)
|
|
262
|
+
- Default scope for these commands is `global`.
|
|
263
|
+
- In this default global mode, only skills/powers install globally. Workflows/agents and rule/engineering files remain workspace-scoped.
|
|
264
|
+
- Other workflow/rules commands default to `project`.
|
|
256
265
|
|
|
257
266
|
Optional:
|
|
258
267
|
- `--scope global`
|
|
268
|
+
- `--scope project`
|
|
259
269
|
|
|
260
270
|
Platform auto-detection:
|
|
261
271
|
- Uses repo markers for Antigravity/Codex/Copilot.
|
package/bin/cubis.js
CHANGED
|
@@ -1295,6 +1295,19 @@ async function resolveProfilePaths(profileId, scope, cwd = process.cwd()) {
|
|
|
1295
1295
|
};
|
|
1296
1296
|
}
|
|
1297
1297
|
|
|
1298
|
+
async function resolveArtifactProfilePaths(profileId, scope, cwd = process.cwd()) {
|
|
1299
|
+
const scopedPaths = await resolveProfilePaths(profileId, scope, cwd);
|
|
1300
|
+
if (scope !== "global") return scopedPaths;
|
|
1301
|
+
|
|
1302
|
+
// Global install mode is skills-only. Keep workflows/agents in workspace scope.
|
|
1303
|
+
const workspacePaths = await resolveProfilePaths(profileId, "project", cwd);
|
|
1304
|
+
return {
|
|
1305
|
+
...scopedPaths,
|
|
1306
|
+
workflowsDir: workspacePaths.workflowsDir,
|
|
1307
|
+
agentsDir: workspacePaths.agentsDir
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1298
1311
|
async function listBundleIds() {
|
|
1299
1312
|
const root = path.join(agentAssetsRoot(), "workflows");
|
|
1300
1313
|
if (!(await pathExists(root))) return [];
|
|
@@ -2632,12 +2645,13 @@ async function installBundleArtifacts({
|
|
|
2632
2645
|
platform,
|
|
2633
2646
|
scope,
|
|
2634
2647
|
overwrite,
|
|
2648
|
+
profilePathsOverride = null,
|
|
2635
2649
|
extraSkillIds = [],
|
|
2636
2650
|
terminalVerifierSelection = null,
|
|
2637
2651
|
dryRun = false,
|
|
2638
2652
|
cwd = process.cwd()
|
|
2639
2653
|
}) {
|
|
2640
|
-
const profilePaths = await
|
|
2654
|
+
const profilePaths = profilePathsOverride || (await resolveArtifactProfilePaths(platform, scope, cwd));
|
|
2641
2655
|
const platformSpec = manifest.platforms?.[platform];
|
|
2642
2656
|
|
|
2643
2657
|
if (!platformSpec) {
|
|
@@ -2766,6 +2780,46 @@ async function installBundleArtifacts({
|
|
|
2766
2780
|
};
|
|
2767
2781
|
}
|
|
2768
2782
|
|
|
2783
|
+
async function installCodexProjectWorkflowTemplates({
|
|
2784
|
+
bundleId,
|
|
2785
|
+
manifest,
|
|
2786
|
+
overwrite,
|
|
2787
|
+
dryRun = false,
|
|
2788
|
+
cwd = process.cwd()
|
|
2789
|
+
}) {
|
|
2790
|
+
const platform = "codex";
|
|
2791
|
+
const platformSpec = manifest.platforms?.[platform];
|
|
2792
|
+
if (!platformSpec) return { installed: [], skipped: [] };
|
|
2793
|
+
|
|
2794
|
+
const workflowFiles = Array.isArray(platformSpec.workflows) ? platformSpec.workflows : [];
|
|
2795
|
+
if (workflowFiles.length === 0) return { installed: [], skipped: [] };
|
|
2796
|
+
|
|
2797
|
+
const profilePaths = await resolveProfilePaths(platform, "project", cwd);
|
|
2798
|
+
if (!dryRun) {
|
|
2799
|
+
await mkdir(profilePaths.workflowsDir, { recursive: true });
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
const bundleRoot = path.join(agentAssetsRoot(), "workflows", bundleId);
|
|
2803
|
+
const platformRoot = path.join(bundleRoot, "platforms", platform);
|
|
2804
|
+
const installed = [];
|
|
2805
|
+
const skipped = [];
|
|
2806
|
+
|
|
2807
|
+
for (const workflowFile of workflowFiles) {
|
|
2808
|
+
const source = path.join(platformRoot, "workflows", workflowFile);
|
|
2809
|
+
const destination = path.join(profilePaths.workflowsDir, path.basename(workflowFile));
|
|
2810
|
+
|
|
2811
|
+
if (!(await pathExists(source))) {
|
|
2812
|
+
throw new Error(`Missing workflow source file: ${source}`);
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
const result = await copyArtifact({ source, destination, overwrite, dryRun });
|
|
2816
|
+
if (result.action === "skipped" || result.action === "would-skip") skipped.push(destination);
|
|
2817
|
+
else installed.push(destination);
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
return { installed, skipped };
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2769
2823
|
async function seedRuleFileFromTemplateIfMissing({
|
|
2770
2824
|
bundleId,
|
|
2771
2825
|
manifest,
|
|
@@ -2833,10 +2887,11 @@ async function removeBundleArtifacts({
|
|
|
2833
2887
|
manifest,
|
|
2834
2888
|
platform,
|
|
2835
2889
|
scope,
|
|
2890
|
+
profilePathsOverride = null,
|
|
2836
2891
|
dryRun = false,
|
|
2837
2892
|
cwd = process.cwd()
|
|
2838
2893
|
}) {
|
|
2839
|
-
const profilePaths = await
|
|
2894
|
+
const profilePaths = profilePathsOverride || (await resolveArtifactProfilePaths(platform, scope, cwd));
|
|
2840
2895
|
const platformSpec = manifest.platforms?.[platform];
|
|
2841
2896
|
if (!platformSpec) throw new Error(`Bundle '${bundleId}' does not define platform '${platform}'.`);
|
|
2842
2897
|
|
|
@@ -2886,6 +2941,7 @@ function printPlatforms() {
|
|
|
2886
2941
|
);
|
|
2887
2942
|
console.log(` global skills: ${profile.global.skillDirs[0]}`);
|
|
2888
2943
|
console.log(` global rules: ${profile.global.ruleFilesByPriority.join(" | ")}`);
|
|
2944
|
+
console.log(" default install: workflows/agents -> project, skills -> global");
|
|
2889
2945
|
}
|
|
2890
2946
|
}
|
|
2891
2947
|
|
|
@@ -3060,21 +3116,22 @@ function printRemoveSummary({
|
|
|
3060
3116
|
async function createDoctorReport({ platform, scope, cwd = process.cwd() }) {
|
|
3061
3117
|
const profile = WORKFLOW_PROFILES[platform];
|
|
3062
3118
|
const profilePaths = await resolveProfilePaths(platform, scope, cwd);
|
|
3119
|
+
const artifactPaths = await resolveArtifactProfilePaths(platform, scope, cwd);
|
|
3063
3120
|
const agentsEnabled = platformInstallsCustomAgents(platform);
|
|
3064
3121
|
|
|
3065
3122
|
const pathStatus = {
|
|
3066
3123
|
workflows: {
|
|
3067
|
-
path:
|
|
3068
|
-
exists: await pathExists(
|
|
3124
|
+
path: artifactPaths.workflowsDir,
|
|
3125
|
+
exists: await pathExists(artifactPaths.workflowsDir)
|
|
3069
3126
|
},
|
|
3070
3127
|
agents: {
|
|
3071
|
-
path:
|
|
3128
|
+
path: artifactPaths.agentsDir,
|
|
3072
3129
|
enabled: agentsEnabled,
|
|
3073
|
-
exists: agentsEnabled ? await pathExists(
|
|
3130
|
+
exists: agentsEnabled ? await pathExists(artifactPaths.agentsDir) : null
|
|
3074
3131
|
},
|
|
3075
3132
|
skills: {
|
|
3076
|
-
path:
|
|
3077
|
-
exists: await pathExists(
|
|
3133
|
+
path: artifactPaths.skillsDir,
|
|
3134
|
+
exists: await pathExists(artifactPaths.skillsDir)
|
|
3078
3135
|
}
|
|
3079
3136
|
};
|
|
3080
3137
|
|
|
@@ -3100,7 +3157,7 @@ async function createDoctorReport({ platform, scope, cwd = process.cwd() }) {
|
|
|
3100
3157
|
|
|
3101
3158
|
let terminalIntegration = null;
|
|
3102
3159
|
if (platform === "antigravity") {
|
|
3103
|
-
const integrationDir = getAntigravityTerminalIntegrationDir(
|
|
3160
|
+
const integrationDir = getAntigravityTerminalIntegrationDir(artifactPaths);
|
|
3104
3161
|
const configPath = path.join(integrationDir, "config.json");
|
|
3105
3162
|
const exists = await pathExists(integrationDir);
|
|
3106
3163
|
const configExists = await pathExists(configPath);
|
|
@@ -3220,7 +3277,7 @@ async function createDoctorReport({ platform, scope, cwd = process.cwd() }) {
|
|
|
3220
3277
|
}
|
|
3221
3278
|
|
|
3222
3279
|
if (platform === "copilot" && pathStatus.skills.exists) {
|
|
3223
|
-
const findings = await validateCopilotSkillsSchema(
|
|
3280
|
+
const findings = await validateCopilotSkillsSchema(artifactPaths.skillsDir);
|
|
3224
3281
|
if (findings.length > 0) {
|
|
3225
3282
|
const preview = findings
|
|
3226
3283
|
.slice(0, 5)
|
|
@@ -3236,7 +3293,7 @@ async function createDoctorReport({ platform, scope, cwd = process.cwd() }) {
|
|
|
3236
3293
|
}
|
|
3237
3294
|
|
|
3238
3295
|
if (platform === "copilot" && pathStatus.agents.exists) {
|
|
3239
|
-
const findings = await validateCopilotAgentsSchema(
|
|
3296
|
+
const findings = await validateCopilotAgentsSchema(artifactPaths.agentsDir);
|
|
3240
3297
|
if (findings.length > 0) {
|
|
3241
3298
|
const preview = findings
|
|
3242
3299
|
.slice(0, 5)
|
|
@@ -3319,7 +3376,9 @@ function withWorkflowBaseOptions(command) {
|
|
|
3319
3376
|
}
|
|
3320
3377
|
|
|
3321
3378
|
function withInstallOptions(command) {
|
|
3322
|
-
return
|
|
3379
|
+
return command
|
|
3380
|
+
.option("-p, --platform <platform>", "target platform id")
|
|
3381
|
+
.option("--scope <scope>", "target scope: project|global", "global")
|
|
3323
3382
|
.option("-b, --bundle <bundle>", "bundle id (default: agent-environment-setup)")
|
|
3324
3383
|
.option("--overwrite", "overwrite existing files")
|
|
3325
3384
|
.option(
|
|
@@ -3445,7 +3504,7 @@ async function cleanupAntigravityTerminalIntegration({
|
|
|
3445
3504
|
cwd,
|
|
3446
3505
|
dryRun = false
|
|
3447
3506
|
}) {
|
|
3448
|
-
const profilePaths = await
|
|
3507
|
+
const profilePaths = await resolveArtifactProfilePaths("antigravity", scope, cwd);
|
|
3449
3508
|
const integrationDir = getAntigravityTerminalIntegrationDir(profilePaths);
|
|
3450
3509
|
const dirRemoved = await safeRemove(integrationDir, dryRun);
|
|
3451
3510
|
|
|
@@ -3473,9 +3532,12 @@ async function cleanupAntigravityTerminalIntegration({
|
|
|
3473
3532
|
|
|
3474
3533
|
async function runWorkflowInstall(options) {
|
|
3475
3534
|
try {
|
|
3535
|
+
const cwd = process.cwd();
|
|
3476
3536
|
const scope = normalizeScope(options.scope);
|
|
3537
|
+
const ruleScope = scope === "global" ? "project" : scope;
|
|
3477
3538
|
const dryRun = Boolean(options.dryRun);
|
|
3478
|
-
const platform = await resolvePlatform(options.platform, scope,
|
|
3539
|
+
const platform = await resolvePlatform(options.platform, scope, cwd);
|
|
3540
|
+
const artifactProfilePaths = await resolveArtifactProfilePaths(platform, scope, cwd);
|
|
3479
3541
|
const bundleId = await chooseBundle(options.bundle);
|
|
3480
3542
|
const manifest = await readBundleManifest(bundleId);
|
|
3481
3543
|
|
|
@@ -3497,7 +3559,7 @@ async function runWorkflowInstall(options) {
|
|
|
3497
3559
|
const postmanSelection = await resolvePostmanInstallSelection({
|
|
3498
3560
|
scope,
|
|
3499
3561
|
options,
|
|
3500
|
-
cwd
|
|
3562
|
+
cwd
|
|
3501
3563
|
});
|
|
3502
3564
|
|
|
3503
3565
|
const installResult = await installBundleArtifacts({
|
|
@@ -3506,35 +3568,51 @@ async function runWorkflowInstall(options) {
|
|
|
3506
3568
|
platform,
|
|
3507
3569
|
scope,
|
|
3508
3570
|
overwrite: Boolean(options.overwrite),
|
|
3571
|
+
profilePathsOverride: artifactProfilePaths,
|
|
3509
3572
|
extraSkillIds: postmanSelection.enabled ? [POSTMAN_SKILL_ID] : [],
|
|
3510
3573
|
terminalVerifierSelection,
|
|
3511
3574
|
dryRun,
|
|
3512
|
-
cwd
|
|
3575
|
+
cwd
|
|
3513
3576
|
});
|
|
3514
3577
|
|
|
3578
|
+
if (platform === "codex" && scope === "global") {
|
|
3579
|
+
const codexProjectPaths = await resolveProfilePaths("codex", "project", cwd);
|
|
3580
|
+
if (path.resolve(artifactProfilePaths.workflowsDir) !== path.resolve(codexProjectPaths.workflowsDir)) {
|
|
3581
|
+
const codexProjectWorkflows = await installCodexProjectWorkflowTemplates({
|
|
3582
|
+
bundleId,
|
|
3583
|
+
manifest,
|
|
3584
|
+
overwrite: Boolean(options.overwrite),
|
|
3585
|
+
dryRun,
|
|
3586
|
+
cwd
|
|
3587
|
+
});
|
|
3588
|
+
installResult.installed.push(...codexProjectWorkflows.installed);
|
|
3589
|
+
installResult.skipped.push(...codexProjectWorkflows.skipped);
|
|
3590
|
+
}
|
|
3591
|
+
}
|
|
3592
|
+
|
|
3515
3593
|
await seedRuleFileFromTemplateIfMissing({
|
|
3516
3594
|
bundleId,
|
|
3517
3595
|
manifest,
|
|
3518
3596
|
platform,
|
|
3519
|
-
scope,
|
|
3597
|
+
scope: ruleScope,
|
|
3520
3598
|
overwrite: Boolean(options.overwrite),
|
|
3521
3599
|
dryRun,
|
|
3522
|
-
cwd
|
|
3600
|
+
cwd
|
|
3523
3601
|
});
|
|
3524
3602
|
|
|
3525
3603
|
const syncResult = await syncRulesForPlatform({
|
|
3526
3604
|
platform,
|
|
3527
|
-
scope,
|
|
3605
|
+
scope: ruleScope,
|
|
3528
3606
|
dryRun,
|
|
3529
|
-
cwd
|
|
3607
|
+
cwd
|
|
3530
3608
|
});
|
|
3531
3609
|
const engineeringArtifactsResult = await upsertEngineeringArtifacts({
|
|
3532
3610
|
platform,
|
|
3533
|
-
scope,
|
|
3611
|
+
scope: ruleScope,
|
|
3534
3612
|
overwrite: false,
|
|
3535
3613
|
dryRun,
|
|
3536
3614
|
skipTech: false,
|
|
3537
|
-
cwd
|
|
3615
|
+
cwd
|
|
3538
3616
|
});
|
|
3539
3617
|
const postmanSetupResult = await configurePostmanInstallArtifacts({
|
|
3540
3618
|
scope,
|
|
@@ -3542,14 +3620,14 @@ async function runWorkflowInstall(options) {
|
|
|
3542
3620
|
postmanSelection,
|
|
3543
3621
|
overwrite: Boolean(options.overwrite),
|
|
3544
3622
|
dryRun,
|
|
3545
|
-
cwd
|
|
3623
|
+
cwd
|
|
3546
3624
|
});
|
|
3547
3625
|
|
|
3548
3626
|
const terminalVerificationRuleResult =
|
|
3549
3627
|
platform === "antigravity" && installResult.terminalIntegration
|
|
3550
3628
|
? await upsertTerminalVerificationForInstall({
|
|
3551
|
-
scope,
|
|
3552
|
-
cwd
|
|
3629
|
+
scope: ruleScope,
|
|
3630
|
+
cwd,
|
|
3553
3631
|
terminalIntegration: installResult.terminalIntegration,
|
|
3554
3632
|
dryRun
|
|
3555
3633
|
})
|
|
@@ -3562,7 +3640,7 @@ async function runWorkflowInstall(options) {
|
|
|
3562
3640
|
bundleId,
|
|
3563
3641
|
artifacts: installResult.artifacts,
|
|
3564
3642
|
ruleFilePath: syncResult.filePath,
|
|
3565
|
-
cwd
|
|
3643
|
+
cwd
|
|
3566
3644
|
});
|
|
3567
3645
|
}
|
|
3568
3646
|
|
|
@@ -3590,7 +3668,7 @@ async function runWorkflowInstall(options) {
|
|
|
3590
3668
|
if (dryRun) {
|
|
3591
3669
|
console.log("\nDry-run complete. Re-run without `--dry-run` to apply changes.");
|
|
3592
3670
|
} else {
|
|
3593
|
-
console.log("\nTip: run `cbx workflows doctor --platform " + platform + " --scope " +
|
|
3671
|
+
console.log("\nTip: run `cbx workflows doctor --platform " + platform + " --scope " + ruleScope + "`.");
|
|
3594
3672
|
}
|
|
3595
3673
|
} catch (error) {
|
|
3596
3674
|
if (error?.name === "ExitPromptError") {
|
|
@@ -3608,9 +3686,12 @@ async function runWorkflowRemove(target, options) {
|
|
|
3608
3686
|
throw new Error("Missing <bundle-or-workflow>. Usage: cbx workflows remove <bundle-or-workflow>");
|
|
3609
3687
|
}
|
|
3610
3688
|
|
|
3689
|
+
const cwd = process.cwd();
|
|
3611
3690
|
const scope = normalizeScope(options.scope);
|
|
3691
|
+
const ruleScope = scope === "global" ? "project" : scope;
|
|
3612
3692
|
const dryRun = Boolean(options.dryRun);
|
|
3613
|
-
const platform = await resolvePlatform(options.platform, scope,
|
|
3693
|
+
const platform = await resolvePlatform(options.platform, scope, cwd);
|
|
3694
|
+
const artifactProfilePaths = await resolveArtifactProfilePaths(platform, scope, cwd);
|
|
3614
3695
|
const bundleIds = await listBundleIds();
|
|
3615
3696
|
|
|
3616
3697
|
let removed = [];
|
|
@@ -3637,8 +3718,9 @@ async function runWorkflowRemove(target, options) {
|
|
|
3637
3718
|
manifest,
|
|
3638
3719
|
platform,
|
|
3639
3720
|
scope,
|
|
3721
|
+
profilePathsOverride: artifactProfilePaths,
|
|
3640
3722
|
dryRun,
|
|
3641
|
-
cwd
|
|
3723
|
+
cwd
|
|
3642
3724
|
});
|
|
3643
3725
|
|
|
3644
3726
|
removed = removeResult.removed;
|
|
@@ -3646,7 +3728,7 @@ async function runWorkflowRemove(target, options) {
|
|
|
3646
3728
|
if (platform === "antigravity") {
|
|
3647
3729
|
terminalIntegrationCleanup = await cleanupAntigravityTerminalIntegration({
|
|
3648
3730
|
scope,
|
|
3649
|
-
cwd
|
|
3731
|
+
cwd,
|
|
3650
3732
|
dryRun
|
|
3651
3733
|
});
|
|
3652
3734
|
if (terminalIntegrationCleanup.dirRemoved) {
|
|
@@ -3654,8 +3736,7 @@ async function runWorkflowRemove(target, options) {
|
|
|
3654
3736
|
}
|
|
3655
3737
|
}
|
|
3656
3738
|
} else {
|
|
3657
|
-
const
|
|
3658
|
-
const workflowFile = await findWorkflowFileByTarget(profilePaths.workflowsDir, target);
|
|
3739
|
+
const workflowFile = await findWorkflowFileByTarget(artifactProfilePaths.workflowsDir, target);
|
|
3659
3740
|
|
|
3660
3741
|
if (!workflowFile) {
|
|
3661
3742
|
throw new Error(`Could not find workflow or bundle '${target}' in platform '${platform}'.`);
|
|
@@ -3679,9 +3760,9 @@ async function runWorkflowRemove(target, options) {
|
|
|
3679
3760
|
|
|
3680
3761
|
const syncResult = await syncRulesForPlatform({
|
|
3681
3762
|
platform,
|
|
3682
|
-
scope,
|
|
3763
|
+
scope: ruleScope,
|
|
3683
3764
|
dryRun,
|
|
3684
|
-
cwd
|
|
3765
|
+
cwd
|
|
3685
3766
|
});
|
|
3686
3767
|
|
|
3687
3768
|
if (!dryRun && removedType === "bundle") {
|
|
@@ -3690,7 +3771,7 @@ async function runWorkflowRemove(target, options) {
|
|
|
3690
3771
|
platform,
|
|
3691
3772
|
bundleId: target,
|
|
3692
3773
|
ruleFilePath: syncResult.filePath,
|
|
3693
|
-
cwd
|
|
3774
|
+
cwd
|
|
3694
3775
|
});
|
|
3695
3776
|
}
|
|
3696
3777
|
|