@zibby/skills 2.0.3 → 2.0.5

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.
@@ -0,0 +1,184 @@
1
+ ---
2
+ sidebar_position: 6
3
+ title: surfaces & entryPoints
4
+ ---
5
+
6
+ # `surfaces` and `entryPoints`
7
+
8
+ Two blocks, one subject: **which channels your agent offers, and where each one
9
+ lives.**
10
+
11
+ - `surfaces` — *which* channels the agent's page should show.
12
+ - `entryPoints` — *where* a channel lives when it is not served by the platform
13
+ itself, and every word the card shows.
14
+
15
+ ---
16
+
17
+ ## `surfaces`
18
+
19
+ ### What it is
20
+
21
+ The deployed agent's page renders one section per interaction channel.
22
+ `surfaces` says which of them are meaningful, so a pure knowledge-base agent
23
+ does not show a Trigger button that does nothing.
24
+
25
+ ### Syntax
26
+
27
+ ```js
28
+ spec: { surfaces: ['mcp', 'connect'] }
29
+ ```
30
+
31
+ ### Properties
32
+
33
+ | Name | Type | Required | Allowed values | Default | Update behavior |
34
+ |---|---|---|---|---|---|
35
+ | `surfaces` | string[] | No | `cli`, `webhook`, `schedule`, `mcp`, `connect` | `['cli','webhook','schedule','mcp']` | Re-applied |
36
+
37
+ | Value | Meaning |
38
+ |---|---|
39
+ | `cli` | started from the command line |
40
+ | `webhook` | started by an inbound HTTP call |
41
+ | `schedule` | started by cron |
42
+ | `mcp` | a machine endpoint an MCP client attaches to |
43
+ | `connect` | a public page a **human opens in a browser** to link their own account — an OAuth sign-in, a device pairing, a licence activation |
44
+
45
+ `connect` is not a webhook: nothing third-party posts to it and it starts no run.
46
+
47
+ Unknown values are ignored. Declaring nothing gives you the four standard
48
+ channels — **not** all five, because `connect` is opt-in by design.
49
+
50
+ ### Use cases
51
+
52
+ | Agent shape | Declare |
53
+ |---|---|
54
+ | An ordinary triggerable workflow | nothing |
55
+ | A pure store — running it directly is a no-op, it is driven over MCP | `['mcp']` |
56
+ | A service a person signs into, then uses from their editor | `['mcp', 'connect']` |
57
+
58
+ ### Gotchas
59
+
60
+ Declaring `mcp` does not create an endpoint — it says the agent has one. The
61
+ endpoint still has to exist.
62
+
63
+ ---
64
+
65
+ ## `entryPoints`
66
+
67
+ ### What it is
68
+
69
+ For a channel that need not be served by the platform, `entryPoints` names which
70
+ service serves it and at which path. **The URL itself is derived when the page
71
+ is read** — from the service's resolved public mount and your installation's
72
+ origin. No template ever writes a URL down.
73
+
74
+ For `connect` it also carries every word on the card, because the renderer has
75
+ none of its own.
76
+
77
+ ### Syntax
78
+
79
+ An MCP endpoint the platform authenticates and forwards to a service:
80
+
81
+ ```js
82
+ spec: {
83
+ surfaces: ['mcp'],
84
+ entryPoints: {
85
+ mcp: {
86
+ sidecar: 'openapi-mcp',
87
+ path: '/mcp',
88
+ auth: 'bearer-pat',
89
+ label: 'MCP endpoint for the APIs this agent bridges',
90
+ },
91
+ },
92
+ }
93
+ ```
94
+
95
+ A sign-in the platform drives, on an agent with no service container at all:
96
+
97
+ ```js
98
+ spec: {
99
+ surfaces: ['mcp', 'connect'],
100
+ entryPoints: {
101
+ connect: {
102
+ kind: 'oauth',
103
+ server: 'figma', // a name from this agent's own remoteMcp block
104
+ label: 'Connect your Figma account',
105
+ button: 'Connect',
106
+ buttonDisconnect: 'Disconnect',
107
+ disconnectConfirm: 'Disconnect Figma? The stored sign-in is deleted.',
108
+ connectedLine: 'Connected to Figma as {account}.',
109
+ },
110
+ // NO `mcp` entry — the absence IS the declaration. See below.
111
+ },
112
+ }
113
+ ```
114
+
115
+ ### Properties
116
+
117
+ Only `mcp` and `connect` can be redirected. `cli`, `webhook` and `schedule` are
118
+ platform mechanics with no alternative home.
119
+
120
+ | Name | Type | Required | Allowed values | Default | Update behavior |
121
+ |---|---|---|---|---|---|
122
+ | `sidecar` | string | **Yes**, except for `connect` with `kind: 'oauth'` | a service this agent declares, or one the platform ships | — (entry is dropped without it) | Re-applied |
123
+ | `path` | string | **Yes**, same exception | must start with `/`; `..` is refused | — | Re-applied |
124
+ | `auth` | string | No | `bearer-pat`, `connect-bearer`, `none` | `connect-bearer` for `mcp`, `none` for `connect` | Re-applied |
125
+ | `label` | string | No | any | none | Card only |
126
+ | `kind` (connect) | string | No | `sidecar-page`, `oauth` | `sidecar-page` | Re-applied |
127
+ | `server` (connect + `oauth`) | string | **Yes** for that kind | a name from `remoteMcp` | — | Re-applied |
128
+ | copy (`button`, `buttonDisconnect`, `disconnectConfirm`, `disconnectedLine`, `waitingLine`, `connectedLine`, `note`) | string | No | `{account}` is substituted | none — a field you omit renders nothing | Card only |
129
+
130
+ ### `auth` names what the CALLER presents
131
+
132
+ | Value | The caller presents |
133
+ |---|---|
134
+ | `bearer-pat` | a Zibby access token — the platform authenticates and forwards |
135
+ | `connect-bearer` | the token this agent's own sign-in handed the user |
136
+ | `none` | nothing — the surface authenticates the caller itself |
137
+
138
+ :::warning A misspelt `auth` is silently corrected, not rejected
139
+ An unrecognised value falls back to the channel's default, so a typo quietly
140
+ describes an authentication your endpoint does not use. Spell it exactly.
141
+ :::
142
+
143
+ ### An absent `entryPoints.mcp` is itself a declaration
144
+
145
+ Leave it out and **the platform serves the surface itself**, at the agent's own
146
+ authenticated MCP address, with a Zibby bearer token.
147
+
148
+ That is the right choice whenever your service has no authentication of its own.
149
+ Naming a source when you did not need to is how an endpoint gets taken away from
150
+ the sign-in that feeds it: the declared service wins the address and answers
151
+ every call with its own "missing token".
152
+
153
+ :::tip One agent, one MCP address
154
+ A declared MCP service takes the **whole** surface — other MCP servers attached
155
+ to the same agent are not merged into it. If you need both, you need two agents.
156
+ :::
157
+
158
+ ### Use cases
159
+
160
+ | You want | Declare |
161
+ |---|---|
162
+ | Platform-served MCP with a Zibby token | `surfaces: ['mcp']` and nothing else |
163
+ | MCP forwarded to your own service, platform-authenticated | `entryPoints.mcp` with `auth: 'bearer-pat'` |
164
+ | A service that runs its own OAuth and issues its own bearer | `connect` with `auth: 'none'` **and** `mcp` with `auth: 'connect-bearer'` |
165
+ | A hosted third-party MCP the platform signs you into | `connect` with `kind: 'oauth'`, and **no** `mcp` entry |
166
+
167
+ ### Gotchas
168
+
169
+ **Both halves are required.** A channel must be in `surfaces` *and* have an
170
+ `entryPoints` entry before anything is derived.
171
+
172
+ **A path the proxy would not serve is never advertised.** If the mount does not
173
+ publish it, the entry is dropped rather than shown as a dead link.
174
+
175
+ **`connect-bearer` turns off the platform's own token check** on the agent's MCP
176
+ address. Only declare it when your service really does authenticate.
177
+
178
+ **Service-served entries need a self-hosted box.** A `connect` entry with
179
+ `kind: 'oauth'` works everywhere.
180
+
181
+ ## See also
182
+
183
+ - [`sidecars`](./sidecars.md), [`remoteMcp`](./remote-mcp.md),
184
+ [`requires`](./requires.md)
@@ -0,0 +1,108 @@
1
+ ---
2
+ sidebar_position: 12
3
+ title: Update behavior
4
+ ---
5
+
6
+ # Update behavior
7
+
8
+ CloudFormation tells you, per property, whether a change updates the resource in
9
+ place or replaces it. Zibby's declaration model has the same question and four
10
+ answers. Every properties table in this section carries the column.
11
+
12
+ | Class | What happens on the next deploy |
13
+ |---|---|
14
+ | **Re-applied** | the platform re-runs the action — provision the store, register the sidecar, attach the endpoint, bind the server. Idempotent: nothing is duplicated and nothing working is broken |
15
+ | **Seeded once** | written on the **first** install only. Whatever the operator set afterwards survives every Update |
16
+ | **Card only** | reaches the catalog card and nothing else. A deployed agent never consumes it, so changing it never offers an Update |
17
+ | **Frozen** | baked into the deployed agent when it was installed. Changing it needs a re-deploy |
18
+
19
+ ---
20
+
21
+ ## Seeded once — the list
22
+
23
+ These are written on a fresh install and never again:
24
+
25
+ - [`selections`](./deploy-time-config.md#selections) — a value already set is kept, and the deploy tells you so
26
+ - [`defaultSchedule`](./deploy-time-config.md#defaultschedule) — **any** existing schedule blocks the seed, including a paused one
27
+ - [`deployInput`](./deploy-time-config.md#deployinput) values
28
+ - [`maxRuntimeMinutes`](./catalog-metadata.md)
29
+ - `defaultSlug` — an agent's name is fixed at first install
30
+
31
+ The rule behind all of them: **the platform never overwrites a decision you
32
+ made.** If your agent needs an operator to change something, say so in the
33
+ release notes; do not try to write it for them.
34
+
35
+ ---
36
+
37
+ ## Frozen — why a published fix does not reach a deployed agent
38
+
39
+ :::danger This is the one that surprises people
40
+ When you deploy an agent, the platform stores **that version's source** —
41
+ including its `package.json` and every version range in it — against the agent.
42
+ That copy is what runs, forever, until somebody re-deploys.
43
+
44
+ So publishing a fixed package **does not reach an agent that is already
45
+ running**. An agent installed against `^0.1.x` can never pick up a `0.2.x`. It
46
+ does not error; the runs simply keep failing the same way.
47
+ :::
48
+
49
+ **The fix is always a re-deploy** — take the Update on the agent's page, or
50
+ deploy the card again. There is no other route.
51
+
52
+ The same is true of the agent's `deps`, and of anything else that travels inside
53
+ the source bundle.
54
+
55
+ ---
56
+
57
+ ## What lights the "Update available" badge
58
+
59
+ Two independent signals, either of which is enough:
60
+
61
+ 1. **The template's files changed** — a checksum over your template directory.
62
+ 2. **The declaration changed** — a per-template signature over your
63
+ `spec` block, minus the fields listed as *Card only*.
64
+
65
+ The second exists because your `spec` block lives **outside** the
66
+ template directory, so a metadata-only change (a sidecar version pin, a new
67
+ `selections` picker) moves no source byte and the first signal cannot see it.
68
+
69
+ The rule the badge states, and the one to test your own field against:
70
+
71
+ > **Re-installing this agent from the current template would change this agent.**
72
+
73
+ A field is excluded from the signal only when updating provably changes nothing
74
+ for somebody already running it — tags, taglines, icons, capability bullets,
75
+ sample trigger bodies, and the release notes themselves. (Notes *describing* an
76
+ update cannot be the reason to offer one.)
77
+
78
+ :::tip Why your card is not showing an update
79
+ Two common causes:
80
+
81
+ - You changed only a *Card only* field. That is working as designed — the card
82
+ updated, nobody was offered a re-install.
83
+ - You added a new declared field to a template but the platform is not tracking
84
+ it yet. A field that is copied but not tracked only ever lands on rows written
85
+ for some other reason.
86
+ :::
87
+
88
+ ---
89
+
90
+ ## Idempotency, in practice
91
+
92
+ Everything in the *Re-applied* class is safe to run repeatedly:
93
+
94
+ | Action | On re-deploy |
95
+ |---|---|
96
+ | Store provisioning | the same store is re-used; a store you re-pointed by hand stays re-pointed |
97
+ | Sidecar registration | the same image, unless the pinned version or checksum moved |
98
+ | `requires` attachment | an existing link is kept; a stale one is replaced; one you added by hand is adopted |
99
+ | `remoteMcp` binding | matched by URL and left byte-for-byte, which is what keeps an OAuth grant alive |
100
+ | Member agents | re-deployed in place; the bindings do not churn |
101
+
102
+ And one thing that is not idempotent, by nature: **renaming**. A renamed store
103
+ is a new store; a renamed `slug` is a new agent. Nothing migrates the old one.
104
+
105
+ ## See also
106
+
107
+ - [The declaration model](./index.md)
108
+ - [Catalog metadata](./catalog-metadata.md) — release-notes rules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zibby/skills",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Built-in skill definitions for the Zibby agent-workflow framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -116,10 +116,10 @@
116
116
  "dependencies": {
117
117
  "@modelcontextprotocol/sdk": "^1.29.0",
118
118
  "@resvg/resvg-js": "^2.6.2",
119
- "@zibby/agent-workflow": "2.0.3",
119
+ "@zibby/agent-workflow": "2.0.5",
120
120
  "@zibby/bin-oxlint": "^1.73.0",
121
121
  "@zibby/bin-semgrep": "^1.169.0",
122
- "@zibby/skill-ids": "2.0.3",
122
+ "@zibby/skill-ids": "2.0.5",
123
123
  "echarts": "^6.1.0",
124
124
  "mem0ai": "npm:@zibby/mem0ai@^3.0.5",
125
125
  "zod": "^3.23.0 || ^4.0.0"
@@ -134,7 +134,7 @@
134
134
  }
135
135
  },
136
136
  "optionalDependencies": {
137
- "@zibby/mcp-browser": "2.0.3",
137
+ "@zibby/mcp-browser": "2.0.5",
138
138
  "@zibby/mcp-memory": "*"
139
139
  },
140
140
  "devDependencies": {
@@ -1,85 +0,0 @@
1
- ---
2
- sidebar_position: 4
3
- title: Bug-autofix agent
4
- ---
5
-
6
- # `bug-autofix` — ticket → fix PR → tracker writeback
7
-
8
- The flagship orchestrator agent. It polls a tracker for new bugs, classifies each one, opens a fix PR for the autofixable ones, and writes the result back to the tracker — chaining three reusable building-block agents via **sub-graph dispatch**.
9
-
10
- ```
11
- poll (this graph)
12
- ↓ found a ticket?
13
- triage → sub-graph: ticket-triage → { severity, shouldAutofix, summary }
14
- ↓ severity ≥ AUTOFIX_MIN_SEVERITY AND shouldAutofix AND repo configured?
15
- ├─ yes → code_fix → sub-graph: code-fix → { pr_url, branch }
16
- │ ↓
17
- └─ no ───────────────────────────────────────────┐
18
-
19
- writeback → sub-graph: tracker-writeback (runs on BOTH branches)
20
-
21
- END
22
- ```
23
-
24
- High-severity, concrete, autofixable bugs get a fix PR opened and the Jira ticket moved to *In Review*. Everything else (noise, vague, too-big, below threshold, or no repo configured) is triaged and a human is notified — no PR.
25
-
26
- ## The three building-block agents
27
-
28
- `bug-autofix` is an orchestrator: each step is a separate, independently deployable agent it dispatches as a sub-graph. Deploy all four in the same project.
29
-
30
- | Step | Building block | Input | Output |
31
- |---|---|---|---|
32
- | `triage` | `ticket-triage` | `{ ticket }` | severity (`CRITICAL…NOISE`), `shouldAutofix`, summary |
33
- | `code_fix` | `code-fix` | `{ ticket, repo }` | `{ pr_url, branch }` — clones, fixes with an inline test-gate, opens a PR |
34
- | `writeback` | `tracker-writeback` | `{ ticket, pr_url?, branch?, result }` | transitions the issue, comments the PR link, posts to Slack/Lark |
35
-
36
- Each block is usable on its own — `ticket-triage` is a fine standalone classifier; `code-fix` is a standalone clone→fix→PR agent.
37
-
38
- ## Sub-graph dispatch
39
-
40
- A child step is declared with `{ workflow }` on the node:
41
-
42
- ```js
43
- graph.addNode('triage', {
44
- workflow: 'ticket-triage', // child deploy slug
45
- input: (state) => ({ ticket: state.poll.ticket }),
46
- output: 'classify', // dot-path on the child's final state
47
- });
48
- ```
49
-
50
- The engine spawns the child as a **separate execution** (its own run row + Fargate task, or in-process when runtime tags match), links it to the parent for the Activity-tab tree and cancellation cascade, polls until terminal, and extracts `output` back into the parent state under the node name.
51
-
52
- ## Trigger
53
-
54
- Cron poll (default) or per-ticket webhook. Each run processes ONE ticket; the next tick/webhook handles the next.
55
-
56
- ```json
57
- { "jql": "issuetype = Bug AND statusCategory != Done ORDER BY updated DESC" } // cron
58
- { "ticketKey": "PROJ-123" } // webhook
59
- ```
60
-
61
- ## Config (ENV tab)
62
-
63
- | Var | Meaning |
64
- |---|---|
65
- | `REPO_URL` | Repo the fix targets. Unset → no autofix, notify-only. |
66
- | `REPO_NAME` | Short repo name (default: derived from `REPO_URL`). |
67
- | `REPO_BRANCH` | Base branch (default `main`). |
68
- | `AUTOFIX_MIN_SEVERITY` | Routing floor for code-fix (default `MEDIUM`). |
69
-
70
- Plus the children's own config: Jira connected (triage/poll/writeback), GitHub connected (code-fix), and `SLACK_CHANNEL` / `LARK_RECEIVE_ID` (writeback).
71
-
72
- ## Scope (v1)
73
-
74
- - **In:** poll → triage → (autofix?) → code-fix → writeback, end-to-end to "PR opened + Jira written back".
75
- - **Out:** deploy / verify / rollback; an auto re-dispatch loop; in-engine approval. The open PR is the human gate.
76
- - **Tracker seam:** Jira is implemented; GitHub / Linear are extension points in the child templates.
77
-
78
- ## Deploy
79
-
80
- ```bash
81
- zibby agent templates # browse the marketplace
82
- zibby agent new bug-autofix -t bug-autofix # scaffold the orchestrator
83
- # ...also scaffold + deploy ticket-triage, code-fix, tracker-writeback in the same project
84
- zibby agent deploy bug-autofix
85
- ```