@comfanion/workflow 4.22.0 → 4.24.0
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/bin/cli.js +27 -1
- package/package.json +1 -1
- package/src/build-info.json +1 -1
- package/src/opencode/plugins/file-indexer.ts +10 -6
package/bin/cli.js
CHANGED
|
@@ -379,7 +379,20 @@ program
|
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
|
|
382
|
+
// Install plugin dependencies
|
|
383
|
+
spinner.text = 'Installing plugin dependencies...';
|
|
384
|
+
try {
|
|
385
|
+
execSync('bun install', {
|
|
386
|
+
cwd: targetDir,
|
|
387
|
+
stdio: 'pipe',
|
|
388
|
+
timeout: 60000
|
|
389
|
+
});
|
|
390
|
+
spinner.succeed(chalk.green('OpenCode Workflow initialized!'));
|
|
391
|
+
console.log(chalk.green('✅ Plugin dependencies installed'));
|
|
392
|
+
} catch (e) {
|
|
393
|
+
spinner.succeed(chalk.green('OpenCode Workflow initialized!'));
|
|
394
|
+
console.log(chalk.yellow('⚠️ Plugin dependencies: run `cd .opencode && bun install`'));
|
|
395
|
+
}
|
|
383
396
|
|
|
384
397
|
// Show what was preserved
|
|
385
398
|
if (hadVectorizer) {
|
|
@@ -540,6 +553,18 @@ program
|
|
|
540
553
|
spinner.text = 'Restoring config.yaml...';
|
|
541
554
|
await fs.writeFile(configPath, configBackup);
|
|
542
555
|
|
|
556
|
+
// Install plugin dependencies
|
|
557
|
+
spinner.text = 'Installing plugin dependencies...';
|
|
558
|
+
try {
|
|
559
|
+
execSync('bun install', {
|
|
560
|
+
cwd: targetDir,
|
|
561
|
+
stdio: 'pipe',
|
|
562
|
+
timeout: 60000
|
|
563
|
+
});
|
|
564
|
+
} catch (e) {
|
|
565
|
+
// Ignore errors, will show warning below
|
|
566
|
+
}
|
|
567
|
+
|
|
543
568
|
spinner.succeed(chalk.green('OpenCode Workflow updated!'));
|
|
544
569
|
|
|
545
570
|
if (options.backup !== false) {
|
|
@@ -548,6 +573,7 @@ program
|
|
|
548
573
|
}
|
|
549
574
|
|
|
550
575
|
console.log(chalk.green('✅ Your config.yaml was preserved.'));
|
|
576
|
+
console.log(chalk.green('✅ Plugin dependencies installed.'));
|
|
551
577
|
if (hasVectorizer) {
|
|
552
578
|
console.log(chalk.green('✅ Vectorizer updated (node_modules preserved).'));
|
|
553
579
|
}
|
package/package.json
CHANGED
package/src/build-info.json
CHANGED
|
@@ -128,22 +128,24 @@ export const FileIndexerPlugin: Plugin = async ({ directory }) => {
|
|
|
128
128
|
* Event handler for file events
|
|
129
129
|
*/
|
|
130
130
|
event: async ({ event }) => {
|
|
131
|
-
|
|
131
|
+
// Log ALL events with full data structure
|
|
132
|
+
const eventData = JSON.stringify(event.data || {}, null, 2).slice(0, 500)
|
|
133
|
+
console.log(`[file-indexer] 📨 Event: ${event.type}\n${eventData}`)
|
|
132
134
|
|
|
133
135
|
// file.edited - when agent edits a file via Edit tool
|
|
134
136
|
if (event.type === "file.edited") {
|
|
135
|
-
const filePath = event.data?.path || event.data?.filePath
|
|
137
|
+
const filePath = event.data?.path || event.data?.filePath || event.data?.file
|
|
138
|
+
console.log(`[file-indexer] 📝 file.edited detected, path: ${filePath}`)
|
|
136
139
|
if (filePath) {
|
|
137
|
-
console.log(`[file-indexer] 📝 file.edited: ${filePath}`)
|
|
138
140
|
queueFileForIndexing(filePath)
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
// file.watcher.updated - when file changes on disk (external or internal)
|
|
143
145
|
if (event.type === "file.watcher.updated") {
|
|
144
|
-
const filePath = event.data?.path || event.data?.filePath
|
|
146
|
+
const filePath = event.data?.path || event.data?.filePath || event.data?.file
|
|
147
|
+
console.log(`[file-indexer] 👁️ file.watcher.updated detected, path: ${filePath}`)
|
|
145
148
|
if (filePath) {
|
|
146
|
-
console.log(`[file-indexer] 👁️ file.watcher.updated: ${filePath}`)
|
|
147
149
|
queueFileForIndexing(filePath)
|
|
148
150
|
}
|
|
149
151
|
}
|
|
@@ -156,7 +158,9 @@ export const FileIndexerPlugin: Plugin = async ({ directory }) => {
|
|
|
156
158
|
const toolName = input.tool?.toLowerCase()
|
|
157
159
|
const filePath = input.args?.filePath
|
|
158
160
|
|
|
159
|
-
|
|
161
|
+
// Log full input structure
|
|
162
|
+
console.log(`[file-indexer] 🔧 tool.execute.after: ${toolName}, filePath: ${filePath}`)
|
|
163
|
+
console.log(`[file-indexer] 🔧 input.args: ${JSON.stringify(input.args || {}, null, 2).slice(0, 300)}`)
|
|
160
164
|
|
|
161
165
|
if ((toolName === "edit" || toolName === "write" || toolName === "patch") && filePath) {
|
|
162
166
|
console.log(`[file-indexer] 📝 Tool edited file: ${filePath}`)
|