bots-garden/mini-mepublic Fork
⑂ 59af04a
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

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

Download ZIP

📦 Mini Me

k33g committed 2026-09-23T14:10:30+02:00 Browse files
59af04a parent: 9f12ae1
modified .tickets/issues/0004-do-we-need-mcp.yaml +13 -17
@@ -1,13 +1,14 @@
11 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
22 id: 4
33 title: Do we need MCP?
4-state: open
4+state: closed
55 author:
66 name: k33g
77 email: ph.charriere@gmail.com
88 createdAt: 2026-09-15T22:38:45.129Z
9-updatedAt: 2026-09-23T23:30:00.000Z
9+updatedAt: 2026-09-23T11:49:34.861Z
1010 labels: []
11+milestone: v0.1.2
1112 body: |
1213 I would say no - use a CLI
1314
@@ -251,43 +252,38 @@ tasks:
251252 email: vibe@mistral.ai
252253 createdAt: 2026-09-23T22:00:00.000Z
253254 closedAt: 2026-09-23T23:30:00.000Z
254- dependencies: [1]
255255 - id: 5
256- title: "Add stdio transport support for MCP client"
256+ title: Add stdio transport support for MCP client
257257 state: open
258258 priority: low
259259 author:
260260 name: vibe
261261 email: vibe@mistral.ai
262262 createdAt: 2026-09-23T22:00:00.000Z
263- dependencies: [4]
264263 - id: 6
265- title: "Add OAuth2 authentication support for MCP client"
264+ title: Add OAuth2 authentication support for MCP client
266265 state: open
267266 priority: low
268267 author:
269268 name: vibe
270269 email: vibe@mistral.ai
271270 createdAt: 2026-09-23T22:00:00.000Z
272- dependencies: [4]
273271 - id: 7
274- title: "Run tool-count experiment with MCP tools (measure prompt cost impact)"
272+ title: Run tool-count experiment with MCP tools (measure prompt cost impact)
275273 state: open
276274 priority: high
277275 author:
278276 name: vibe
279277 email: vibe@mistral.ai
280278 createdAt: 2026-09-23T22:00:00.000Z
281- dependencies: [4]
282279 - id: 8
283- title: "Test with real MCP servers (context7.com, etc.)"
280+ title: Test with real MCP servers (context7.com, etc.)
284281 state: open
285282 priority: medium
286283 author:
287284 name: vibe
288285 email: vibe@mistral.ai
289286 createdAt: 2026-09-23T22:00:00.000Z
290- dependencies: [4]
291287 comments:
292288 - id: 1
293289 author:
@@ -296,9 +292,9 @@ comments:
296292 createdAt: 2026-09-23T23:30:00.000Z
297293 body: |
298294 **Implementation Status: Base MCP Client Complete**
299-
295+
300296 The initial implementation is now complete and compiles successfully.
301-
297+
302298 **What's implemented:**
303299 - Configuration schema for MCP (enabled, permissions, discoveryTimeout, servers)
304300 - MCP server configuration (name, transport, url/command, auth, tools filter)
@@ -313,22 +309,22 @@ comments:
313309 - Binary I/O tool filtering (text-only, as requested)
314310 - Tool filtering by name (optional `tools` list in server config)
315311 - Graceful degradation (warnings, not errors)
316-
312+
317313 **What's NOT implemented (per user requirements):**
318314 - Stdio transport (returns "not yet implemented" error)
319315 - OAuth2 authentication (only bearer and api_key supported)
320316 - Caching (of tool descriptions or tokens)
321317 - Lazy discovery for stdio
322-
318+
323319 **Files changed:**
324320 - internal/config/config.go (added MCPConfig, MCPServer, MCPAuthConfig)
325321 - internal/mcp/client.go (new package - HTTP client, tool types)
326322 - internal/mcp/tool_wrapper.go (new - tool wrapping logic)
327323 - internal/tools/mcp.go (new - tool factory)
328324 - main.go (added assembleMCP)
329-
325+
330326 **Example config:** See agent.mcp-example.yaml
331-
327+
332328 **Next steps:**
333329 - Run tool-count experiment (task 7)
334330 - Test with real MCP servers (task 8)
@@ -1,13 +1,14 @@
1 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.1 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2 id: 42 id: 4
3 title: Do we need MCP?3 title: Do we need MCP?
4-state: open4+state: closed
5 author:5 author:
6 name: k33g6 name: k33g
7 email: ph.charriere@gmail.com7 email: ph.charriere@gmail.com
8 createdAt: 2026-09-15T22:38:45.129Z8 createdAt: 2026-09-15T22:38:45.129Z
9-updatedAt: 2026-09-23T23:30:00.000Z9+updatedAt: 2026-09-23T11:49:34.861Z
10 labels: []10 labels: []
11+milestone: v0.1.2
11 body: |12 body: |
12 I would say no - use a CLI13 I would say no - use a CLI
13 14
@@ -251,43 +252,38 @@ tasks:
251 email: vibe@mistral.ai252 email: vibe@mistral.ai
252 createdAt: 2026-09-23T22:00:00.000Z253 createdAt: 2026-09-23T22:00:00.000Z
253 closedAt: 2026-09-23T23:30:00.000Z254 closedAt: 2026-09-23T23:30:00.000Z
254- dependencies: [1]
255 - id: 5255 - id: 5
256- title: "Add stdio transport support for MCP client"256+ title: Add stdio transport support for MCP client
257 state: open257 state: open
258 priority: low258 priority: low
259 author:259 author:
260 name: vibe260 name: vibe
261 email: vibe@mistral.ai261 email: vibe@mistral.ai
262 createdAt: 2026-09-23T22:00:00.000Z262 createdAt: 2026-09-23T22:00:00.000Z
263- dependencies: [4]
264 - id: 6263 - id: 6
265- title: "Add OAuth2 authentication support for MCP client"264+ title: Add OAuth2 authentication support for MCP client
266 state: open265 state: open
267 priority: low266 priority: low
268 author:267 author:
269 name: vibe268 name: vibe
270 email: vibe@mistral.ai269 email: vibe@mistral.ai
271 createdAt: 2026-09-23T22:00:00.000Z270 createdAt: 2026-09-23T22:00:00.000Z
272- dependencies: [4]
273 - id: 7271 - id: 7
274- title: "Run tool-count experiment with MCP tools (measure prompt cost impact)"272+ title: Run tool-count experiment with MCP tools (measure prompt cost impact)
275 state: open273 state: open
276 priority: high274 priority: high
277 author:275 author:
278 name: vibe276 name: vibe
279 email: vibe@mistral.ai277 email: vibe@mistral.ai
280 createdAt: 2026-09-23T22:00:00.000Z278 createdAt: 2026-09-23T22:00:00.000Z
281- dependencies: [4]
282 - id: 8279 - id: 8
283- title: "Test with real MCP servers (context7.com, etc.)"280+ title: Test with real MCP servers (context7.com, etc.)
284 state: open281 state: open
285 priority: medium282 priority: medium
286 author:283 author:
287 name: vibe284 name: vibe
288 email: vibe@mistral.ai285 email: vibe@mistral.ai
289 createdAt: 2026-09-23T22:00:00.000Z286 createdAt: 2026-09-23T22:00:00.000Z
290- dependencies: [4]
291 comments:287 comments:
292 - id: 1288 - id: 1
293 author:289 author:
@@ -296,9 +292,9 @@ comments:
296 createdAt: 2026-09-23T23:30:00.000Z292 createdAt: 2026-09-23T23:30:00.000Z
297 body: |293 body: |
298 **Implementation Status: Base MCP Client Complete**294 **Implementation Status: Base MCP Client Complete**
299- 295+
300 The initial implementation is now complete and compiles successfully.296 The initial implementation is now complete and compiles successfully.
301- 297+
302 **What's implemented:**298 **What's implemented:**
303 - Configuration schema for MCP (enabled, permissions, discoveryTimeout, servers)299 - Configuration schema for MCP (enabled, permissions, discoveryTimeout, servers)
304 - MCP server configuration (name, transport, url/command, auth, tools filter)300 - MCP server configuration (name, transport, url/command, auth, tools filter)
@@ -313,22 +309,22 @@ comments:
313 - Binary I/O tool filtering (text-only, as requested)309 - Binary I/O tool filtering (text-only, as requested)
314 - Tool filtering by name (optional `tools` list in server config)310 - Tool filtering by name (optional `tools` list in server config)
315 - Graceful degradation (warnings, not errors)311 - Graceful degradation (warnings, not errors)
316- 312+
317 **What's NOT implemented (per user requirements):**313 **What's NOT implemented (per user requirements):**
318 - Stdio transport (returns "not yet implemented" error)314 - Stdio transport (returns "not yet implemented" error)
319 - OAuth2 authentication (only bearer and api_key supported)315 - OAuth2 authentication (only bearer and api_key supported)
320 - Caching (of tool descriptions or tokens)316 - Caching (of tool descriptions or tokens)
321 - Lazy discovery for stdio317 - Lazy discovery for stdio
322- 318+
323 **Files changed:**319 **Files changed:**
324 - internal/config/config.go (added MCPConfig, MCPServer, MCPAuthConfig)320 - internal/config/config.go (added MCPConfig, MCPServer, MCPAuthConfig)
325 - internal/mcp/client.go (new package - HTTP client, tool types)321 - internal/mcp/client.go (new package - HTTP client, tool types)
326 - internal/mcp/tool_wrapper.go (new - tool wrapping logic)322 - internal/mcp/tool_wrapper.go (new - tool wrapping logic)
327 - internal/tools/mcp.go (new - tool factory)323 - internal/tools/mcp.go (new - tool factory)
328 - main.go (added assembleMCP)324 - main.go (added assembleMCP)
329- 325+
330 **Example config:** See agent.mcp-example.yaml326 **Example config:** See agent.mcp-example.yaml
331- 327+
332 **Next steps:**328 **Next steps:**
333 - Run tool-count experiment (task 7)329 - Run tool-count experiment (task 7)
334 - Test with real MCP servers (task 8)330 - Test with real MCP servers (task 8)
modified .tickets/issues/0036-hooks.yaml +1 -2
@@ -6,9 +6,8 @@ author:
66 name: k33g
77 email: ph.charriere@gmail.com
88 createdAt: 2026-09-21T06:32:48.566Z
9-updatedAt: 2026-09-22T21:54:11.101Z
9+updatedAt: 2026-09-23T11:50:03.431Z
1010 labels: []
11-milestone: v0.1.2
1211 body: |
1312 ## Overview
1413 Design a hook system for mini-me to allow extensibility at key points in the agent lifecycle
@@ -6,9 +6,8 @@ author:
6 name: k33g6 name: k33g
7 email: ph.charriere@gmail.com7 email: ph.charriere@gmail.com
8 createdAt: 2026-09-21T06:32:48.566Z8 createdAt: 2026-09-21T06:32:48.566Z
9-updatedAt: 2026-09-22T21:54:11.101Z9+updatedAt: 2026-09-23T11:50:03.431Z
10 labels: []10 labels: []
11-milestone: v0.1.2
12 body: |11 body: |
13 ## Overview12 ## Overview
14 Design a hook system for mini-me to allow extensibility at key points in the agent lifecycle13 Design a hook system for mini-me to allow extensibility at key points in the agent lifecycle
modified docker-sbx/template/Dockerfile +83 -0
@@ -49,5 +49,88 @@ ENV TERM=xterm-256color \
4949 COLORTERM=truecolor \
5050 LANG=C.UTF-8
5151
52+# The pinned toolchains (/usr/local/go/bin, /usr/local/node/bin) must come
53+# before /usr/bin so they win over any Go or Node the base image ships.
54+ENV PATH=/usr/local/go/bin:/usr/local/node/bin:/home/agent/go/bin:$PATH
55+
56+# Without this, a go.mod whose `go` directive is newer than GO_VERSION makes the
57+# toolchain download and run a different Go, silently defeating the pin.
58+ENV GOTOOLCHAIN=local
59+
60+# ------------------------------------
61+# Shared curl options for every download below.
62+#
63+# ARG, not ENV: this is build-time only and must not leak into the image.
64+# ------------------------------------
65+ARG CURL_RETRY="--retry 5 --retry-all-errors --retry-delay 3 --connect-timeout 15"
66+
67+USER root
68+
69+# ------------------------------------
70+# Install Go toolchain and Node.js
71+# ------------------------------------
72+ARG GO_VERSION=1.26.0
73+ARG NODE_VERSION=24.21.0
74+ARG TARGETARCH
75+
76+RUN <<EOF
77+set -eux
78+apt-get update
79+apt-get install -y curl build-essential xz-utils
80+rm -rf /var/lib/apt/lists/*
81+EOF
82+
83+RUN <<EOF
84+set -eux
85+apt-get remove -y golang-go golang-doc
86+apt-get autoremove -y
87+curl ${CURL_RETRY} -C - -fsSL -o /tmp/go.tgz "https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz"
88+rm -rf /usr/local/go
89+tar -C /usr/local -xzf /tmp/go.tgz
90+rm /tmp/go.tgz
91+/usr/local/go/bin/go version
92+EOF
93+
94+RUN <<EOF
95+set -eux
96+case "${TARGETARCH}" in
97+ amd64) node_arch=x64 ;;
98+ arm64) node_arch=arm64 ;;
99+ *) echo "unsupported TARGETARCH: ${TARGETARCH}" >&2; exit 1 ;;
100+esac
101+curl ${CURL_RETRY} -C - -fsSL -o /tmp/node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${node_arch}.tar.xz"
102+rm -rf /usr/local/node
103+mkdir -p /usr/local/node
104+tar -C /usr/local/node --strip-components=1 -xJf /tmp/node.tar.xz
105+rm /tmp/node.tar.xz
106+/usr/local/node/bin/node --version
107+/usr/local/node/bin/npm --version
108+EOF
109+
110+# ------------------------------------
111+# Persist the Go and Node environment for sandbox shells.
112+# /etc/sandbox-persistent.sh is sourced before every bash command in the sbx.
113+# ------------------------------------
114+RUN <<EOF
115+{
116+ echo 'export PATH=/usr/local/go/bin:/usr/local/node/bin:/home/agent/go/bin:$PATH'
117+ echo 'export GOTOOLCHAIN=local'
118+} >> /etc/sandbox-persistent.sh
119+EOF
120+
121+# Switch to agent user for Go tools installation (they go to /home/agent/go/bin)
122+USER agent
123+
124+# ------------------------------------
125+# Install Go developer tools
126+# ------------------------------------
127+ARG GOPLS_VERSION=v0.23.0
128+ARG X_TOOLS_VERSION=v0.49.0
129+ARG STATICCHECK_VERSION=v0.7.0
130+
131+RUN go install golang.org/x/tools/gopls@${GOPLS_VERSION} \
132+ && go install golang.org/x/tools/cmd/goimports@${X_TOOLS_VERSION} \
133+ && go install honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION}
134+
52135 # Prove the binary runs on this platform before the image is tagged.
53136 RUN mm --version && mm-tui --version
@@ -49,5 +49,88 @@ ENV TERM=xterm-256color \
49 COLORTERM=truecolor \49 COLORTERM=truecolor \
50 LANG=C.UTF-850 LANG=C.UTF-8
51 51
52+# The pinned toolchains (/usr/local/go/bin, /usr/local/node/bin) must come
53+# before /usr/bin so they win over any Go or Node the base image ships.
54+ENV PATH=/usr/local/go/bin:/usr/local/node/bin:/home/agent/go/bin:$PATH
55+
56+# Without this, a go.mod whose `go` directive is newer than GO_VERSION makes the
57+# toolchain download and run a different Go, silently defeating the pin.
58+ENV GOTOOLCHAIN=local
59+
60+# ------------------------------------
61+# Shared curl options for every download below.
62+#
63+# ARG, not ENV: this is build-time only and must not leak into the image.
64+# ------------------------------------
65+ARG CURL_RETRY="--retry 5 --retry-all-errors --retry-delay 3 --connect-timeout 15"
66+
67+USER root
68+
69+# ------------------------------------
70+# Install Go toolchain and Node.js
71+# ------------------------------------
72+ARG GO_VERSION=1.26.0
73+ARG NODE_VERSION=24.21.0
74+ARG TARGETARCH
75+
76+RUN <<EOF
77+set -eux
78+apt-get update
79+apt-get install -y curl build-essential xz-utils
80+rm -rf /var/lib/apt/lists/*
81+EOF
82+
83+RUN <<EOF
84+set -eux
85+apt-get remove -y golang-go golang-doc
86+apt-get autoremove -y
87+curl ${CURL_RETRY} -C - -fsSL -o /tmp/go.tgz "https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz"
88+rm -rf /usr/local/go
89+tar -C /usr/local -xzf /tmp/go.tgz
90+rm /tmp/go.tgz
91+/usr/local/go/bin/go version
92+EOF
93+
94+RUN <<EOF
95+set -eux
96+case "${TARGETARCH}" in
97+ amd64) node_arch=x64 ;;
98+ arm64) node_arch=arm64 ;;
99+ *) echo "unsupported TARGETARCH: ${TARGETARCH}" >&2; exit 1 ;;
100+esac
101+curl ${CURL_RETRY} -C - -fsSL -o /tmp/node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${node_arch}.tar.xz"
102+rm -rf /usr/local/node
103+mkdir -p /usr/local/node
104+tar -C /usr/local/node --strip-components=1 -xJf /tmp/node.tar.xz
105+rm /tmp/node.tar.xz
106+/usr/local/node/bin/node --version
107+/usr/local/node/bin/npm --version
108+EOF
109+
110+# ------------------------------------
111+# Persist the Go and Node environment for sandbox shells.
112+# /etc/sandbox-persistent.sh is sourced before every bash command in the sbx.
113+# ------------------------------------
114+RUN <<EOF
115+{
116+ echo 'export PATH=/usr/local/go/bin:/usr/local/node/bin:/home/agent/go/bin:$PATH'
117+ echo 'export GOTOOLCHAIN=local'
118+} >> /etc/sandbox-persistent.sh
119+EOF
120+
121+# Switch to agent user for Go tools installation (they go to /home/agent/go/bin)
122+USER agent
123+
124+# ------------------------------------
125+# Install Go developer tools
126+# ------------------------------------
127+ARG GOPLS_VERSION=v0.23.0
128+ARG X_TOOLS_VERSION=v0.49.0
129+ARG STATICCHECK_VERSION=v0.7.0
130+
131+RUN go install golang.org/x/tools/gopls@${GOPLS_VERSION} \
132+ && go install golang.org/x/tools/cmd/goimports@${X_TOOLS_VERSION} \
133+ && go install honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION}
134+
52 # Prove the binary runs on this platform before the image is tagged.135 # Prove the binary runs on this platform before the image is tagged.
53 RUN mm --version && mm-tui --version136 RUN mm --version && mm-tui --version