@orderful/droid 0.15.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 +18 -40
- package/AGENTS.md +75 -0
- package/CHANGELOG.md +25 -0
- package/dist/bin/droid.js +3064 -54
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/tui/components/Badge.d.ts +13 -0
- package/dist/commands/tui/components/Badge.d.ts.map +1 -0
- package/dist/commands/tui/components/Markdown.d.ts +5 -0
- package/dist/commands/tui/components/Markdown.d.ts.map +1 -0
- package/dist/commands/tui/components/SettingsDetails.d.ts +5 -0
- package/dist/commands/tui/components/SettingsDetails.d.ts.map +1 -0
- package/dist/commands/tui/components/TabBar.d.ts +10 -0
- package/dist/commands/tui/components/TabBar.d.ts.map +1 -0
- package/dist/commands/tui/components/ToolDetails.d.ts +8 -0
- package/dist/commands/tui/components/ToolDetails.d.ts.map +1 -0
- package/dist/commands/tui/components/ToolItem.d.ts +9 -0
- package/dist/commands/tui/components/ToolItem.d.ts.map +1 -0
- package/dist/commands/tui/constants.d.ts +16 -0
- package/dist/commands/tui/constants.d.ts.map +1 -0
- package/dist/commands/tui/hooks/useAppUpdate.d.ts +13 -0
- package/dist/commands/tui/hooks/useAppUpdate.d.ts.map +1 -0
- package/dist/commands/tui/hooks/useToolUpdates.d.ts +22 -0
- package/dist/commands/tui/hooks/useToolUpdates.d.ts.map +1 -0
- package/dist/commands/tui/types.d.ts +5 -0
- package/dist/commands/tui/types.d.ts.map +1 -0
- package/dist/commands/tui/views/ReadmeViewer.d.ts +7 -0
- package/dist/commands/tui/views/ReadmeViewer.d.ts.map +1 -0
- package/dist/commands/tui/views/SetupScreen.d.ts +8 -0
- package/dist/commands/tui/views/SetupScreen.d.ts.map +1 -0
- package/dist/commands/tui/views/SkillConfigScreen.d.ts +8 -0
- package/dist/commands/tui/views/SkillConfigScreen.d.ts.map +1 -0
- package/dist/commands/tui/views/ToolExplorer.d.ts +8 -0
- package/dist/commands/tui/views/ToolExplorer.d.ts.map +1 -0
- package/dist/commands/tui/views/ToolUpdatePrompt.d.ts +10 -0
- package/dist/commands/tui/views/ToolUpdatePrompt.d.ts.map +1 -0
- package/dist/commands/tui/views/WelcomeScreen.d.ts +11 -0
- package/dist/commands/tui/views/WelcomeScreen.d.ts.map +1 -0
- package/dist/commands/tui.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +952 -6
- package/dist/lib/agents.d.ts +1 -1
- package/dist/lib/agents.d.ts.map +1 -1
- package/dist/lib/config.d.ts +1 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/platforms.d.ts +1 -1
- package/dist/lib/platforms.d.ts.map +1 -1
- package/dist/lib/skill-config.d.ts +1 -1
- package/dist/lib/skill-config.d.ts.map +1 -1
- package/dist/lib/skills.d.ts +1 -1
- package/dist/lib/skills.d.ts.map +1 -1
- package/dist/lib/tools.d.ts +1 -1
- package/dist/lib/tools.d.ts.map +1 -1
- package/package.json +3 -3
- package/scripts/build.ts +78 -0
- package/src/bin/droid.ts +8 -8
- package/src/commands/config.ts +1 -1
- package/src/commands/install.ts +3 -3
- package/src/commands/setup.test.ts +1 -1
- package/src/commands/setup.ts +3 -3
- package/src/commands/skills.ts +4 -4
- package/src/commands/tui/components/Badge.tsx +86 -0
- package/src/commands/tui/components/Markdown.tsx +48 -0
- package/src/commands/tui/components/SettingsDetails.tsx +70 -0
- package/src/commands/tui/components/TabBar.tsx +26 -0
- package/src/commands/tui/components/ToolDetails.tsx +117 -0
- package/src/commands/tui/components/ToolItem.tsx +39 -0
- package/src/commands/tui/constants.ts +17 -0
- package/src/commands/tui/hooks/useAppUpdate.ts +67 -0
- package/src/commands/tui/hooks/useToolUpdates.ts +110 -0
- package/src/commands/tui/types.ts +4 -0
- package/src/commands/tui/views/ReadmeViewer.tsx +93 -0
- package/src/commands/tui/views/SetupScreen.tsx +242 -0
- package/src/commands/tui/views/SkillConfigScreen.tsx +278 -0
- package/src/commands/tui/views/ToolExplorer.tsx +190 -0
- package/src/commands/tui/views/ToolUpdatePrompt.tsx +109 -0
- package/src/commands/tui/views/WelcomeScreen.tsx +149 -0
- package/src/commands/tui.tsx +65 -1587
- package/src/commands/uninstall.ts +2 -2
- package/src/commands/update.ts +1 -1
- package/src/index.ts +4 -4
- package/src/lib/agents.ts +4 -4
- package/src/lib/config.ts +1 -1
- package/src/lib/platforms.ts +1 -1
- package/src/lib/skill-config.ts +2 -2
- package/src/lib/skills.test.ts +2 -2
- package/src/lib/skills.ts +5 -5
- package/src/lib/tools.ts +3 -3
- package/src/lib/types.test.ts +1 -1
- package/src/lib/version.test.ts +1 -1
- 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.js +0 -1008
- 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/dist/lib/config.js
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
2
|
-
import { homedir } from 'os';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
import YAML from 'yaml';
|
|
5
|
-
import { Platform, BuiltInOutput } from './types.js';
|
|
6
|
-
const CONFIG_DIR = join(homedir(), '.droid');
|
|
7
|
-
const CONFIG_FILE = join(CONFIG_DIR, 'config.yaml');
|
|
8
|
-
const DEFAULT_AUTO_UPDATE = {
|
|
9
|
-
app: false, // Opt-in: user must enable
|
|
10
|
-
tools: true, // Opt-out: enabled by default (tools only update when app updates)
|
|
11
|
-
};
|
|
12
|
-
const DEFAULT_CONFIG = {
|
|
13
|
-
platform: Platform.ClaudeCode,
|
|
14
|
-
user_mention: '@user',
|
|
15
|
-
output_preference: BuiltInOutput.Terminal,
|
|
16
|
-
git_username: '',
|
|
17
|
-
platforms: {},
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Migrate legacy config (v1) to new config format (v2)
|
|
21
|
-
* v1: ai_tool + skills flat
|
|
22
|
-
* v2: platform + platforms map with per-platform tools
|
|
23
|
-
*/
|
|
24
|
-
function migrateConfig(config) {
|
|
25
|
-
// Check if this is a legacy config (has ai_tool, no platform)
|
|
26
|
-
if ('ai_tool' in config && !('platform' in config)) {
|
|
27
|
-
const legacyConfig = config;
|
|
28
|
-
return {
|
|
29
|
-
platform: legacyConfig.ai_tool,
|
|
30
|
-
user_mention: legacyConfig.user_mention ?? DEFAULT_CONFIG.user_mention,
|
|
31
|
-
output_preference: legacyConfig.output_preference ?? DEFAULT_CONFIG.output_preference,
|
|
32
|
-
git_username: legacyConfig.git_username ?? DEFAULT_CONFIG.git_username,
|
|
33
|
-
platforms: {
|
|
34
|
-
[legacyConfig.ai_tool]: {
|
|
35
|
-
tools: legacyConfig.skills ?? {},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
// Already new format, just ensure defaults
|
|
41
|
-
return {
|
|
42
|
-
...DEFAULT_CONFIG,
|
|
43
|
-
...config,
|
|
44
|
-
platforms: config.platforms ?? {},
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Ensure the config directory exists
|
|
49
|
-
*/
|
|
50
|
-
export function ensureConfigDir() {
|
|
51
|
-
if (!existsSync(CONFIG_DIR)) {
|
|
52
|
-
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Check if config file exists
|
|
57
|
-
*/
|
|
58
|
-
export function configExists() {
|
|
59
|
-
return existsSync(CONFIG_FILE);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Load the global config, or return defaults if none exists
|
|
63
|
-
* Automatically migrates legacy config format to new format
|
|
64
|
-
*/
|
|
65
|
-
export function loadConfig() {
|
|
66
|
-
ensureConfigDir();
|
|
67
|
-
if (!existsSync(CONFIG_FILE)) {
|
|
68
|
-
return { ...DEFAULT_CONFIG };
|
|
69
|
-
}
|
|
70
|
-
try {
|
|
71
|
-
const content = readFileSync(CONFIG_FILE, 'utf-8');
|
|
72
|
-
const rawConfig = YAML.parse(content);
|
|
73
|
-
// Check if migration is needed
|
|
74
|
-
// TODO: Remove after v0.14.0 (target: late Jan 2025)
|
|
75
|
-
const needsMigration = 'ai_tool' in rawConfig && !('platform' in rawConfig);
|
|
76
|
-
const config = migrateConfig(rawConfig);
|
|
77
|
-
// Save migrated config if it was migrated
|
|
78
|
-
if (needsMigration) {
|
|
79
|
-
saveConfig(config);
|
|
80
|
-
}
|
|
81
|
-
return config;
|
|
82
|
-
}
|
|
83
|
-
catch (error) {
|
|
84
|
-
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
85
|
-
console.error(`Error reading config: ${message}`);
|
|
86
|
-
return { ...DEFAULT_CONFIG };
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Save the global config
|
|
91
|
-
*/
|
|
92
|
-
export function saveConfig(config) {
|
|
93
|
-
ensureConfigDir();
|
|
94
|
-
const content = YAML.stringify(config, { indent: 2 });
|
|
95
|
-
writeFileSync(CONFIG_FILE, content, 'utf-8');
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Get a specific config value using dot notation
|
|
99
|
-
*/
|
|
100
|
-
export function getConfigValue(key) {
|
|
101
|
-
const config = loadConfig();
|
|
102
|
-
const keys = key.split('.');
|
|
103
|
-
let value = config;
|
|
104
|
-
for (const k of keys) {
|
|
105
|
-
if (value === undefined || value === null || typeof value !== 'object') {
|
|
106
|
-
return undefined;
|
|
107
|
-
}
|
|
108
|
-
value = value[k];
|
|
109
|
-
}
|
|
110
|
-
return value;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Set a specific config value using dot notation
|
|
114
|
-
*/
|
|
115
|
-
export function setConfigValue(key, value) {
|
|
116
|
-
const config = loadConfig();
|
|
117
|
-
const keys = key.split('.');
|
|
118
|
-
let current = config;
|
|
119
|
-
for (let i = 0; i < keys.length - 1; i++) {
|
|
120
|
-
if (current[keys[i]] === undefined) {
|
|
121
|
-
current[keys[i]] = {};
|
|
122
|
-
}
|
|
123
|
-
current = current[keys[i]];
|
|
124
|
-
}
|
|
125
|
-
current[keys[keys.length - 1]] = value;
|
|
126
|
-
saveConfig(config);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Get the path to the config file
|
|
130
|
-
*/
|
|
131
|
-
export function getConfigPath() {
|
|
132
|
-
return CONFIG_FILE;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Get the path to the config directory
|
|
136
|
-
*/
|
|
137
|
-
export function getConfigDir() {
|
|
138
|
-
return CONFIG_DIR;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Get skill-specific overrides path
|
|
142
|
-
*/
|
|
143
|
-
export function getSkillOverridesPath(skillName) {
|
|
144
|
-
return join(CONFIG_DIR, 'skills', skillName, 'overrides.yaml');
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Load skill-specific overrides
|
|
148
|
-
*/
|
|
149
|
-
export function loadSkillOverrides(skillName) {
|
|
150
|
-
const overridesPath = getSkillOverridesPath(skillName);
|
|
151
|
-
if (!existsSync(overridesPath)) {
|
|
152
|
-
return {};
|
|
153
|
-
}
|
|
154
|
-
try {
|
|
155
|
-
const content = readFileSync(overridesPath, 'utf-8');
|
|
156
|
-
return YAML.parse(content) || {};
|
|
157
|
-
}
|
|
158
|
-
catch {
|
|
159
|
-
return {};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Save skill-specific overrides
|
|
164
|
-
*/
|
|
165
|
-
export function saveSkillOverrides(skillName, overrides) {
|
|
166
|
-
const overridesPath = getSkillOverridesPath(skillName);
|
|
167
|
-
const skillDir = join(CONFIG_DIR, 'skills', skillName);
|
|
168
|
-
if (!existsSync(skillDir)) {
|
|
169
|
-
mkdirSync(skillDir, { recursive: true });
|
|
170
|
-
}
|
|
171
|
-
const content = YAML.stringify(overrides, { indent: 2 });
|
|
172
|
-
writeFileSync(overridesPath, content, 'utf-8');
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Get auto-update config with defaults applied
|
|
176
|
-
*/
|
|
177
|
-
export function getAutoUpdateConfig() {
|
|
178
|
-
const config = loadConfig();
|
|
179
|
-
return {
|
|
180
|
-
...DEFAULT_AUTO_UPDATE,
|
|
181
|
-
...config.auto_update,
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Update auto-update config
|
|
186
|
-
*/
|
|
187
|
-
export function setAutoUpdateConfig(updates) {
|
|
188
|
-
const config = loadConfig();
|
|
189
|
-
config.auto_update = {
|
|
190
|
-
...DEFAULT_AUTO_UPDATE,
|
|
191
|
-
...config.auto_update,
|
|
192
|
-
...updates,
|
|
193
|
-
};
|
|
194
|
-
saveConfig(config);
|
|
195
|
-
}
|
|
196
|
-
//# sourceMappingURL=config.js.map
|
package/dist/lib/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAwF,MAAM,YAAY,CAAC;AAE3I,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC7C,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AAEpD,MAAM,mBAAmB,GAAqB;IAC5C,GAAG,EAAE,KAAK,EAAI,2BAA2B;IACzC,KAAK,EAAE,IAAI,EAAG,mEAAmE;CAClF,CAAC;AAEF,MAAM,cAAc,GAAgB;IAClC,QAAQ,EAAE,QAAQ,CAAC,UAAU;IAC7B,YAAY,EAAE,OAAO;IACrB,iBAAiB,EAAE,aAAa,CAAC,QAAQ;IACzC,YAAY,EAAE,EAAE;IAChB,SAAS,EAAE,EAAE;CACd,CAAC;AAEF;;;;GAIG;AACH,SAAS,aAAa,CAAC,MAAyD;IAC9E,8DAA8D;IAC9D,IAAI,SAAS,IAAI,MAAM,IAAI,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,EAAE,CAAC;QACnD,MAAM,YAAY,GAAG,MAA2B,CAAC;QACjD,OAAO;YACL,QAAQ,EAAE,YAAY,CAAC,OAAO;YAC9B,YA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,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAiB,EAAE,SAAyB;IAC7E,MAAM,aAAa,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAEvD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACzD,aAAa,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,OAAO;QACL,GAAG,mBAAmB;QACtB,GAAG,MAAM,CAAC,WAAW;KACtB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAkC;IACpE,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,MAAM,CAAC,WAAW,GAAG;QACnB,GAAG,mBAAmB;QACtB,GAAG,MAAM,CAAC,WAAW;QACrB,GAAG,OAAO;KACX,CAAC;IACF,UAAU,CAAC,MAAM,CAAC,CAAC;AACrB,CAAC"}
|
package/dist/lib/platforms.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { join } from 'path';
|
|
2
|
-
import { homedir } from 'os';
|
|
3
|
-
import { Platform } from './types.js';
|
|
4
|
-
/**
|
|
5
|
-
* Platform-specific paths configuration
|
|
6
|
-
* Single source of truth for all platform-specific directories
|
|
7
|
-
*/
|
|
8
|
-
export const PLATFORM_PATHS = {
|
|
9
|
-
[Platform.ClaudeCode]: {
|
|
10
|
-
skills: join(homedir(), '.claude', 'skills'),
|
|
11
|
-
commands: join(homedir(), '.claude', 'commands'),
|
|
12
|
-
agents: join(homedir(), '.claude', 'agents'),
|
|
13
|
-
config: join(homedir(), '.claude', 'CLAUDE.md'),
|
|
14
|
-
},
|
|
15
|
-
[Platform.OpenCode]: {
|
|
16
|
-
skills: join(homedir(), '.config', 'opencode', 'skills'),
|
|
17
|
-
commands: join(homedir(), '.config', 'opencode', 'command'),
|
|
18
|
-
agents: join(homedir(), '.config', 'opencode', 'agent'),
|
|
19
|
-
config: join(homedir(), '.config', 'opencode', 'AGENTS.md'),
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Get all paths for a platform
|
|
24
|
-
*/
|
|
25
|
-
export function getPlatformPaths(platform) {
|
|
26
|
-
return PLATFORM_PATHS[platform];
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get skills install path for a platform
|
|
30
|
-
*/
|
|
31
|
-
export function getSkillsPath(platform) {
|
|
32
|
-
return PLATFORM_PATHS[platform].skills;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Get commands install path for a platform
|
|
36
|
-
*/
|
|
37
|
-
export function getCommandsPath(platform) {
|
|
38
|
-
return PLATFORM_PATHS[platform].commands;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get agents install path for a platform
|
|
42
|
-
*/
|
|
43
|
-
export function getAgentsPath(platform) {
|
|
44
|
-
return PLATFORM_PATHS[platform].agents;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Get platform config file path (CLAUDE.md or AGENTS.md)
|
|
48
|
-
*/
|
|
49
|
-
export function getConfigPath(platform) {
|
|
50
|
-
return PLATFORM_PATHS[platform].config;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=platforms.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|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,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,QAAkB;IAChD,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,QAAkB;IAC9C,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,QAAkB;IAC9C,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;AACzC,CAAC"}
|
package/dist/lib/quotes.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Star Wars themed quotes for the TUI welcome screen.
|
|
3
|
-
* Some hint at specific skills available in droid.
|
|
4
|
-
*/
|
|
5
|
-
export const quotes = [
|
|
6
|
-
"I'm probably the droid you are looking for.",
|
|
7
|
-
"These are the skills you're looking for.",
|
|
8
|
-
"I have a bad feeling about this, we might be too efficient.",
|
|
9
|
-
"May the source be with you.",
|
|
10
|
-
"The Force is strong with this one.",
|
|
11
|
-
"This is the way.",
|
|
12
|
-
"I'm fluent in over six million forms of communication. - `/comments`",
|
|
13
|
-
"Much to learn, you still have. - `/coach`",
|
|
14
|
-
"If into the archives you go, only knowledge will you find. - `/project`",
|
|
15
|
-
];
|
|
16
|
-
/**
|
|
17
|
-
* Get a random quote from the list.
|
|
18
|
-
* Uses a simple random selection - each launch gets a fresh quote.
|
|
19
|
-
*/
|
|
20
|
-
export function getRandomQuote() {
|
|
21
|
-
const index = Math.floor(Math.random() * quotes.length);
|
|
22
|
-
return quotes[index];
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=quotes.js.map
|
package/dist/lib/quotes.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quotes.js","sourceRoot":"","sources":["../../src/lib/quotes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,6CAA6C;IAC7C,0CAA0C;IAC1C,6DAA6D;IAC7D,6BAA6B;IAC7B,oCAAoC;IACpC,kBAAkB;IAClB,sEAAsE;IACtE,2CAA2C;IAC3C,yEAAyE;CAC1E,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACxD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"}
|
package/dist/lib/skill-config.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import inquirer from 'inquirer';
|
|
3
|
-
import { saveSkillOverrides, loadConfig, loadSkillOverrides } from './config.js';
|
|
4
|
-
import { ConfigOptionType } from './types.js';
|
|
5
|
-
/**
|
|
6
|
-
* Prompt user to configure a skill after install
|
|
7
|
-
*/
|
|
8
|
-
export async function promptForSkillConfig(skillName, configSchema, askFirst = true) {
|
|
9
|
-
const globalConfig = loadConfig();
|
|
10
|
-
if (askFirst) {
|
|
11
|
-
const { wantsConfigure } = await inquirer.prompt([
|
|
12
|
-
{
|
|
13
|
-
type: 'confirm',
|
|
14
|
-
name: 'wantsConfigure',
|
|
15
|
-
message: 'Would you like to configure this skill now?',
|
|
16
|
-
default: false,
|
|
17
|
-
},
|
|
18
|
-
]);
|
|
19
|
-
if (!wantsConfigure) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
console.log(chalk.bold(`\n⚙️ Configure ${skillName}\n`));
|
|
24
|
-
// Load existing overrides to use as defaults
|
|
25
|
-
const existingOverrides = loadSkillOverrides(skillName);
|
|
26
|
-
const questions = Object.entries(configSchema).map(([key, option]) => {
|
|
27
|
-
const baseQuestion = {
|
|
28
|
-
name: key,
|
|
29
|
-
message: option.description,
|
|
30
|
-
};
|
|
31
|
-
// Use existing override as default if present
|
|
32
|
-
const existingValue = existingOverrides[key];
|
|
33
|
-
switch (option.type) {
|
|
34
|
-
case ConfigOptionType.Boolean:
|
|
35
|
-
return {
|
|
36
|
-
...baseQuestion,
|
|
37
|
-
type: 'confirm',
|
|
38
|
-
default: existingValue ?? option.default ?? false,
|
|
39
|
-
};
|
|
40
|
-
case ConfigOptionType.Select:
|
|
41
|
-
return {
|
|
42
|
-
...baseQuestion,
|
|
43
|
-
type: 'list',
|
|
44
|
-
choices: option.options || [],
|
|
45
|
-
default: existingValue ?? option.default,
|
|
46
|
-
};
|
|
47
|
-
case ConfigOptionType.String:
|
|
48
|
-
default: {
|
|
49
|
-
// For user_mention, default to global config value if no existing override
|
|
50
|
-
let defaultValue = existingValue ?? option.default ?? '';
|
|
51
|
-
if (key === 'user_mention' && !existingValue && globalConfig.user_mention) {
|
|
52
|
-
defaultValue = globalConfig.user_mention;
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
...baseQuestion,
|
|
56
|
-
type: 'input',
|
|
57
|
-
default: defaultValue,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
const answers = await inquirer.prompt(questions);
|
|
63
|
-
// Filter out empty/default values to keep overrides minimal
|
|
64
|
-
const overrides = {};
|
|
65
|
-
for (const [key, value] of Object.entries(answers)) {
|
|
66
|
-
const schema = configSchema[key];
|
|
67
|
-
// Only save if different from default
|
|
68
|
-
if (value !== schema.default && value !== '' && value !== false) {
|
|
69
|
-
overrides[key] = value;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (Object.keys(overrides).length > 0) {
|
|
73
|
-
saveSkillOverrides(skillName, overrides);
|
|
74
|
-
console.log(chalk.green(`\n✓ Configuration saved to ~/.droid/skills/${skillName}/overrides.yaml`));
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
console.log(chalk.gray('\nNo custom configuration set (using defaults).'));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=skill-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-config.js","sourceRoot":"","sources":["../../src/lib/skill-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAA0C,MAAM,YAAY,CAAC;AAEtF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,SAAiB,EACjB,YAA0C,EAC1C,WAAoB,IAAI;IAExB,MAAM,YAAY,GAAG,UAAU,EAAE,CAAC;IAElC,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAA8B;YAC5E;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,gBAAgB;gBACtB,OAAO,EAAE,6CAA6C;gBACtD,OAAO,EAAE,KAAK;aACf;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,SAAS,IAAI,CAAC,CAAC,CAAC;IAE1D,6CAA6C;IAC7C,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAExD,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE;QACnE,MAAM,YAAY,GAAG;YACnB,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,MAAM,CAAC,WAAW;SAC5B,CAAC;QAEF,8CAA8C;QAC9C,MAAM,aAAa,GAAG,iBA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