bots-garden/sidekickspublic Fork
⑂ feature/m4-agents-workspace
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
🛟 Updated. d580a32 · on feature/m4-agents-workspace · k33g · 3d ago
config.schema.json · 265 lines · 7.3 KBJSON Blame HistoryRaw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://git.rickub.com/bots-garden/sidekicks/schema/config.schema.json",
  "title": "Sidekicks configuration",
  "description": "The agents Sidekicks can talk to, the channels declared up front, and a few preferences. Specified in docs/en/reference/configuration.md.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "version",
    "agents"
  ],
  "properties": {
    "version": {
      "description": "Format version of this file. Only 1 exists.",
      "const": 1
    },
    "ui": {
      "$ref": "#/$defs/ui"
    },
    "limits": {
      "$ref": "#/$defs/limits"
    },
    "agents": {
      "description": "The agents available with @name. Names must be unique.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/agent"
      }
    },
    "channels": {
      "description": "Channels created at startup when they do not exist yet. Channels can also be created from the application.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/channel"
      }
    }
  },
  "$defs": {
    "name": {
      "description": "Lowercase identifier: letters, digits, '-' and '_', starting with a letter, 32 characters at most. Used in @name and /name:command.",
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]{0,31}$"
    },
    "ui": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "theme": {
          "description": "Colour theme. 'system' follows the operating system.",
          "enum": [
            "system",
            "light",
            "dark"
          ],
          "default": "system"
        },
        "language": {
          "description": "Language of the interface.",
          "enum": [
            "en",
            "fr"
          ],
          "default": "en"
        }
      }
    },
    "limits": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "maxRunningAgents": {
          "description": "How many agents may run at the same time. Each local agent keeps a model in memory.",
          "type": "integer",
          "minimum": 1,
          "default": 2
        },
        "stopIdleAgentsAfter": {
          "description": "Stop an agent that has not been used for this long (Go duration: 30s, 10m, 1h). 0 (number or text) never stops it.",
          "type": [
            "string",
            "integer"
          ],
          "pattern": "^(0|([0-9]+(\\.[0-9]+)?(ms|s|m|h))+)$",
          "default": "10m",
          "minimum": 0,
          "maximum": 0
        }
      }
    },
    "agent": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "command"
      ],
      "properties": {
        "name": {
          "$ref": "#/$defs/name"
        },
        "title": {
          "description": "Name shown in the interface. Defaults to the name.",
          "type": "string",
          "minLength": 1
        },
        "icon": {
          "description": "An emoji shown next to the agent.",
          "type": "string",
          "maxLength": 16
        },
        "description": {
          "description": "One sentence shown in the @ list.",
          "type": "string"
        },
        "command": {
          "description": "Program serving ACP on stdio. A bare name is looked up in PATH; a path is relative to this file.",
          "type": "string",
          "minLength": 1
        },
        "args": {
          "description": "Arguments of the command. Paths are not rewritten: write them relative to the workspace or absolute.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "afterStop": {
          "description": "Optional command run each time the agent's process ends (stopped, crashed, or Sidekicks quitting), in its workspace with its env: the program, then its arguments. For instance a script that unloads the agent's model.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "env": {
          "description": "Extra environment variables for the agent process.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "workspace": {
          "description": "The agent's folder: the process starts there and it is the session cwd sent over ACP. Relative to this file; defaults to the folder of this file.",
          "type": "string",
          "minLength": 1
        },
        "runtime": {
          "$ref": "#/$defs/runtime"
        }
      }
    },
    "runtime": {
      "description": "Where the agent runs. Decides how Sidekicks reaches its files and terminal.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "description": "local: on this computer. container: in a running Docker container. sbx: in a Docker sandbox.",
          "enum": [
            "local",
            "container",
            "sbx"
          ]
        },
        "container": {
          "description": "Name or id of the running Docker container (type: container).",
          "type": "string",
          "minLength": 1
        },
        "sandbox": {
          "description": "Name of the Docker sandbox (type: sbx).",
          "type": "string",
          "minLength": 1
        },
        "workspacePath": {
          "description": "The workspace path inside the container or the sandbox.",
          "type": "string",
          "pattern": "^/"
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "type": {
                "const": "local"
              }
            }
          },
          "then": {
            "properties": {
              "container": false,
              "sandbox": false,
              "workspacePath": false
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "container"
              }
            }
          },
          "then": {
            "required": [
              "container"
            ],
            "properties": {
              "sandbox": false
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "sbx"
              }
            }
          },
          "then": {
            "required": [
              "sandbox"
            ],
            "properties": {
              "container": false
            }
          }
        }
      ]
    },
    "channel": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "Channel name, shown as #name. Unique.",
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "description": {
          "type": "string"
        },
        "agents": {
          "description": "Agents invited when the channel is created. Each must be an agent name.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/name"
          },
          "uniqueItems": true
        }
      }
    }
  }
}