@frenchtoastman/oh-my-groundcontrol 0.0.18 → 0.0.19
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/dist/cli/custom-commands.d.ts +26 -0
- package/dist/cli/index.js +71 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom command bundled in this repository.
|
|
3
|
+
* Copied from src/commands/ to ~/.config/opencode/command/ during install.
|
|
4
|
+
*/
|
|
5
|
+
export interface CustomCommand {
|
|
6
|
+
/** Command name (filename without .md extension) */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Human-readable description */
|
|
9
|
+
description: string;
|
|
10
|
+
/** Source path in this repo (relative to project root) */
|
|
11
|
+
sourcePath: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Registry of custom commands bundled in this repository.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CUSTOM_COMMANDS: CustomCommand[];
|
|
17
|
+
/**
|
|
18
|
+
* Get the target directory for custom command installation.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getCustomCommandsDir(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Install a custom command by copying from src/commands/ to ~/.config/opencode/command/
|
|
23
|
+
* @param command - The custom command to install
|
|
24
|
+
* @returns True if installation succeeded, false otherwise
|
|
25
|
+
*/
|
|
26
|
+
export declare function installCustomCommand(command: CustomCommand): boolean;
|
package/dist/cli/index.js
CHANGED
|
@@ -16129,6 +16129,42 @@ function pickSupportOpenCodeModel(models, primaryModel) {
|
|
|
16129
16129
|
}, primaryModel);
|
|
16130
16130
|
return support;
|
|
16131
16131
|
}
|
|
16132
|
+
// src/cli/custom-commands.ts
|
|
16133
|
+
import { copyFileSync as copyFileSync3, existsSync as existsSync4, mkdirSync as mkdirSync3 } from "fs";
|
|
16134
|
+
import { homedir as homedir3 } from "os";
|
|
16135
|
+
import { join as join3 } from "path";
|
|
16136
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
16137
|
+
var CUSTOM_COMMANDS = [
|
|
16138
|
+
{
|
|
16139
|
+
name: "analyze",
|
|
16140
|
+
description: "Code review and analysis for uncommitted changes, commits, branches, PRs, or specific files",
|
|
16141
|
+
sourcePath: "src/commands/analyze.md"
|
|
16142
|
+
}
|
|
16143
|
+
];
|
|
16144
|
+
function getCustomCommandsDir() {
|
|
16145
|
+
return join3(homedir3(), ".config", "opencode", "command");
|
|
16146
|
+
}
|
|
16147
|
+
function installCustomCommand(command) {
|
|
16148
|
+
try {
|
|
16149
|
+
const packageRoot = fileURLToPath2(new URL("../..", import.meta.url));
|
|
16150
|
+
const sourcePath = join3(packageRoot, command.sourcePath);
|
|
16151
|
+
const targetDir = getCustomCommandsDir();
|
|
16152
|
+
const targetPath = join3(targetDir, `${command.name}.md`);
|
|
16153
|
+
if (!existsSync4(sourcePath)) {
|
|
16154
|
+
console.error(`Custom command source not found: ${sourcePath}`);
|
|
16155
|
+
return false;
|
|
16156
|
+
}
|
|
16157
|
+
if (!existsSync4(targetDir)) {
|
|
16158
|
+
mkdirSync3(targetDir, { recursive: true });
|
|
16159
|
+
}
|
|
16160
|
+
copyFileSync3(sourcePath, targetPath);
|
|
16161
|
+
return true;
|
|
16162
|
+
} catch (error48) {
|
|
16163
|
+
console.error(`Failed to install custom command: ${command.name}`, error48);
|
|
16164
|
+
return false;
|
|
16165
|
+
}
|
|
16166
|
+
}
|
|
16167
|
+
|
|
16132
16168
|
// src/cli/install.ts
|
|
16133
16169
|
var GREEN = "\x1B[32m";
|
|
16134
16170
|
var BLUE = "\x1B[34m";
|
|
@@ -16525,12 +16561,15 @@ async function runManualSetupMode(rl, detected, modelsOnly = false) {
|
|
|
16525
16561
|
console.log();
|
|
16526
16562
|
skills = await askYesNo(rl, "Install recommended skills?", "yes");
|
|
16527
16563
|
console.log();
|
|
16528
|
-
console.log(`${BOLD}Custom Skills:${RESET}`);
|
|
16564
|
+
console.log(`${BOLD}Custom Skills & Commands:${RESET}`);
|
|
16529
16565
|
for (const skill of CUSTOM_SKILLS) {
|
|
16530
|
-
console.log(` ${SYMBOLS.bullet} ${BOLD}${skill.name}${RESET}: ${skill.description}`);
|
|
16566
|
+
console.log(` ${SYMBOLS.bullet} ${BOLD}${skill.name}${RESET} (skill): ${skill.description}`);
|
|
16567
|
+
}
|
|
16568
|
+
for (const command of CUSTOM_COMMANDS) {
|
|
16569
|
+
console.log(` ${SYMBOLS.bullet} ${BOLD}/${command.name}${RESET} (command): ${command.description}`);
|
|
16531
16570
|
}
|
|
16532
16571
|
console.log();
|
|
16533
|
-
customSkills = await askYesNo(rl, "Install custom skills?", "yes");
|
|
16572
|
+
customSkills = await askYesNo(rl, "Install custom skills & commands?", "yes");
|
|
16534
16573
|
console.log();
|
|
16535
16574
|
} else {
|
|
16536
16575
|
printInfo("Models-only mode: skipping plugin/auth setup and skills prompts.");
|
|
@@ -16676,12 +16715,15 @@ async function runInteractiveMode(detected, modelsOnly = false) {
|
|
|
16676
16715
|
console.log();
|
|
16677
16716
|
skills = await askYesNo(rl, "Install recommended skills?", "yes");
|
|
16678
16717
|
console.log();
|
|
16679
|
-
console.log(`${BOLD}Custom Skills:${RESET}`);
|
|
16718
|
+
console.log(`${BOLD}Custom Skills & Commands:${RESET}`);
|
|
16680
16719
|
for (const skill of CUSTOM_SKILLS) {
|
|
16681
|
-
console.log(` ${SYMBOLS.bullet} ${BOLD}${skill.name}${RESET}: ${skill.description}`);
|
|
16720
|
+
console.log(` ${SYMBOLS.bullet} ${BOLD}${skill.name}${RESET} (skill): ${skill.description}`);
|
|
16721
|
+
}
|
|
16722
|
+
for (const command of CUSTOM_COMMANDS) {
|
|
16723
|
+
console.log(` ${SYMBOLS.bullet} ${BOLD}/${command.name}${RESET} (command): ${command.description}`);
|
|
16682
16724
|
}
|
|
16683
16725
|
console.log();
|
|
16684
|
-
customSkills = await askYesNo(rl, "Install custom skills?", "yes");
|
|
16726
|
+
customSkills = await askYesNo(rl, "Install custom skills & commands?", "yes");
|
|
16685
16727
|
console.log();
|
|
16686
16728
|
} else {
|
|
16687
16729
|
printInfo("Models-only mode: skipping plugin/auth setup and skills prompts.");
|
|
@@ -16738,6 +16780,8 @@ async function runInstall(config2) {
|
|
|
16738
16780
|
totalSteps += 1;
|
|
16739
16781
|
if (!modelsOnly && resolvedConfig.installCustomSkills)
|
|
16740
16782
|
totalSteps += 1;
|
|
16783
|
+
if (!modelsOnly && resolvedConfig.installCustomSkills)
|
|
16784
|
+
totalSteps += 1;
|
|
16741
16785
|
let step = 1;
|
|
16742
16786
|
if (modelsOnly) {
|
|
16743
16787
|
printInfo("Models-only mode: updating model assignments without reinstalling plugins/skills.");
|
|
@@ -16912,6 +16956,27 @@ ${JSON.stringify(liteConfig, null, 2)}
|
|
|
16912
16956
|
printSuccess(`${customSkillsInstalled}/${CUSTOM_SKILLS.length} custom skills installed`);
|
|
16913
16957
|
}
|
|
16914
16958
|
}
|
|
16959
|
+
if (!modelsOnly && resolvedConfig.installCustomSkills) {
|
|
16960
|
+
printStep(step++, totalSteps, "Installing custom commands...");
|
|
16961
|
+
if (resolvedConfig.dryRun) {
|
|
16962
|
+
printInfo("Dry run mode - would install custom commands:");
|
|
16963
|
+
for (const command of CUSTOM_COMMANDS) {
|
|
16964
|
+
printInfo(` - /${command.name}`);
|
|
16965
|
+
}
|
|
16966
|
+
} else {
|
|
16967
|
+
let commandsInstalled = 0;
|
|
16968
|
+
for (const command of CUSTOM_COMMANDS) {
|
|
16969
|
+
printInfo(`Installing /${command.name}...`);
|
|
16970
|
+
if (installCustomCommand(command)) {
|
|
16971
|
+
printSuccess(`Installed: /${command.name}`);
|
|
16972
|
+
commandsInstalled++;
|
|
16973
|
+
} else {
|
|
16974
|
+
printWarning(`Failed to install: /${command.name}`);
|
|
16975
|
+
}
|
|
16976
|
+
}
|
|
16977
|
+
printSuccess(`${commandsInstalled}/${CUSTOM_COMMANDS.length} custom commands installed`);
|
|
16978
|
+
}
|
|
16979
|
+
}
|
|
16915
16980
|
console.log();
|
|
16916
16981
|
console.log(formatConfigSummary(resolvedConfig));
|
|
16917
16982
|
console.log();
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Plugin } from '@opencode-ai/plugin';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const OhMyGroundControl: Plugin;
|
|
3
|
+
export default OhMyGroundControl;
|
|
4
4
|
export type { AgentName, AgentOverrideConfig, HashlineEditConfig, McpName, PluginConfig, SessionExportConfig, TmuxConfig, TmuxLayout, } from './config';
|
|
5
5
|
export type { RemoteMcpConfig } from './mcp';
|
package/dist/index.js
CHANGED
|
@@ -39318,7 +39318,7 @@ var lsp_rename = tool({
|
|
|
39318
39318
|
}
|
|
39319
39319
|
});
|
|
39320
39320
|
// src/index.ts
|
|
39321
|
-
var
|
|
39321
|
+
var OhMyGroundControl = async (ctx) => {
|
|
39322
39322
|
const config3 = loadPluginConfig(ctx.directory);
|
|
39323
39323
|
const agentDefs = createAgents(config3);
|
|
39324
39324
|
const agents = getAgentConfigs(config3);
|
|
@@ -39473,7 +39473,7 @@ var OhMyOpenCodeLite = async (ctx) => {
|
|
|
39473
39473
|
}
|
|
39474
39474
|
};
|
|
39475
39475
|
};
|
|
39476
|
-
var src_default =
|
|
39476
|
+
var src_default = OhMyGroundControl;
|
|
39477
39477
|
export {
|
|
39478
39478
|
src_default as default
|
|
39479
39479
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frenchtoastman/oh-my-groundcontrol",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "An OpenCode plugin for multi-agent orchestration for structured planning with NASA-style guardrails.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|