bots-garden/sidekickspublic Fork
⑂ c77d577
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

#91 Descriptions de search_messages et list_channels : des messages, pas des fichiers ; à préférer à bash

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k33g committed 2026-11-11T01:20:24+01:00 Browse files
c77d577 parent: 2bea9ed
modified docs/en/how-to/use-sidekicks-tools-from-an-agent.md +1 -0
@@ -43,6 +43,7 @@ A model may answer a question it was already asked from its earlier answer inste
4343
4444 then save. The tools are read when an agent starts: a running agent whose tools change shows "restart to apply changes"; restart it. The editor suggests the names after `- `. An unknown name is shown as a warning.
4545 - **The agent says it has no such tool**: open its log (**Log** in the status bar). At start, Sidekicks writes `sidekicks: tools offered (meta): about_sidekicks, current_channel, …`, then mm writes `[acp] client tools (meta): client_…` with the tools it took. A tool missing from the first line is left out by `agentTools`; from the second only, mm refused it (its stderr says why). If an older log lacks it, the agent was started before the change: restart it. If the log shows it and the agent still denies it, the model overlooked it: name the tool in its `system:` instructions.
46+- **The agent searches files with bash instead**: a channel named like a folder (`documentation`) can make a coding agent look for files. Name the channel with `#` and say "messages": `@riker search the messages of #documentation about Kotlin`. For a coding agent, add to its `system:` a line such as "To find what was said in a Sidekicks channel, call client_search_messages, never bash."
4647 - **Keep an agent to its own channels**: `list_channels` lists every channel (the direct conversations are not listed), and `search_messages` reads every channel and direct conversation (`channel: @alice`), not only the agent's. Leave them out of `offer` if that is not wanted.
4748
4849 - **`discovery: request`**: Sidekicks reads the agent's file (the one after `--config`) to know it, announces the tools only, and gives the list each time the agent opens a session. The file is read on this computer: an agent in a sandbox or a container must have it at the same path, which the assistant's sbx and Docker variants already require.
@@ -43,6 +43,7 @@ A model may answer a question it was already asked from its earlier answer inste
43 43
44 then save. The tools are read when an agent starts: a running agent whose tools change shows "restart to apply changes"; restart it. The editor suggests the names after `- `. An unknown name is shown as a warning.44 then save. The tools are read when an agent starts: a running agent whose tools change shows "restart to apply changes"; restart it. The editor suggests the names after `- `. An unknown name is shown as a warning.
45 - **The agent says it has no such tool**: open its log (**Log** in the status bar). At start, Sidekicks writes `sidekicks: tools offered (meta): about_sidekicks, current_channel, …`, then mm writes `[acp] client tools (meta): client_…` with the tools it took. A tool missing from the first line is left out by `agentTools`; from the second only, mm refused it (its stderr says why). If an older log lacks it, the agent was started before the change: restart it. If the log shows it and the agent still denies it, the model overlooked it: name the tool in its `system:` instructions.45 - **The agent says it has no such tool**: open its log (**Log** in the status bar). At start, Sidekicks writes `sidekicks: tools offered (meta): about_sidekicks, current_channel, …`, then mm writes `[acp] client tools (meta): client_…` with the tools it took. A tool missing from the first line is left out by `agentTools`; from the second only, mm refused it (its stderr says why). If an older log lacks it, the agent was started before the change: restart it. If the log shows it and the agent still denies it, the model overlooked it: name the tool in its `system:` instructions.
46+- **The agent searches files with bash instead**: a channel named like a folder (`documentation`) can make a coding agent look for files. Name the channel with `#` and say "messages": `@riker search the messages of #documentation about Kotlin`. For a coding agent, add to its `system:` a line such as "To find what was said in a Sidekicks channel, call client_search_messages, never bash."
46 - **Keep an agent to its own channels**: `list_channels` lists every channel (the direct conversations are not listed), and `search_messages` reads every channel and direct conversation (`channel: @alice`), not only the agent's. Leave them out of `offer` if that is not wanted.47 - **Keep an agent to its own channels**: `list_channels` lists every channel (the direct conversations are not listed), and `search_messages` reads every channel and direct conversation (`channel: @alice`), not only the agent's. Leave them out of `offer` if that is not wanted.
47 48
48 - **`discovery: request`**: Sidekicks reads the agent's file (the one after `--config`) to know it, announces the tools only, and gives the list each time the agent opens a session. The file is read on this computer: an agent in a sandbox or a container must have it at the same path, which the assistant's sbx and Docker variants already require.49 - **`discovery: request`**: Sidekicks reads the agent's file (the one after `--config`) to know it, announces the tools only, and gives the list each time the agent opens a session. The file is read on this computer: an agent in a sandbox or a container must have it at the same path, which the assistant's sbx and Docker variants already require.
modified docs/fr/how-to/utiliser-les-outils-de-sidekicks-depuis-un-agent.md +1 -0
@@ -43,6 +43,7 @@ Un modèle peut répondre à une question déjà posée avec sa réponse précé
4343
4444 puis enregistrez. Les outils sont lus au démarrage d'un agent : un agent en marche dont les outils changent affiche « à redémarrer » ; redémarrez-le. L'éditeur propose les noms après `- `. Un nom inconnu s'affiche en avertissement.
4545 - **L'agent dit qu'il n'a pas cet outil** : ouvrez son journal (**Log** dans la barre d'état). Au démarrage, Sidekicks écrit `sidekicks: tools offered (meta): about_sidekicks, current_channel, …`, puis mm écrit `[acp] client tools (meta): client_…` avec les outils qu'il a pris. Un outil absent de la première ligne est retiré par `agentTools` ; absent de la seconde seulement, mm l'a refusé (son stderr dit pourquoi). Si l'outil manque dans un journal plus ancien, l'agent a été démarré avant le changement : redémarrez-le. Si le journal le montre et que l'agent le nie quand même, le modèle l'a ignoré : nommez l'outil dans ses instructions `system:`.
46+- **L'agent cherche des fichiers avec bash à la place** : un channel nommé comme un dossier (`documentation`) peut pousser un agent de code à chercher des fichiers. Nommez le channel avec `#` et dites « messages » : `@riker cherche les messages de #documentation sur Kotlin`. Pour un agent de code, ajoutez à son `system:` une ligne comme « To find what was said in a Sidekicks channel, call client_search_messages, never bash. »
4647 - **Cantonner un agent à ses propres channels** : `list_channels` liste tous les channels (les conversations directes n'y sont pas), et `search_messages` lit tous les channels et conversations directes (`channel: @alice`), pas seulement ceux de l'agent. Retirez-les d'`offer` si ce n'est pas souhaité.
4748
4849 - **`discovery: request`** : Sidekicks lit le fichier de l'agent (celui qui suit `--config`) pour le savoir, annonce seulement les outils, et donne la liste à chaque ouverture de session. Le fichier est lu sur cet ordinateur : un agent dans une sandbox ou un conteneur doit l'avoir au même chemin, ce que demandent déjà les variantes sbx et Docker de l'assistant.
@@ -43,6 +43,7 @@ Un modèle peut répondre à une question déjà posée avec sa réponse précé
43 43
44 puis enregistrez. Les outils sont lus au démarrage d'un agent : un agent en marche dont les outils changent affiche « à redémarrer » ; redémarrez-le. L'éditeur propose les noms après `- `. Un nom inconnu s'affiche en avertissement.44 puis enregistrez. Les outils sont lus au démarrage d'un agent : un agent en marche dont les outils changent affiche « à redémarrer » ; redémarrez-le. L'éditeur propose les noms après `- `. Un nom inconnu s'affiche en avertissement.
45 - **L'agent dit qu'il n'a pas cet outil** : ouvrez son journal (**Log** dans la barre d'état). Au démarrage, Sidekicks écrit `sidekicks: tools offered (meta): about_sidekicks, current_channel, …`, puis mm écrit `[acp] client tools (meta): client_…` avec les outils qu'il a pris. Un outil absent de la première ligne est retiré par `agentTools` ; absent de la seconde seulement, mm l'a refusé (son stderr dit pourquoi). Si l'outil manque dans un journal plus ancien, l'agent a été démarré avant le changement : redémarrez-le. Si le journal le montre et que l'agent le nie quand même, le modèle l'a ignoré : nommez l'outil dans ses instructions `system:`.45 - **L'agent dit qu'il n'a pas cet outil** : ouvrez son journal (**Log** dans la barre d'état). Au démarrage, Sidekicks écrit `sidekicks: tools offered (meta): about_sidekicks, current_channel, …`, puis mm écrit `[acp] client tools (meta): client_…` avec les outils qu'il a pris. Un outil absent de la première ligne est retiré par `agentTools` ; absent de la seconde seulement, mm l'a refusé (son stderr dit pourquoi). Si l'outil manque dans un journal plus ancien, l'agent a été démarré avant le changement : redémarrez-le. Si le journal le montre et que l'agent le nie quand même, le modèle l'a ignoré : nommez l'outil dans ses instructions `system:`.
46+- **L'agent cherche des fichiers avec bash à la place** : un channel nommé comme un dossier (`documentation`) peut pousser un agent de code à chercher des fichiers. Nommez le channel avec `#` et dites « messages » : `@riker cherche les messages de #documentation sur Kotlin`. Pour un agent de code, ajoutez à son `system:` une ligne comme « To find what was said in a Sidekicks channel, call client_search_messages, never bash. »
46 - **Cantonner un agent à ses propres channels** : `list_channels` liste tous les channels (les conversations directes n'y sont pas), et `search_messages` lit tous les channels et conversations directes (`channel: @alice`), pas seulement ceux de l'agent. Retirez-les d'`offer` si ce n'est pas souhaité.47 - **Cantonner un agent à ses propres channels** : `list_channels` liste tous les channels (les conversations directes n'y sont pas), et `search_messages` lit tous les channels et conversations directes (`channel: @alice`), pas seulement ceux de l'agent. Retirez-les d'`offer` si ce n'est pas souhaité.
47 48
48 - **`discovery: request`** : Sidekicks lit le fichier de l'agent (celui qui suit `--config`) pour le savoir, annonce seulement les outils, et donne la liste à chaque ouverture de session. Le fichier est lu sur cet ordinateur : un agent dans une sandbox ou un conteneur doit l'avoir au même chemin, ce que demandent déjà les variantes sbx et Docker de l'assistant.49 - **`discovery: request`** : Sidekicks lit le fichier de l'agent (celui qui suit `--config`) pour le savoir, annonce seulement les outils, et donne la liste à chaque ouverture de session. Le fichier est lu sur cet ordinateur : un agent dans une sandbox ou un conteneur doit l'avoir au même chemin, ce que demandent déjà les variantes sbx et Docker de l'assistant.
modified internal/app/historytools.go +3 -3
@@ -35,7 +35,7 @@ func (c *Core) historyTools(agent string) []acp.Tool {
3535 return []acp.Tool{
3636 {
3737 Name: "list_channels",
38- Description: "List the Sidekicks channels (not the direct conversations): name, description, members, number of messages and date of the last one. Call it to know where a topic was discussed before searching. Channels and messages change: call it again each time, never reuse an earlier result.",
38+ Description: "List the Sidekicks channels, the places where the user talks with agents (not files, not the direct conversations): name, description, members, number of messages and date of the last one. Call it to know where a topic was discussed before searching. Channels and messages change: call it again each time, never reuse an earlier result.",
3939 Method: ChannelsMethod,
4040 Call: func(context.Context, string, map[string]any) (string, error) {
4141 manager, err := c.channelManager()
@@ -59,13 +59,13 @@ func (c *Core) historyTools(agent string) []acp.Tool {
5959 },
6060 {
6161 Name: "search_messages",
62- Description: "Search the whole history of a Sidekicks channel, or of a direct conversation, for messages containing a text (case and accents ignored), the most recent first. Without channel, the channel of this conversation. New messages arrive: search again each time, never reuse an earlier result.",
62+ Description: "Search what was said in a Sidekicks channel: the messages the user and the agents wrote there, not files. Use it, not bash nor file tools, when the user asks what was said, discussed or decided about something in a channel (e.g. \"what was said about Kotlin in documentation\" means channel documentation, query Kotlin). It returns the messages containing the text (case and accents ignored), the most recent first. Without channel, the channel of this conversation. New messages arrive: search again each time, never reuse an earlier result.",
6363 Method: SearchMethod,
6464 InputSchema: map[string]any{
6565 "type": "object",
6666 "properties": map[string]any{
6767 "query": map[string]any{"type": "string", "description": "The text to find, e.g. a word or a name."},
68- "channel": map[string]any{"type": "string", "description": "The channel's name (general or #general), or @agent for a direct conversation with that agent. Default: this conversation's channel."},
68+ "channel": map[string]any{"type": "string", "description": "The channel's name (documentation, general or #general; client_list_channels lists them), or @agent for a direct conversation with that agent. Default: this conversation's channel."},
6969 "limit": map[string]any{"type": "integer", "description": fmt.Sprintf("How many messages at most (default %d, at most %d).", DefaultSearchLimit, MaxSearchLimit)},
7070 },
7171 "required": []string{"query"},
@@ -35,7 +35,7 @@ func (c *Core) historyTools(agent string) []acp.Tool {
35 return []acp.Tool{35 return []acp.Tool{
36 {36 {
37 Name: "list_channels",37 Name: "list_channels",
38- Description: "List the Sidekicks channels (not the direct conversations): name, description, members, number of messages and date of the last one. Call it to know where a topic was discussed before searching. Channels and messages change: call it again each time, never reuse an earlier result.",38+ Description: "List the Sidekicks channels, the places where the user talks with agents (not files, not the direct conversations): name, description, members, number of messages and date of the last one. Call it to know where a topic was discussed before searching. Channels and messages change: call it again each time, never reuse an earlier result.",
39 Method: ChannelsMethod,39 Method: ChannelsMethod,
40 Call: func(context.Context, string, map[string]any) (string, error) {40 Call: func(context.Context, string, map[string]any) (string, error) {
41 manager, err := c.channelManager()41 manager, err := c.channelManager()
@@ -59,13 +59,13 @@ func (c *Core) historyTools(agent string) []acp.Tool {
59 },59 },
60 {60 {
61 Name: "search_messages",61 Name: "search_messages",
62- Description: "Search the whole history of a Sidekicks channel, or of a direct conversation, for messages containing a text (case and accents ignored), the most recent first. Without channel, the channel of this conversation. New messages arrive: search again each time, never reuse an earlier result.",62+ Description: "Search what was said in a Sidekicks channel: the messages the user and the agents wrote there, not files. Use it, not bash nor file tools, when the user asks what was said, discussed or decided about something in a channel (e.g. \"what was said about Kotlin in documentation\" means channel documentation, query Kotlin). It returns the messages containing the text (case and accents ignored), the most recent first. Without channel, the channel of this conversation. New messages arrive: search again each time, never reuse an earlier result.",
63 Method: SearchMethod,63 Method: SearchMethod,
64 InputSchema: map[string]any{64 InputSchema: map[string]any{
65 "type": "object",65 "type": "object",
66 "properties": map[string]any{66 "properties": map[string]any{
67 "query": map[string]any{"type": "string", "description": "The text to find, e.g. a word or a name."},67 "query": map[string]any{"type": "string", "description": "The text to find, e.g. a word or a name."},
68- "channel": map[string]any{"type": "string", "description": "The channel's name (general or #general), or @agent for a direct conversation with that agent. Default: this conversation's channel."},68+ "channel": map[string]any{"type": "string", "description": "The channel's name (documentation, general or #general; client_list_channels lists them), or @agent for a direct conversation with that agent. Default: this conversation's channel."},
69 "limit": map[string]any{"type": "integer", "description": fmt.Sprintf("How many messages at most (default %d, at most %d).", DefaultSearchLimit, MaxSearchLimit)},69 "limit": map[string]any{"type": "integer", "description": fmt.Sprintf("How many messages at most (default %d, at most %d).", DefaultSearchLimit, MaxSearchLimit)},
70 },70 },
71 "required": []string{"query"},71 "required": []string{"query"},