mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
Extend scripts/sync-mod-screen.mjs to a second kit: the flag() helper in hooks/options.ts of 38 mods now sits between SHARED FLAG markers and is rewritten/checked from ruflo-agentdb. Drift, a lost marker or zero copies fails --check. Bump the 39 touched plugin versions and their version pins. Co-Authored-By: RuFlo <ruv@ruv.net>
12 lines
641 B
TypeScript
12 lines
641 B
TypeScript
import type { PluginOptions } from 'claude-code'
|
|
|
|
/** The plugin's `userConfig`, validated: a bad value is the default (guard on). */
|
|
export type ModOptions = { readonly guard: boolean }
|
|
|
|
// BEGIN SHARED FLAG (generated by scripts/sync-mod-screen.mjs; edit plugins/ruflo-agentdb/hooks/options.ts)
|
|
export const flag = (value: unknown, fallback: boolean) =>
|
|
value === true || value === 'true' || value === 'on' ? true : value === false || value === 'false' || value === 'off' ? false : fallback
|
|
// END SHARED FLAG
|
|
|
|
export const readOptions = (options: PluginOptions | undefined): ModOptions => ({ guard: flag((options ?? {}).guard, true) })
|