@orderful/droid 0.27.0 → 0.27.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/CHANGELOG.md +17 -0
- package/dist/bin/droid.js +39 -1
- package/dist/index.js +39 -1
- package/dist/lib/migrations.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/lib/migrations.ts +60 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @orderful/droid
|
|
2
2
|
|
|
3
|
+
## 0.27.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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
|
|
8
|
+
|
|
9
|
+
**Bug fix:**
|
|
10
|
+
- Add package migration (v0.27.0) to update config entries from `droid-*` to unprefixed names
|
|
11
|
+
- Fixes TUI showing tools as not installed after upgrade from v0.26.0
|
|
12
|
+
- Migration handles both Claude Code and OpenCode platforms automatically
|
|
13
|
+
- Runs seamlessly on TUI startup - no user action required
|
|
14
|
+
|
|
15
|
+
**Technical details:**
|
|
16
|
+
- Config entries renamed: `droid-brain` → `brain`, `droid-codex` → `codex`, etc.
|
|
17
|
+
- Special `droid` tool preserved (not renamed)
|
|
18
|
+
- Platform switching continues to work correctly after migration
|
|
19
|
+
|
|
3
20
|
## 0.27.0
|
|
4
21
|
|
|
5
22
|
### 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.0")
|
|
656
|
+
];
|
|
619
657
|
var TOOL_MIGRATIONS = {
|
|
620
658
|
brain: [createConfigDirMigration("droid-brain", "0.2.3")],
|
|
621
659
|
comments: [createConfigDirMigration("droid-comments", "0.2.6")],
|
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.0")
|
|
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/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.0'),
|
|
221
|
+
];
|
|
163
222
|
|
|
164
223
|
/**
|
|
165
224
|
* Registry of all tool migrations
|