@zibby/skills 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat-notify.js +2 -2
- package/dist/chatProgress.js +2 -2
- package/dist/datasetStore.js +2 -2
- package/dist/discord.js +1 -1
- package/dist/figma.js +1 -1
- package/dist/git-write.js +9 -9
- package/dist/git.d.ts +23 -0
- package/dist/git.js +2 -2
- package/dist/github.js +5 -5
- package/dist/gitlab.js +3 -3
- package/dist/googleDocs.js +1 -1
- package/dist/index.js +95 -95
- package/dist/jira.js +1 -1
- package/dist/lark.js +1 -1
- package/dist/larkDocs.js +1 -1
- package/dist/linear.js +1 -1
- package/dist/linkedin.js +1 -1
- package/dist/notion.js +1 -1
- package/dist/package.json +2 -2
- package/dist/plane.js +1 -1
- package/dist/sentry.js +1 -1
- package/dist/slack.js +1 -1
- package/dist/trackers/github-adapter.js +5 -5
- package/dist/trackers/index.js +6 -6
- package/dist/trackers/jira-adapter.js +1 -1
- package/dist/trackers/linear-adapter.js +1 -1
- package/docs/self-host/backup-restore.md +4 -3
- package/docs/self-host/custom-sidecars.md +136 -0
- package/package.json +2 -2
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 5
|
|
3
|
+
title: Custom (BYO) sidecars
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bring your own sidecar
|
|
7
|
+
|
|
8
|
+
A **sidecar** is a long-lived service container the box runs next to your
|
|
9
|
+
agents — the platform's own vector-KB engine and OAuth token broker ship this
|
|
10
|
+
way. On a self-hosted box you can also register **your own** sidecar image.
|
|
11
|
+
That is the standard way to add a custom resident service to the platform —
|
|
12
|
+
most commonly a **thin MCP server that wraps an internal REST API**, so your
|
|
13
|
+
agents and the chat Copilot can call systems that only exist inside your
|
|
14
|
+
network.
|
|
15
|
+
|
|
16
|
+
No marketplace entry, no platform code change, no third-party registry: you
|
|
17
|
+
push a `docker save` tarball to your own box, the box pins its sha256, and the
|
|
18
|
+
sidecar flows through the exact same launch/health/idle-reap machinery as the
|
|
19
|
+
built-ins.
|
|
20
|
+
|
|
21
|
+
:::tip Wrapping a REST API? Try the OpenAPI bridge agent first.
|
|
22
|
+
|
|
23
|
+
If all you need is "my agents should be able to call this internal REST API",
|
|
24
|
+
you probably do **not** need to build an image at all. Deploy the **OpenAPI MCP
|
|
25
|
+
Bridge** agent from the marketplace, put your API's spec URL in its **Env** tab,
|
|
26
|
+
and every operation in the spec becomes an MCP tool — no code, no upload.
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
OPENAPI_APIS = {"billing":{"specUrl":"https://internal/v2/api-docs","root":"https://internal"}}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
It is a marketplace agent that carries its own sidecar, so deploying it is the
|
|
33
|
+
whole installation. Build your own image (below) when you need logic the bridge
|
|
34
|
+
can't express — a non-HTTP protocol, a stateful session, custom auth.
|
|
35
|
+
:::
|
|
36
|
+
|
|
37
|
+
## Push one
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 1. Build your image however you like; it must serve HTTP on one port.
|
|
41
|
+
docker build -t report-mcp:0.1.0 .
|
|
42
|
+
docker save report-mcp:0.1.0 | gzip > report-mcp.tar.gz
|
|
43
|
+
|
|
44
|
+
# 2. Push it to the box. Needs an OPERATOR access token
|
|
45
|
+
# (a restricted per-user token is refused).
|
|
46
|
+
zibby sidecar push report-mcp.tar.gz \
|
|
47
|
+
--name report-mcp --port 8080 \
|
|
48
|
+
--health-path /health \
|
|
49
|
+
--warm \
|
|
50
|
+
--api-url https://your-box.example.com --token $OPERATOR_PAT
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`push` streams the tarball up (`POST /selfhost/sidecars/artifacts`), then
|
|
54
|
+
registers the declaration (`PUT /selfhost/sidecars/report-mcp`) pinned to the
|
|
55
|
+
sha256 the server computed from the uploaded bytes. The image is verified and
|
|
56
|
+
`docker load`ed **before** anything is persisted — a corrupt or tampered
|
|
57
|
+
tarball can never become a registered sidecar.
|
|
58
|
+
|
|
59
|
+
Manage what's registered:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
zibby sidecar list # custom sidecars + the reserved built-in names
|
|
63
|
+
zibby sidecar remove <name> # unregister + stop (image reclaimed; data volume kept) (data volumes are kept)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Reach it
|
|
67
|
+
|
|
68
|
+
- **From the control plane / the chat Copilot** — the container listens on the
|
|
69
|
+
box's infra network at `http://zibby-sidecar-<name>:<port>`. Agent run
|
|
70
|
+
containers deliberately **cannot** dial it directly (they are isolated on the
|
|
71
|
+
run network); access is brokered by the platform.
|
|
72
|
+
- **From a browser / third-party client** — every `--public-path` prefix is
|
|
73
|
+
served at `https://<box-origin>/sidecars/<name>/<path>` through the
|
|
74
|
+
control-plane reverse proxy. Anything not declared public stays
|
|
75
|
+
infra-network-only.
|
|
76
|
+
|
|
77
|
+
:::warning `--public-path` is opt-in, and most sidecars don't need it
|
|
78
|
+
A declared public path is reachable **anonymously** — the platform adds no auth
|
|
79
|
+
and no identity; your app owns that surface entirely. Agents and the chat
|
|
80
|
+
Copilot reach a sidecar over the infra network, so an MCP server for them needs
|
|
81
|
+
**no** public path. It exists for browser flows (an OAuth callback a provider
|
|
82
|
+
redirects to). Registering one is therefore refused unless the box opts in with
|
|
83
|
+
`SIDECAR_BYO_PUBLIC_PATHS=1` in its `.env` (then restart the control-plane).
|
|
84
|
+
:::
|
|
85
|
+
|
|
86
|
+
### Wire it into the Copilot
|
|
87
|
+
|
|
88
|
+
For the "internal API → MCP → chat" use case, register the sidecar and then
|
|
89
|
+
attach its MCP endpoint to the Copilot (in chat):
|
|
90
|
+
|
|
91
|
+
> connect yourself to the MCP at `http://zibby-sidecar-report-mcp:8080/mcp`
|
|
92
|
+
|
|
93
|
+
The Copilot can also drive the whole flow itself with the owner-only tools
|
|
94
|
+
`zibby_add_sidecar` (takes a downloadable `url` + pinned `sha256` instead of a
|
|
95
|
+
file upload), `zibby_list_sidecars`, and `zibby_remove_sidecar`.
|
|
96
|
+
|
|
97
|
+
## Declaration reference
|
|
98
|
+
|
|
99
|
+
| Flag | Meaning |
|
|
100
|
+
|---|---|
|
|
101
|
+
| `--name` | `[a-z][a-z0-9-]{1,30}`. Built-in names (`gbrain`, `pingcode`, …) are reserved. |
|
|
102
|
+
| `--port` | The HTTP port your app listens on inside the container. Required. |
|
|
103
|
+
| `--version` | Display/tag version (default: first 12 chars of the sha256). |
|
|
104
|
+
| `--health-path` | GET path returning 2xx when ready (default `/health`). |
|
|
105
|
+
| `--public-path` | Repeatable. Path prefix exposed through the public reverse proxy — **anonymously**. Disabled unless the box sets `SIDECAR_BYO_PUBLIC_PATHS=1`; see below. |
|
|
106
|
+
| `--warm` | Keep it always-on (pre-warmed at boot, never idle-reaped). Default: on-demand launch + idle reap. |
|
|
107
|
+
| `--env-key` | Repeatable. A box `.env` variable forwarded into the container when set. |
|
|
108
|
+
| `--request-config-key` | Repeatable. Per-agent config: resolved from the **calling agent's encrypted Env bag** and sent per request — one shared container can serve N projects with different upstream credentials. |
|
|
109
|
+
| `--data-path` | Container path persisted on a named volume (survives restarts; kept on remove). |
|
|
110
|
+
| `--memory-bytes` | Container memory cap. |
|
|
111
|
+
|
|
112
|
+
## What the box guarantees
|
|
113
|
+
|
|
114
|
+
- **sha256-pinned, always.** The tarball's hash is computed server-side at
|
|
115
|
+
upload and re-verified on every subsequent load — including the re-fetch
|
|
116
|
+
path: the verified tarball is kept in the box's own object store, so if the
|
|
117
|
+
docker image is ever pruned it is restored automatically without a re-upload.
|
|
118
|
+
- **Operator-only surface.** Upload/register/remove require the box
|
|
119
|
+
owner/admin token; restricted per-user tokens get `403`.
|
|
120
|
+
- **Isolation unchanged.** Custom sidecars get the same placement as built-in
|
|
121
|
+
ones: infra network, brokered access, no host mounts — the declaration
|
|
122
|
+
cannot ask for privileged options.
|
|
123
|
+
- **No shadowing, at BOTH layers.** A custom sidecar can never take over a
|
|
124
|
+
built-in sidecar's *name*, and its package can never take over a platform or
|
|
125
|
+
another sidecar's *image tag*: the archive's manifest is read **before**
|
|
126
|
+
`docker load` runs, and a package declaring `zibby-*` or another sidecar's
|
|
127
|
+
image is refused outright — even if that image isn't on the box yet.
|
|
128
|
+
- **Uninstall reclaims storage.** Removing a sidecar deletes its image; a
|
|
129
|
+
superseded image is reclaimed when you push a new version. The declared data
|
|
130
|
+
volume is **kept** (it holds your content) — the response tells you its name,
|
|
131
|
+
and `zibby sidecar remove <name> --purge-data` deletes it deliberately.
|
|
132
|
+
|
|
133
|
+
:::note Cloud
|
|
134
|
+
BYO sidecars are **self-host only** today. On cloud, wrap an external API as a
|
|
135
|
+
remote MCP server and attach it with `zibby_add_mcp` instead.
|
|
136
|
+
:::
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zibby/skills",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Built-in skill definitions for the Zibby agent-workflow framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"dependencies": {
|
|
116
116
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
117
117
|
"@resvg/resvg-js": "^2.6.2",
|
|
118
|
-
"@zibby/agent-workflow": "^0.
|
|
118
|
+
"@zibby/agent-workflow": "^0.6.1",
|
|
119
119
|
"@zibby/bin-oxlint": "^1.73.0",
|
|
120
120
|
"@zibby/bin-semgrep": "^1.169.0",
|
|
121
121
|
"@zibby/skill-ids": "^0.2.0",
|