@orderful/droid 0.27.0 → 0.27.2
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/CHANGELOG.md +33 -0
- package/dist/bin/droid.js +56 -6
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/index.js +39 -1
- package/dist/lib/migrations.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/commands/update.ts +22 -6
- package/src/lib/migrations.ts +60 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @orderful/droid
|
|
2
2
|
|
|
3
|
+
## 0.27.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#150](https://github.com/Orderful/droid/pull/150) [`07bffaa`](https://github.com/Orderful/droid/commit/07bffaab1a55363e0b12d7cb2e035dcdae113c8d) Thanks [@frytyler](https://github.com/frytyler)! - Fix config migration not running for users on v0.27.1 and npm cache issues
|
|
8
|
+
|
|
9
|
+
**Bug fix:**
|
|
10
|
+
- Change migration version from v0.27.0 to v0.27.2 to ensure it runs for users already on v0.27.1
|
|
11
|
+
- Add npm cache clear before update to prevent stale package installations
|
|
12
|
+
- Fixes TUI continuing to show tools as not installed after upgrade
|
|
13
|
+
|
|
14
|
+
**Technical details:**
|
|
15
|
+
- Migration was added in v0.27.1 but marked as v0.27.0, causing it to be skipped for users upgrading from v0.27.0 to v0.27.1
|
|
16
|
+
- Update command now runs `npm cache clean --force` before installing to prevent cached packages from being served
|
|
17
|
+
- Migration will now run when users upgrade to v0.27.2
|
|
18
|
+
|
|
19
|
+
## 0.27.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#148](https://github.com/Orderful/droid/pull/148) [`7b030da`](https://github.com/Orderful/droid/commit/7b030da044551b66674f06b0fb8e31257b5a1fd4) Thanks [@frytyler](https://github.com/frytyler)! - Fix installation detection after commands-skills merge
|
|
24
|
+
|
|
25
|
+
**Bug fix:**
|
|
26
|
+
- Add package migration (v0.27.0) to update config entries from `droid-*` to unprefixed names
|
|
27
|
+
- Fixes TUI showing tools as not installed after upgrade from v0.26.0
|
|
28
|
+
- Migration handles both Claude Code and OpenCode platforms automatically
|
|
29
|
+
- Runs seamlessly on TUI startup - no user action required
|
|
30
|
+
|
|
31
|
+
**Technical details:**
|
|
32
|
+
- Config entries renamed: `droid-brain` → `brain`, `droid-codex` → `codex`, etc.
|
|
33
|
+
- Special `droid` tool preserved (not renamed)
|
|
34
|
+
- Platform switching continues to work correctly after migration
|
|
35
|
+
|
|
3
36
|
## 0.27.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|
package/dist/bin/droid.js
CHANGED
|
@@ -615,7 +615,45 @@ function createPlatformSyncMigration(version2) {
|
|
|
615
615
|
}
|
|
616
616
|
};
|
|
617
617
|
}
|
|
618
|
-
|
|
618
|
+
function createConfigSkillNameMigration(version2) {
|
|
619
|
+
return {
|
|
620
|
+
version: version2,
|
|
621
|
+
description: "Remove droid- prefix from config skill names",
|
|
622
|
+
up: () => {
|
|
623
|
+
const config = loadConfig();
|
|
624
|
+
let configChanged = false;
|
|
625
|
+
const originalPlatform = config.platform;
|
|
626
|
+
for (const platformKey of ["claude-code" /* ClaudeCode */, "opencode" /* OpenCode */]) {
|
|
627
|
+
if (!config.platforms[platformKey]) continue;
|
|
628
|
+
config.platform = platformKey;
|
|
629
|
+
const trackedTools = getPlatformTools(config);
|
|
630
|
+
const skillNames = Object.keys(trackedTools);
|
|
631
|
+
for (const skillName of skillNames) {
|
|
632
|
+
if (!skillName.startsWith("droid-") || skillName === "droid") {
|
|
633
|
+
continue;
|
|
634
|
+
}
|
|
635
|
+
const unprefixedName = skillName.replace(/^droid-/, "");
|
|
636
|
+
if (!trackedTools[unprefixedName]) {
|
|
637
|
+
trackedTools[unprefixedName] = trackedTools[skillName];
|
|
638
|
+
delete trackedTools[skillName];
|
|
639
|
+
configChanged = true;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
if (configChanged) {
|
|
643
|
+
setPlatformTools(config, trackedTools);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
config.platform = originalPlatform;
|
|
647
|
+
if (configChanged) {
|
|
648
|
+
saveConfig(config);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
var PACKAGE_MIGRATIONS = [
|
|
654
|
+
createPlatformSyncMigration("0.25.0"),
|
|
655
|
+
createConfigSkillNameMigration("0.27.2")
|
|
656
|
+
];
|
|
619
657
|
var TOOL_MIGRATIONS = {
|
|
620
658
|
brain: [createConfigDirMigration("droid-brain", "0.2.3")],
|
|
621
659
|
comments: [createConfigDirMigration("droid-comments", "0.2.6")],
|
|
@@ -1724,21 +1762,32 @@ import { execSync as execSync4 } from "child_process";
|
|
|
1724
1762
|
async function updateCommand(tool, options) {
|
|
1725
1763
|
if (tool) {
|
|
1726
1764
|
console.log(chalk8.yellow("\n\u26A0 Per-tool updates not implemented yet"));
|
|
1727
|
-
console.log(
|
|
1765
|
+
console.log(
|
|
1766
|
+
chalk8.gray(
|
|
1767
|
+
"Tools are bundled with the CLI - run `droid update` to update all."
|
|
1768
|
+
)
|
|
1769
|
+
);
|
|
1728
1770
|
return;
|
|
1729
1771
|
}
|
|
1730
1772
|
if (options?.tools) {
|
|
1731
1773
|
console.log(chalk8.yellow("\n\u26A0 Tool-only updates not implemented yet"));
|
|
1732
|
-
console.log(
|
|
1774
|
+
console.log(
|
|
1775
|
+
chalk8.gray(
|
|
1776
|
+
"Tools are bundled with the CLI - run `droid update` to update all."
|
|
1777
|
+
)
|
|
1778
|
+
);
|
|
1733
1779
|
return;
|
|
1734
1780
|
}
|
|
1735
1781
|
console.log(chalk8.bold("\n\u{1F916} Updating Droid...\n"));
|
|
1736
1782
|
const currentVersion = getVersion();
|
|
1737
1783
|
console.log(chalk8.gray(`Current version: ${currentVersion}`));
|
|
1738
1784
|
try {
|
|
1739
|
-
const latestVersion = execSync4(
|
|
1740
|
-
|
|
1741
|
-
|
|
1785
|
+
const latestVersion = execSync4(
|
|
1786
|
+
"npm view @orderful/droid version 2>/dev/null",
|
|
1787
|
+
{
|
|
1788
|
+
encoding: "utf-8"
|
|
1789
|
+
}
|
|
1790
|
+
).trim();
|
|
1742
1791
|
if (!latestVersion) {
|
|
1743
1792
|
console.log(chalk8.yellow("\n\u26A0 Could not check for updates"));
|
|
1744
1793
|
return;
|
|
@@ -1749,6 +1798,7 @@ async function updateCommand(tool, options) {
|
|
|
1749
1798
|
}
|
|
1750
1799
|
console.log(chalk8.gray(`Latest version: ${latestVersion}`));
|
|
1751
1800
|
console.log(chalk8.gray("\nUpdating..."));
|
|
1801
|
+
execSync4("npm cache clean --force 2>/dev/null", { stdio: "pipe" });
|
|
1752
1802
|
execSync4("npm install -g @orderful/droid@latest", { stdio: "inherit" });
|
|
1753
1803
|
console.log(chalk8.green(`
|
|
1754
1804
|
\u2713 Updated to v${latestVersion}`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAIA,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAsB,aAAa,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAIA,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAsB,aAAa,CACjC,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,IAAI,CAAC,CA6Df"}
|
package/dist/index.js
CHANGED
|
@@ -578,7 +578,45 @@ function createPlatformSyncMigration(version) {
|
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
|
-
|
|
581
|
+
function createConfigSkillNameMigration(version) {
|
|
582
|
+
return {
|
|
583
|
+
version,
|
|
584
|
+
description: "Remove droid- prefix from config skill names",
|
|
585
|
+
up: () => {
|
|
586
|
+
const config = loadConfig();
|
|
587
|
+
let configChanged = false;
|
|
588
|
+
const originalPlatform = config.platform;
|
|
589
|
+
for (const platformKey of ["claude-code" /* ClaudeCode */, "opencode" /* OpenCode */]) {
|
|
590
|
+
if (!config.platforms[platformKey]) continue;
|
|
591
|
+
config.platform = platformKey;
|
|
592
|
+
const trackedTools = getPlatformTools(config);
|
|
593
|
+
const skillNames = Object.keys(trackedTools);
|
|
594
|
+
for (const skillName of skillNames) {
|
|
595
|
+
if (!skillName.startsWith("droid-") || skillName === "droid") {
|
|
596
|
+
continue;
|
|
597
|
+
}
|
|
598
|
+
const unprefixedName = skillName.replace(/^droid-/, "");
|
|
599
|
+
if (!trackedTools[unprefixedName]) {
|
|
600
|
+
trackedTools[unprefixedName] = trackedTools[skillName];
|
|
601
|
+
delete trackedTools[skillName];
|
|
602
|
+
configChanged = true;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
if (configChanged) {
|
|
606
|
+
setPlatformTools(config, trackedTools);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
config.platform = originalPlatform;
|
|
610
|
+
if (configChanged) {
|
|
611
|
+
saveConfig(config);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
var PACKAGE_MIGRATIONS = [
|
|
617
|
+
createPlatformSyncMigration("0.25.0"),
|
|
618
|
+
createConfigSkillNameMigration("0.27.2")
|
|
619
|
+
];
|
|
582
620
|
var TOOL_MIGRATIONS = {
|
|
583
621
|
brain: [createConfigDirMigration("droid-brain", "0.2.3")],
|
|
584
622
|
comments: [createConfigDirMigration("droid-comments", "0.2.6")],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/lib/migrations.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/lib/migrations.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,SAAS,CAAC;AAiOjB;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,CAE/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAc/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,IAAI,CAmBN;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CA2CtC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,GACvB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAStC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG;IAC5D,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAqDA"}
|
package/package.json
CHANGED
package/src/commands/update.ts
CHANGED
|
@@ -7,18 +7,29 @@ interface UpdateOptions {
|
|
|
7
7
|
cli?: boolean;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export async function updateCommand(
|
|
10
|
+
export async function updateCommand(
|
|
11
|
+
tool?: string,
|
|
12
|
+
options?: UpdateOptions,
|
|
13
|
+
): Promise<void> {
|
|
11
14
|
// If specific tool specified, update just that tool
|
|
12
15
|
if (tool) {
|
|
13
16
|
console.log(chalk.yellow('\n⚠ Per-tool updates not implemented yet'));
|
|
14
|
-
console.log(
|
|
17
|
+
console.log(
|
|
18
|
+
chalk.gray(
|
|
19
|
+
'Tools are bundled with the CLI - run `droid update` to update all.',
|
|
20
|
+
),
|
|
21
|
+
);
|
|
15
22
|
return;
|
|
16
23
|
}
|
|
17
24
|
|
|
18
25
|
// If --tools flag, update tools only
|
|
19
26
|
if (options?.tools) {
|
|
20
27
|
console.log(chalk.yellow('\n⚠ Tool-only updates not implemented yet'));
|
|
21
|
-
console.log(
|
|
28
|
+
console.log(
|
|
29
|
+
chalk.gray(
|
|
30
|
+
'Tools are bundled with the CLI - run `droid update` to update all.',
|
|
31
|
+
),
|
|
32
|
+
);
|
|
22
33
|
return;
|
|
23
34
|
}
|
|
24
35
|
|
|
@@ -30,9 +41,12 @@ export async function updateCommand(tool?: string, options?: UpdateOptions): Pro
|
|
|
30
41
|
|
|
31
42
|
try {
|
|
32
43
|
// Check for latest version
|
|
33
|
-
const latestVersion = execSync(
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
const latestVersion = execSync(
|
|
45
|
+
'npm view @orderful/droid version 2>/dev/null',
|
|
46
|
+
{
|
|
47
|
+
encoding: 'utf-8',
|
|
48
|
+
},
|
|
49
|
+
).trim();
|
|
36
50
|
|
|
37
51
|
if (!latestVersion) {
|
|
38
52
|
console.log(chalk.yellow('\n⚠ Could not check for updates'));
|
|
@@ -47,6 +61,8 @@ export async function updateCommand(tool?: string, options?: UpdateOptions): Pro
|
|
|
47
61
|
console.log(chalk.gray(`Latest version: ${latestVersion}`));
|
|
48
62
|
console.log(chalk.gray('\nUpdating...'));
|
|
49
63
|
|
|
64
|
+
// Clear npm cache to ensure fresh install
|
|
65
|
+
execSync('npm cache clean --force 2>/dev/null', { stdio: 'pipe' });
|
|
50
66
|
execSync('npm install -g @orderful/droid@latest', { stdio: 'inherit' });
|
|
51
67
|
|
|
52
68
|
console.log(chalk.green(`\n✓ Updated to v${latestVersion}`));
|
package/src/lib/migrations.ts
CHANGED
|
@@ -153,13 +153,72 @@ function createPlatformSyncMigration(version: string): Migration {
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Migration: Remove droid- prefix from config skill names
|
|
158
|
+
*
|
|
159
|
+
* After PR #145, all skill names in tool manifests are unprefixed (brain, codex, etc.)
|
|
160
|
+
* This migration updates config entries to match:
|
|
161
|
+
* - droid-brain → brain
|
|
162
|
+
* - droid-codex → codex
|
|
163
|
+
* - droid-project → project
|
|
164
|
+
* - etc.
|
|
165
|
+
*/
|
|
166
|
+
function createConfigSkillNameMigration(version: string): Migration {
|
|
167
|
+
return {
|
|
168
|
+
version,
|
|
169
|
+
description: 'Remove droid- prefix from config skill names',
|
|
170
|
+
up: () => {
|
|
171
|
+
const config = loadConfig();
|
|
172
|
+
let configChanged = false;
|
|
173
|
+
const originalPlatform = config.platform;
|
|
174
|
+
|
|
175
|
+
// Check both platforms
|
|
176
|
+
for (const platformKey of [Platform.ClaudeCode, Platform.OpenCode]) {
|
|
177
|
+
if (!config.platforms[platformKey]) continue;
|
|
178
|
+
|
|
179
|
+
config.platform = platformKey;
|
|
180
|
+
const trackedTools = getPlatformTools(config);
|
|
181
|
+
const skillNames = Object.keys(trackedTools);
|
|
182
|
+
|
|
183
|
+
for (const skillName of skillNames) {
|
|
184
|
+
// Skip if already unprefixed or is the special 'droid' tool
|
|
185
|
+
if (!skillName.startsWith('droid-') || skillName === 'droid') {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const unprefixedName = skillName.replace(/^droid-/, '');
|
|
190
|
+
|
|
191
|
+
// Only migrate if unprefixed name doesn't already exist
|
|
192
|
+
if (!trackedTools[unprefixedName]) {
|
|
193
|
+
trackedTools[unprefixedName] = trackedTools[skillName];
|
|
194
|
+
delete trackedTools[skillName];
|
|
195
|
+
configChanged = true;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (configChanged) {
|
|
200
|
+
setPlatformTools(config, trackedTools);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
config.platform = originalPlatform;
|
|
205
|
+
if (configChanged) {
|
|
206
|
+
saveConfig(config);
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
156
212
|
/**
|
|
157
213
|
* Registry of package-level migrations
|
|
158
214
|
* These run when the @orderful/droid npm package updates
|
|
159
215
|
* Triggered by package version from package.json (e.g., 0.26.0)
|
|
160
216
|
* Run at TUI startup
|
|
161
217
|
*/
|
|
162
|
-
const PACKAGE_MIGRATIONS: Migration[] = [
|
|
218
|
+
const PACKAGE_MIGRATIONS: Migration[] = [
|
|
219
|
+
createPlatformSyncMigration('0.25.0'),
|
|
220
|
+
createConfigSkillNameMigration('0.27.2'),
|
|
221
|
+
];
|
|
163
222
|
|
|
164
223
|
/**
|
|
165
224
|
* Registry of all tool migrations
|