@sylphx/flow 1.4.12 → 1.4.13

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @sylphx/flow
2
2
 
3
+ ## 1.4.13
4
+
5
+ ### Patch Changes
6
+
7
+ - 1d0ac4e: Add startup check for new templates:
8
+ - Detects missing templates on startup (new templates not installed locally)
9
+ - Shows notification with count of new agents/commands/rules
10
+ - Prompts user to run --sync to install
11
+ - Ignores unknown files (custom user files)
12
+ - Non-blocking - just informational
13
+
3
14
  ## 1.4.12
4
15
 
5
16
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/flow",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "description": "AI-powered development workflow automation with autonomous loop mode and smart configuration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -621,6 +621,7 @@ async function executeFlowOnce(prompt: string | undefined, options: FlowOptions)
621
621
  const {
622
622
  checkUpgrades,
623
623
  checkComponentIntegrity,
624
+ checkSyncStatus,
624
625
  selectTarget,
625
626
  initializeProject,
626
627
  launchTarget,
@@ -675,6 +676,9 @@ async function executeFlowOnce(prompt: string | undefined, options: FlowOptions)
675
676
 
676
677
  // Step 2.5: Check component integrity (only if we have valid state)
677
678
  await checkComponentIntegrity(state, options);
679
+
680
+ // Step 2.6: Check sync status (new templates available)
681
+ await checkSyncStatus(state, options);
678
682
  }
679
683
 
680
684
  // Step 3: Initialize (only if actually needed)
@@ -147,6 +147,59 @@ export async function checkComponentIntegrity(
147
147
  }
148
148
  }
149
149
 
150
+ /**
151
+ * Step 2.5: Check sync status (new templates available)
152
+ * Only checks for missing templates, ignores unknown files
153
+ */
154
+ export async function checkSyncStatus(
155
+ state: ProjectState,
156
+ options: FlowOptions
157
+ ): Promise<void> {
158
+ // Skip if not initialized, syncing, or init-only
159
+ if (!state.initialized || options.sync || options.initOnly) return;
160
+
161
+ // Skip in quick mode
162
+ if (options.quick) return;
163
+
164
+ // Need target to check sync status
165
+ if (!state.target) return;
166
+
167
+ try {
168
+ const { buildSyncManifest } = await import('../utils/sync-utils.js');
169
+ const target = targetManager.getTarget(state.target);
170
+
171
+ if (target._tag === 'None') return;
172
+
173
+ const manifest = await buildSyncManifest(process.cwd(), target.value);
174
+
175
+ // Count missing templates (new templates not installed locally)
176
+ const missingCount =
177
+ manifest.agents.missing.length +
178
+ manifest.slashCommands.missing.length +
179
+ manifest.rules.missing.length;
180
+
181
+ // Only prompt if there are missing templates
182
+ if (missingCount > 0) {
183
+ const missing: string[] = [];
184
+
185
+ if (manifest.agents.missing.length > 0) {
186
+ missing.push(`${manifest.agents.missing.length} agent${manifest.agents.missing.length > 1 ? 's' : ''}`);
187
+ }
188
+ if (manifest.slashCommands.missing.length > 0) {
189
+ missing.push(`${manifest.slashCommands.missing.length} command${manifest.slashCommands.missing.length > 1 ? 's' : ''}`);
190
+ }
191
+ if (manifest.rules.missing.length > 0) {
192
+ missing.push(`${manifest.rules.missing.length} rule${manifest.rules.missing.length > 1 ? 's' : ''}`);
193
+ }
194
+
195
+ console.log(chalk.yellow(`\nšŸ“¦ New templates available: ${missing.join(', ')}\n`));
196
+ console.log(chalk.dim(` Run ${chalk.cyan('sylphx-flow --sync')} to install new templates\n`));
197
+ }
198
+ } catch (error) {
199
+ // Silently ignore sync check errors - don't block execution
200
+ }
201
+ }
202
+
150
203
  /**
151
204
  * Step 3: Handle target selection
152
205
  * Returns the selected target ID