Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

fix(console): Plugin Catalog names a mod loaded by sync whose plugin is not installed; drop work-in-progress and merge lines from the console and mods changelogs (#3979)

ree79a9850181
diff --git a/plugins/ruflo-console/CHANGELOG.md b/plugins/ruflo-console/CHANGELOG.md
index 686ea94304..f607536254 100644
--- a/plugins/ruflo-console/CHANGELOG.md
+++ b/plugins/ruflo-console/CHANGELOG.md
@@ -92,7 +92,6 @@ Newest first. One `## <version> — <date>` heading per version, then `feat:`, `
## 0.37.0 — 2026-10-07
- feat: shared toast system with levels, dedupe, persistence and Settings (ADR-477)
-- feat: shared toast policy and its call sites (ADR-477), work in progress
- fix: CONSOLE_VERSION follows the manifest (0.36.1)
## 0.36.1 — 2026-10-07
@@ -102,7 +101,6 @@ Newest first. One `## <version> — <date>` heading per version, then `feat:`, `
- feat: 0.36.0 integration: eventsPersist option, shared whole-batch append argv, hostile-time hardening, init ignores console/
- fix: log Claude's refused request when the person's card is waiting; mission-auto why when not wired; document the local-read allowlist
- fix: session control cap, gate on read-only entries that act, hostile text/data, mission auto-run guards (#3814 #3815 #3816 #3817 #3818)
-- chore: Merge verify/events-0.36 into feat/console-0.36
## 0.35.0 — 2026-10-06
- feat: autopilot envelope editor, parallel hand-over, spend windows, band segment, and the first live run (ADR-470)
diff --git a/plugins/ruflo-console/hooks/plugin-catalog.ts b/plugins/ruflo-console/hooks/plugin-catalog.ts
index 724cce4c0c..1574624eb4 100644
--- a/plugins/ruflo-console/hooks/plugin-catalog.ts
+++ b/plugins/ruflo-console/hooks/plugin-catalog.ts
@@ -69,6 +69,25 @@ export function installedOf(state: State): { installed: Set<string>; enabled: Se
}
}
+/**
+ * The catalog plugins whose mod Claude Code loaded in this session without installing the plugin (mod sync: the provenance reads
+ * `<plugin>@synced` or `<plugin>@inline`). Installed plugins are left out: they are already shown by their install state.
+ */
+export function syncedOf(state: State): Set<string> {
+ const { installed } = installedOf(state)
+ const names = new Set<string>()
+
+ for (const mod of state.mods) {
+ if (!mod.isLoaded) continue
+
+ const bare = /^(.+)@(?:synced|inline)$/.exec(mod.provenance)?.[1]
+
+ if (bare !== undefined && !installed.has(bare)) names.add(bare)
+ }
+
+ return names
+}
+
export const listOf = (state: State): CatalogPlugin[] => {
const catalog = catalogOf(state)
const { installed } = installedOf(state)
diff --git a/plugins/ruflo-console/hooks/views/plugin-catalog.ts b/plugins/ruflo-console/hooks/views/plugin-catalog.ts
index 0ae57c0565..fae6b63669 100644
--- a/plugins/ruflo-console/hooks/views/plugin-catalog.ts
+++ b/plugins/ruflo-console/hooks/views/plugin-catalog.ts
@@ -1,6 +1,6 @@
import type { RenderElement } from 'claude-code'
-import { catalogOf, installedOf, listOf, MODES, PAGE, type Verb } from '../plugin-catalog'
+import { catalogOf, installedOf, listOf, MODES, PAGE, syncedOf, type Verb } from '../plugin-catalog'
import type { CatalogPlugin } from '../data/plugin-catalog'
import { RUFLO_MARKET } from '../data/snapshot'
import { ago, button, clip, col, kv, row, rule, section, text, THEME, type Ctx } from './common'
@@ -21,7 +21,7 @@ function counts(plugin: CatalogPlugin): string {
/** One plugin row: the whole row selects it, the trailing button changes it. */
function pluginRow(ctx: Ctx, plugin: CatalogPlugin, lead: number): RenderElement {
const { installed, enabled } = installedOf(ctx.state)
- const badge = enabled.has(plugin.name) ? '■' : installed.has(plugin.name) ? '□' : '·'
+ const badge = enabled.has(plugin.name) ? '■' : installed.has(plugin.name) ? '□' : syncedOf(ctx.state).has(plugin.name) ? '◇' : '·'
const act = verbOf(ctx, plugin)
const isPicked = catalogOf(ctx.state).selected === plugin.name
const press = () => ctx.act.catalog.select(isPicked ? null : plugin.name)
@@ -55,7 +55,7 @@ function itemRow(ctx: Ctx, kind: 'skill' | 'agent' | 'command', plugin: CatalogP
function detailRows(ctx: Ctx, plugin: CatalogPlugin): RenderElement[] {
const { installed, enabled, version } = installedOf(ctx.state)
- const state = enabled.has(plugin.name) ? 'installed and enabled' : installed.has(plugin.name) ? 'installed, disabled' : 'not installed'
+ const state = enabled.has(plugin.name) ? 'installed and enabled' : installed.has(plugin.name) ? 'installed, disabled' : syncedOf(ctx.state).has(plugin.name) ? 'mod synced here, plugin not installed' : 'not installed'
const rows: RenderElement[] = [rule(ctx, plugin.name, state), text(ctx, ` ${plugin.description}`, { color: THEME.info })]
rows.push(kv(ctx, 'version', `${plugin.version ?? 'n/a'}${installed.has(plugin.name) ? ` (installed ${version.get(plugin.name) ?? '?'})` : ''}`))
@@ -119,7 +119,7 @@ export function catalogView(ctx: Ctx): RenderElement {
const lead = Math.max(24, Math.min(34, ctx.columns - 60))
rows.push(rule(ctx, 'Plugin Catalog', `${all.length} plugins · ${installed.size} installed · ${enabled.size} enabled`))
- rows.push(text(ctx, ` ${total(plugin => plugin.skills.length)} skills · ${total(plugin => plugin.agents.length)} agents · ${total(plugin => plugin.commands.length)} commands · ${all.filter(plugin => plugin.hasMcp).length} MCP · ${all.filter(plugin => plugin.isMod).length} mods · ■ enabled □ installed · not installed`, { dimColor: true }))
+ rows.push(text(ctx, ` ${total(plugin => plugin.skills.length)} skills · ${total(plugin => plugin.agents.length)} agents · ${total(plugin => plugin.commands.length)} commands · ${all.filter(plugin => plugin.hasMcp).length} MCP · ${all.filter(plugin => plugin.isMod).length} mods · ■ enabled □ installed ◇ mod synced, plugin not installed · not installed`, { dimColor: true }))
// The marketplace these come from: how fresh the clone is, with the way back to the Plugins page (the setup's health) and the update.
const market = state.snapshot?.plugins.markets?.find(entry => entry.name === RUFLO_MARKET)
const isStale = (state.snapshot?.plugins.missingFromClone.length ?? 0) > 0
diff --git a/plugins/ruflo-console/tests/plugin-catalog-synced.spec.ts b/plugins/ruflo-console/tests/plugin-catalog-synced.spec.ts
new file mode 100644
index 0000000000..78174ab829
--- /dev/null
+++ b/plugins/ruflo-console/tests/plugin-catalog-synced.spec.ts
@@ -0,0 +1,56 @@
+/**
+ * #3979 item 2: Claude Code's mod sync loads a marketplace mod without installing its plugin (`ruflo-arena@synced`). The Plugins page said
+ * "loaded"; the Plugin Catalog read only installed_plugins.json and said "not installed". It now says the mod is synced here and the plugin
+ * is not installed, and keeps the install button.
+ * npx vitest run plugins/ruflo-console/tests/plugin-catalog-synced.spec.ts
+ */
+import { describe, expect, it } from 'vitest'
+
+import type { CatalogPlugin } from '../hooks/data/plugin-catalog'
+import { catalogOf, syncedOf } from '../hooks/plugin-catalog'
+import { newState } from '../hooks/state'
+import { catalogView } from '../hooks/views/plugin-catalog'
+import { linesOf, plainKit } from '../hooks/views/pane'
+import type { Actions, Ctx } from '../hooks/views/common'
+
+const plugin = (name: string): CatalogPlugin => ({ name, description: `the ${name} plugin`, version: '1.0.0', skills: [], agents: [], commands: [], hasMcp: false, isMod: true }) as CatalogPlugin
+
+function world() {
+ const state = newState({})
+
+ state.snapshot = { plugins: { missingFromClone: [], installed: [{ id: 'ruflo-installed@ruflo', name: 'ruflo-installed', marketplace: 'ruflo', version: '1.0.0' }], enabled: new Set(['ruflo-installed@ruflo']), markets: [] } } as never
+ catalogOf(state).plugins = [plugin('ruflo-arena'), plugin('ruflo-installed'), plugin('ruflo-absent'), plugin('ruflo-refused')]
+ state.mods.push(
+ { name: 'ruflo-arena', provenance: 'ruflo-arena@synced', isLoaded: true, atMs: 1 },
+ { name: 'ruflo-installed', provenance: 'ruflo-installed@synced', isLoaded: true, atMs: 1 },
+ { name: 'ruflo-refused', provenance: 'ruflo-refused@synced', isLoaded: false, reason: 'trust', atMs: 1 },
+ { name: 'someone-else', provenance: 'ruflo-absent@ruflo', isLoaded: true, atMs: 1 },
+ )
+
+ return state
+}
+
+const draw = (state: ReturnType<typeof world>): string => {
+ const out: string[] = []
+ const ctx = { kit: plainKit(), state, nowMs: 1_000_000, columns: 140, pictures: new Map(), act: new Proxy({}, { get: () => new Proxy(() => undefined, { get: () => () => undefined }) }) as unknown as Actions } as Ctx
+
+ linesOf(catalogView(ctx), out)
+
+ return out.join('\n')
+}
+
+describe('Plugin Catalog and mods loaded by sync', () => {
+ it('a synced mod whose plugin is not installed is named, an installed or refused or marketplace-loaded one is not', () => {
+ expect([...syncedOf(world())]).toEqual(['ruflo-arena'])
+ })
+
+ it('the row and the detail say so instead of "not installed"', () => {
+ const state = world()
+
+ expect(draw(state)).toMatch(/â—‡ ruflo-arena/)
+ expect(draw(state)).toMatch(/· ruflo-absent/)
+ catalogOf(state).selected = 'ruflo-arena'
+ expect(draw(state)).toContain('mod synced here, plugin not installed')
+ expect(draw(state)).toMatch(/install/)
+ })
+})
diff --git a/plugins/ruflo-mods/CHANGELOG.md b/plugins/ruflo-mods/CHANGELOG.md
index 000117de05..ed138f54e5 100644
--- a/plugins/ruflo-mods/CHANGELOG.md
+++ b/plugins/ruflo-mods/CHANGELOG.md
@@ -13,7 +13,6 @@ Newest first. One `## <version> — <date>` heading per version, then `feat:`, `
## 0.3.16 — 2026-10-07
- feat: shared toast system with levels, dedupe, persistence and Settings (ADR-477)
-- feat: shared toast policy and its call sites (ADR-477), work in progress
- fix: a toast needs no engine.create (bind at session.start too), a throwing clock falls back to the wall clock; update the cost ladder expectati…
## 0.3.15 — 2026-10-07