@orderful/droid 0.16.0 ā 0.16.1
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/.claude/CLAUDE.md +3 -43
- package/AGENTS.md +75 -0
- package/CHANGELOG.md +12 -0
- package/dist/bin/droid.js +3064 -54
- package/dist/index.js +952 -6
- package/package.json +2 -2
- package/scripts/build.ts +78 -0
- package/dist/bin/droid.js.map +0 -1
- package/dist/commands/config.js +0 -67
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/install.js +0 -45
- package/dist/commands/install.js.map +0 -1
- package/dist/commands/setup.js +0 -269
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/skills.js +0 -144
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/tui/components/Badge.js +0 -29
- package/dist/commands/tui/components/Badge.js.map +0 -1
- package/dist/commands/tui/components/Markdown.js +0 -42
- package/dist/commands/tui/components/Markdown.js.map +0 -1
- package/dist/commands/tui/components/SettingsDetails.js +0 -11
- package/dist/commands/tui/components/SettingsDetails.js.map +0 -1
- package/dist/commands/tui/components/TabBar.js +0 -7
- package/dist/commands/tui/components/TabBar.js.map +0 -1
- package/dist/commands/tui/components/ToolDetails.js +0 -35
- package/dist/commands/tui/components/ToolDetails.js.map +0 -1
- package/dist/commands/tui/components/ToolItem.js +0 -11
- package/dist/commands/tui/components/ToolItem.js.map +0 -1
- package/dist/commands/tui/constants.js +0 -17
- package/dist/commands/tui/constants.js.map +0 -1
- package/dist/commands/tui/hooks/useAppUpdate.js +0 -52
- package/dist/commands/tui/hooks/useAppUpdate.js.map +0 -1
- package/dist/commands/tui/hooks/useToolUpdates.js +0 -77
- package/dist/commands/tui/hooks/useToolUpdates.js.map +0 -1
- package/dist/commands/tui/types.js +0 -2
- package/dist/commands/tui/types.js.map +0 -1
- package/dist/commands/tui/views/ReadmeViewer.js +0 -56
- package/dist/commands/tui/views/ReadmeViewer.js.map +0 -1
- package/dist/commands/tui/views/SetupScreen.js +0 -114
- package/dist/commands/tui/views/SetupScreen.js.map +0 -1
- package/dist/commands/tui/views/SkillConfigScreen.js +0 -148
- package/dist/commands/tui/views/SkillConfigScreen.js.map +0 -1
- package/dist/commands/tui/views/ToolExplorer.js +0 -86
- package/dist/commands/tui/views/ToolExplorer.js.map +0 -1
- package/dist/commands/tui/views/ToolUpdatePrompt.js +0 -38
- package/dist/commands/tui/views/ToolUpdatePrompt.js.map +0 -1
- package/dist/commands/tui/views/WelcomeScreen.js +0 -46
- package/dist/commands/tui/views/WelcomeScreen.js.map +0 -1
- package/dist/commands/tui.js +0 -307
- package/dist/commands/tui.js.map +0 -1
- package/dist/commands/uninstall.js +0 -26
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/commands/update.js +0 -45
- package/dist/commands/update.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/agents.js +0 -248
- package/dist/lib/agents.js.map +0 -1
- package/dist/lib/config.js +0 -196
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/platforms.js +0 -52
- package/dist/lib/platforms.js.map +0 -1
- package/dist/lib/quotes.js +0 -24
- package/dist/lib/quotes.js.map +0 -1
- package/dist/lib/skill-config.js +0 -80
- package/dist/lib/skill-config.js.map +0 -1
- package/dist/lib/skills.js +0 -582
- package/dist/lib/skills.js.map +0 -1
- package/dist/lib/tools.js +0 -145
- package/dist/lib/tools.js.map +0 -1
- package/dist/lib/types.js +0 -50
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/version.js +0 -100
- package/dist/lib/version.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orderful/droid",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "AI workflow toolkit for sharing skills, commands, and agents across the team",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "
|
|
11
|
+
"build": "bun run lint && bun scripts/build.ts",
|
|
12
12
|
"dev": "tsc --watch",
|
|
13
13
|
"start": "bun dist/bin/droid.js",
|
|
14
14
|
"test": "bun test src/",
|
package/scripts/build.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Build script using esbuild for proper ESM bundling
|
|
4
|
+
*
|
|
5
|
+
* This bundles the CLI entry point so Node ESM can resolve imports
|
|
6
|
+
* without explicit .js extensions (which TypeScript doesn't add).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { build, type Plugin } from 'esbuild';
|
|
10
|
+
import { execSync } from 'child_process';
|
|
11
|
+
import { cpSync, rmSync } from 'fs';
|
|
12
|
+
|
|
13
|
+
// Plugin to stub out optional dependencies that may not be installed
|
|
14
|
+
const stubOptionalDeps: Plugin = {
|
|
15
|
+
name: 'stub-optional-deps',
|
|
16
|
+
setup(build) {
|
|
17
|
+
// Stub react-devtools-core (optional Ink dependency for debugging)
|
|
18
|
+
build.onResolve({ filter: /^react-devtools-core$/ }, () => ({
|
|
19
|
+
path: 'react-devtools-core',
|
|
20
|
+
namespace: 'stub',
|
|
21
|
+
}));
|
|
22
|
+
build.onLoad({ filter: /.*/, namespace: 'stub' }, () => ({
|
|
23
|
+
contents: 'export default undefined; export const connectToDevTools = () => {};',
|
|
24
|
+
}));
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
async function main() {
|
|
29
|
+
// Clean dist
|
|
30
|
+
rmSync('dist', { recursive: true, force: true });
|
|
31
|
+
|
|
32
|
+
// Run TypeScript for type checking and declaration files
|
|
33
|
+
console.log('Running TypeScript type check...');
|
|
34
|
+
execSync('tsc --emitDeclarationOnly', { stdio: 'inherit' });
|
|
35
|
+
|
|
36
|
+
// Bundle CLI with esbuild
|
|
37
|
+
console.log('Bundling CLI with esbuild...');
|
|
38
|
+
await build({
|
|
39
|
+
entryPoints: ['src/bin/droid.ts'],
|
|
40
|
+
bundle: true,
|
|
41
|
+
platform: 'node',
|
|
42
|
+
target: 'node18',
|
|
43
|
+
format: 'esm',
|
|
44
|
+
outfile: 'dist/bin/droid.js',
|
|
45
|
+
// Note: shebang is preserved from source file, no banner needed
|
|
46
|
+
plugins: [stubOptionalDeps],
|
|
47
|
+
// Keep npm dependencies external - they'll be installed via package.json
|
|
48
|
+
// Only bundle our own code to fix ESM import resolution
|
|
49
|
+
packages: 'external',
|
|
50
|
+
// Handle React JSX
|
|
51
|
+
jsx: 'automatic',
|
|
52
|
+
jsxImportSource: 'react',
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Bundle index.ts for library exports
|
|
56
|
+
console.log('Bundling library exports...');
|
|
57
|
+
await build({
|
|
58
|
+
entryPoints: ['src/index.ts'],
|
|
59
|
+
bundle: true,
|
|
60
|
+
platform: 'node',
|
|
61
|
+
target: 'node18',
|
|
62
|
+
format: 'esm',
|
|
63
|
+
outfile: 'dist/index.js',
|
|
64
|
+
plugins: [stubOptionalDeps],
|
|
65
|
+
packages: 'external',
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// Copy tools directory
|
|
69
|
+
console.log('Copying tools...');
|
|
70
|
+
cpSync('src/tools', 'dist/tools', { recursive: true });
|
|
71
|
+
|
|
72
|
+
console.log('Build complete!');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
main().catch((err) => {
|
|
76
|
+
console.error(err);
|
|
77
|
+
process.exit(1);
|
|
78
|
+
});
|
package/dist/bin/droid.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"droid.js","sourceRoot":"","sources":["../../src/bin/droid.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa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AQ,CAAC;KACjB,WAAW,CAAC,kCAAkC,CAAC;KAC/C,MAAM,CAAC,SAAS,EAAE,mBAAmB,CAAC;KACtC,MAAM,CAAC,OAAO,EAAE,qBAAqB,CAAC;KACtC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;KAC5C,MAAM,CAAC,aAAa,CAAC,CAAC;AAEzB,OAAO;KACJ,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,kCAAkC,CAAC;KAC/C,MAAM,CAAC,UAAU,CAAC,CAAC;AAEtB,qCAAqC;AACrC,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;IAC9B,UAAU,EAAE,CAAC;AACf,CAAC;KAAM,CAAC;IACN,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,CAAC"}
|
package/dist/commands/config.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { execSync } from 'child_process';
|
|
3
|
-
import { loadConfig, getConfigPath, getConfigValue, setConfigValue, configExists, } from '../lib/config';
|
|
4
|
-
export async function configCommand(options) {
|
|
5
|
-
// Handle --edit flag
|
|
6
|
-
if (options.edit) {
|
|
7
|
-
const configPath = getConfigPath();
|
|
8
|
-
const editor = process.env.EDITOR || 'vim';
|
|
9
|
-
if (!configExists()) {
|
|
10
|
-
console.log(chalk.yellow('No config file exists yet. Run `droid setup` first.'));
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
console.log(chalk.gray(`Opening ${configPath} in ${editor}...`));
|
|
14
|
-
try {
|
|
15
|
-
execSync(`${editor} "${configPath}"`, { stdio: 'inherit' });
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
console.error(chalk.red('Failed to open editor'));
|
|
19
|
-
}
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
// Handle --get flag
|
|
23
|
-
if (options.get) {
|
|
24
|
-
const value = getConfigValue(options.get);
|
|
25
|
-
if (value === undefined) {
|
|
26
|
-
console.log(chalk.yellow(`Config key '${options.get}' not found`));
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
29
|
-
if (typeof value === 'object') {
|
|
30
|
-
console.log(JSON.stringify(value, null, 2));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
console.log(value);
|
|
34
|
-
}
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
// Handle --set flag
|
|
38
|
-
if (options.set) {
|
|
39
|
-
const match = options.set.match(/^([^=]+)=(.*)$/);
|
|
40
|
-
if (!match) {
|
|
41
|
-
console.error(chalk.red('Invalid format. Use: --set key=value'));
|
|
42
|
-
process.exit(1);
|
|
43
|
-
}
|
|
44
|
-
const [, key, rawValue] = match;
|
|
45
|
-
// Try to parse as JSON, otherwise use as string
|
|
46
|
-
let value;
|
|
47
|
-
try {
|
|
48
|
-
value = JSON.parse(rawValue);
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
value = rawValue;
|
|
52
|
-
}
|
|
53
|
-
setConfigValue(key, value);
|
|
54
|
-
console.log(chalk.green(`ā Set ${key} = ${JSON.stringify(value)}`));
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
// Default: show full config
|
|
58
|
-
if (!configExists()) {
|
|
59
|
-
console.log(chalk.yellow('No config file exists yet. Run `droid setup` first.'));
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const config = loadConfig();
|
|
63
|
-
console.log(chalk.bold('\nš Droid Config\n'));
|
|
64
|
-
console.log(chalk.gray(`Path: ${getConfigPath()}\n`));
|
|
65
|
-
console.log(JSON.stringify(config, null, 2));
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EA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C,CAAC,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/commands/install.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { installSkill } from '../lib/skills';
|
|
3
|
-
import { getBundledTools, isToolInstalled } from '../lib/tools';
|
|
4
|
-
import { promptForSkillConfig } from '../lib/skill-config';
|
|
5
|
-
export async function installCommand(toolName) {
|
|
6
|
-
// Check if tool exists
|
|
7
|
-
const tools = getBundledTools();
|
|
8
|
-
const tool = tools.find((t) => t.name === toolName);
|
|
9
|
-
if (!tool) {
|
|
10
|
-
console.error(chalk.red(`\nā Tool '${toolName}' not found`));
|
|
11
|
-
console.log(chalk.gray('\nAvailable tools:'));
|
|
12
|
-
for (const t of tools) {
|
|
13
|
-
console.log(chalk.gray(` - ${t.name}`));
|
|
14
|
-
}
|
|
15
|
-
process.exit(1);
|
|
16
|
-
}
|
|
17
|
-
// Check if already installed
|
|
18
|
-
if (isToolInstalled(toolName)) {
|
|
19
|
-
console.log(chalk.yellow(`\nā Tool '${toolName}' is already installed`));
|
|
20
|
-
console.log(chalk.gray('Use `droid update` to update it, or uninstall first.'));
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
console.log(chalk.bold(`\nš¤ Installing ${toolName}...\n`));
|
|
24
|
-
// Install via primary skill
|
|
25
|
-
const primarySkill = tool.includes.skills.find(s => s.required)?.name || toolName;
|
|
26
|
-
const result = installSkill(primarySkill);
|
|
27
|
-
if (result.success) {
|
|
28
|
-
console.log(chalk.green(`ā Installed ${toolName}`));
|
|
29
|
-
// Check if tool has configurable options
|
|
30
|
-
if (tool.config_schema && Object.keys(tool.config_schema).length > 0) {
|
|
31
|
-
// If any config option lacks a default, go straight to config (it's required)
|
|
32
|
-
const hasRequiredConfig = Object.values(tool.config_schema).some((option) => option.default === undefined);
|
|
33
|
-
await promptForSkillConfig(primarySkill, tool.config_schema, !hasRequiredConfig);
|
|
34
|
-
}
|
|
35
|
-
// Show next steps
|
|
36
|
-
console.log(chalk.gray('\nNext steps:'));
|
|
37
|
-
console.log(chalk.gray(' - Run your AI tool to start using it'));
|
|
38
|
-
console.log(chalk.gray(` - Reconfigure anytime with \`droid\` ā Configure`));
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
console.error(chalk.red(`ā ${result.message}`));
|
|
42
|
-
process.exit(1);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=install.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,QAAgB;IACnD,uBAAuB;IACvB,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IAEpD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,QAAQ,aAAa,CAAC,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC;QAC9C,KAA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,CACzC,CAAC;YACF,MAAM,oBAAoB,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,iBAAiB,CAAC,CAAC;QACnF,CAAC;QAED,kBAAkB;QAClB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC,CAAC;IAChF,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/commands/setup.js
DELETED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import inquirer from 'inquirer';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { execSync } from 'child_process';
|
|
4
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
5
|
-
import { join } from 'path';
|
|
6
|
-
import { homedir } from 'os';
|
|
7
|
-
import { loadConfig, saveConfig, configExists } from '../lib/config';
|
|
8
|
-
import { getBundledSkills } from '../lib/skills';
|
|
9
|
-
import { Platform, BuiltInOutput } from '../lib/types';
|
|
10
|
-
/**
|
|
11
|
-
* Permissions droid needs to operate without constant prompts
|
|
12
|
-
*/
|
|
13
|
-
const DROID_PERMISSIONS = [
|
|
14
|
-
'Read(~/.droid/**)',
|
|
15
|
-
'Write(~/.droid/**)',
|
|
16
|
-
'Edit(~/.droid/**)',
|
|
17
|
-
'Glob(~/.droid/**)',
|
|
18
|
-
'Grep(~/.droid/**)',
|
|
19
|
-
];
|
|
20
|
-
/**
|
|
21
|
-
* Detect which platform is installed
|
|
22
|
-
*/
|
|
23
|
-
function detectPlatform() {
|
|
24
|
-
try {
|
|
25
|
-
execSync('claude --version', { stdio: 'ignore' });
|
|
26
|
-
return Platform.ClaudeCode;
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
// Claude Code not found
|
|
30
|
-
}
|
|
31
|
-
try {
|
|
32
|
-
execSync('opencode --version', { stdio: 'ignore' });
|
|
33
|
-
return Platform.OpenCode;
|
|
34
|
-
}
|
|
35
|
-
catch {
|
|
36
|
-
// OpenCode not found
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Try to get git username
|
|
42
|
-
*/
|
|
43
|
-
function detectGitUsername() {
|
|
44
|
-
try {
|
|
45
|
-
return execSync('git config user.name', { encoding: 'utf-8' }).trim();
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
48
|
-
return '';
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* The opencode-skills plugin name for OpenCode
|
|
53
|
-
* This plugin enables Claude Code-style skills in OpenCode
|
|
54
|
-
* @see https://github.com/malhashemi/opencode-skills
|
|
55
|
-
*/
|
|
56
|
-
const OPENCODE_SKILLS_PLUGIN = 'opencode-skills';
|
|
57
|
-
/**
|
|
58
|
-
* Configure platform permissions for droid
|
|
59
|
-
*/
|
|
60
|
-
export function configurePlatformPermissions(platform) {
|
|
61
|
-
const added = [];
|
|
62
|
-
if (platform === Platform.ClaudeCode) {
|
|
63
|
-
const settingsPath = join(homedir(), '.claude', 'settings.json');
|
|
64
|
-
// Ensure .claude directory exists
|
|
65
|
-
const claudeDir = join(homedir(), '.claude');
|
|
66
|
-
if (!existsSync(claudeDir)) {
|
|
67
|
-
mkdirSync(claudeDir, { recursive: true });
|
|
68
|
-
}
|
|
69
|
-
// Load or create settings
|
|
70
|
-
let settings = {};
|
|
71
|
-
if (existsSync(settingsPath)) {
|
|
72
|
-
try {
|
|
73
|
-
settings = JSON.parse(readFileSync(settingsPath, 'utf-8'));
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
console.warn(chalk.yellow('ā Claude Code settings.json appears corrupted, resetting permissions'));
|
|
77
|
-
settings = {};
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
// Ensure permissions structure exists
|
|
81
|
-
if (!settings.permissions) {
|
|
82
|
-
settings.permissions = {};
|
|
83
|
-
}
|
|
84
|
-
if (!Array.isArray(settings.permissions.allow)) {
|
|
85
|
-
settings.permissions.allow = [];
|
|
86
|
-
}
|
|
87
|
-
// Add missing permissions
|
|
88
|
-
for (const perm of DROID_PERMISSIONS) {
|
|
89
|
-
if (!settings.permissions.allow.includes(perm)) {
|
|
90
|
-
settings.permissions.allow.push(perm);
|
|
91
|
-
added.push(perm);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// Save if we added anything
|
|
95
|
-
if (added.length > 0) {
|
|
96
|
-
try {
|
|
97
|
-
writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n', 'utf-8');
|
|
98
|
-
}
|
|
99
|
-
catch (e) {
|
|
100
|
-
const message = e instanceof Error ? e.message : 'Unknown error';
|
|
101
|
-
return { added: [], alreadyPresent: false, error: `Failed to update Claude Code settings: ${message}` };
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return { added, alreadyPresent: added.length === 0 };
|
|
105
|
-
}
|
|
106
|
-
if (platform === Platform.OpenCode) {
|
|
107
|
-
// OpenCode uses opencode.json for config
|
|
108
|
-
// Check global config location: ~/.config/opencode/opencode.json
|
|
109
|
-
const globalConfigDir = join(homedir(), '.config', 'opencode');
|
|
110
|
-
const globalConfigPath = join(globalConfigDir, 'opencode.json');
|
|
111
|
-
// Ensure config directory exists
|
|
112
|
-
if (!existsSync(globalConfigDir)) {
|
|
113
|
-
mkdirSync(globalConfigDir, { recursive: true });
|
|
114
|
-
}
|
|
115
|
-
// Load or create config
|
|
116
|
-
let config = {};
|
|
117
|
-
if (existsSync(globalConfigPath)) {
|
|
118
|
-
try {
|
|
119
|
-
config = JSON.parse(readFileSync(globalConfigPath, 'utf-8'));
|
|
120
|
-
}
|
|
121
|
-
catch {
|
|
122
|
-
console.warn(chalk.yellow('ā OpenCode config appears corrupted, resetting'));
|
|
123
|
-
config = {};
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
// Ensure plugin array exists
|
|
127
|
-
if (!Array.isArray(config.plugin)) {
|
|
128
|
-
config.plugin = [];
|
|
129
|
-
}
|
|
130
|
-
// Add opencode-skills plugin if not present
|
|
131
|
-
if (!config.plugin.includes(OPENCODE_SKILLS_PLUGIN)) {
|
|
132
|
-
config.plugin.push(OPENCODE_SKILLS_PLUGIN);
|
|
133
|
-
added.push(OPENCODE_SKILLS_PLUGIN);
|
|
134
|
-
}
|
|
135
|
-
// Save if we added anything
|
|
136
|
-
if (added.length > 0) {
|
|
137
|
-
try {
|
|
138
|
-
writeFileSync(globalConfigPath, JSON.stringify(config, null, 2) + '\n', 'utf-8');
|
|
139
|
-
}
|
|
140
|
-
catch (e) {
|
|
141
|
-
const message = e instanceof Error ? e.message : 'Unknown error';
|
|
142
|
-
return { added: [], alreadyPresent: false, error: `Failed to update OpenCode config: ${message}` };
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return { added, alreadyPresent: added.length === 0 };
|
|
146
|
-
}
|
|
147
|
-
return { added: [], alreadyPresent: true };
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Get available output options (built-in + skills that provide output)
|
|
151
|
-
*/
|
|
152
|
-
function getOutputOptions() {
|
|
153
|
-
const options = [
|
|
154
|
-
{ name: 'Terminal (display in CLI)', value: BuiltInOutput.Terminal },
|
|
155
|
-
{ name: 'Editor ($EDITOR)', value: BuiltInOutput.Editor },
|
|
156
|
-
];
|
|
157
|
-
// Add skills that provide output targets
|
|
158
|
-
const skills = getBundledSkills();
|
|
159
|
-
for (const skill of skills) {
|
|
160
|
-
if (skill.provides_output) {
|
|
161
|
-
options.push({
|
|
162
|
-
name: `${skill.name} (${skill.description})`,
|
|
163
|
-
value: skill.name,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return options;
|
|
168
|
-
}
|
|
169
|
-
export async function setupCommand() {
|
|
170
|
-
console.log(chalk.bold('\nš¤ Droid Setup\n'));
|
|
171
|
-
const hasExistingConfig = configExists();
|
|
172
|
-
if (hasExistingConfig) {
|
|
173
|
-
const { overwrite } = await inquirer.prompt([
|
|
174
|
-
{
|
|
175
|
-
type: 'confirm',
|
|
176
|
-
name: 'overwrite',
|
|
177
|
-
message: 'Config already exists. Overwrite?',
|
|
178
|
-
default: false,
|
|
179
|
-
},
|
|
180
|
-
]);
|
|
181
|
-
if (!overwrite) {
|
|
182
|
-
console.log(chalk.gray('Setup cancelled.'));
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
// Detect platform
|
|
187
|
-
const detectedPlatform = detectPlatform();
|
|
188
|
-
if (detectedPlatform) {
|
|
189
|
-
console.log(chalk.green(`ā Detected ${detectedPlatform}\n`));
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
console.log(chalk.yellow('ā No platform detected (Claude Code or OpenCode)\n'));
|
|
193
|
-
}
|
|
194
|
-
// Detect git username
|
|
195
|
-
const detectedGitUsername = detectGitUsername();
|
|
196
|
-
// Get dynamic output options
|
|
197
|
-
const outputOptions = getOutputOptions();
|
|
198
|
-
const answers = await inquirer.prompt([
|
|
199
|
-
{
|
|
200
|
-
type: 'list',
|
|
201
|
-
name: 'platform',
|
|
202
|
-
message: 'Which platform are you using?',
|
|
203
|
-
choices: [
|
|
204
|
-
{ name: 'Claude Code', value: Platform.ClaudeCode },
|
|
205
|
-
{ name: 'OpenCode', value: Platform.OpenCode },
|
|
206
|
-
],
|
|
207
|
-
default: detectedPlatform || Platform.ClaudeCode,
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
type: 'input',
|
|
211
|
-
name: 'user_mention',
|
|
212
|
-
message: 'What @mention should be used for you?',
|
|
213
|
-
default: '@user',
|
|
214
|
-
filter: (input) => {
|
|
215
|
-
// Auto-add @ prefix if missing
|
|
216
|
-
return input.startsWith('@') ? input : `@${input}`;
|
|
217
|
-
},
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
type: 'list',
|
|
221
|
-
name: 'output_preference',
|
|
222
|
-
message: 'Default output preference for skill results?',
|
|
223
|
-
choices: outputOptions,
|
|
224
|
-
default: BuiltInOutput.Terminal,
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
type: 'input',
|
|
228
|
-
name: 'git_username',
|
|
229
|
-
message: 'Git username for attribution?',
|
|
230
|
-
default: detectedGitUsername || '',
|
|
231
|
-
},
|
|
232
|
-
]);
|
|
233
|
-
const existingConfig = loadConfig();
|
|
234
|
-
const config = {
|
|
235
|
-
...existingConfig,
|
|
236
|
-
platform: answers.platform,
|
|
237
|
-
user_mention: answers.user_mention,
|
|
238
|
-
output_preference: answers.output_preference,
|
|
239
|
-
git_username: answers.git_username,
|
|
240
|
-
};
|
|
241
|
-
saveConfig(config);
|
|
242
|
-
console.log(chalk.green('\nā Config saved to ~/.droid/config.yaml'));
|
|
243
|
-
// Configure platform permissions/plugins
|
|
244
|
-
const { added, alreadyPresent, error } = configurePlatformPermissions(answers.platform);
|
|
245
|
-
if (error) {
|
|
246
|
-
console.log(chalk.red(`ā ${error}`));
|
|
247
|
-
console.log(chalk.yellow(' You may need to manually configure your platform'));
|
|
248
|
-
}
|
|
249
|
-
else if (answers.platform === Platform.ClaudeCode) {
|
|
250
|
-
if (added.length > 0) {
|
|
251
|
-
console.log(chalk.green(`ā Added droid permissions to Claude Code settings`));
|
|
252
|
-
}
|
|
253
|
-
else if (alreadyPresent) {
|
|
254
|
-
console.log(chalk.gray(` Droid permissions already configured in Claude Code`));
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
else if (answers.platform === Platform.OpenCode) {
|
|
258
|
-
if (added.length > 0) {
|
|
259
|
-
console.log(chalk.green(`ā Added opencode-skills plugin to OpenCode config`));
|
|
260
|
-
console.log(chalk.gray(` This enables Claude Code-style skills in OpenCode`));
|
|
261
|
-
console.log(chalk.gray(` Restart OpenCode to activate the plugin`));
|
|
262
|
-
}
|
|
263
|
-
else if (alreadyPresent) {
|
|
264
|
-
console.log(chalk.gray(` opencode-skills plugin already configured in OpenCode`));
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
console.log(chalk.gray('\nRun `droid skills` to browse and install skills.'));
|
|
268
|
-
}
|
|
269
|
-
//# sourceMappingURL=setup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAA2C,MAAM,cAAc,CAAC;AAEhG;;GAEG;AACH,MAAM,iBAAiB,GAAG;IACxB,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;CACpB,CAAC;AAEF;;GAEG;AACH,SAAS,cAAc;IACrB,IAAI,CAAC;QACH,QAAQ,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QAClD,OA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 +0,0 @@
|
|
|
1
|
-
import inquirer from 'inquirer';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { installSkill, uninstallSkill } from '../lib/skills';
|
|
4
|
-
import { getBundledTools, isToolInstalled, getInstalledToolVersion } from '../lib/tools';
|
|
5
|
-
import { promptForSkillConfig } from '../lib/skill-config';
|
|
6
|
-
import { SkillStatus } from '../lib/types';
|
|
7
|
-
function formatToolChoice(tool) {
|
|
8
|
-
const installed = isToolInstalled(tool.name);
|
|
9
|
-
const installedVersion = getInstalledToolVersion(tool.name);
|
|
10
|
-
let line = `${tool.name}`;
|
|
11
|
-
if (installed && installedVersion) {
|
|
12
|
-
line += chalk.green(` [installed] v${installedVersion}`);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
line += chalk.gray(` v${tool.version}`);
|
|
16
|
-
}
|
|
17
|
-
if (tool.status) {
|
|
18
|
-
const statusColor = tool.status === SkillStatus.Alpha
|
|
19
|
-
? chalk.red
|
|
20
|
-
: tool.status === SkillStatus.Beta
|
|
21
|
-
? chalk.yellow
|
|
22
|
-
: chalk.white;
|
|
23
|
-
line += statusColor(` [${tool.status}]`);
|
|
24
|
-
}
|
|
25
|
-
return line;
|
|
26
|
-
}
|
|
27
|
-
export async function skillsCommand() {
|
|
28
|
-
const tools = getBundledTools();
|
|
29
|
-
if (tools.length === 0) {
|
|
30
|
-
console.log(chalk.yellow('\nNo tools available yet.'));
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
console.log(chalk.bold('\nš¤ Available Tools\n'));
|
|
34
|
-
const toolChoices = tools.map((tool) => ({
|
|
35
|
-
name: formatToolChoice(tool),
|
|
36
|
-
value: tool.name,
|
|
37
|
-
short: tool.name,
|
|
38
|
-
}));
|
|
39
|
-
const choices = [
|
|
40
|
-
{
|
|
41
|
-
name: chalk.gray('ā Exit'),
|
|
42
|
-
value: '__exit__',
|
|
43
|
-
short: 'Exit',
|
|
44
|
-
},
|
|
45
|
-
...toolChoices,
|
|
46
|
-
];
|
|
47
|
-
const { selectedTool } = await inquirer.prompt([
|
|
48
|
-
{
|
|
49
|
-
type: 'list',
|
|
50
|
-
name: 'selectedTool',
|
|
51
|
-
message: 'Select a tool to view details or install:',
|
|
52
|
-
choices,
|
|
53
|
-
pageSize: 15,
|
|
54
|
-
},
|
|
55
|
-
]);
|
|
56
|
-
if (selectedTool === '__exit__') {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const tool = tools.find((t) => t.name === selectedTool);
|
|
60
|
-
if (!tool) {
|
|
61
|
-
console.error(chalk.red('Tool not found'));
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
// Show tool details
|
|
65
|
-
console.log(chalk.bold(`\nš¦ ${tool.name}`));
|
|
66
|
-
console.log(chalk.gray(`Version: ${tool.version}`));
|
|
67
|
-
if (tool.status) {
|
|
68
|
-
console.log(chalk.gray(`Status: ${tool.status}`));
|
|
69
|
-
}
|
|
70
|
-
console.log(`\n${tool.description}`);
|
|
71
|
-
// Show what the tool includes
|
|
72
|
-
const skillNames = tool.includes.skills.map(s => s.name);
|
|
73
|
-
const commandNames = tool.includes.commands.map(c => `/${c}`);
|
|
74
|
-
const agentNames = tool.includes.agents;
|
|
75
|
-
if (skillNames.length > 0) {
|
|
76
|
-
console.log(chalk.gray(`\nSkills: ${skillNames.join(', ')}`));
|
|
77
|
-
}
|
|
78
|
-
if (commandNames.length > 0) {
|
|
79
|
-
console.log(chalk.gray(`Commands: ${commandNames.join(', ')}`));
|
|
80
|
-
}
|
|
81
|
-
if (agentNames.length > 0) {
|
|
82
|
-
console.log(chalk.gray(`Agents: ${agentNames.join(', ')}`));
|
|
83
|
-
}
|
|
84
|
-
const installed = isToolInstalled(tool.name);
|
|
85
|
-
const primarySkill = tool.includes.skills.find(s => s.required)?.name || tool.name;
|
|
86
|
-
const actions = installed
|
|
87
|
-
? [
|
|
88
|
-
{ name: 'ā Back', value: 'back' },
|
|
89
|
-
{ name: 'Configure', value: 'configure' },
|
|
90
|
-
{ name: 'Uninstall', value: 'uninstall' },
|
|
91
|
-
]
|
|
92
|
-
: [
|
|
93
|
-
{ name: 'ā Back', value: 'back' },
|
|
94
|
-
{ name: 'Install', value: 'install' },
|
|
95
|
-
];
|
|
96
|
-
const { action } = await inquirer.prompt([
|
|
97
|
-
{
|
|
98
|
-
type: 'list',
|
|
99
|
-
name: 'action',
|
|
100
|
-
message: 'What would you like to do?',
|
|
101
|
-
choices: actions,
|
|
102
|
-
},
|
|
103
|
-
]);
|
|
104
|
-
switch (action) {
|
|
105
|
-
case 'install': {
|
|
106
|
-
const result = installSkill(primarySkill);
|
|
107
|
-
if (result.success) {
|
|
108
|
-
console.log(chalk.green(`\nā Installed ${tool.name}`));
|
|
109
|
-
// Prompt for config if tool has options
|
|
110
|
-
if (tool.config_schema && Object.keys(tool.config_schema).length > 0) {
|
|
111
|
-
const hasRequiredConfig = Object.values(tool.config_schema).some((option) => option.default === undefined);
|
|
112
|
-
await promptForSkillConfig(primarySkill, tool.config_schema, !hasRequiredConfig);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
console.log(chalk.red(`\nā ${result.message}`));
|
|
117
|
-
}
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
case 'configure': {
|
|
121
|
-
if (tool.config_schema && Object.keys(tool.config_schema).length > 0) {
|
|
122
|
-
await promptForSkillConfig(primarySkill, tool.config_schema, false);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
console.log(chalk.gray('\nThis tool has no configuration options.'));
|
|
126
|
-
}
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
case 'uninstall': {
|
|
130
|
-
const result = uninstallSkill(primarySkill);
|
|
131
|
-
if (result.success) {
|
|
132
|
-
console.log(chalk.green(`\nā Uninstalled ${tool.name}`));
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
console.log(chalk.red(`\nā ${result.message}`));
|
|
136
|
-
}
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
case 'back':
|
|
140
|
-
await skillsCommand();
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
//# sourceMappingURL=skills.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/commands/skills.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAqB,MAAM,cAAc,CAAC;AAE9D,SAAS,gBAAgB,CAAC,IAAkB;IAC1C,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE5D,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAE1B,IAAI,SAAS,IAAI,gBAAgB,EAAE,CAAC;QAClC,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,iBAAiB,gBAAgB,EAAE,CAAC,CAAC;IAC3D,CAAC;SAAM,CAAC;QACN,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,MAAM,WAAW,GACf,IAAI,CAAC,MAAM,KAAK,WAAW,CAAC,KAAK;YAC/B,CAAC,CAAC,KAAK,CAAC,GAAG;YACX,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,WAAW,CAAC,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