Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

feat: show each agent's rules and plugins

forwardxu4eb7ca7dd7f9
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotDetailsView.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotDetailsView.kt
index 1871d763..7c78e697 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotDetailsView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotDetailsView.kt
@@ -40,7 +40,7 @@ import kotlinx.coroutines.delay
* (docs/plans/android-app.md).
*/
internal enum class DetailsTab(val title: String) {
- Details("Details"), Library("Library"), Settings("Settings"), Skills("Skills"), Connectors("Connectors"),
+ Details("Details"), Library("Library"), Settings("Settings"), Skills("Skills"), Connectors("Connectors"), Rules("Rules"), Plugins("Plugins"),
}
/**
@@ -50,7 +50,7 @@ internal enum class DetailsTab(val title: String) {
internal data class DetailsRequest(val tab: DetailsTab = DetailsTab.Details, val routineId: String? = null, val botId: String? = null)
/**
- * A bot's details (iOS `BotDetailsView`): who it is, then its details, library, settings, skills and connectors.
+ * A bot's details (iOS `BotDetailsView`): who it is, then its details, library, settings, skills, connectors, rules and plugins.
* Settings save as you edit.
* `openArtifact`: an artifact picked in the Library, for the chat's viewer.
*/
@@ -71,13 +71,16 @@ internal data class DetailsRequest(val tab: DetailsTab = DetailsTab.Details, val
delay(600)
store.saveSettings(draft)
}
- val tabs = listOfNotNull(DetailsTab.Details, DetailsTab.Library.takeIf { hasLibrary(state.hello?.text("version")) },
- DetailsTab.Settings, DetailsTab.Skills, DetailsTab.Connectors)
+ val botTabs = listOfNotNull(DetailsTab.Details, DetailsTab.Library.takeIf { hasLibrary(state.hello?.text("version")) }, DetailsTab.Settings)
+ val gearTabs = listOf(DetailsTab.Skills, DetailsTab.Connectors, DetailsTab.Rules, DetailsTab.Plugins)
Box(Modifier.fillMaxSize().background(Palette.background)) {
Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(start = 20.dp, end = 20.dp, bottom = 24.dp),
horizontalAlignment = Alignment.CenterHorizontally) {
Identity(bot, state)
- TabChoice(tab, tabs.map { it to it.title }, { tab = it }, Modifier.padding(top = 18.dp))
+ Column(Modifier.padding(top = 18.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(2.dp)) {
+ TabChoice(tab, botTabs.map { it to it.title }, { tab = it })
+ TabChoice(tab, gearTabs.map { it to it.title }, { tab = it })
+ }
CompositionLocalProvider(LocalCardStyle provides CardStyle.Outlined) {
Box(Modifier.fillMaxWidth().padding(top = 20.dp)) {
when (tab) {
@@ -89,8 +92,10 @@ internal data class DetailsRequest(val tab: DetailsTab = DetailsTab.Details, val
}
DetailsTab.Library -> LibraryView(bot, state, store, openArtifact)
DetailsTab.Settings -> BotSettingsForm(state, store, draft, { draft = it }, FormPart.Rarely)
- DetailsTab.Skills -> BotGearPage(bot, state, store, draft, { draft = it }, skills = true)
- DetailsTab.Connectors -> BotGearPage(bot, state, store, draft, { draft = it }, skills = false)
+ DetailsTab.Skills -> BotGearPage(bot, state, store, draft, { draft = it }, GearKind.Skills)
+ DetailsTab.Connectors -> BotGearPage(bot, state, store, draft, { draft = it }, GearKind.Connectors)
+ DetailsTab.Rules -> BotGearPage(bot, state, store, draft, { draft = it }, GearKind.Rules)
+ DetailsTab.Plugins -> BotGearPage(bot, state, store, draft, { draft = it }, GearKind.Plugins)
}
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotGearPage.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotGearPage.kt
index 20df6934..a45c3cb6 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotGearPage.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotGearPage.kt
@@ -24,7 +24,14 @@ import kotlinx.serialization.json.put
/** One skill or connector the agent keeps for itself (`agentGear`). */
internal data class GearItem(val name: String, val description: String, val detail: String)
-internal data class AgentGear(val skills: List<GearItem>, val connectors: List<GearItem>)
+internal enum class GearKind { Skills, Connectors, Rules, Plugins }
+
+internal data class AgentGear(
+ val skills: List<GearItem>,
+ val connectors: List<GearItem>,
+ val rules: List<GearItem> = emptyList(),
+ val plugins: List<GearItem> = emptyList(),
+)
/** What `backend` already has in `cwd`. Codync's own skills and connectors are not in this list. */
internal suspend fun AppStore.agentGear(backend: String, cwd: String): AgentGear {
@@ -33,7 +40,7 @@ internal suspend fun AppStore.agentGear(backend: String, cwd: String): AgentGear
put("cwd", cwd)
})
val obj = body as? JsonObject ?: return AgentGear(emptyList(), emptyList())
- return AgentGear(obj.gearItems("skills"), obj.gearItems("connectors"))
+ return AgentGear(obj.gearItems("skills"), obj.gearItems("connectors"), obj.gearItems("rules"), obj.gearItems("plugins"))
}
private fun JsonObject.gearItems(key: String): List<GearItem> {
@@ -50,7 +57,7 @@ private fun JsonObject.gearItems(key: String): List<GearItem> {
* The Skills or Connectors page: what the bot's agent already brings, then the Codync ones passed on top.
* `skills` picks the skills page; otherwise the page is connectors.
*/
-@Composable internal fun BotGearPage(bot: Bot, state: AppState, store: AppStore, draft: BotDraft, change: (BotDraft) -> Unit, skills: Boolean) {
+@Composable internal fun BotGearPage(bot: Bot, state: AppState, store: AppStore, draft: BotDraft, change: (BotDraft) -> Unit, kind: GearKind) {
val online = state.actualConnection is LinkState.Ready
val cwd = draft.cwd.ifEmpty { bot.cwd }
val agent = backendName(state, draft.backend)
@@ -72,17 +79,23 @@ private fun JsonObject.gearItems(key: String): List<GearItem> {
}
}
LaunchedEffect(online) { if (online) store.refreshPlugins() }
- val items = if (skills) gear?.skills.orEmpty() else gear?.connectors.orEmpty()
+ val passesOn = kind == GearKind.Skills || kind == GearKind.Connectors
+ val items = when (kind) {
+ GearKind.Skills -> gear?.skills.orEmpty()
+ GearKind.Connectors -> gear?.connectors.orEmpty()
+ GearKind.Rules -> gear?.rules.orEmpty()
+ GearKind.Plugins -> gear?.plugins.orEmpty()
+ }
+ val intro = if (passesOn) "{agent} brings these. Codync adds its own on top, and those are what get passed to the agent." else "{agent} brings these."
Column(verticalArrangement = Arrangement.spacedBy(28.dp)) {
- Text(tr("{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.").replace("{agent}", agent),
- style = Type.footnote, color = Palette.secondary)
+ Text(tr(intro).replace("{agent}", agent), style = Type.footnote, color = Palette.secondary)
CardSection(tr("From {agent}").replace("{agent}", agent)) {
when {
gear == null && !failed -> row { Text(tr("Loading…"), style = Type.body, color = Palette.secondary) }
failed -> row { Text(tr("Couldn't load what this agent brings."), style = Type.body, color = Palette.danger) }
items.isEmpty() -> row { Text(tr("None from this agent."), style = Type.body, color = Palette.secondary) }
else -> for (item in items) row {
- val note = if (skills) item.description else item.detail
+ val note = if (kind == GearKind.Connectors) item.detail else item.description
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
Text(item.name, style = Type.body, color = Palette.text)
if (note.isNotEmpty()) Text(note, style = Type.caption, color = Palette.secondary)
@@ -90,17 +103,19 @@ private fun JsonObject.gearItems(key: String): List<GearItem> {
}
}
}
- val plugins = state.plugins
- if (skills) {
- PluginToggles("From Codync", "No skills yet. Get some from Extensions, or write your own.",
- plugins?.skills.orEmpty().map { Triple(it.id, it.name, it.description) }, draft.skills.orEmpty(),
- { change(draft.copy(skills = it)) }, enabled = online) { id ->
- plugins?.skills?.firstOrNull { it.id == id }?.let { viewingSkill = SkillRef(it.id, it.name, it.description) }
+ if (passesOn) {
+ val plugins = state.plugins
+ if (kind == GearKind.Skills) {
+ PluginToggles("From Codync", "No skills yet. Get some from Extensions, or write your own.",
+ plugins?.skills.orEmpty().map { Triple(it.id, it.name, it.description) }, draft.skills.orEmpty(),
+ { change(draft.copy(skills = it)) }, enabled = online) { id ->
+ plugins?.skills?.firstOrNull { it.id == id }?.let { viewingSkill = SkillRef(it.id, it.name, it.description) }
+ }
+ } else {
+ PluginToggles("From Codync", "No connectors yet. Add GitHub, Linear, Notion and more from Extensions.",
+ plugins?.connectors.orEmpty().map { Triple(it.id, it.name, it.command ?: it.url.orEmpty()) },
+ draft.connectors ?: plugins?.connectors.orEmpty().map { it.id }, { change(draft.copy(connectors = it)) }, enabled = online)
}
- } else {
- PluginToggles("From Codync", "No connectors yet. Add GitHub, Linear, Notion and more from Extensions.",
- plugins?.connectors.orEmpty().map { Triple(it.id, it.name, it.command ?: it.url.orEmpty()) },
- draft.connectors ?: plugins?.connectors.orEmpty().map { it.id }, { change(draft.copy(connectors = it)) }, enabled = online)
}
}
CodyncSheet(viewingSkill, { viewingSkill = null }) { SkillSheet(it, state, store) }
diff --git a/apps/desktop/src/renderer/store/bot-store.ts b/apps/desktop/src/renderer/store/bot-store.ts
index 74b62d0b..94ae799a 100644
--- a/apps/desktop/src/renderer/store/bot-store.ts
+++ b/apps/desktop/src/renderer/store/bot-store.ts
@@ -381,11 +381,11 @@ export class BotStore extends BotSync {
}
/** Skills and connectors `backend` already has in `cwd`, not the Codync ones this bot passes on. */
- async agentGear(backend: string, cwd: string): Promise<{ skills: AgentGearItem[]; connectors: AgentGearItem[] }> {
+ async agentGear(backend: string, cwd: string): Promise<{ skills: AgentGearItem[]; connectors: AgentGearItem[]; rules: AgentGearItem[]; plugins: AgentGearItem[] }> {
const client = this.client
if (!client) throw new Error("Couldn't load what this agent brings.")
- const value = await client.call<{ skills?: AgentGearItem[]; connectors?: AgentGearItem[] }>('agentGear', { backend, cwd })
- return { skills: value.skills ?? [], connectors: value.connectors ?? [] }
+ const value = await client.call<{ skills?: AgentGearItem[]; connectors?: AgentGearItem[]; rules?: AgentGearItem[]; plugins?: AgentGearItem[] }>('agentGear', { backend, cwd })
+ return { skills: value.skills ?? [], connectors: value.connectors ?? [], rules: value.rules ?? [], plugins: value.plugins ?? [] }
}
async save(draft: BotDraft) {
diff --git a/apps/desktop/src/renderer/views/bots/GearPage.tsx b/apps/desktop/src/renderer/views/bots/GearPage.tsx
index 696e64a0..bc666b33 100644
--- a/apps/desktop/src/renderer/views/bots/GearPage.tsx
+++ b/apps/desktop/src/renderer/views/bots/GearPage.tsx
@@ -13,12 +13,12 @@ import { errorText, isValid, normalized, useFollowSaved, usePlugins } from './dr
import './bots.css'
/** The agent's own skills or connectors, then the Codync ones this bot passes on. */
-export function GearPage({ botId, kind }: { botId: string; kind: 'skills' | 'connectors' }) {
+export function GearPage({ botId, kind }: { botId: string; kind: 'skills' | 'connectors' | 'rules' | 'plugins' }) {
const tr = useTr()
const store = useStore()
const plugins = usePlugins(store)
const [draft, setDraft] = useState<BotDraft | null>(null)
- const [gear, setGear] = useState<{ skills: AgentGearItem[]; connectors: AgentGearItem[] } | null>(null)
+ const [gear, setGear] = useState<{ skills: AgentGearItem[]; connectors: AgentGearItem[]; rules: AgentGearItem[]; plugins: AgentGearItem[] } | null>(null)
const [failed, setFailed] = useState(false)
const [error, setError] = useState<string | null>(null)
const [viewingSkill, setViewingSkill] = useState<SkillRef | null>(null)
@@ -67,13 +67,17 @@ export function GearPage({ botId, kind }: { botId: string; kind: 'skills' | 'con
}
if (!draft) return null
- const items = (kind === 'skills' ? gear?.skills : gear?.connectors) ?? []
+ const passesOn = kind === 'skills' || kind === 'connectors'
+ const items = gear?.[kind] ?? []
const fromAgent = tr('From {agent}').replace('{agent}', agent)
+ const intro = passesOn
+ ? '{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.'
+ : '{agent} brings these.'
return (
<div className="bot-form">
<div className="bot-form-content">
<Text size="footnote" tone="secondary">
- {tr('{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.').replace('{agent}', agent)}
+ {tr(intro).replace('{agent}', agent)}
</Text>
<CardSection title={fromAgent}>
{failed ? (
@@ -84,7 +88,7 @@ export function GearPage({ botId, kind }: { botId: string; kind: 'skills' | 'con
<Text tone="secondary">{tr('None from this agent.')}</Text>
) : (
items.map((item) => {
- const note = kind === 'skills' ? item.description : item.detail
+ const note = kind === 'connectors' ? item.detail : item.description
return (
<VStack key={item.name} gap={2}>
<Text>{item.name}</Text>
@@ -94,7 +98,7 @@ export function GearPage({ botId, kind }: { botId: string; kind: 'skills' | 'con
})
)}
</CardSection>
- {kind === 'skills' ? (
+ {kind === 'rules' || kind === 'plugins' ? null : kind === 'skills' ? (
<PluginToggles
title="From Codync"
empty="No skills yet. Get some from Extensions, or write your own."
diff --git a/apps/desktop/src/renderer/views/thread/DetailsPanel.tsx b/apps/desktop/src/renderer/views/thread/DetailsPanel.tsx
index eb19c72d..ece12988 100644
--- a/apps/desktop/src/renderer/views/thread/DetailsPanel.tsx
+++ b/apps/desktop/src/renderer/views/thread/DetailsPanel.tsx
@@ -20,15 +20,19 @@ import './details-panel.css'
import { useTr } from '../../lib/use-language'
-export type DetailsTab = 'details' | 'library' | 'memory' | 'settings' | 'skills' | 'connectors'
+export type DetailsTab = 'details' | 'library' | 'memory' | 'settings' | 'skills' | 'connectors' | 'rules' | 'plugins'
-const TABS: { id: DetailsTab; label: string }[] = [
+const BOT_TABS: { id: DetailsTab; label: string }[] = [
{ id: 'details', label: 'Details' },
{ id: 'library', label: 'Library' },
{ id: 'memory', label: 'Memory' },
{ id: 'settings', label: 'Settings' },
+]
+const GEAR_TABS: { id: DetailsTab; label: string }[] = [
{ id: 'skills', label: 'Skills' },
{ id: 'connectors', label: 'Connectors' },
+ { id: 'rules', label: 'Rules' },
+ { id: 'plugins', label: 'Plugins' },
]
/** The inspector beside a conversation (Grok Bot's): who the bot is, then its details, library, memory, settings, skills and connectors. */
@@ -59,7 +63,10 @@ export function DetailsPanel({ botId, routineId, tab, setTab, editGroup, openArt
<GroupMembersList group={bot} editGroup={editGroup} />
) : (
<>
- <TabChoice label="Conversation details" selection={tab} options={hasLibrary(store.hostVersion?.version) ? TABS : TABS.filter((t) => t.id !== 'library')} onChange={setTab} />
+ <div className="details-tabs">
+ <TabChoice label="Conversation details" selection={tab} options={hasLibrary(store.hostVersion?.version) ? BOT_TABS : BOT_TABS.filter((t) => t.id !== 'library')} onChange={setTab} />
+ <TabChoice label="What the agent brings" selection={tab} options={GEAR_TABS} onChange={setTab} />
+ </div>
<div key={tab} className="details-tab fade-in">
{tab === 'details' ? (
<>
@@ -71,7 +78,7 @@ export function DetailsPanel({ botId, routineId, tab, setTab, editGroup, openArt
<LibraryView botId={botId} openArtifact={openArtifact} />
) : tab === 'memory' ? (
<MemoryCard botId={botId} />
- ) : tab === 'skills' || tab === 'connectors' ? (
+ ) : tab === 'skills' || tab === 'connectors' || tab === 'rules' || tab === 'plugins' ? (
<GearPage botId={botId} kind={tab} />
) : (
<BotSettingsPanel botId={botId} part="rarely" />
diff --git a/apps/desktop/src/renderer/views/thread/details-panel.css b/apps/desktop/src/renderer/views/thread/details-panel.css
index 7e34d11f..906730eb 100644
--- a/apps/desktop/src/renderer/views/thread/details-panel.css
+++ b/apps/desktop/src/renderer/views/thread/details-panel.css
@@ -18,6 +18,14 @@
background: linear-gradient(var(--background) 70%, transparent);
-webkit-app-region: drag;
}
+/* The bot's pages, then what its agent brings. One row of eight labels does not fit this panel. */
+.details-tabs {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 2px;
+}
+
.details-actions {
position: absolute;
top: 11px;
diff --git a/apps/ios/Kit/Sources/CodyncKit/Models/Market.swift b/apps/ios/Kit/Sources/CodyncKit/Models/Market.swift
index 2e821cf2..e5da83be 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Models/Market.swift
+++ b/apps/ios/Kit/Sources/CodyncKit/Models/Market.swift
@@ -108,23 +108,29 @@ public struct MarketConnector: Codable, Hashable, Sendable, Identifiable {
}
}
-/// Skills and MCP connectors an agent keeps for itself (`agentGear`). Codync's own are separate.
+/// Skills, connectors, rules and plugins an agent keeps for itself (`agentGear`). Codync's own skills and connectors are separate.
public struct AgentGear: Decodable, Sendable, Equatable {
public var skills: [AgentGearItem]
public var connectors: [AgentGearItem]
+ public var rules: [AgentGearItem]
+ public var plugins: [AgentGearItem]
- public init(skills: [AgentGearItem] = [], connectors: [AgentGearItem] = []) {
+ public init(skills: [AgentGearItem] = [], connectors: [AgentGearItem] = [], rules: [AgentGearItem] = [], plugins: [AgentGearItem] = []) {
self.skills = skills
self.connectors = connectors
+ self.rules = rules
+ self.plugins = plugins
}
public init(from decoder: Decoder) throws {
let c = try decoder.container(keyedBy: CodingKeys.self)
skills = try c.decodeIfPresent([AgentGearItem].self, forKey: .skills) ?? []
connectors = try c.decodeIfPresent([AgentGearItem].self, forKey: .connectors) ?? []
+ rules = try c.decodeIfPresent([AgentGearItem].self, forKey: .rules) ?? []
+ plugins = try c.decodeIfPresent([AgentGearItem].self, forKey: .plugins) ?? []
}
- private enum CodingKeys: String, CodingKey { case skills, connectors }
+ private enum CodingKeys: String, CodingKey { case skills, connectors, rules, plugins }
}
public struct AgentGearItem: Decodable, Sendable, Equatable, Identifiable {
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
index 0db811ca..6e320557 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
@@ -439,8 +439,13 @@
"None from this agent.": "Keine von diesem Agenten.",
"{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.": "{agent} bringt diese mit. Codync legt eigene darüber; eingeschaltete werden an den Agenten übergeben.",
"Couldn't load what this agent brings.": "Was dieser Agent mitbringt, konnte nicht geladen werden.",
- "between details, library, memory, settings, skills and connectors": "zwischen Details, Bibliothek, Gedächtnis, Einstellungen, Skills und Connectors",
+ "{agent} brings these.": "{agent} bringt diese mit.",
+ "Rules": "Regeln",
+ "Plugins": "Plugins",
+ "Skills, connectors, rules and plugins belong to a bot, not a group": "Skills, Connectors, Regeln und Plugins gehören zu einem Bot, nicht zu einer Gruppe",
+ "between details, library, memory, settings, skills, connectors, rules and plugins": "zwischen Details, Bibliothek, Gedächtnis, Einstellungen, Skills, Connectors, Regeln und Plugins",
"space on / off · ⇧←→ page · esc": "Leertaste an / aus · ⇧←→ Seite · esc",
+ "⇧←→ page · esc": "⇧←→ Seite · esc",
"No skills yet. Get some from Extensions, or write your own.": "Noch keine Skills. Hole welche aus den Erweiterungen oder schreibe eigene.",
"Your coding agents, as teammates.": "Deine Coding-Agenten als Teamkollegen.",
"Pick a bot, or create one for each kind of work and point it at a project.": "Wähle einen Bot oder erstelle für jede Art von Arbeit einen und weise ihm ein Projekt zu.",
@@ -911,6 +916,7 @@
"Connect this computer to create the bot.": "Verbinde diesen Computer, um den Bot zu erstellen.",
"Connection request updated": "Verbindungsanfrage aktualisiert",
"Conversation details": "Gesprächsdetails",
+ "What the agent brings": "Was der Agent mitbringt",
"Copied the last reply": "Letzte Antwort kopiert",
"Copy install command": "Installationsbefehl kopieren",
"Copy pairing link": "Kopplungslink kopieren",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
index b09f48e4..3e7907ed 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
@@ -439,8 +439,13 @@
"None from this agent.": "Ninguno de este agente.",
"{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.": "{agent} trae estos. Codync añade los suyos encima; los activados se pasan al agente.",
"Couldn't load what this agent brings.": "No se pudo leer lo que trae este agente.",
- "between details, library, memory, settings, skills and connectors": "entre detalles, biblioteca, memoria, ajustes, habilidades y conectores",
+ "{agent} brings these.": "{agent} trae estos.",
+ "Rules": "Reglas",
+ "Plugins": "Plugins",
+ "Skills, connectors, rules and plugins belong to a bot, not a group": "Las habilidades, conectores, reglas y plugins pertenecen a un bot, no a un grupo",
+ "between details, library, memory, settings, skills, connectors, rules and plugins": "entre detalles, biblioteca, memoria, ajustes, habilidades, conectores, reglas y plugins",
"space on / off · ⇧←→ page · esc": "espacio on / off · ⇧←→ página · esc",
+ "⇧←→ page · esc": "⇧←→ página · esc",
"No skills yet. Get some from Extensions, or write your own.": "Aún no hay habilidades. Consíguelas en Extensiones o escribe las tuyas.",
"Your coding agents, as teammates.": "Tus agentes de programación, como compañeros de equipo.",
"Pick a bot, or create one for each kind of work and point it at a project.": "Elige un bot o crea uno para cada tipo de trabajo y asígnale un proyecto.",
@@ -911,6 +916,7 @@
"Connect this computer to create the bot.": "Conecta esta computadora para crear el bot.",
"Connection request updated": "Solicitud de conexión actualizada",
"Conversation details": "Detalles de la conversación",
+ "What the agent brings": "Lo que trae el agente",
"Copied the last reply": "Última respuesta copiada",
"Copy install command": "Copiar comando de instalación",
"Copy pairing link": "Copiar enlace de vinculación",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
index ba3b4d9e..0989d018 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
@@ -439,8 +439,13 @@
"None from this agent.": "Aucun de la part de cet agent.",
"{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.": "{agent} apporte ceux-ci. Codync ajoute les siens par-dessus ; ceux qui sont activés sont transmis à l'agent.",
"Couldn't load what this agent brings.": "Impossible de lire ce que cet agent apporte.",
- "between details, library, memory, settings, skills and connectors": "entre détails, bibliothèque, mémoire, réglages, compétences et connecteurs",
+ "{agent} brings these.": "{agent} apporte ceci.",
+ "Rules": "Règles",
+ "Plugins": "Plugins",
+ "Skills, connectors, rules and plugins belong to a bot, not a group": "Les compétences, connecteurs, règles et plugins appartiennent à un bot, pas à un groupe",
+ "between details, library, memory, settings, skills, connectors, rules and plugins": "entre détails, bibliothèque, mémoire, réglages, compétences, connecteurs, règles et plugins",
"space on / off · ⇧←→ page · esc": "espace on / off · ⇧←→ page · esc",
+ "⇧←→ page · esc": "⇧←→ page · esc",
"No skills yet. Get some from Extensions, or write your own.": "Aucune compétence pour le moment. Ajoutez-en depuis Extensions ou écrivez les vôtres.",
"Your coding agents, as teammates.": "Vos agents de programmation, comme coéquipiers.",
"Pick a bot, or create one for each kind of work and point it at a project.": "Choisissez un bot ou créez-en un par type de travail et attribuez-lui un projet.",
@@ -911,6 +916,7 @@
"Connect this computer to create the bot.": "Connectez cet ordinateur pour créer le bot.",
"Connection request updated": "Demande de connexion mise à jour",
"Conversation details": "Détails de la conversation",
+ "What the agent brings": "Ce que l'agent apporte",
"Copied the last reply": "Dernière réponse copiée",
"Copy install command": "Copier la commande d’installation",
"Copy pairing link": "Copier le lien d’association",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
index 3a382687..40c9d380 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
@@ -439,8 +439,13 @@
"None from this agent.": "このエージェントからはありません。",
"{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.": "{agent} が持っているものです。Codync のものは上に加わり、オンにしたものがエージェントに渡されます。",
"Couldn't load what this agent brings.": "このエージェントが持っているものを読み込めませんでした。",
- "between details, library, memory, settings, skills and connectors": "詳細、ライブラリ、メモリ、設定、スキル、コネクタの間",
+ "{agent} brings these.": "{agent} が持っているものです。",
+ "Rules": "ルール",
+ "Plugins": "プラグイン",
+ "Skills, connectors, rules and plugins belong to a bot, not a group": "スキル、コネクタ、ルール、プラグインはグループではなくボットに属します",
+ "between details, library, memory, settings, skills, connectors, rules and plugins": "詳細、ライブラリ、メモリ、設定、スキル、コネクタ、ルール、プラグインの間",
"space on / off · ⇧←→ page · esc": "space オン/オフ · ⇧←→ ページ · esc",
+ "⇧←→ page · esc": "⇧←→ ページ · esc",
"No skills yet. Get some from Extensions, or write your own.": "まだスキルはありません。拡張機能からいくつかを取得するか、独自に作成します。",
"Your coding agents, as teammates.": "チームメイトとしてのコーディングエージェント。",
"Pick a bot, or create one for each kind of work and point it at a project.": "ボットを選択するか、作業の種類ごとにボットを作成してプロジェクトに向けます。",
@@ -911,6 +916,7 @@
"Connect this computer to create the bot.": "このコンピューターを接続してボットを作成します。",
"Connection request updated": "接続リクエストが更新されました",
"Conversation details": "会話の詳細",
+ "What the agent brings": "このエージェントが持っているもの",
"Copied the last reply": "最後の返信をコピーしました",
"Copy install command": "インストールコマンドのコピー",
"Copy pairing link": "ペアリングリンクをコピーする",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
index 2f11d1f0..39c6d68f 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
@@ -439,8 +439,13 @@
"None from this agent.": "이 에이전트에는 없습니다.",
"{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.": "{agent}가 직접 가져오는 것입니다. Codync의 것은 위에 더해지며, 켜 둔 것이 에이전트에 전달됩니다.",
"Couldn't load what this agent brings.": "이 에이전트가 가져오는 것을 불러오지 못했습니다.",
- "between details, library, memory, settings, skills and connectors": "상세, 라이브러리, 메모리, 설정, 기술, 커넥터 사이",
+ "{agent} brings these.": "{agent}이 기본으로 가진 것입니다.",
+ "Rules": "규칙",
+ "Plugins": "플러그인",
+ "Skills, connectors, rules and plugins belong to a bot, not a group": "기술, 커넥터, 규칙, 플러그인은 그룹이 아닌 봇에 속합니다",
+ "between details, library, memory, settings, skills, connectors, rules and plugins": "상세, 라이브러리, 메모리, 설정, 기술, 커넥터, 규칙, 플러그인 사이",
"space on / off · ⇧←→ page · esc": "space 켜기/끄기 · ⇧←→ 페이지 · esc",
+ "⇧←→ page · esc": "⇧←→ 페이지 · esc",
"No skills yet. Get some from Extensions, or write your own.": "아직 스킬이 없습니다. Extensions에서 일부를 가져오거나 직접 작성해 보세요.",
"Your coding agents, as teammates.": "코딩 에이전트를 팀원으로 활용하세요.",
"Pick a bot, or create one for each kind of work and point it at a project.": "봇을 선택하거나 작업 종류별로 하나를 만들고 프로젝트를 가리킵니다.",
@@ -911,6 +916,7 @@
"Connect this computer to create the bot.": "봇을 만들려면 이 컴퓨터에 연결하세요.",
"Connection request updated": "연결 요청 갱신됨",
"Conversation details": "대화 상세 정보",
+ "What the agent brings": "이 에이전트가 가진 것",
"Copied the last reply": "마지막 답장 복사됨",
"Copy install command": "설치 명령 복사",
"Copy pairing link": "페어링 링크 복사",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
index d40693e2..53805d38 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
@@ -439,8 +439,13 @@
"None from this agent.": "这个智能体没有自带的。",
"{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.": "{agent} 自带这些。Codync 再叠加上去,打开的会传给智能体。",
"Couldn't load what this agent brings.": "没能读到这个智能体自带的。",
- "between details, library, memory, settings, skills and connectors": "在详情、资料库、记忆、设置、技能和连接器之间切换",
+ "{agent} brings these.": "{agent} 自带这些。",
+ "Rules": "规则",
+ "Plugins": "插件",
+ "Skills, connectors, rules and plugins belong to a bot, not a group": "技能、连接器、规则和插件属于 Bot,不属于群聊",
+ "between details, library, memory, settings, skills, connectors, rules and plugins": "在详情、资料库、记忆、设置、技能、连接器、规则和插件之间切换",
"space on / off · ⇧←→ page · esc": "空格 开/关 · ⇧←→ 翻页 · esc",
+ "⇧←→ page · esc": "⇧←→ 翻页 · esc",
"No skills yet. Get some from Extensions, or write your own.": "还没有技能。到「扩展」里找,或自己写。",
"Your coding agents, as teammates.": "你的编程智能体,像队友一样。",
"Pick a bot, or create one for each kind of work and point it at a project.": "选一个 Bot,或为每种工作新建一个,并指向一个项目。",
@@ -911,6 +916,7 @@
"Connect this computer to create the bot.": "先连上这台电脑,才能创建 Bot。",
"Connection request updated": "连接请求已更新",
"Conversation details": "对话详情",
+ "What the agent brings": "这个 agent 自带的",
"Copied the last reply": "已复制上一条回复",
"Copy install command": "复制安装命令",
"Copy pairing link": "复制配对链接",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
index efac94ac..7705b2e5 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
@@ -439,8 +439,13 @@
"None from this agent.": "這個智能體沒有自帶的。",
"{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.": "{agent} 自帶這些。Codync 再疊加上去,打開的會傳給智能體。",
"Couldn't load what this agent brings.": "沒能讀到這個智能體自帶的。",
- "between details, library, memory, settings, skills and connectors": "在詳情、資料庫、記憶、設定、技能和連接器之間切換",
+ "{agent} brings these.": "{agent} 自帶這些。",
+ "Rules": "規則",
+ "Plugins": "外掛",
+ "Skills, connectors, rules and plugins belong to a bot, not a group": "技能、連接器、規則和插件屬於 Bot,不屬於群聊",
+ "between details, library, memory, settings, skills, connectors, rules and plugins": "在詳情、資料庫、記憶、設定、技能、連接器、規則和插件之間切換",
"space on / off · ⇧←→ page · esc": "空白鍵 開/關 · ⇧←→ 翻頁 · esc",
+ "⇧←→ page · esc": "⇧←→ 翻頁 · esc",
"No skills yet. Get some from Extensions, or write your own.": "還沒有技能。到「擴充套件」裡找,或自己寫。",
"Your coding agents, as teammates.": "你的程式設計智慧體,像隊友一樣。",
"Pick a bot, or create one for each kind of work and point it at a project.": "選一個 Bot,或為每種工作新建一個,並指向一個專案。",
@@ -911,6 +916,7 @@
"Connect this computer to create the bot.": "先連上這臺電腦,才能建立 Bot。",
"Connection request updated": "連線請求已更新",
"Conversation details": "對話詳情",
+ "What the agent brings": "這個 agent 自帶的",
"Copied the last reply": "已複製上一條回覆",
"Copy install command": "複製安裝命令",
"Copy pairing link": "複製配對連結",
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/BotDetailsView.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/BotDetailsView.swift
index beec0364..240efb55 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/BotDetailsView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/BotDetailsView.swift
@@ -3,7 +3,7 @@ import SwiftUI
/// The details sheet's pages, as on the desktop inspector.
enum DetailsTab: Hashable {
- case details, library, memory, settings, skills, connectors
+ case details, library, memory, settings, skills, connectors, rules, plugins
}
/// What to open the details sheet on.
@@ -16,8 +16,8 @@ struct DetailsRequest: Identifiable {
var botId: String?
}
-/// A bot's details (Grok Bot's): who it is, then its details, library, memory, settings, skills and
-/// connectors. Settings save as you edit.
+/// A bot's details (Grok Bot's): who it is, then its details, library, memory, settings, skills,
+/// connectors, rules and plugins. Settings save as you edit.
struct BotDetailsView: View {
let botId: String
let routineId: String?
@@ -44,9 +44,12 @@ struct BotDetailsView: View {
ScrollView {
VStack(spacing: 0) {
if let bot { identity(bot) }
- TabChoice(selection: $tab, options: [(.details, "Details")] + (model.hasLibrary ? [(.library, "Library")] : [])
- + [(.memory, "Memory"), (.settings, "Settings"), (.skills, "Skills"), (.connectors, "Connectors")])
- .padding(.top, 18)
+ VStack(spacing: 2) {
+ TabChoice(selection: $tab, options: [(.details, "Details")] + (model.hasLibrary ? [(.library, "Library")] : [])
+ + [(.memory, "Memory"), (.settings, "Settings")])
+ TabChoice(selection: $tab, options: [(.skills, "Skills"), (.connectors, "Connectors"), (.rules, "Rules"), (.plugins, "Plugins")])
+ }
+ .padding(.top, 18)
page.padding(.top, 20)
.environment(\.cardStyle, .outlined)
.environment(\.noteLines, 2)
@@ -148,6 +151,10 @@ struct BotDetailsView: View {
if let draft = Binding($draft) { BotGearPage(draft: draft, kind: .skills, saveError: saveError) }
case .connectors:
if let draft = Binding($draft) { BotGearPage(draft: draft, kind: .connectors, saveError: saveError) }
+ case .rules:
+ if let draft = Binding($draft) { BotGearPage(draft: draft, kind: .rules, saveError: saveError) }
+ case .plugins:
+ if let draft = Binding($draft) { BotGearPage(draft: draft, kind: .plugins, saveError: saveError) }
}
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/BotGearPage.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/BotGearPage.swift
index 2adbd433..b6d4e89f 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/BotGearPage.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/BotGearPage.swift
@@ -9,7 +9,15 @@ struct BotGearPage: View {
@Environment(BotStore.self) private var model
@State private var viewingSkill: SkillRef?
- enum Kind { case skills, connectors }
+ enum Kind { case skills, connectors, rules, plugins
+
+ var passesOn: Bool {
+ switch self {
+ case .skills, .connectors: true
+ case .rules, .plugins: false
+ }
+ }
+ }
private var bot: Bot? { draft.id.flatMap { model.bots[$0] } }
@@ -22,17 +30,27 @@ struct BotGearPage: View {
switch kind {
case .skills: model.agentGear?.skills ?? []
case .connectors: model.agentGear?.connectors ?? []
+ case .rules: model.agentGear?.rules ?? []
+ case .plugins: model.agentGear?.plugins ?? []
}
}
+ private var intro: String {
+ let key = kind.passesOn
+ ? "{agent} brings these. Codync adds its own on top, and those are what get passed to the agent."
+ : "{agent} brings these."
+ return L10n.tr(key).replacingOccurrences(of: "{agent}", with: agent)
+ }
+
var body: some View {
VStack(alignment: .leading, spacing: 28) {
- Text(L10n.tr("{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.")
- .replacingOccurrences(of: "{agent}", with: agent))
+ Text(intro)
.font(.footnote)
.foregroundStyle(Palette.secondary)
agentSection
- codyncSection.disabled(model.isOffline)
+ if kind.passesOn {
+ codyncSection.disabled(model.isOffline)
+ }
if let saveError {
Text(saveError).font(.footnote).foregroundStyle(Palette.danger)
}
@@ -53,7 +71,7 @@ struct BotGearPage: View {
ForEach(agentItems) { item in
VStack(alignment: .leading, spacing: 2) {
Text(item.name).foregroundStyle(Palette.text)
- let note = kind == .skills ? item.description : item.detail
+ let note = kind == .connectors ? item.detail : item.description
if !note.isEmpty {
Text(note).font(.caption).foregroundStyle(Palette.secondary)
}
@@ -80,6 +98,8 @@ struct BotGearPage: View {
items: model.installedConnectors.map { ($0.id, $0.name, $0.command ?? $0.url ?? "") },
selection: Binding(get: { draft.connectors ?? [] }, set: { draft.connectors = $0 })
)
+ case .rules, .plugins:
+ EmptyView()
}
}
diff --git a/docs/plans/android-app.md b/docs/plans/android-app.md
index 46090190..46d45d7f 100644
--- a/docs/plans/android-app.md
+++ b/docs/plans/android-app.md
@@ -19,7 +19,7 @@ emulator against a real host; device acceptance is listed separately.
| Roster | Ported: rows, menus, pin/hide/delete, New session (bots only), groups, drag to reorder (host-synced order) and TalkBack Move up/down, computer header, pull to refresh (also in Computer management) | Multiple computers |
| Conversation | Ported: bubbles, Markdown/code, permissions, reactions, quote replies, Full conversation, bot-to-bot exchange lines and their conversation, routine notices that open their routine, files a bot shares (verified download, then the share sheet), sent images full size, pull down to reconnect, jump to latest, read receipts for every conversation on screen | Physical keyboard and TalkBack |
| Composer | Ported: files/photos/paste (groups too, image thumbnails, Paste only when the clipboard holds files), `/` commands (Fast mode, skills listed fresh on `/`), @mentions in groups, call/send/stop/interrupt button | Dictation ([voice call](../features/voice-call.md)): the mic, its recording pill, the engine menu beside it (On device, or OpenAI / Gemini transcribed on the user's key with *Transcribing…*) and the *Couldn't dictate* dialog |
-| Bot and group editors | Ported: avatar, profile, agent and model options, Fast mode, workspace folder picker, permissions, activity, connectors, skills (with their details); the bot details sheet (`BotDetailsView`, from the chat's title, a routine notice or Add a fallback): Details (instructions, agent, Use the computer, Routines), Library, Settings, Skills and Connectors tabs saved as you edit, Create template; a group's title opens its editor | The details' Memory tab (see Memory) |
+| Bot and group editors | Ported: avatar, profile, agent and model options, Fast mode, workspace folder picker, permissions, activity, connectors, skills (with their details); the bot details sheet (`BotDetailsView`, from the chat's title, a routine notice or Add a fallback): Details (instructions, agent, Use the computer, Routines), Library, Settings, Skills and Connectors (the agent's own, plus Codync's switches), Rules and Plugins (what the agent already has, read only), saved as you edit, Create template; a group's title opens its editor | The details' Memory tab (see Memory) |
| Memory | Broken since 2.18.0: the screen calls removed host methods (see [Not ported yet](#not-ported-yet)); it shows only in the roster's Edit profile, and the bot details have no Memory tab until the port | Port the read-only memory screen from `MemoryView.swift`, `MemoryFilesView.swift` and `MemoryInfoSheet.swift`, without add, edit, pin or forget |
| Routines | Ported: list with switches, editor (schedule, webhook panel, run settings), test run, delete | Live provider/routine acceptance |
| Extensions | Ported: agents (install, sign-in, setup terminal), registry connectors, Composio apps, skills, installed list, custom connector, own skill, credentials, chat connection request card | Real provider OAuth, 1Password |
diff --git a/host/src/agent/gear.rs b/host/src/agent/gear.rs
index aa3eb9b9..d77b4cff 100644
--- a/host/src/agent/gear.rs
+++ b/host/src/agent/gear.rs
@@ -1,7 +1,8 @@
-//! An agent's own skills and MCP connectors, read from the config it keeps on disk.
+//! An agent's own skills, MCP connectors, rules and plugins, read from the config it keeps on disk.
//!
//! Codync's skills and connectors are a separate list: clients show them beside these
-//! and pass along the ones the bot has switched on. This never starts the agent.
+//! and pass along the ones the bot has switched on. Rules and plugins are the agent's own;
+//! Codync does not add either. This never starts the agent.
//! MCP environment variables, headers and tokens stay in the files.
use serde_json::{Map, Value, json};
@@ -21,8 +22,9 @@ struct Item {
detail: String,
}
-/// `{ skills: [{name, description}], connectors: [{name, detail}] }` for `backend` working in `cwd`.
+/// `{ skills, connectors, rules, plugins }` for `backend` working in `cwd`.
/// An empty `cwd` lists only what the agent keeps for the user, not a project.
+/// Each entry is `{name, description}` except connectors, which use `{name, detail}`.
pub async fn list(backend: &str, cwd: &str) -> Value {
let backend = backend.to_owned();
let cwd = cwd.to_owned();
@@ -30,7 +32,7 @@ pub async fn list(backend: &str, cwd: &str) -> Value {
Ok(value) => value,
Err(e) => {
tracing::warn!(error = format!("{e:#}"), "listing an agent's skills and connectors");
- json!({"skills": [], "connectors": []})
+ json!({"skills": [], "connectors": [], "rules": [], "plugins": []})
}
}
}
@@ -39,9 +41,12 @@ fn scan(backend: &str, cwd: &str) -> Value {
let home = dirs::home_dir().unwrap_or_default();
let project = (!cwd.is_empty()).then(|| Path::new(cwd));
let (skills, connectors) = collect(backend, &home, project);
+ let (rules, plugins) = super::gear_catalog::list(backend, &home, project);
json!({
"skills": skills.iter().map(|s| json!({"name": s.name, "description": s.description})).collect::<Vec<_>>(),
"connectors": connectors.iter().map(|c| json!({"name": c.name, "detail": c.detail})).collect::<Vec<_>>(),
+ "rules": rules.iter().map(|s| json!({"name": s.name, "description": s.description})).collect::<Vec<_>>(),
+ "plugins": plugins.iter().map(|s| json!({"name": s.name, "description": s.description})).collect::<Vec<_>>(),
})
}
diff --git a/host/src/agent/gear_catalog.rs b/host/src/agent/gear_catalog.rs
new file mode 100644
index 00000000..7e1b93b3
--- /dev/null
+++ b/host/src/agent/gear_catalog.rs
@@ -0,0 +1,398 @@
+//! Rules and plugins an agent already has on disk. Names and descriptions only:
+//! a plugin manifest's other fields (hooks, MCP, tokens) stay in the file.
+
+use serde_json::Value;
+use std::io::Read;
+use std::path::Path;
+
+const MAX_ITEMS: usize = 200;
+const MAX_DEPTH: usize = 3;
+const FILE_BYTES: u64 = 64 * 1024;
+const TEXT_CHARS: usize = 180;
+
+pub(super) struct Named {
+ pub name: String,
+ pub description: String,
+}
+
+pub(super) fn list(backend: &str, home: &Path, cwd: Option<&Path>) -> (Vec<Named>, Vec<Named>) {
+ let mut rules = Vec::new();
+ let mut plugins = Vec::new();
+ gather(backend, home, false, &mut rules, &mut plugins);
+ if let Some(cwd) = cwd {
+ gather(backend, cwd, true, &mut rules, &mut plugins);
+ }
+ dedupe(&mut rules);
+ dedupe(&mut plugins);
+ (rules, plugins)
+}
+
+/// `project` is set when `base` is the bot's folder. Home is scanned first, so a project entry replaces it.
+fn gather(backend: &str, base: &Path, project: bool, rules: &mut Vec<Named>, plugins: &mut Vec<Named>) {
+ if base.as_os_str().is_empty() {
+ return;
+ }
+ let (dirs, files) = if project {
+ (project_rule_dirs(backend), project_rule_files(backend))
+ } else {
+ (home_rule_dirs(backend), &[][..])
+ };
+ for rel in dirs {
+ walk_rules(&base.join(rel), 0, rules);
+ }
+ for rel in files {
+ if let Some(item) = rule_file(&base.join(rel)) {
+ rules.push(item);
+ }
+ }
+ if project {
+ for rel in project_plugin_dirs(backend) {
+ walk_plugins(&base.join(rel), 0, plugins);
+ }
+ } else {
+ for rel in home_plugin_indexes(backend) {
+ read_installed(&base.join(rel), plugins);
+ }
+ if backend == "codex" {
+ read_codex_plugins(base, plugins);
+ }
+ }
+}
+
+fn home_rule_dirs(backend: &str) -> &'static [&'static str] {
+ match backend {
+ "cursor" => &[".cursor/rules"],
+ "claude" | "copilot" => &[".claude/rules"],
+ "codebuddy" | "workbuddy" => &[".codebuddy/rules"],
+ _ => &[],
+ }
+}
+
+fn project_rule_dirs(backend: &str) -> &'static [&'static str] {
+ match backend {
+ "cursor" => &[".cursor/rules"],
+ "claude" | "copilot" => &[".claude/rules"],
+ "codebuddy" | "workbuddy" => &[".codebuddy/rules"],
+ "gemini" | "antigravity" => &[".gemini/rules"],
+ "grok" => &[".grok/rules"],
+ "codex" => &[],
+ _ => &[".agents/rules"],
+ }
+}
+
+fn project_rule_files(backend: &str) -> &'static [&'static str] {
+ match backend {
+ "cursor" => &[".cursorrules", "AGENTS.md", "CLAUDE.md", "CLAUDE.local.md"],
+ "claude" | "copilot" => &["CLAUDE.md", "CLAUDE.local.md", "AGENTS.md"],
+ "codex" | "grok" => &["AGENTS.md"],
+ "codebuddy" | "workbuddy" => &["AGENTS.md", "CODEBUDDY.md"],
+ "gemini" | "antigravity" => &["GEMINI.md", "AGENTS.md"],
+ _ => &["AGENTS.md", "CLAUDE.md"],
+ }
+}
+
+fn home_plugin_indexes(backend: &str) -> &'static [&'static str] {
+ match backend {
+ "cursor" => &[".cursor/plugins/installed_plugins.json"],
+ "claude" | "copilot" => &[".claude/plugins/installed_plugins.json"],
+ "codebuddy" | "workbuddy" => &[".codebuddy/plugins/installed_plugins.json"],
+ _ => &[],
+ }
+}
+
+fn project_plugin_dirs(backend: &str) -> &'static [&'static str] {
+ match backend {
+ "cursor" => &[".cursor/plugins"],
+ "claude" | "copilot" => &[".claude/plugins"],
+ "codebuddy" | "workbuddy" => &[".codebuddy/plugins"],
+ "codex" => &[".codex/plugins"],
+ _ => &[],
+ }
+}
+
+fn walk_rules(dir: &Path, depth: usize, out: &mut Vec<Named>) {
+ if depth > MAX_DEPTH || out.len() >= MAX_ITEMS || skipped(dir) {
+ return;
+ }
+ let Ok(entries) = std::fs::read_dir(dir) else { return };
+ for entry in entries.flatten() {
+ if out.len() >= MAX_ITEMS {
+ return;
+ }
+ let name = entry.file_name();
+ let name = name.to_string_lossy();
+ if name.starts_with('.') || matches!(name.as_ref(), "node_modules" | "dist" | "target") {
+ continue;
+ }
+ let path = entry.path();
+ if path.is_dir() {
+ walk_rules(&path, depth + 1, out);
+ } else if is_rule_file(&path)
+ && let Some(item) = rule_file(&path)
+ {
+ out.push(item);
+ }
+ }
+}
+
+fn is_rule_file(path: &Path) -> bool {
+ matches!(path.extension().and_then(|ext| ext.to_str()), Some("md" | "mdc" | "markdown"))
+}
+
+fn rule_file(path: &Path) -> Option<Named> {
+ if !path.is_file() {
+ return None;
+ }
+ let text = read_limited(path, FILE_BYTES)?;
+ let (name, description) = front_matter(&text);
+ let fallback = path.file_name().and_then(|n| n.to_str()).unwrap_or("rule");
+ let name = clip(&name.unwrap_or_else(|| fallback.to_owned()), 80);
+ if name.is_empty() {
+ return None;
+ }
+ Some(Named { name, description: clip(&description.unwrap_or_default(), TEXT_CHARS) })
+}
+
+fn front_matter(md: &str) -> (Option<String>, Option<String>) {
+ let Some(rest) = md.strip_prefix("---\n").or_else(|| md.strip_prefix("---\r\n")) else {
+ return (None, None);
+ };
+ let Some((head, _)) = rest.split_once("\n---").or_else(|| rest.split_once("\r\n---")) else {
+ return (None, None);
+ };
+ let mut name = None;
+ let mut description = None;
+ for line in head.lines() {
+ let Some((key, value)) = line.split_once(':') else { continue };
+ if key.chars().any(char::is_whitespace) {
+ continue;
+ }
+ let value = value.trim().trim_matches(['"', '\'']).trim();
+ if value.is_empty() {
+ continue;
+ }
+ match key.trim() {
+ "name" if name.is_none() => name = Some(value.to_owned()),
+ "description" if description.is_none() => description = Some(value.to_owned()),
+ _ => {}
+ }
+ }
+ (name, description)
+}
+
+const MANIFESTS: &[&str] = &[
+ ".cursor-plugin/plugin.json",
+ ".claude-plugin/plugin.json",
+ ".codebuddy-plugin/plugin.json",
+ ".codex-plugin/plugin.json",
+ "plugin.json",
+];
+
+fn walk_plugins(dir: &Path, depth: usize, out: &mut Vec<Named>) {
+ if depth > MAX_DEPTH || out.len() >= MAX_ITEMS || skipped(dir) {
+ return;
+ }
+ if let Some(item) = manifest_here(dir) {
+ out.push(item);
+ return;
+ }
+ let Ok(entries) = std::fs::read_dir(dir) else { return };
+ for entry in entries.flatten() {
+ if out.len() >= MAX_ITEMS {
+ return;
+ }
+ let name = entry.file_name();
+ let name = name.to_string_lossy();
+ if name.starts_with('.')
+ || matches!(name.as_ref(), "node_modules" | "cache" | "marketplaces" | "dist" | "target")
+ {
+ continue;
+ }
+ let path = entry.path();
+ if path.is_dir() {
+ walk_plugins(&path, depth + 1, out);
+ }
+ }
+}
+
+fn read_installed(path: &Path, out: &mut Vec<Named>) {
+ let Some(text) = read_limited(path, FILE_BYTES) else { return };
+ let Ok(value) = serde_json::from_str::<Value>(&text) else { return };
+ let Some(plugins) = value.get("plugins").and_then(Value::as_object) else { return };
+ for (key, entry) in plugins {
+ if out.len() >= MAX_ITEMS {
+ return;
+ }
+ let fallback = key.split('@').next().unwrap_or(key);
+ let item = entry_path(entry)
+ .and_then(|dir| manifest_under(Path::new(dir)))
+ .unwrap_or_else(|| Named { name: clip(fallback, 80), description: String::new() });
+ if !item.name.is_empty() {
+ out.push(item);
+ }
+ }
+}
+
+fn entry_path(value: &Value) -> Option<&str> {
+ let obj = value.as_array().and_then(|rows| rows.iter().find_map(Value::as_object)).or_else(|| value.as_object())?;
+ obj.get("installPath").and_then(Value::as_str).filter(|path| !path.is_empty())
+}
+
+/// `[plugins."name@marketplace"]` in Codex config. Nested tables are not plugins.
+fn read_codex_plugins(home: &Path, out: &mut Vec<Named>) {
+ let Some(text) = read_limited(&home.join(".codex/config.toml"), FILE_BYTES) else { return };
+ let cache = home.join(".codex/plugins/cache");
+ for line in text.lines() {
+ if out.len() >= MAX_ITEMS {
+ return;
+ }
+ let Some((name, market)) = codex_plugin_header(line.trim()) else { continue };
+ let dir = cache.join(&market).join(&name);
+ let item = manifest_under(&dir).unwrap_or(Named { name: clip(&name, 80), description: String::new() });
+ if !item.name.is_empty() {
+ out.push(item);
+ }
+ }
+}
+
+fn codex_plugin_header(line: &str) -> Option<(String, String)> {
+ let inner = line.strip_prefix('[')?.strip_suffix(']')?.trim();
+ let rest = inner.strip_prefix("plugins.")?.trim_matches('"');
+ if rest.is_empty() || rest.contains('.') {
+ return None;
+ }
+ let (name, market) = rest.split_once('@')?;
+ (!name.is_empty() && !market.is_empty()).then(|| (name.to_owned(), market.to_owned()))
+}
+
+fn manifest_here(dir: &Path) -> Option<Named> {
+ MANIFESTS.iter().map(|rel| dir.join(rel)).find(|path| path.is_file()).and_then(|path| plugin_meta(&path))
+}
+
+fn manifest_under(dir: &Path) -> Option<Named> {
+ if let Some(item) = manifest_here(dir) {
+ return Some(item);
+ }
+ let mut children =
+ std::fs::read_dir(dir).ok()?.flatten().map(|e| e.path()).filter(|p| p.is_dir()).collect::<Vec<_>>();
+ children.sort();
+ children.into_iter().rev().find_map(|child| {
+ let name = child.file_name()?.to_string_lossy();
+ if name.starts_with('.') || name == "node_modules" { None } else { manifest_here(&child) }
+ })
+}
+
+fn plugin_meta(path: &Path) -> Option<Named> {
+ let text = read_limited(path, FILE_BYTES)?;
+ let value: Value = serde_json::from_str(&text).ok()?;
+ let obj = value.as_object()?;
+ let fallback = path.parent().and_then(|dir| dir.file_name()).and_then(|n| n.to_str()).unwrap_or("plugin");
+ let name = obj.get("name").and_then(Value::as_str).filter(|n| !n.is_empty()).unwrap_or(fallback);
+ let name = clip(name, 80);
+ if name.is_empty() {
+ return None;
+ }
+ let description = obj.get("description").and_then(Value::as_str).unwrap_or("");
+ Some(Named { name, description: clip(description, TEXT_CHARS) })
+}
+
+fn skipped(path: &Path) -> bool {
+ std::fs::symlink_metadata(path).is_ok_and(|meta| meta.file_type().is_symlink())
+}
+
+fn dedupe(items: &mut Vec<Named>) {
+ let mut index = std::collections::HashMap::<String, usize>::new();
+ let mut kept = Vec::new();
+ for item in items.drain(..) {
+ if let Some(at) = index.get(&item.name).copied() {
+ kept[at] = item;
+ } else {
+ index.insert(item.name.clone(), kept.len());
+ kept.push(item);
+ }
+ }
+ *items = kept;
+}
+
+fn clip(text: &str, max: usize) -> String {
+ let collapsed = text.split_whitespace().collect::<Vec<_>>().join(" ");
+ if collapsed.chars().count() <= max { collapsed } else { collapsed.chars().take(max).collect() }
+}
+
+fn read_limited(path: &Path, cap: u64) -> Option<String> {
+ let mut file = std::fs::File::open(path).ok()?.take(cap);
+ let mut text = String::new();
+ file.read_to_string(&mut text).ok()?;
+ Some(text)
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use std::path::PathBuf;
+
+ fn scratch() -> PathBuf {
+ let dir = std::env::temp_dir().join(format!("codync-gear-catalog-{}", uuid::Uuid::new_v4()));
+ std::fs::create_dir_all(&dir).expect("temp dir");
+ dir
+ }
+
+ #[test]
+ fn a_project_rule_replaces_the_home_one_and_a_plugin_keeps_only_its_name() {
+ let root = scratch();
+ let home = root.join("home");
+ let cwd = root.join("proj");
+ let plug = root.join("plug");
+ std::fs::create_dir_all(home.join(".cursor/rules")).expect("rules");
+ std::fs::create_dir_all(cwd.join(".cursor/rules")).expect("project rules");
+ std::fs::create_dir_all(plug.join(".cursor-plugin")).expect("plugin");
+ std::fs::write(
+ home.join(".cursor/rules/style.mdc"),
+ "---\nname: style\ndescription: Home style\n---\n# Style\n",
+ )
+ .expect("home rule");
+ std::fs::write(cwd.join(".cursor/rules/style.mdc"), "---\nname: style\ndescription: Project style\n---\n")
+ .expect("project rule");
+ std::fs::write(cwd.join("AGENTS.md"), "# Agents\n").expect("agents");
+ std::fs::write(
+ plug.join(".cursor-plugin/plugin.json"),
+ r#"{"name":"browser","description":"Drive a browser","token":"secret-token"}"#,
+ )
+ .expect("manifest");
+ std::fs::create_dir_all(home.join(".cursor/plugins")).expect("index dir");
+ std::fs::write(
+ home.join(".cursor/plugins/installed_plugins.json"),
+ format!(r#"{{"plugins":{{"browser@local":[{{"installPath":"{}"}}]}}}}"#, plug.display()),
+ )
+ .expect("index");
+ let (rules, plugins) = list("cursor", &home, Some(&cwd));
+ assert_eq!(rules.iter().map(|r| r.name.as_str()).collect::<Vec<_>>(), ["style", "AGENTS.md"]);
+ assert_eq!(rules[0].description, "Project style");
+ assert_eq!(plugins.len(), 1);
+ assert_eq!(plugins[0].name, "browser");
+ assert_eq!(plugins[0].description, "Drive a browser");
+ let dumped = format!("{} {}", plugins[0].name, plugins[0].description);
+ assert!(!dumped.contains("secret-token"), "{dumped}");
+ let _ = std::fs::remove_dir_all(root);
+ }
+
+ #[test]
+ fn codex_lists_the_plugins_its_config_names() {
+ let root = scratch();
+ let home = root.join("home");
+ let plug = home.join(".codex/plugins/cache/openai-bundled/docs/1/.codex-plugin");
+ std::fs::create_dir_all(&plug).expect("cache");
+ std::fs::write(plug.join("plugin.json"), r#"{"name":"docs","description":"Write docs"}"#).expect("manifest");
+ std::fs::write(
+ home.join(".codex/config.toml"),
+ "[plugins.\"docs@openai-bundled\"]\n\n[plugins.\"docs@openai-bundled\".env]\nTOKEN = \"secret-token\"\n",
+ )
+ .expect("config");
+ let (_, plugins) = list("codex", &home, None);
+ assert_eq!(plugins.len(), 1);
+ assert_eq!(plugins[0].name, "docs");
+ assert_eq!(plugins[0].description, "Write docs");
+ assert!(!format!("{:?}", plugins[0].description).contains("secret-token"));
+ let _ = std::fs::remove_dir_all(root);
+ }
+}
diff --git a/host/src/agent/mod.rs b/host/src/agent/mod.rs
index b229a0a3..f56ef5a6 100644
--- a/host/src/agent/mod.rs
+++ b/host/src/agent/mod.rs
@@ -8,6 +8,7 @@ pub mod bot;
pub mod config;
pub mod fallback;
pub mod gear;
+mod gear_catalog;
pub mod new_bot;
pub mod node;
pub mod own_memory;
diff --git a/host/src/tui/manage/gear.rs b/host/src/tui/manage/gear.rs
index d68b0d45..c645e758 100644
--- a/host/src/tui/manage/gear.rs
+++ b/host/src/tui/manage/gear.rs
@@ -1,4 +1,4 @@
-//! A bot's Skills and Connectors pages: what its agent already has, then the Codync ones it passes on.
+//! A bot's Skills, Connectors, Rules and Plugins pages. Skills and connectors also list what Codync passes on.
use crossterm::event::{KeyCode, KeyEvent};
use serde_json::{Value, json};
@@ -6,11 +6,14 @@ use serde_json::{Value, json};
use super::super::app::{After, App, Overlay};
use super::{Page, Reply};
-/// Which of the two pages is open.
+/// Which gear page is open. Skills and connectors also list what Codync passes on.
+/// Rules and plugins are only what the agent already has.
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum GearKind {
Skills,
Connectors,
+ Rules,
+ Plugins,
}
impl GearKind {
@@ -18,13 +21,21 @@ impl GearKind {
match self {
Self::Skills => Page::Skills,
Self::Connectors => Page::Connectors,
+ Self::Rules => Page::Rules,
+ Self::Plugins => Page::Plugins,
}
}
- fn field(self) -> &'static str {
+ /// Codync can pass skills and connectors on. Rules and plugins stay the agent's.
+ pub fn passes_on(self) -> bool {
+ matches!(self, Self::Skills | Self::Connectors)
+ }
+
+ fn field(self) -> Option<&'static str> {
match self {
- Self::Skills => "skills",
- Self::Connectors => "connectors",
+ Self::Skills => Some("skills"),
+ Self::Connectors => Some("connectors"),
+ Self::Rules | Self::Plugins => None,
}
}
}
@@ -43,6 +54,8 @@ pub struct Gear {
/// `None` until `agentGear` answers.
pub agent_skills: Option<Vec<GearItem>>,
pub agent_connectors: Option<Vec<GearItem>>,
+ pub agent_rules: Option<Vec<GearItem>>,
+ pub agent_plugins: Option<Vec<GearItem>>,
pub failed: bool,
pub cursor: usize,
}
@@ -52,16 +65,21 @@ impl Gear {
match self.kind {
GearKind::Skills => self.agent_skills.as_deref(),
GearKind::Connectors => self.agent_connectors.as_deref(),
+ GearKind::Rules => self.agent_rules.as_deref(),
+ GearKind::Plugins => self.agent_plugins.as_deref(),
}
}
- /// One scrollable list: the agent's rows, then Codync's switches. Headings scroll with them.
+ /// One scrollable list: the agent's rows, then Codync's switches when this page has them.
pub fn rows(&self, toggles: usize) -> Vec<GearRow> {
let mut rows = vec![GearRow::AgentHeading];
match self.agent() {
Some(items) if !self.failed && !items.is_empty() => rows.extend((0..items.len()).map(GearRow::Agent)),
_ => rows.push(GearRow::AgentNote),
}
+ if !self.kind.passes_on() {
+ return rows;
+ }
rows.push(GearRow::CodyncHeading);
if toggles == 0 {
rows.push(GearRow::CodyncNote);
@@ -109,7 +127,7 @@ pub(super) fn items(value: &Value) -> Vec<GearItem> {
impl App {
pub(in crate::tui) fn open_gear(&mut self, kind: GearKind) {
let Some(bot) = self.bot().filter(|bot| !bot.group) else {
- self.flash("Skills and connectors belong to a bot, not a group");
+ self.flash("Skills, connectors, rules and plugins belong to a bot, not a group");
return;
};
let id = bot.id.clone();
@@ -123,6 +141,8 @@ impl App {
kind,
agent_skills: None,
agent_connectors: None,
+ agent_rules: None,
+ agent_plugins: None,
failed: false,
cursor: 1,
}));
@@ -156,6 +176,7 @@ impl App {
let (installed, enabled) = match gear.kind {
GearKind::Skills => (&self.market.1, &bot.skills),
GearKind::Connectors => (&self.market.0, &bot.connectors),
+ GearKind::Rules | GearKind::Plugins => return Vec::new(),
};
installed
.iter()
@@ -169,19 +190,22 @@ impl App {
let installed = match gear.kind {
GearKind::Skills => &self.market.1,
GearKind::Connectors => &self.market.0,
+ GearKind::Rules | GearKind::Plugins => return,
};
let Some(item) = installed.get(index) else { return };
let id = item.id.clone();
let mut ids = match gear.kind {
GearKind::Skills => bot.skills.clone(),
GearKind::Connectors => bot.connectors.clone(),
+ GearKind::Rules | GearKind::Plugins => return,
};
if ids.iter().any(|have| have == &id) {
ids.retain(|have| have != &id);
} else {
ids.push(id);
}
- (gear.bot.clone(), gear.kind.field(), ids)
+ let Some(field) = gear.kind.field() else { return };
+ (gear.bot.clone(), field, ids)
};
let mut body = json!({"id": bot_id});
body[field] = json!(ids);
diff --git a/host/src/tui/manage/mod.rs b/host/src/tui/manage/mod.rs
index 03b76311..d96ebfe9 100644
--- a/host/src/tui/manage/mod.rs
+++ b/host/src/tui/manage/mod.rs
@@ -55,7 +55,7 @@ pub enum Reply {
RoutineSaved,
/// A bot's Library (`library {botId}`).
Library(String),
- /// What an agent brings on its own (`agentGear`), for the bot's Skills or Connectors page.
+ /// What an agent brings on its own (`agentGear`), for the bot's Skills, Connectors, Rules or Plugins page.
Gear(String),
/// A routine's webhook URL and key: copied as a ready-to-run curl.
Webhook,
diff --git a/host/src/tui/manage/pages.rs b/host/src/tui/manage/pages.rs
index 40ca92ef..91a33c49 100644
--- a/host/src/tui/manage/pages.rs
+++ b/host/src/tui/manage/pages.rs
@@ -1,6 +1,7 @@
//! A bot's pages of details, as in the desktop inspector and the iPhone's details: Details (whether it
//! may use the computer, and its routines), Library (the artifacts it made and the files shared in its
-//! chat), Memory, Settings, Skills and Connectors. Shift+←→ moves between them.
+//! chat), Memory and Settings, then what the agent brings: Skills, Connectors, Rules and Plugins.
+//! Shift+←→ moves between them.
use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
@@ -14,11 +15,21 @@ pub enum Page {
Settings,
Skills,
Connectors,
+ Rules,
+ Plugins,
}
impl Page {
- pub const ALL: [Self; 6] =
- [Self::Details, Self::Library, Self::Memory, Self::Settings, Self::Skills, Self::Connectors];
+ pub const ALL: [Self; 8] = [
+ Self::Details,
+ Self::Library,
+ Self::Memory,
+ Self::Settings,
+ Self::Skills,
+ Self::Connectors,
+ Self::Rules,
+ Self::Plugins,
+ ];
pub fn label(self) -> &'static str {
match self {
@@ -28,6 +39,8 @@ impl Page {
Self::Settings => "Settings",
Self::Skills => "Skills",
Self::Connectors => "Connectors",
+ Self::Rules => "Rules",
+ Self::Plugins => "Plugins",
}
}
@@ -56,6 +69,8 @@ impl App {
Page::Settings => self.edit_bot(),
Page::Skills => self.open_gear(super::GearKind::Skills),
Page::Connectors => self.open_gear(super::GearKind::Connectors),
+ Page::Rules => self.open_gear(super::GearKind::Rules),
+ Page::Plugins => self.open_gear(super::GearKind::Plugins),
}
}
}
@@ -72,8 +87,10 @@ mod tests {
assert_eq!(Page::Library.step(key(KeyCode::Left)), Some(Page::Details));
assert_eq!(Page::Settings.step(key(KeyCode::Right)), Some(Page::Skills));
assert_eq!(Page::Skills.step(key(KeyCode::Right)), Some(Page::Connectors));
- assert_eq!(Page::Connectors.step(key(KeyCode::Left)), Some(Page::Skills));
- assert_eq!(Page::Connectors.step(key(KeyCode::Right)), None);
+ assert_eq!(Page::Connectors.step(key(KeyCode::Right)), Some(Page::Rules));
+ assert_eq!(Page::Rules.step(key(KeyCode::Right)), Some(Page::Plugins));
+ assert_eq!(Page::Plugins.step(key(KeyCode::Left)), Some(Page::Rules));
+ assert_eq!(Page::Plugins.step(key(KeyCode::Right)), None);
assert_eq!(Page::Details.step(key(KeyCode::Left)), None);
assert_eq!(
Page::Memory.step(KeyEvent::new(KeyCode::Right, KeyModifiers::NONE)),
diff --git a/host/src/tui/manage/replies.rs b/host/src/tui/manage/replies.rs
index 577a1680..5805bf48 100644
--- a/host/src/tui/manage/replies.rs
+++ b/host/src/tui/manage/replies.rs
@@ -97,6 +97,8 @@ impl App {
{
gear.agent_skills = Some(skills.clone());
gear.agent_connectors = Some(connectors.clone());
+ gear.agent_rules = Some(super::gear::items(&v["rules"]));
+ gear.agent_plugins = Some(super::gear::items(&v["plugins"]));
gear.failed = false;
}
}
@@ -314,6 +316,8 @@ impl App {
{
gear.agent_skills.get_or_insert_with(Vec::new);
gear.agent_connectors.get_or_insert_with(Vec::new);
+ gear.agent_rules.get_or_insert_with(Vec::new);
+ gear.agent_plugins.get_or_insert_with(Vec::new);
gear.failed = true;
}
}
diff --git a/host/src/tui/sheets.rs b/host/src/tui/sheets.rs
index c7d12a50..db32835c 100644
--- a/host/src/tui/sheets.rs
+++ b/host/src/tui/sheets.rs
@@ -69,18 +69,27 @@ fn name_of(app: &App, bot: &str) -> String {
app.bots.get(bot).map_or_else(String::new, |b| b.name.clone())
}
-/// A bot's pages on the top line (Details, Memory, Settings) with this one marked; returns the
-/// area under it.
+/// A bot's pages on two lines: the bot (Details, Library, Memory, Settings), then what its agent
+/// brings (Skills, Connectors, Rules, Plugins). Returns the area under them.
pub fn page_tabs(buf: &mut Buffer, inner: Rect, current: Page) -> Rect {
let t = theme();
- let mut x = inner.x;
- for page in Page::ALL {
- let style = if page == current { t.text.patch(t.sel) } else { t.secondary.patch(t.panel) };
- let tab = tr(page.label());
- x = put(buf, x, inner.y, inner.right().saturating_sub(x), &format!(" {tab} "), style) + 1;
+ let rows: [&[Page]; 2] = [
+ &[Page::Details, Page::Library, Page::Memory, Page::Settings],
+ &[Page::Skills, Page::Connectors, Page::Rules, Page::Plugins],
+ ];
+ for (row, pages) in rows.iter().enumerate() {
+ let mut x = inner.x;
+ let y = inner.y.saturating_add(u16::try_from(row).unwrap_or(0));
+ for page in *pages {
+ let style = if *page == current { t.text.patch(t.sel) } else { t.secondary.patch(t.panel) };
+ let tab = tr(page.label());
+ x = put(buf, x, y, inner.right().saturating_sub(x), &format!(" {tab} "), style) + 1;
+ }
+ if row == 0 {
+ rput(buf, inner.right(), y, "⇧←→ page", t.dim.patch(t.panel));
+ }
}
- rput(buf, inner.right(), inner.y, "⇧←→ page", t.dim.patch(t.panel));
- Rect::new(inner.x, inner.y + 2, inner.width, inner.height.saturating_sub(2))
+ Rect::new(inner.x, inner.y.saturating_add(3), inner.width, inner.height.saturating_sub(3))
}
pub fn routines(buf: &mut Buffer, area: Rect, app: &App, l: &RoutineList) {
diff --git a/host/src/tui/sheets/gear_view.rs b/host/src/tui/sheets/gear_view.rs
index e9460f31..d322563b 100644
--- a/host/src/tui/sheets/gear_view.rs
+++ b/host/src/tui/sheets/gear_view.rs
@@ -1,5 +1,5 @@
-//! The Skills and Connectors pages: the agent's own rows, then Codync's switches.
-//! Both groups are one list, so the cursor scrolls agent rows that do not fit.
+//! The Skills, Connectors, Rules and Plugins pages. Skills and connectors also list Codync's switches.
+//! Every row is one list, so the cursor scrolls agent rows that do not fit.
use super::{App, Buffer, Rect, centered, footer, frame_box, name_of, page_tabs, put, row, theme, truncate, window};
use crate::tui::l10n::tr;
@@ -12,8 +12,12 @@ pub fn draw(buf: &mut Buffer, area: Rect, app: &App, gear: &Gear) {
let inner = frame_box(buf, frame, t.text, t.panel, Some((&title, t.text)));
let inner = page_tabs(buf, inner, gear.kind.page());
let agent = app.bots.get(&gear.bot).map(|bot| app.agent_name(&bot.backend)).unwrap_or_default();
- let intro = tr("{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.")
- .replace("{agent}", &agent);
+ let intro = if gear.kind.passes_on() {
+ tr("{agent} brings these. Codync adds its own on top, and those are what get passed to the agent.")
+ } else {
+ tr("{agent} brings these.")
+ }
+ .replace("{agent}", &agent);
let mut y = inner.y;
let bottom = inner.bottom().saturating_sub(2);
if y < bottom {
@@ -46,6 +50,7 @@ pub fn draw(buf: &mut Buffer, area: Rect, app: &App, gear: &Gear) {
let empty = match gear.kind {
GearKind::Skills => "No skills yet. Get some from Extensions, or write your own.",
GearKind::Connectors => "No connectors yet. Add GitHub, Linear, Notion and more from Extensions.",
+ GearKind::Rules | GearKind::Plugins => "None from this agent.",
};
(tr(empty).into(), t.dim.patch(base))
}
@@ -57,7 +62,8 @@ pub fn draw(buf: &mut Buffer, area: Rect, app: &App, gear: &Gear) {
put(buf, inner.x, y, inner.width, &truncate(&text, usize::from(inner.width)), style);
y += 1;
}
- footer(buf, inner, None, "space on / off · ⇧←→ page · esc");
+ let hint = if gear.kind.passes_on() { "space on / off · ⇧←→ page · esc" } else { "⇧←→ page · esc" };
+ footer(buf, inner, None, hint);
}
fn agent_note(gear: &Gear) -> String {
diff --git a/host/src/tui/view/help.rs b/host/src/tui/view/help.rs
index 663ff944..0e74ba01 100644
--- a/host/src/tui/view/help.rs
+++ b/host/src/tui/view/help.rs
@@ -63,7 +63,7 @@ const HELP: [(&str, &str, &str); 69] = [
("BOTS", "R", "details: routines, computer"),
("BOTS", "B", "details: switch back to the bot's own agent"),
("BOTS", "L", "library: artifacts and files; open, save, rename"),
- ("BOTS", "⇧← ⇧→", "between details, library, memory, settings, skills and connectors"),
+ ("BOTS", "⇧← ⇧→", "between details, library, memory, settings, skills, connectors, rules and plugins"),
("BOTS", "A", "extensions, sign-in"),
("BOTS", "x", "delete bot or group"),
("VIEW", "t", "trace pane"),
diff --git a/web/content/docs/bots.mdx b/web/content/docs/bots.mdx
index be2c3347..7f779ef5 100644
--- a/web/content/docs/bots.mdx
+++ b/web/content/docs/bots.mdx
@@ -18,10 +18,10 @@ The host on your computer runs every bot. A bot's agent starts when you send it
## Where to change a bot's settings
-- **iPhone:** open the bot's chat and tap its name at the top, for the tabs **Details**, **Library**, **Memory**, **Settings**, **Skills** and **Connectors**. **Details** shows its instructions, agent, model and routines; **Settings** shows the rest. **Skills** and **Connectors** show what that agent already brings, and the Codync ones passed on top. Changes save as you edit. You can also touch and hold the bot in the list and choose **Edit profile**.
-- **Desktop:** click the bot's name at the top of the chat to open the details panel, with the same tabs. Changes save as you edit. You can also right-click the bot in the sidebar and choose **Edit Profile…**
+- **iPhone:** open the bot's chat and tap its name at the top. The first row of tabs is **Details**, **Library**, **Memory** and **Settings**. The second row is **Skills**, **Connectors**, **Rules** and **Plugins**. **Details** shows its instructions, agent, model and routines; **Settings** shows the rest. **Skills** and **Connectors** show what that agent already brings, and the Codync ones passed on top. **Rules** and **Plugins** show what that agent already brings; Codync does not add its own. Changes save as you edit. You can also touch and hold the bot in the list and choose **Edit profile**.
+- **Desktop:** click the bot's name at the top of the chat to open the details panel, with the same two rows of tabs. Changes save as you edit. You can also right-click the bot in the sidebar and choose **Edit Profile…**
- **Android:** the same sheet, without **Memory** until that screen is ported.
-- **Terminal UI:** select the bot and press `e` for settings. Shift+Left and Shift+Right move between the same pages, including **Skills** and **Connectors**. Press Ctrl+S to save, or Esc to drop your changes.
+- **Terminal UI:** select the bot and press `e` for settings. Shift+Left and Shift+Right move between the same pages, including **Skills**, **Connectors**, **Rules** and **Plugins**. Press Ctrl+S to save, or Esc to drop your changes.
## Profile
@@ -76,7 +76,7 @@ How approval cards work: [Conversations](/docs/conversations#approval-cards).
## Connectors and skills
-The **Skills** and **Connectors** tabs list two groups. The first is named for the agent (From Claude Code, for example): the skills it already has, and the MCP servers in its config for this bot's folder. Those rows are there to read; Codync does not turn them on or off. **From Codync** is what Codync adds on top and passes to the agent. Each of those has a switch. A new bot starts with all of them on; turn off what a bot shouldn't use. A skill a bot writes for itself is on only for that bot until you turn it on for others. The full editor (Edit profile) still has the same switches. See [Connectors and skills](/docs/connectors-and-skills).
+The **Skills** and **Connectors** tabs list two groups. The first is named for the agent (From Claude Code, for example): the skills it already has, and the MCP servers in its config for this bot's folder. Those rows are there to read; Codync does not turn them on or off. **From Codync** is what Codync adds on top and passes to the agent. Each of those has a switch. A new bot starts with all of them on; turn off what a bot shouldn't use. A skill a bot writes for itself is on only for that bot until you turn it on for others. The full editor (Edit profile) still has the same switches. **Rules** and **Plugins** list only what that agent already has in its own files, such as Cursor rules or an installed plugin. Codync does not add rules or plugins, and those rows have no switch. See [Connectors and skills](/docs/connectors-and-skills).
## Memory and routines
diff --git a/web/content/docs/connectors-and-skills.mdx b/web/content/docs/connectors-and-skills.mdx
index 7d25e5fb..93ef39cf 100644
--- a/web/content/docs/connectors-and-skills.mdx
+++ b/web/content/docs/connectors-and-skills.mdx
@@ -80,10 +80,12 @@ A connector or skill you add is turned on for every bot, and new bots start with
- **Desktop app:** click the bot's name at the top of the chat, then **Skills** or **Connectors**.
- **iPhone and Android:** tap the bot's name at the top of the chat, then the **Skills** or **Connectors** tab.
-- **Terminal UI:** Shift+Right from settings opens **Skills**, then **Connectors**. Space toggles a Codync row. The settings form (`e`) still has the same fields.
+- **Terminal UI:** Shift+Right from settings opens **Skills**, then **Connectors**, **Rules** and **Plugins**. Space toggles a Codync row. The settings form (`e`) still has the same fields.
The bot picks up the change on its next turn, in the same conversation.
+**Rules** and **Plugins** are the same kind of list, without a **From Codync** group: the rules files and installed plugins that agent already has. Codync does not pass extra ones on.
+
## Skills
A skill is a folder with a `SKILL.md` file: a name, a line saying when to use it, and the instructions. A bot with a skill on is told its name, its description and where its instructions are, so it can read them when a task calls for it.