@nyuchi/mzizi-mcp 0.15.0 → 0.17.0
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/README.md +10 -4
- package/dist/auth/authkit-handler.d.ts.map +1 -1
- package/dist/auth/authkit-handler.js +7 -13
- package/dist/auth/authkit-handler.js.map +1 -1
- package/dist/auth/cors.d.ts +33 -0
- package/dist/auth/cors.d.ts.map +1 -0
- package/dist/auth/cors.js +110 -0
- package/dist/auth/cors.js.map +1 -0
- package/dist/generated/skills.d.ts +1 -1
- package/dist/generated/skills.d.ts.map +1 -1
- package/dist/generated/skills.js +35 -3
- package/dist/generated/skills.js.map +1 -1
- package/dist/origin.d.ts +16 -3
- package/dist/origin.d.ts.map +1 -1
- package/dist/origin.js +20 -6
- package/dist/origin.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/tools.js +2 -2
- package/dist/tools.js.map +1 -1
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +7 -1
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Owned and operated by **Mzizi**.
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
**Live at** `https://mcp.mzizi.dev/mcp` (Cloudflare Worker `mzizi-mcp`, version
|
|
15
|
-
0.
|
|
15
|
+
0.17.0 — `MZIZI_MCP_VERSION` in `src/server.ts` is what `serverInfo.version`
|
|
16
16
|
reports, and it moves in lockstep with `package.json` and `server.json`).
|
|
17
17
|
|
|
18
18
|
## Free, with no gate except Fundi
|
|
@@ -302,9 +302,15 @@ call, passing the result through untouched:
|
|
|
302
302
|
that is not a plain `https` origin is dropped with a logged warning). Clients that send no
|
|
303
303
|
`Origin` (every non-browser client) are not affected. On `/mcp`, CORS echoes an allowed `Origin`
|
|
304
304
|
with `Vary: Origin` and never answers `Access-Control-Allow-Origin: *`. The OAuth provider's own
|
|
305
|
-
endpoints
|
|
306
|
-
|
|
307
|
-
|
|
305
|
+
endpoints follow `src/auth/cors.ts` (0.16.0; the provider's own CORS, which echoed any `Origin`,
|
|
306
|
+
is replaced): `/.well-known/*` are public discovery documents and answer
|
|
307
|
+
`Access-Control-Allow-Origin: *` (GET, HEAD, OPTIONS); `/token` and `/register` echo an `Origin`
|
|
308
|
+
only if it is on the same list as `/mcp` and always send `Vary: Origin`. A listed `Origin`
|
|
309
|
+
gets `POST, OPTIONS`, `Content-Type, Authorization` and `Access-Control-Max-Age: 600`; an unlisted
|
|
310
|
+
or `null` `Origin` is still served but gets no `Access-Control-Allow-Origin`, so a browser cannot read
|
|
311
|
+
the answer; a request with no `Origin` is unaffected. Errors (400, 401, 405, 429, 5xx) carry the
|
|
312
|
+
same headers. No `Access-Control-Allow-Credentials` anywhere. `/catalogue.json` is `*` on purpose.
|
|
313
|
+
Browser clients hosted on other sites cannot call `/mcp` (`src/origin.ts` is the one list).
|
|
308
314
|
- **PKCE and token audience:** the authorization-server metadata advertises `S256` only. Audience
|
|
309
315
|
binding applies only to clients that send a `resource` indicator (RFC 8707): such a token is
|
|
310
316
|
refused on a different server or path, but a token for `/mcp` is also accepted on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authkit-handler.d.ts","sourceRoot":"","sources":["../../src/auth/authkit-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAgB,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAuBrC,KAAK,OAAO,GAAG;IAAE,QAAQ,EAAE,GAAG,GAAG;QAAE,cAAc,EAAE,YAAY,CAAA;KAAE,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"authkit-handler.d.ts","sourceRoot":"","sources":["../../src/auth/authkit-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAgB,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAuBrC,KAAK,OAAO,GAAG;IAAE,QAAQ,EAAE,GAAG,GAAG;QAAE,cAAc,EAAE,YAAY,CAAA;KAAE,CAAA;CAAE,CAAC;AAsVpE,eAAO,MAAM,cAAc,sDAAM,CAAC"}
|
|
@@ -32,7 +32,6 @@ import { verifyIdToken } from "./id-token.js";
|
|
|
32
32
|
import { addApprovedClient, bindStateToSession, createOAuthState, generateCSRFProtection, isClientApproved, OAuthError, renderApprovalDialog, validateCSRFToken, validateOAuthState, } from "./oauth-utils.js";
|
|
33
33
|
const SERVER_NAME = "Mzizi Design System Registry";
|
|
34
34
|
const SERVER_DESCRIPTION = "Free, public MCP over the Mzizi design-system registry — components, design tokens, brand, the ecosystem architecture nodes, agent skills and the docs. No account needed; sign in (free) only to use Fundi.";
|
|
35
|
-
const ICON_REDIRECT = "https://www.nyuchi.com/icon-light.png";
|
|
36
35
|
/**
|
|
37
36
|
* `offline_access` is what makes the connection outlive its first access token.
|
|
38
37
|
*
|
|
@@ -82,15 +81,6 @@ function authkitOrigin(c) {
|
|
|
82
81
|
function callbackUrl(c) {
|
|
83
82
|
return new URL("/callback", c.req.url).href;
|
|
84
83
|
}
|
|
85
|
-
function redirectToIcon() {
|
|
86
|
-
return new Response(null, {
|
|
87
|
-
status: 301,
|
|
88
|
-
headers: {
|
|
89
|
-
Location: ICON_REDIRECT,
|
|
90
|
-
"Cache-Control": "public, max-age=86400",
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
84
|
app.get("/", (c) => c.html(`<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>${SERVER_NAME}</title><style>body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:#f9fafb;color:#111;margin:0}.wrap{max-width:640px;margin:4rem auto;padding:2rem}h1{font-size:1.6rem}code{background:#eef2f0;padding:.15rem .4rem;border-radius:4px}a{color:#1f6f4f}</style></head><body><div class="wrap"><h1>${SERVER_NAME}</h1><p>${SERVER_DESCRIPTION}</p><p>This is a remote <strong>Model Context Protocol</strong> endpoint. Add it as a connector in an MCP client (e.g. claude.ai) and connect to <code>/mcp</code>: every tool works without an account except the Fundi ones (<code>mzizi_fundi</code>, <code>mzizi_report_issue</code>). To use those, connect to <code>/mcp/signin</code> instead, and you will be prompted to sign in or create a free account.</p><p>Learn more at <a href="https://mzizi.dev">mzizi.dev</a>.</p></div></body></html>`, 200, { "Cache-Control": "public, max-age=300" }));
|
|
95
85
|
/**
|
|
96
86
|
* `GET /catalogue.json` — the tool surface as plain JSON, for readers that are
|
|
@@ -118,8 +108,8 @@ app.options("/catalogue.json", () => new Response(null, {
|
|
|
118
108
|
"Access-Control-Allow-Headers": "Content-Type",
|
|
119
109
|
},
|
|
120
110
|
}));
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
// /favicon.ico and /icon.png are the Mzizi mark, served from public/ (static assets answer
|
|
112
|
+
// before this Worker).
|
|
123
113
|
// The sign-in flow needs the identity tenant, which comes only from
|
|
124
114
|
// configuration. Without it, fail closed and say which setting is missing.
|
|
125
115
|
for (const path of ["/authorize", "/callback"]) {
|
|
@@ -147,7 +137,11 @@ app.get("/authorize", async (c) => {
|
|
|
147
137
|
return renderApprovalDialog(c.req.raw, {
|
|
148
138
|
client: await c.env.OAUTH_PROVIDER.lookupClient(clientId),
|
|
149
139
|
csrfToken,
|
|
150
|
-
server: {
|
|
140
|
+
server: {
|
|
141
|
+
description: SERVER_DESCRIPTION,
|
|
142
|
+
logo: new URL("/icon.png", c.req.url).href,
|
|
143
|
+
name: SERVER_NAME,
|
|
144
|
+
},
|
|
151
145
|
setCookie,
|
|
152
146
|
state: { oauthReqInfo },
|
|
153
147
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authkit-handler.js","sourceRoot":"","sources":["../../src/auth/authkit-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,EAAgB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAsB,aAAa,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAI1B,MAAM,WAAW,GAAG,8BAA8B,CAAC;AACnD,MAAM,kBAAkB,GACtB,8MAA8M,CAAC;AACjN,MAAM,aAAa,GAAG,uCAAuC,CAAC;AAC9D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,GAAG,qCAAqC,CAAC;AAC1D,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAW,CAAC;AAEhC,gFAAgF;AAChF,SAAS,SAAS,CAAC,GAAgB;IACjC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,MAAM,CAAC,IAAI,KAAK;QAAE,MAAM,IAAI,MAAM,CAAC,YAA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QACpB,CAAC,CAAC,EAAE,CAAC;IAEP,6EAA6E;IAC7E,4EAA4E;IAC5E,mEAAmE;IACnE,MAAM,KAAK,GAAU;QACnB,MAAM;QACN,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,IAAI,EAAE,IAAI,IAAI,SAAS;QACvB,WAAW,EAAE,MAAM,CAAC,YAAY,IAAI,EAAE;QACtC,YAAY,EAAE,MAAM,CAAC,aAAa;QAClC,WAAW;KACZ,CAAC;IAEF,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,qBAAqB,CAAC;QACtE,OAAO,EAAE,YAAY;QACrB,MAAM;QACN,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,WAAW;QAClB,KAAK;KACN,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;IACtD,IAAI,kBAAkB;QAAE,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;IAEtE,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CORS for the OAuth provider's own endpoints.
|
|
3
|
+
*
|
|
4
|
+
* `@cloudflare/workers-oauth-provider` answers every cross-origin request on
|
|
5
|
+
* `/token`, `/register` and `/.well-known/*` by echoing ANY `Origin` back with
|
|
6
|
+
* `Allow-Methods: *`, `Allow-Headers: Authorization, *` and a day of preflight
|
|
7
|
+
* cache. This module takes those answers over: the provider still serves the
|
|
8
|
+
* request, and its CORS headers are replaced with ours. Its own module, not
|
|
9
|
+
* `worker.ts`, because the Worker's entry may export only handlers.
|
|
10
|
+
*
|
|
11
|
+
* /.well-known/* public, credential-less documents: `*`, GET/HEAD only.
|
|
12
|
+
* /token, /register the same allowlist as the `/mcp` Origin gate
|
|
13
|
+
* (`origin.ts`): an allowed `Origin` is echoed with
|
|
14
|
+
* `Vary: Origin`; no `Origin` (every non-browser client)
|
|
15
|
+
* is served without CORS headers; an unlisted or `null`
|
|
16
|
+
* `Origin` is served too, but gets no
|
|
17
|
+
* `Access-Control-Allow-Origin`, so a browser cannot read
|
|
18
|
+
* the answer. Nothing is 403'd: a browser's block is the
|
|
19
|
+
* enforcement, and these endpoints take no cookie.
|
|
20
|
+
*
|
|
21
|
+
* Every answer carries the headers, errors included (a browser cannot read a
|
|
22
|
+
* 400, 401, 405, 429 or 5xx without them). No `Access-Control-Allow-Credentials`.
|
|
23
|
+
* `/authorize` is a top-level navigation, not a fetch, so it gets none.
|
|
24
|
+
*/
|
|
25
|
+
export type CorsRoute = "discovery" | "endpoint";
|
|
26
|
+
/** Which CORS rule governs `pathname`, or undefined for a path this module leaves alone. */
|
|
27
|
+
export declare function corsRouteFor(pathname: string): CorsRoute | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Serve `request` through `next` (the OAuth provider) with the CORS rules above,
|
|
30
|
+
* or return undefined when the path is not one of ours.
|
|
31
|
+
*/
|
|
32
|
+
export declare function withProviderCors(request: Request, hosts: readonly string[] | undefined, next: () => Promise<Response>): Promise<Response | undefined>;
|
|
33
|
+
//# sourceMappingURL=cors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cors.d.ts","sourceRoot":"","sources":["../../src/auth/cors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAiBH,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAEjD,4FAA4F;AAC5F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAIpE;AAoDD;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EACpC,IAAI,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GAC5B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAgB/B"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CORS for the OAuth provider's own endpoints.
|
|
3
|
+
*
|
|
4
|
+
* `@cloudflare/workers-oauth-provider` answers every cross-origin request on
|
|
5
|
+
* `/token`, `/register` and `/.well-known/*` by echoing ANY `Origin` back with
|
|
6
|
+
* `Allow-Methods: *`, `Allow-Headers: Authorization, *` and a day of preflight
|
|
7
|
+
* cache. This module takes those answers over: the provider still serves the
|
|
8
|
+
* request, and its CORS headers are replaced with ours. Its own module, not
|
|
9
|
+
* `worker.ts`, because the Worker's entry may export only handlers.
|
|
10
|
+
*
|
|
11
|
+
* /.well-known/* public, credential-less documents: `*`, GET/HEAD only.
|
|
12
|
+
* /token, /register the same allowlist as the `/mcp` Origin gate
|
|
13
|
+
* (`origin.ts`): an allowed `Origin` is echoed with
|
|
14
|
+
* `Vary: Origin`; no `Origin` (every non-browser client)
|
|
15
|
+
* is served without CORS headers; an unlisted or `null`
|
|
16
|
+
* `Origin` is served too, but gets no
|
|
17
|
+
* `Access-Control-Allow-Origin`, so a browser cannot read
|
|
18
|
+
* the answer. Nothing is 403'd: a browser's block is the
|
|
19
|
+
* enforcement, and these endpoints take no cookie.
|
|
20
|
+
*
|
|
21
|
+
* Every answer carries the headers, errors included (a browser cannot read a
|
|
22
|
+
* 400, 401, 405, 429 or 5xx without them). No `Access-Control-Allow-Credentials`.
|
|
23
|
+
* `/authorize` is a top-level navigation, not a fetch, so it gets none.
|
|
24
|
+
*/
|
|
25
|
+
import { OAUTH_ENDPOINT_CORS, corsHeadersFor, isAllowedOrigin } from "../origin.js";
|
|
26
|
+
/** Headers the provider sets on its answers; removed before ours go on. */
|
|
27
|
+
const PROVIDER_CORS_HEADERS = [
|
|
28
|
+
"Access-Control-Allow-Origin",
|
|
29
|
+
"Access-Control-Allow-Methods",
|
|
30
|
+
"Access-Control-Allow-Headers",
|
|
31
|
+
"Access-Control-Max-Age",
|
|
32
|
+
"Access-Control-Allow-Credentials",
|
|
33
|
+
"Access-Control-Expose-Headers",
|
|
34
|
+
];
|
|
35
|
+
/** What a browser MCP client sends when it fetches discovery documents (the SDK adds `MCP-Protocol-Version`). */
|
|
36
|
+
const DISCOVERY_ALLOW_HEADERS = "Content-Type, MCP-Protocol-Version";
|
|
37
|
+
/** Which CORS rule governs `pathname`, or undefined for a path this module leaves alone. */
|
|
38
|
+
export function corsRouteFor(pathname) {
|
|
39
|
+
if (pathname === "/.well-known" || pathname.startsWith("/.well-known/"))
|
|
40
|
+
return "discovery";
|
|
41
|
+
if (pathname === "/token" || pathname === "/register")
|
|
42
|
+
return "endpoint";
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
/** The CORS headers for `request` on `route`. */
|
|
46
|
+
function headersFor(route, request, hosts) {
|
|
47
|
+
if (route === "discovery")
|
|
48
|
+
return { "Access-Control-Allow-Origin": "*" };
|
|
49
|
+
const origin = request.headers.get("origin");
|
|
50
|
+
return corsHeadersFor(origin, isAllowedOrigin(origin, hosts), OAUTH_ENDPOINT_CORS);
|
|
51
|
+
}
|
|
52
|
+
function withHeaders(response, extra) {
|
|
53
|
+
const headers = new Headers(response.headers);
|
|
54
|
+
for (const name of PROVIDER_CORS_HEADERS)
|
|
55
|
+
headers.delete(name);
|
|
56
|
+
for (const [key, value] of Object.entries(extra)) {
|
|
57
|
+
if (key === "Vary") {
|
|
58
|
+
if (!/(^|,)\s*origin\s*(,|$)/i.test(headers.get("Vary") ?? ""))
|
|
59
|
+
headers.append(key, value);
|
|
60
|
+
}
|
|
61
|
+
else
|
|
62
|
+
headers.set(key, value);
|
|
63
|
+
}
|
|
64
|
+
return new Response(response.body, {
|
|
65
|
+
status: response.status,
|
|
66
|
+
statusText: response.statusText,
|
|
67
|
+
headers,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/** The preflight answer: 204, the route's methods and headers, the same origin decision. */
|
|
71
|
+
function preflight(route, request, hosts) {
|
|
72
|
+
if (route === "discovery") {
|
|
73
|
+
return new Response(null, {
|
|
74
|
+
status: 204,
|
|
75
|
+
headers: {
|
|
76
|
+
"Access-Control-Allow-Origin": "*",
|
|
77
|
+
"Access-Control-Allow-Methods": "GET, HEAD, OPTIONS",
|
|
78
|
+
"Access-Control-Allow-Headers": DISCOVERY_ALLOW_HEADERS,
|
|
79
|
+
"Access-Control-Max-Age": "600",
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const origin = request.headers.get("origin");
|
|
84
|
+
return new Response(null, {
|
|
85
|
+
status: 204,
|
|
86
|
+
headers: corsHeadersFor(origin, isAllowedOrigin(origin, hosts), OAUTH_ENDPOINT_CORS),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Serve `request` through `next` (the OAuth provider) with the CORS rules above,
|
|
91
|
+
* or return undefined when the path is not one of ours.
|
|
92
|
+
*/
|
|
93
|
+
export async function withProviderCors(request, hosts, next) {
|
|
94
|
+
const route = corsRouteFor(new URL(request.url).pathname);
|
|
95
|
+
if (!route)
|
|
96
|
+
return undefined;
|
|
97
|
+
if (request.method === "OPTIONS")
|
|
98
|
+
return preflight(route, request, hosts);
|
|
99
|
+
let response;
|
|
100
|
+
try {
|
|
101
|
+
response = await next();
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
// A throw would reach the browser as an opaque network error; answer it.
|
|
105
|
+
console.error("mzizi-mcp: OAuth provider threw", error);
|
|
106
|
+
response = Response.json({ error: "server_error", error_description: "Internal error" }, { status: 500 });
|
|
107
|
+
}
|
|
108
|
+
return withHeaders(response, headersFor(route, request, hosts));
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=cors.js.map
|
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BAAgB,CACpC,OAAgB,EAChB,KAAoC,EACpC,IAA6B;IAE7B,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC1D,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC1E,IAAI,QAAkB,CAAC;IACvB,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,IAAI,EAAE,CAAC;IAC1B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,yEAAyE;QACzE,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACxD,QAAQ,GAAG,QAAQ,CAAC,IAAI,CACtB,EAAE,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,EAC9D,EAAE,MAAM,EAAE,GAAG,EAAE,CAChB,CAAC;IACJ,CAAC;IACD,OAAO,WAAW,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -28,5 +28,5 @@ export interface BundledSkill {
|
|
|
28
28
|
}
|
|
29
29
|
export declare const BUNDLED_SKILLS: readonly BundledSkill[];
|
|
30
30
|
/** Bundle version, from mzizi-skills/index.json. */
|
|
31
|
-
export declare const SKILLS_VERSION = "0.
|
|
31
|
+
export declare const SKILLS_VERSION = "0.18.0";
|
|
32
32
|
//# sourceMappingURL=skills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/generated/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,iDAA+C,CAAA;AAE5E,MAA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SAAS,gBAAgB,EAAE,CAAA;CACnC;AAED,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAqRxC,CAAA;AAEV,oDAAoD;AACpD,eAAO,MAAM,cAAc,WAAW,CAAA"}
|
package/dist/generated/skills.js
CHANGED
|
@@ -240,8 +240,8 @@ export const BUNDLED_SKILLS = [
|
|
|
240
240
|
{
|
|
241
241
|
"name": "progress-report",
|
|
242
242
|
"category": "dev",
|
|
243
|
-
"description": "Use this skill whenever dev work starts, in any repo. All dev work runs on a 10-minute progress-report loop. When work starts, schedule a recurring report every 10 minutes (`/loop 10m` or CronCreate `*/10 * * *
|
|
244
|
-
"body_mdx": "# Progress report: measured, every ten minutes\n\n> **Covenant:** _The owner should never have to ask \"where are we?\"_\n\nAll dev work runs on a 10-minute progress-report loop. The owner reads the reports to decide\nwhat to do next, so every number in them is measured, and every report ends with what the\nowner has to do. A report that guesses is worse than none, because it is believed.\n\nThis skill has four parts: **starting** the loop, **what a report holds**, **the rules for a\ntick**, and **stopping**. The script `progress.sh` in this skill folder renders the bars and\nreads the repo state for you.\n\n## Get the script\n\n`progress.sh` is portable bash (3.2+) for macOS and Linux. It is **read-only**: it reads git,\nthe GitHub API (through `gh`) and HTTP status codes, and never writes anything.\n\n| Where you are | Path |\n| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `@nyuchi/mzizi-skills` from npm | `node_modules/@nyuchi/mzizi-skills/skills/progress-report/progress.sh` |\n| The public `mzizi` plugin | `skills/progress-report/progress.sh` in the plugin |\n| Only the MCP | `curl -fsSL https://unpkg.com/@nyuchi/mzizi-skills/skills/progress-report/progress.sh -o \"${TMPDIR:-/tmp}/progress.sh\"` |\n\n```bash\nP=\"${TMPDIR:-/tmp}/progress.sh\" # or one of the paths above\nbash \"$P\" bar 78 \"Plan steps\" \"7 of 9\" # Plan steps ████████████████░░░░ 78% 7 of 9\nbash \"$P\" pct 7 9 # 78\nbash \"$P\" repo mzizi-dev/agent-tools # open PRs, latest release, staging vs main, CI\nbash \"$P\" -C \"${TMPDIR:-/tmp}/task/app\" lines origin/staging app/ # lines under app/ at that ref\nbash \"$P\" http https://mcp.mzizi.dev/ https://mzizi.dev # status code per deployed site\n```\n\n`lines` counts the committed tree at a ref (`git grep -c ''`, binary files skipped), never the\nworking copy, so two reports on the same commit give the same number. `repo` reads only, every\npage of each list. Its CI line takes the newest run of each GitHub Actions workflow, the\nchecks of other apps, and the commit statuses (deploy integrations often post only a status)\non the default branch's head, and names what failed. A workflow whose newest run was\ncancelled is shown as cancelled (`; 1 cancelled: CI`), neither green nor red, because nothing\nfinished it; read that as \"not verified\", never as passing. `pct` and\n`bar` never round unfinished work up to 100%.\n\n## Starting the loop\n\nWhen dev work starts, schedule the report before you write any code:\n\n- **Claude Code:** `/loop 10m <report prompt>`, or CronCreate with `*/10 * * * *`. The cron\n lives in the session: it dies when the session ends and expires after 7 days, so a long build\n re-arms it in each new session.\n- **Surfaces without cron** (a chat, a CI job, an agent with no scheduler): report at each\n natural checkpoint instead, such as a PR opened, CI finished, a merge, a release, or a\n blocker.\n\nThe report prompt names the work and where its measures come from, for example:\n\n```text\nProgress report for the Toddle rebuild (nyuchi/toddle-enhancement-extension#41).\nBars: plan steps from the checklist in #41; features from the feature table in docs/plan.md;\ncode migrated = lines in app/ vs src/ at origin/staging. Workstreams: the repo, the Chrome Web\nStore listing. Use the progress-report skill. Read-only.\n```\n\nWrite the measures down once, in the tracking issue (see \"Track big work in GitHub issues\").\nThen every tick measures the same thing the same way.\n\n## What a report holds\n\n### 1. Progress bars\n\nEach bar is 20 cells of `█` and `░`, a percentage, and a **one-line basis**: what was counted.\nUse `progress.sh bar` so every bar has the same width and alignment. Typical bars:\n\n| Bar | Basis (measured) |\n| ------------- | ------------------------------------------------------------------------------------ |\n| Plan steps | Steps done of total, from the repo's plan doc or the tracking issue's checklist. |\n| Features done | Features shipped of the features listed in the plan. |\n| Code migrated | Lines in the new tree against the old (`progress.sh lines`), at the same ref. |\n| Overall | How it combines the others. Labelled `(estimate)` and shown as `~N%` when not exact. |\n\nOnly show a bar you can measure. If there is no checklist, say so and don't invent a\ndenominator. A bar never reads 100% for unfinished work: `progress.sh` keeps a cell empty\nuntil the count is complete.\n\n### 2. Per workstream\n\nFor each repo, service or content stream the work touches:\n\n- **Open PRs**, the **latest release or tag**, **staging ahead of main**, and **CI** on the\n default branch: `progress.sh repo <owner/repo>`.\n- **Deployed sites:** a live HTTP check (`progress.sh http <url>…`). Report the status code\n you got; don't call a site live without one.\n- **Content**, when the work includes it (Intercom articles, Sanity documents, store\n listings): the **published** count against the **draft** count, read from the source's API\n or MCP.\n\n### 3. Since last report\n\nOne line: what changed since the previous tick (a PR merged, CI went green, a bar moved from\n68% to 74%).\n\n### 4. Needs you\n\nThe **last line** of every report: `Needs you:` and the owner actions and decisions that block\nthe work, each one specific enough to act on. Write `Needs you: nothing` when nothing does.\n\n### When nothing changed\n\nIf nothing changed since the last tick, the whole report is one line, such as\n`10:40 no change since 10:30 (PR #212 CI still running). Needs you: nothing.`\n\n## Example\n\nThe Toddle rebuild format, partway through (the numbers are illustrative):\n\n```text\nProgress report 14:20 (Toddle rebuild, nyuchi/toddle-enhancement-extension#41)\n\nFeatures rebuilt (UI) ████████████████████ 100% every visible feature is React in app/\nPlan steps ████████████████░░░░ 78% 7 of 9\nCode in app/ ██████████████░░░░░░ 69% 16,090 app/ · 7,266 src/\n───────────────────────────────────────────────\nOverall (estimate) ███████████████░░░░░ ~75% plan steps, weighted by code moved\n\nnyuchi/toddle-enhancement-extension\n open PRs 2 (#58 settings panel, #59 remove src/)\n latest release v1.6.0 (2026-10-05)\n staging vs main 4 ahead, 0 behind\n CI on main green (9 checks)\nChrome Web Store 1.6.0 published, 1.7.0 draft staged\n\nSince last report: #57 merged; code in app/ 64% → 69%.\nNeeds you: approve the 1.7.0 store submission (staged, not submitted).\n```\n\n## Rules for a tick\n\n- **Ticks are read-only by default.** Never publish, release, merge, delete or deploy from a\n report tick unless the owner already approved that specific action. A report observes the\n work; it does not do it. Installing an approved test build is fine when the owner set that\n up.\n- **Measure, don't guess.** Every number comes from a command, an API or a file you read in\n this tick. If a read fails, say `?` and why, rather than reusing an old number.\n- **Privacy.** No secrets, tokens or credential status, and no personal information (names of\n members of the public, emails, phone numbers) in a report. Name a secret by its name, never\n its value.\n- **Short.** A report is read on a phone between other things. Bars, workstreams, one \"Since\n last report\" line, then \"Needs you\".\n\n## Stopping\n\nThe loop stops when:\n\n- **the work is done:** send one final report with the outcome (what merged, what is live and\n verified, what is left) and its \"Needs you\" line, then cancel the loop; or\n- **the owner says stop.**\n\nCancel the scheduled job (`CronDelete`, or end the `/loop`) so nothing keeps reporting on\nfinished work.\n\n## Checklist\n\n- [ ] The loop is scheduled (10 minutes) or, without cron, checkpoints are named.\n- [ ] Each bar has a measured basis; the Overall bar says `estimate` when it is one.\n- [ ] Each workstream shows PRs, release, staging vs main, CI, live HTTP, and content counts.\n- [ ] One \"Since last report:\" line, and \"Needs you:\" is the last line.\n- [ ] Nothing published, released, merged, deleted or deployed by a tick without approval.\n- [ ] No secrets, no PII.\n- [ ] A final report when the work is done, and the loop cancelled.",
|
|
243
|
+
"description": "Use this skill whenever dev work starts, in any repo. All dev work runs on a 10-minute progress-report loop. When work starts, schedule a recurring report every 10 minutes (`/loop 10m` or CronCreate `*/10 * * * *`; the cron dies with the session; without cron, report at each checkpoint). Measure, don't guess: each report has 20-cell progress bars with a percentage and a one-line basis (plan steps, features, code migrated as lines, and an Overall bar labelled estimate when not exact) and per workstream open PRs, latest release, staging ahead of main, CI, and a live HTTP check for deployed sites. It ends with one 'Since last report:' line and a final 'Needs you:' line. A \"what's blocking / what's live\" status gives each product one line: live value, what waits, who acts. When nothing changed, report a single line. Ticks are read-only: never publish, release, merge, delete or deploy from a tick unless the owner approved that exact action. No secrets or PII. Ships progress.sh (bar, pct, repo, lines, http).",
|
|
244
|
+
"body_mdx": "# Progress report: measured, every ten minutes\n\n> **Covenant:** _The owner should never have to ask \"where are we?\"_\n\nAll dev work runs on a 10-minute progress-report loop. The owner reads the reports to decide\nwhat to do next, so every number in them is measured, and every report ends with what the\nowner has to do. A report that guesses is worse than none, because it is believed.\n\nThis skill has five parts: **starting** the loop, **what a report holds**, the **\"what's\nblocking / what's live\" status**, **the rules for a tick**, and **stopping**. The script\n`progress.sh` in this skill folder renders the bars and reads the repo state for you.\n\n## Get the script\n\n`progress.sh` is portable bash (3.2+) for macOS and Linux. It is **read-only**: it reads git,\nthe GitHub API (through `gh`) and HTTP status codes, and never writes anything.\n\n| Where you are | Path |\n| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `@nyuchi/mzizi-skills` from npm | `node_modules/@nyuchi/mzizi-skills/skills/progress-report/progress.sh` |\n| The public `mzizi` plugin | `skills/progress-report/progress.sh` in the plugin |\n| Only the MCP | `curl -fsSL https://unpkg.com/@nyuchi/mzizi-skills/skills/progress-report/progress.sh -o \"${TMPDIR:-/tmp}/progress.sh\"` |\n\n```bash\nP=\"${TMPDIR:-/tmp}/progress.sh\" # or one of the paths above\nbash \"$P\" bar 78 \"Plan steps\" \"7 of 9\" # Plan steps ████████████████░░░░ 78% 7 of 9\nbash \"$P\" pct 7 9 # 78\nbash \"$P\" repo mzizi-dev/agent-tools # open PRs, latest release, staging vs main, CI\nbash \"$P\" -C \"${TMPDIR:-/tmp}/task/app\" lines origin/staging app/ # lines under app/ at that ref\nbash \"$P\" http https://mcp.mzizi.dev/ https://mzizi.dev # status code per deployed site\n```\n\n`lines` counts the committed tree at a ref (`git grep -c ''`, binary files skipped), never the\nworking copy, so two reports on the same commit give the same number. `repo` reads only, every\npage of each list. Its CI line takes the newest run of each GitHub Actions workflow, the\nchecks of other apps, and the commit statuses (deploy integrations often post only a status)\non the default branch's head, and names what failed. A workflow whose newest run was\ncancelled is shown as cancelled (`; 1 cancelled: CI`), neither green nor red, because nothing\nfinished it; read that as \"not verified\", never as passing. `pct` and\n`bar` never round unfinished work up to 100%.\n\n## Starting the loop\n\nWhen dev work starts, schedule the report before you write any code:\n\n- **Claude Code:** `/loop 10m <report prompt>`, or CronCreate with `*/10 * * * *`. The cron\n lives in the session: it dies when the session ends and expires after 7 days, so a long build\n re-arms it in each new session.\n- **Surfaces without cron** (a chat, a CI job, an agent with no scheduler): report at each\n natural checkpoint instead, such as a PR opened, CI finished, a merge, a release, or a\n blocker.\n\nThe report prompt names the work and where its measures come from, for example:\n\n```text\nProgress report for the Toddle rebuild (nyuchi/toddle-enhancement-extension#41).\nBars: plan steps from the checklist in #41; features from the feature table in docs/plan.md;\ncode migrated = lines in app/ vs src/ at origin/staging. Workstreams: the repo, the Chrome Web\nStore listing. Use the progress-report skill. Read-only.\n```\n\nWrite the measures down once, in the tracking issue (see \"Track big work in GitHub issues\").\nThen every tick measures the same thing the same way.\n\n## What a report holds\n\n### 1. Progress bars\n\nEach bar is 20 cells of `█` and `░`, a percentage, and a **one-line basis**: what was counted.\nUse `progress.sh bar` so every bar has the same width and alignment. Typical bars:\n\n| Bar | Basis (measured) |\n| ------------- | ------------------------------------------------------------------------------------ |\n| Plan steps | Steps done of total, from the repo's plan doc or the tracking issue's checklist. |\n| Features done | Features shipped of the features listed in the plan. |\n| Code migrated | Lines in the new tree against the old (`progress.sh lines`), at the same ref. |\n| Overall | How it combines the others. Labelled `(estimate)` and shown as `~N%` when not exact. |\n\nOnly show a bar you can measure. If there is no checklist, say so and don't invent a\ndenominator. A bar never reads 100% for unfinished work: `progress.sh` keeps a cell empty\nuntil the count is complete.\n\n### 2. Per workstream\n\nFor each repo, service or content stream the work touches:\n\n- **Open PRs**, the **latest release or tag**, **staging ahead of main**, and **CI** on the\n default branch: `progress.sh repo <owner/repo>`.\n- **Deployed sites:** a live HTTP check (`progress.sh http <url>…`). Report the status code\n you got; don't call a site live without one.\n- **Content**, when the work includes it (Intercom articles, Sanity documents, store\n listings): the **published** count against the **draft** count, read from the source's API\n or MCP.\n\n### 3. Since last report\n\nOne line: what changed since the previous tick (a PR merged, CI went green, a bar moved from\n68% to 74%).\n\n### 4. Needs you\n\nThe **last line** of every report: `Needs you:` and the owner actions and decisions that block\nthe work, each one specific enough to act on. Write `Needs you: nothing` when nothing does.\n\n### When nothing changed\n\nIf nothing changed since the last tick, the whole report is one line, such as\n`10:40 no change since 10:30 (PR #212 CI still running). Needs you: nothing.`\n\n## Example\n\nThe Toddle rebuild format, partway through (the numbers are illustrative):\n\n```text\nProgress report 14:20 (Toddle rebuild, nyuchi/toddle-enhancement-extension#41)\n\nFeatures rebuilt (UI) ████████████████████ 100% every visible feature is React in app/\nPlan steps ████████████████░░░░ 78% 7 of 9\nCode in app/ ██████████████░░░░░░ 69% 16,090 app/ · 7,266 src/\n───────────────────────────────────────────────\nOverall (estimate) ███████████████░░░░░ ~75% plan steps, weighted by code moved\n\nnyuchi/toddle-enhancement-extension\n open PRs 2 (#58 settings panel, #59 remove src/)\n latest release v1.6.0 (2026-10-05)\n staging vs main 4 ahead, 0 behind\n CI on main green (9 checks)\nChrome Web Store 1.6.0 published, 1.7.0 draft staged\n\nSince last report: #57 merged; code in app/ 64% → 69%.\nNeeds you: approve the 1.7.0 store submission (staged, not submitted).\n```\n\n## Status: what's blocking, what's live\n\nUse this format when the owner asks \"what's blocking?\" or \"what's live?\", when work crosses\nseveral products, or when a release is in flight. It can stand in for the per-workstream block\nof a tick, or follow it. Its one rule: **merged to `staging` is not live.** A product is live\nwhen you read its live value this minute, and deploys lag a minute or two behind a merge to\n`main`, so say \"not yet\" before you say \"stale\".\n\nOne line per product, with three parts: **live value**, **waiting**, **who acts**.\n\n- **Live value:** what the product serves now, read from its own source in this tick (a\n version, a registry commit, an HTTP status), or `?` and why. Never a value from an earlier\n tick or from a merged PR.\n- **Waiting:** what stands between here and the target, specific enough to check, such as\n `PR #120 in the merge queue`, `release PR #340 open` or `npm lists 0.17.0, not 0.18.0`.\n Write `nothing` when the live value is the target.\n- **Who acts:** `me` (the agent, within what the owner approved), `CI`, `bot`, `deploy` (a\n Cloudflare deploy, which lags), or `owner` for a decision only the owner can make: a\n release, the `forward-ported` label, a major version. Name a person only by role.\n\n```text\nStatus 14:20 (registry 4.25.0 to every product) target: registry=c3e6e87c49ee\n\nmzizi-api live registry=1ac4f81a0571 waiting: bump PR #121 in the merge queue, then release who: CI, then owner\nmzizi-mcp live registry=1ac4f81a0571 waiting: bump PR open, parity not run who: me\n@bundu/ui live 0.10.0, pin 780457a waiting: registry:sync not run who: me\nmzizi-site live 200, counts for 675 waiting: the API release first who: owner (release)\nmzizi-docs live 200 waiting: nothing who: -\n\nBlocking: the API release (release PR not cut; the main gate may need the owner's forward-ported label).\nSince last report: API bump PR moved from open to queued.\nNeeds you: say whether to cut the API release now, and whether forward-ported is approved for it.\n```\n\n(The values above are illustrative: read yours from the live commands. `ship-release`'s\n`verify-live.sh` prints most of them, and `registry-propagation` has the alignment table.)\n\nRules for this status:\n\n- **One line per product**, plus a `Blocking:` line naming the single thing that, once\n cleared, moves the most lines. If nothing blocks, write `Blocking: nothing`.\n- **Honest wording.** `merged` and `queued` are not `live`. Say `live` only with a value read\n now; say `not yet` for what a deploy has not reached; say `?` when a read failed.\n- **End with `Needs you:`**, the owner's actions and decisions, each one specific enough to act on\n (`Needs you: nothing` when nothing is). It is still the last line of the report.\n- Still read-only: reading the live state never publishes, releases, merges or deploys.\n\n## Rules for a tick\n\n- **Ticks are read-only by default.** Never publish, release, merge, delete or deploy from a\n report tick unless the owner already approved that specific action. A report observes the\n work; it does not do it. Installing an approved test build is fine when the owner set that\n up.\n- **Measure, don't guess.** Every number comes from a command, an API or a file you read in\n this tick. If a read fails, say `?` and why, rather than reusing an old number.\n- **Privacy.** No secrets, tokens or credential status, and no personal information (names of\n members of the public, emails, phone numbers) in a report. Name a secret by its name, never\n its value.\n- **Short.** A report is read on a phone between other things. Bars, workstreams, one \"Since\n last report\" line, then \"Needs you\".\n\n## Stopping\n\nThe loop stops when:\n\n- **the work is done:** send one final report with the outcome (what merged, what is live and\n verified, what is left) and its \"Needs you\" line, then cancel the loop; or\n- **the owner says stop.**\n\nCancel the scheduled job (`CronDelete`, or end the `/loop`) so nothing keeps reporting on\nfinished work.\n\n## Checklist\n\n- [ ] The loop is scheduled (10 minutes) or, without cron, checkpoints are named.\n- [ ] Each bar has a measured basis; the Overall bar says `estimate` when it is one.\n- [ ] Each workstream shows PRs, release, staging vs main, CI, live HTTP, and content counts.\n- [ ] One \"Since last report:\" line, and \"Needs you:\" is the last line.\n- [ ] A \"what's blocking / what's live\" status has one line per product (live value, waiting, who acts), says live only for a value read this tick, and keeps merged and live apart.\n- [ ] Nothing published, released, merged, deleted or deployed by a tick without approval.\n- [ ] No secrets, no PII.\n- [ ] A final report when the work is done, and the loop cancelled.",
|
|
245
245
|
"source": "mzizi-dev/agent-tools/mzizi-skills/skills/progress-report",
|
|
246
246
|
"files": [
|
|
247
247
|
{
|
|
@@ -252,8 +252,40 @@ export const BUNDLED_SKILLS = [
|
|
|
252
252
|
"content": "#!/usr/bin/env bash\n# progress.sh — measured progress for a report tick (the Mzizi `progress-report` skill).\n#\n# Portable bash (3.2+, macOS and Linux). READ-ONLY: it never writes to a repo,\n# a branch, a release, a registry or a deployment. It only reads git, the\n# GitHub API (through gh) and HTTP status codes.\n#\n# progress.sh bar PCT [LABEL [BASIS]] a 20-cell bar: LABEL ████████░░░░ 40% BASIS\n# progress.sh pct DONE TOTAL DONE/TOTAL as a whole percentage (0 when TOTAL is 0)\n# progress.sh repo OWNER/REPO open PRs, latest release, staging ahead of the\n# default branch, default-branch CI\n# progress.sh lines REF PATHSPEC... lines in the files under PATHSPEC at REF, run\n# inside a git clone (for \"code migrated\" bars)\n# progress.sh http URL... the HTTP status of each deployed site\n#\n# Options (before or after the command's arguments):\n# -C DIR run `lines` against the git clone at DIR (default: the current directory)\n# --width N bar cells (default 20)\n# --label-width N pad LABEL to N columns (default 24)\n#\n# Environment:\n# PROGRESS_GH the gh binary (default: gh)\n# PROGRESS_CURL the curl binary (default: curl)\n#\n# Exit codes: 0 ok; 1 bad usage or a failed read (the message says which).\n\nset -u\nset -o pipefail\n\ndie() {\n printf 'progress: %s\\n' \"$*\" >&2\n exit 1\n}\n\nGH=\"${PROGRESS_GH:-gh}\"\nCURL=\"${PROGRESS_CURL:-curl}\"\nWIDTH=20\nLABEL_WIDTH=24\nGIT_DIR_ARG=\".\"\n\n# Pull the options out wherever they sit (before or after the command), and keep\n# the command and its positional arguments in order.\nARGS=()\nwhile [ $# -gt 0 ]; do\n case \"$1\" in\n -C) GIT_DIR_ARG=\"${2:?-C needs a directory}\"; shift 2 ;;\n --width) WIDTH=\"${2:?--width needs a number}\"; shift 2 ;;\n --label-width) LABEL_WIDTH=\"${2:?--label-width needs a number}\"; shift 2 ;;\n -h|--help) sed -n '2,26p' \"$0\"; exit 0 ;;\n --) shift; while [ $# -gt 0 ]; do ARGS+=(\"$1\"); shift; done ;;\n *) ARGS+=(\"$1\"); shift ;;\n esac\ndone\nset -- ${ARGS[@]+\"${ARGS[@]}\"}\nCMD=\"${1:-}\"\n[ $# -gt 0 ] && shift\n\nis_uint() { case \"$1\" in ''|*[!0-9]*) return 1 ;; *) return 0 ;; esac; }\nif ! is_uint \"$WIDTH\" || [ \"$WIDTH\" -eq 0 ]; then die \"--width must be a whole number above 0\"; fi\nis_uint \"$LABEL_WIDTH\" || die \"--label-width must be a whole number\"\n\n# Round a percentage given as 75, 75.4, ~75 or 75% to a whole number in 0..100.\nnorm_pct() {\n local p=\"${1#\\~}\"\n p=\"${p%\\%}\"\n case \"$p\" in\n ''|*[!0-9.]*|*.*.*|.) return 1 ;;\n esac\n # Unfinished work never rounds up to 100 (99.6% is not done), and started\n # work never rounds down to 0 (0.4% has begun).\n awk -v p=\"$p\" 'BEGIN { r = int(p + 0.5); if (r > 100) r = 100\n if (p < 100 && r == 100) r = 99; if (p > 0 && r == 0) r = 1; print r }'\n}\n\n# ---------------------------------------------------------------- bar\ncmd_bar() {\n [ $# -ge 1 ] || die \"usage: progress.sh bar PCT [LABEL [BASIS]]\"\n local raw=\"$1\" label=\"${2:-}\" basis=\"${3:-}\" pct filled i cells=\"\" shown\n pct=\"$(norm_pct \"$raw\")\" || die \"bar: '$raw' is not a percentage\"\n filled=$(( (pct * WIDTH + 50) / 100 ))\n # Never an empty bar for started work, and never a full bar for unfinished\n # work. The second rule wins when the two collide (a one-cell bar).\n if [ \"$pct\" -gt 0 ] && [ \"$filled\" -eq 0 ]; then filled=1; fi\n if [ \"$pct\" -lt 100 ] && [ \"$filled\" -ge \"$WIDTH\" ]; then filled=$((WIDTH - 1)); fi\n i=0\n while [ \"$i\" -lt \"$WIDTH\" ]; do\n if [ \"$i\" -lt \"$filled\" ]; then cells=\"${cells}█\"; else cells=\"${cells}░\"; fi\n i=$((i + 1))\n done\n # An estimate keeps its \"~\" so the reader knows it is not a count.\n case \"$raw\" in \\~*) shown=\"~$pct%\" ;; *) shown=\"$pct%\" ;; esac\n if [ -n \"$label\" ]; then\n # Pad by characters, not bytes (printf's %-Ns counts bytes): count the\n # bytes that are not UTF-8 continuation bytes, in any locale. A wide\n # character (CJK, most emoji) still counts as one column, so keep labels\n # to Latin script.\n local chars pad\n chars=\"$(printf '%s' \"$label\" | LC_ALL=C tr -d '\\200-\\277' | wc -c | tr -d ' ')\"\n pad=$((LABEL_WIDTH - chars))\n [ \"$pad\" -lt 0 ] && pad=0\n printf '%s%*s%s %5s' \"$label\" \"$pad\" \"\" \"$cells\" \"$shown\"\n else\n printf '%s %5s' \"$cells\" \"$shown\"\n fi\n [ -n \"$basis\" ] && printf ' %s' \"$basis\"\n printf '\\n'\n}\n\n# ---------------------------------------------------------------- pct\ncmd_pct() {\n [ $# -eq 2 ] || die \"usage: progress.sh pct DONE TOTAL\"\n if ! is_uint \"$1\" || ! is_uint \"$2\"; then die \"pct: DONE and TOTAL must be whole numbers\"; fi\n if [ \"$2\" -eq 0 ]; then echo 0; return; fi\n # 999 of 1000 is 99 and 1 of 1000 is 1: only a finished count reads 100, and\n # only an untouched one reads 0.\n awk -v d=\"$1\" -v t=\"$2\" 'BEGIN { r = int(d * 100 / t + 0.5); if (r > 100) r = 100\n if (d < t && r == 100) r = 99; if (d > 0 && r == 0) r = 1; print r }'\n}\n\n# ---------------------------------------------------------------- repo\ncmd_repo() {\n [ $# -eq 1 ] || die \"usage: progress.sh repo OWNER/REPO\"\n local r=\"$1\" def prs rel ahead ci\n case \"$r\" in */*) ;; *) die \"repo: '$r' is not OWNER/REPO\" ;; esac\n command -v \"$GH\" >/dev/null 2>&1 || die \"repo: gh not found (set PROGRESS_GH)\"\n\n def=\"$(\"$GH\" api \"repos/$r\" --jq '.default_branch' 2>/dev/null)\" || die \"repo: cannot read $r\"\n [ -n \"$def\" ] || die \"repo: cannot read $r\"\n\n # --paginate, so a repo with more than 100 open PRs is counted in full.\n if prs=\"$(\"$GH\" api --paginate \"repos/$r/pulls?state=open&per_page=100\" --jq '.[].number' 2>/dev/null)\"; then\n prs=\"$(printf '%s' \"$prs\" | grep -c . || true)\"\n else\n prs=\"?\"\n fi\n\n rel=\"$(\"$GH\" api \"repos/$r/releases/latest\" --jq '.tag_name + \" (\" + (.published_at[0:10]) + \")\"' 2>/dev/null)\" || rel=\"\"\n if [ -z \"$rel\" ]; then\n # The REST tags list is sorted by name, not date, so ask for the newest tag.\n # shellcheck disable=SC2016 # $owner and $name are GraphQL variables\n rel=\"$(\"$GH\" api graphql -f owner=\"${r%%/*}\" -f name=\"${r#*/}\" -f query='\n query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) {\n refs(refPrefix: \"refs/tags/\", first: 1, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {\n nodes { name } } } }' --jq '.data.repository.refs.nodes[0].name // empty' 2>/dev/null)\" || rel=\"\"\n [ -n \"$rel\" ] && rel=\"$rel (tag, no release)\"\n fi\n [ -n \"$rel\" ] || rel=\"none\"\n\n if [ \"$def\" = \"staging\" ]; then\n ahead=\"n/a (staging is the default branch)\"\n elif \"$GH\" api \"repos/$r/branches/staging\" --jq '.name' >/dev/null 2>&1; then\n ahead=\"$(\"$GH\" api \"repos/$r/compare/$def...staging\" --jq '\"\\(.ahead_by) ahead, \\(.behind_by) behind\"' 2>/dev/null)\" || ahead=\"?\"\n else\n ahead=\"no staging branch\"\n fi\n\n # Default-branch CI on the branch head, from three sources, every page of\n # each: GitHub Actions workflow runs (keyed by workflow file: display names\n # and job names need not be unique), check runs from other apps (keyed by app\n # and check name), and commit statuses (keyed by context; the older API that\n # deploy integrations such as Cloudflare and Vercel often use). One TSV line\n # per signal: kind, state (ok, failed, pending or cancelled), key, time, and\n # the name to show.\n local signals sha\n if sha=\"$(\"$GH\" api \"repos/$r/commits/$def\" --jq '.sha' 2>/dev/null)\" && [ -n \"$sha\" ] &&\n signals=\"$(\n {\n \"$GH\" api --paginate \"repos/$r/actions/runs?head_sha=$sha&per_page=100\" --jq '.workflow_runs[] |\n [ \"workflow\",\n (if .status != \"completed\" then \"pending\"\n elif .conclusion == \"cancelled\" then \"cancelled\"\n elif (.conclusion == \"skipped\" or .conclusion == \"neutral\") then \"skipped\"\n elif .conclusion == \"success\" then \"ok\"\n else \"failed\" end),\n .path, .created_at, .name ] | @tsv' &&\n \"$GH\" api --paginate \"repos/$r/commits/$sha/check-runs?per_page=100\" --jq '.check_runs[] |\n select(.app.slug != \"github-actions\") |\n [ \"app\",\n (if .status != \"completed\" then \"pending\"\n elif .conclusion == \"cancelled\" then \"cancelled\"\n elif (.conclusion == \"skipped\" or .conclusion == \"neutral\") then \"skipped\"\n elif .conclusion == \"success\" then \"ok\"\n else \"failed\" end),\n (.app.slug + \"/\" + .name), (.started_at // \"\"), .name ] | @tsv' &&\n \"$GH\" api --paginate \"repos/$r/commits/$sha/statuses?per_page=100\" --jq '.[] |\n [ \"status\",\n (if .state == \"success\" then \"ok\" elif .state == \"pending\" then \"pending\" else \"failed\" end),\n .context, .created_at, .context ] | @tsv'\n } 2>/dev/null\n )\"; then\n # Reruns, scheduled runs and new statuses pile up on one commit: only the\n # newest signal per key counts, so a stale failure that a later run fixed\n # does not turn CI red. When the newest run was cancelled, nothing finished\n # it: it is reported as cancelled, neither green nor red, and an older\n # result does not stand in for it. ISO times sort as text, newest first.\n ci=\"$(printf '%s\\n' \"$signals\" | sort -t \"$(printf '\\t')\" -k4,4r | awk -F'\\t' '\n function add(list, name) { return list (list ? \", \" : \"\") name }\n NF < 5 || $1 == \"\" { next }\n # A skipped or neutral run checked nothing, so it never replaces an older\n # result; a workflow with only skipped runs counts as passing.\n $2 == \"skipped\" { key = $1 SUBSEP $3; if (!(key in skipped)) { skipped[key] = 1; order[++k] = key } next }\n { key = $1 SUBSEP $3; if (seen[key]++) next }\n $2 == \"cancelled\" { c++; cn = add(cn, $5); next }\n { n++ }\n $2 == \"failed\" { f++; if (!(($5) in named)) { named[$5] = 1; fn = add(fn, $5) } }\n $2 == \"pending\" { p++ }\n END {\n for (i = 1; i <= k; i++) if (!(order[i] in seen)) n++\n extra = c ? sprintf(\"; %d cancelled: %s\", c, cn) : \"\"\n if (n == 0 && c == 0) print \"no checks\"\n else if (f) printf \"red (%d failed of %d: %s%s)\\n\", f, n, fn, extra\n else if (p) printf \"running (%d pending of %d%s)\\n\", p, n, extra\n else if (n == 0) printf \"cancelled (%d: %s)\\n\", c, cn\n else printf \"green (%d checks%s)\\n\", n, extra }')\"\n else\n ci=\"?\"\n fi\n\n printf '%s\\n' \"$r\"\n printf ' open PRs %s\\n' \"$prs\"\n printf ' latest release %s\\n' \"$rel\"\n printf ' staging vs %-4s %s\\n' \"$def\" \"$ahead\"\n printf ' CI on %-9s %s\\n' \"$def\" \"$ci\"\n}\n\n# ---------------------------------------------------------------- lines\ncmd_lines() {\n [ $# -ge 2 ] || die \"usage: progress.sh lines REF PATHSPEC...\"\n local ref=\"$1\" total\n shift\n git -C \"$GIT_DIR_ARG\" rev-parse --git-dir >/dev/null 2>&1 || die \"lines: $GIT_DIR_ARG is not a git clone\"\n git -C \"$GIT_DIR_ARG\" rev-parse --verify --quiet \"$ref^{commit}\" >/dev/null || die \"lines: no such ref '$ref'\"\n # `git grep -c ''` counts every line of every text file in the tree at REF,\n # without checking anything out. -I skips binary files. No match is 0, not an error.\n local counts rc=0 err\n err=\"$(mktemp \"${TMPDIR:-/tmp}/progress-lines.XXXXXX\")\" || die \"lines: cannot make a temp file\"\n counts=\"$(git -C \"$GIT_DIR_ARG\" grep -I -c '' \"$ref\" -- \"$@\" 2>\"$err\")\" || rc=$?\n # Exit 1 is \"no file matched\" (a real 0); anything above is git refusing the\n # pathspec or the ref, and a bar built on it would look measured but not be.\n if [ \"$rc\" -gt 1 ]; then\n printf 'progress: lines: git grep failed: %s\\n' \"$(head -n 1 \"$err\")\" >&2\n rm -f -- \"$err\"\n exit 1\n fi\n rm -f -- \"$err\"\n total=\"$(printf '%s\\n' \"$counts\" | awk -F: 'NF { n += $NF } END { print n + 0 }')\"\n printf '%s\\n' \"$total\"\n}\n\n# ---------------------------------------------------------------- http\ncmd_http() {\n [ $# -ge 1 ] || die \"usage: progress.sh http URL...\"\n command -v \"$CURL\" >/dev/null 2>&1 || die \"http: curl not found (set PROGRESS_CURL)\"\n local u code\n for u in \"$@\"; do\n case \"$u\" in http://*|https://*) ;; *) die \"http: '$u' is not an http(s) URL\" ;; esac\n code=\"$(\"$CURL\" -s -o /dev/null -L --max-time 15 -w '%{http_code}' \"$u\" 2>/dev/null)\" || code=\"${code:-000}\"\n [ -n \"$code\" ] || code=\"000\"\n printf '%s %s\\n' \"$code\" \"$u\"\n done\n # A down site is a fact for the report, not a script failure.\n return 0\n}\n\ncase \"$CMD\" in\n bar) cmd_bar \"$@\" ;;\n pct) cmd_pct \"$@\" ;;\n repo) cmd_repo \"$@\" ;;\n lines) cmd_lines \"$@\" ;;\n http) cmd_http \"$@\" ;;\n ''|-h|--help|help) sed -n '2,26p' \"$0\" ;;\n *) die \"unknown command: $CMD (bar, pct, repo, lines, http)\" ;;\nesac\n"
|
|
253
253
|
}
|
|
254
254
|
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"name": "ship-release",
|
|
258
|
+
"category": "dev",
|
|
259
|
+
"description": "Use this skill whenever you release a Mzizi repo, meaning staging goes to main and the change goes live (npm, Cloudflare Workers, docs.mzizi.dev, mzizi.dev). It is the runbook: cut the release branch off origin/main with staging's exact tree in one commit and prove the tree hashes are equal, the PR title and the issue line in its body, the version rule (next minor above npm, a CHANGELOG section per bumped version, majors need the owner), the main-gate failure about commits that staging may not have and its owner-only forward-ported label (never --admin), merge queue methods (GraphQL is blocked in cloud sessions, use the REST route), stale checks, a publish that npm lists late, immutable releases, and verifying LIVE with commands. Ships verify-live.sh, which only reads. A release is live when the live commands say so, never when it merges.",
|
|
260
|
+
"body_mdx": "# Ship a release: staging to main, then prove it is live\n\n> **Covenant:** _A release is done when the live commands say so, not when the PR merges._\n\nReleases go live without sitting around. The owner's direction is to choose the practice that\nkeeps releases moving and every claim checkable: cut, check, queue, publish, verify, report.\nThis skill is the runbook, written from the releases that stalled for the same few reasons.\n\nIt has seven parts: **cut**, **versions**, **the main gate**, **queues**, **stale checks**,\n**publish**, and **verify live**. `verify-live.sh` in this skill folder prints the live state.\n\n**Scope.** Which repos release this way: the org's repos with a `staging` branch that deploys\nor publishes from `main` (agent-tools, mzizi-registry, mzizi-api, mzizi-docs, mzizi-site,\npackages-npm). Each repo's own `AGENTS.md` wins where it differs. Who may release: only the\nowner, or an agent the owner authorised for that release. Without that authority, stop at a\nmerged PR into `staging` and say so in \"Needs you:\".\n\n## Get the script\n\n`verify-live.sh` is portable bash (3.2+) and **read-only**: it reads npm, the GitHub API\n(through `gh`) and HTTP responses, and never publishes, tags or deploys.\n\n| Where you are | Path |\n| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `@nyuchi/mzizi-skills` from npm | `node_modules/@nyuchi/mzizi-skills/skills/ship-release/verify-live.sh` |\n| The public `mzizi` plugin | `skills/ship-release/verify-live.sh` in the plugin |\n| Only the MCP | `curl -fsSL https://unpkg.com/@nyuchi/mzizi-skills/skills/ship-release/verify-live.sh -o \"${TMPDIR:-/tmp}/verify-live.sh\"` |\n\n```bash\nV=\"${TMPDIR:-/tmp}/verify-live.sh\" # or one of the paths above\nbash \"$V\" npm @nyuchi/mzizi-skills @nyuchi/mzizi-skills@0.18.0 # latest, and is 0.18.0 listed yet\nbash \"$V\" api # status and X-Mzizi-Source of /v1/brand\nbash \"$V\" mcp # catalogue version, registry commit, evil-origin probe\nbash \"$V\" release mzizi-dev/agent-tools '@nyuchi/mzizi-skills@0.18.0' # tag and release exist (a draft shows draft=true), notes length\nbash \"$V\" http https://docs.mzizi.dev/ https://mzizi.dev/ # status per page\n```\n\n## 1. Cut the release branch\n\nA release PR is `main` plus `staging`'s exact tree in **one commit**. Work in your own clone\n(see the `digital-hygiene` skill), never in another agent's.\n\n```bash\ngit fetch origin main staging\ngit checkout -B release/2026-11-04-skills origin/main # release/<date>-<name>\ngit read-tree --reset -u origin/staging # the index and working tree become staging's\ngit commit -m \"chore(release): staging to main, 2026-11-04 (@nyuchi/mzizi-skills 0.18.0)\"\ntest \"$(git rev-parse 'HEAD^{tree}')\" = \"$(git rev-parse 'origin/staging^{tree}')\" && echo \"trees equal\"\ngit push -u origin release/2026-11-04-skills\n```\n\n- If `git commit` says `nothing to commit`, `main` already holds `staging`'s tree: there is\n nothing to release, and you say so instead of opening a PR.\n- **Title:** `chore(release): staging to main, <date> (<package versions>)`.\n- **Body:** a line that starts with `Refs <owner>/<repo>#n`, `Refs #n`, `Closes #n` or\n `No issue: <reason>`, on its own line. A mention in the middle of a sentence does not count.\n Where the repo's `AGENTS.md` asks for release notes in the PR body, paste what the release\n will carry (the CHANGELOG sections), and the `Site/docs/skills impact` heading if it asks.\n- **Never** a merge commit or a rebase here: the point of one commit is that the diff against\n `main` is exactly what `staging` holds. If the trees differ, stop and find out why.\n- After a re-cut or a force-push of the branch, check the labels on the PR again (part 3).\n\n## 2. Versions\n\n- A package version must be the **next minor** above the highest on npm: x.y.z becomes\n x.(y+1).0. Read npm, not the file: `npm view <package> version` (for a list,\n `npm view <package> versions --json`). The release job refuses anything else.\n- **Majors need the owner**, and go only through a manual workflow run with `bump: major`.\n- `CHANGELOG.md` needs a section for **each bumped version** (a `### <package> <version>`\n heading under the release); the release notes are built from it, and a version with no\n section fails the job before `npm publish`.\n- If `package.json` was already bumped for a version that has since reached npm, bump again\n before the release PR, or the job has nothing valid to publish.\n- Do not bump a version a repo's rules leave to tags (a staging patch tag is the workflow's\n job, never yours).\n\n## 3. The main gate and the `forward-ported` label\n\nThe org's main gate (`release-version-check`, which runs `main-gate.sh`) can fail with:\n\n```text\n'main' has 1 commit(s) since the last release that staging may not have; this release would delete them\n```\n\nIt fails because `main`'s own squash or merge commits from earlier releases are never\nancestors of `staging`, so git counts them as commits `staging` may lack. When the trees are\nequal, nothing would be deleted; the documented lane for that is the **`forward-ported`\nlabel** on the release PR.\n\n**That label is an owner decision, made per release.** Add it only when the owner has said so\nfor this release, and only after you have checked both of these:\n\n1. The tree hashes are equal (part 1), and\n2. The main gate is the **only** failing check on the PR:\n\n```bash\nSHA=$(gh api repos/OWNER/REPO/pulls/N --jq .head.sha)\ngh api \"repos/OWNER/REPO/commits/$SHA/check-runs?per_page=100\" --jq '.check_runs[] | [(.conclusion // .status), .name] | @tsv'\n```\n\nThen label the PR and re-run only the failed jobs:\n\n```bash\ngh api -X POST repos/OWNER/REPO/issues/N/labels -f 'labels[]=forward-ported'\ngh api \"repos/OWNER/REPO/actions/runs?head_sha=$SHA&per_page=30\" --jq '.workflow_runs[] | [.id, .name, .conclusion] | @tsv'\ngh api -X POST repos/OWNER/REPO/actions/runs/RUN_ID/rerun-failed-jobs\n```\n\n- **Never `--admin`**, never skip or disable the gate, never merge past a red check. Org admins\n can bypass rulesets; agents never do.\n- If any other check fails, fix that first. The label does not cover it.\n- Prevention: forward-port `main`-only commits into `staging` before cutting, and keep bots\n pointed at `staging`. After the release, sync `main` back into `staging` as the repo's\n `AGENTS.md` says, so the trees match before more work lands. Compare trees, not\n ahead/behind counts.\n\n## 4. Merge queues\n\n- `staging` takes **squash**; `main` takes the method its queue is set to (the owner's note says merge; some repos' `AGENTS.md` say\n squash: read the repo's, and compare trees, not ancestry, afterwards). Do not\n choose a method by hand: enqueue and let the queue use its own.\n- GraphQL is blocked in cloud sessions, so `gh pr merge --auto` fails there. Use the GitHub\n MCP `enable_pr_auto_merge` tool, or the REST route (it is the one the cloud session's own GraphQL error names):\n\n```bash\ngh api -X PUT repos/OWNER/REPO/pulls/N/ccr/auto_merge\ngh api -X DELETE repos/OWNER/REPO/pulls/N/ccr/auto_merge # to take it back\n```\n\n- Enqueue only past the merge gate: the work is complete, CI is green, it is verified at\n runtime, and `/code-review` has run with its findings resolved.\n- A **dequeue with `MERGE_CONFLICT`** means the base moved. Merge `staging` (or `main`, for a\n sync PR) into your branch and resolve. In `CHANGELOG.md`, a conflict under\n `## [Unreleased]` almost always means two PRs each added entries: **keep both sides**.\n Push, then enqueue again.\n\n## 5. Stale checks\n\n`issue attached` reads the PR body from the **event snapshot**, so fixing the body does not\nchange a check that already ran. After you fix the body, save it again to fire a fresh event\n(change it by a character and back, or `gh api -X PATCH repos/OWNER/REPO/pulls/N -F body=@body.md`),\nthen read the new run. The same goes for a label: a check that read the labels before you\nadded one needs a re-run.\n\n## 6. Publish\n\nOn a merge to `main` the release workflow runs `npm publish` (trusted publishing, no token)\nand then a tag step.\n\n- npm can take **minutes** to list a version after `npm publish` prints `+ pkg@version`. The\n tag step can run first, print `not on npm, not tagged`, and make **no tag and no release**.\n Wait until npm lists it (`bash \"$V\" npm <package>@<version>` says `listed`), then re-run the\n workflow run **once**:\n\n```bash\ngh api \"repos/OWNER/REPO/actions/runs?branch=main&per_page=10\" --jq '.workflow_runs[] | [.id, .name, .status, .conclusion] | @tsv'\ngh api -X POST repos/OWNER/REPO/actions/runs/RUN_ID/rerun\n```\n\n- **Releases are immutable.** The workflow creates a release as a draft with its notes, then\n publishes it once. Never edit a published release, never move or delete and re-create a tag,\n never re-upload an asset. A wrong release is corrected by the next version, not by editing\n this one.\n\n## 7. Verify LIVE\n\nMerged is not live. Cloudflare deploys lag a minute or two behind a merge to `main`, so a\nstale answer in the first minutes is not a failure; read again before you report. Check what\nthe release claims, by its own value:\n\n```bash\nnpm view @nyuchi/mzizi-skills version # npm has the version\nbash \"$V\" release mzizi-dev/agent-tools '@nyuchi/mzizi-skills@0.18.0' # tag, release (draft=false) and notes\ncurl -sI https://api.mzizi.dev/v1/brand | grep -i x-mzizi-source # registry=<sha> the API serves\ncurl -s https://mcp.mzizi.dev/catalogue.json | head -c 400 # version, source.registry\ncurl -s -o /dev/null -w '%{http_code}\\n' -X POST -H 'Origin: https://evil.example' \\\n -H 'Content-Type: application/json' -d '{}' https://mcp.mzizi.dev/mcp # 403\ncurl -s -o /dev/null -w '%{http_code}\\n' https://docs.mzizi.dev/ # 200\n```\n\n`bash \"$V\" api`, `bash \"$V\" mcp` and `bash \"$V\" http <url>...` print the same facts without\nthe greps. For a site, the spacing guard runs from a `mzizi-site` checkout (Playwright\ninstalled; `PW_EXECUTABLE` names a Chrome or Chromium binary). Point it at the live URL or a\nCloudflare preview, never a bare `python3 -m http.server` (the site's clean URLs 404 there), and\nwrite its output outside the repo:\n\n```bash\nPW_EXECUTABLE=/opt/pw-browsers/chromium node scripts/audit-ui.mjs --url https://mzizi.dev --guard --out \"${TMPDIR:-/tmp}/audit-out\"\n```\n\nReport each product as **live** only with the value you read this minute, and say what is\nstill waiting (a queued deploy, a bot PR, a registry pin). Use the status format in the\n`progress-report` skill.\n\n## Do not\n\n- Do not use `--admin`, add `forward-ported` without the owner's word for this release, or\n skip or disable a test or gate to go green.\n- Do not cut a release you were not authorised to cut, or promote `staging` while it holds work\n the owner has not approved.\n- Do not edit or move a published tag or release.\n- Do not write a secret, a token or credential status into a PR body, a report or an issue.\n\n## Checklist\n\n- [ ] Branch cut off `origin/main` with `staging`'s tree in one commit; the two tree hashes are equal.\n- [ ] Title is `chore(release): staging to main, <date> (<package versions>)`; the body has an issue line at the start of its own line.\n- [ ] Each bumped version is the next minor above npm and has a CHANGELOG section; no major without the owner.\n- [ ] If the main gate is the only failure and the owner said so: `forward-ported` added, failed jobs re-run, label still there after any re-cut.\n- [ ] Enqueued through the REST route or the MCP tool, past the merge gate; no `--admin`.\n- [ ] Publish confirmed on npm before the one workflow re-run; no release edited.\n- [ ] Verified live with the commands above, a minute or two after the deploy; each product reported with the value read.",
|
|
261
|
+
"source": "mzizi-dev/agent-tools/mzizi-skills/skills/ship-release",
|
|
262
|
+
"files": [
|
|
263
|
+
{
|
|
264
|
+
"path": "verify-live.sh",
|
|
265
|
+
"mimeType": "text/x-shellscript",
|
|
266
|
+
"bytes": 6123,
|
|
267
|
+
"encoding": "utf8",
|
|
268
|
+
"content": "#!/usr/bin/env bash\n# verify-live.sh — print what is LIVE (the Mzizi `ship-release` skill).\n#\n# Portable bash (3.2+, macOS and Linux). READ-ONLY: it only reads npm, the GitHub\n# API (through gh) and HTTP responses, and never writes, publishes, tags or deploys.\n# It prints facts. It does not decide that a release is good: compare the output\n# with what you expect, and say \"not live\" until it matches. Cloudflare deploys\n# lag a minute or two behind a merge to main, so a stale answer is not yet a failure.\n#\n# verify-live.sh npm PKG[@VERSION]... latest on npm, or whether PKG@VERSION is listed\n# verify-live.sh api [BASE] status and X-Mzizi-Source of BASE/v1/brand\n# (default https://api.mzizi.dev)\n# verify-live.sh mcp [BASE] catalogue.json version and registry commit, and the\n# status of a POST with Origin https://evil.example\n# (default https://mcp.mzizi.dev; want 403)\n# verify-live.sh release OWNER/REPO TAG whether the tag and its release exist, draft state\n# and the length of the notes\n# verify-live.sh http URL... the HTTP status of each page\n#\n# Environment: VERIFY_CURL, VERIFY_GH, VERIFY_NPM, VERIFY_NODE name the binaries\n# (defaults: curl, gh, npm, node).\n#\n# Exit codes: 0 ok (a down site or an unlisted version is a fact, not a failure);\n# 1 bad usage or a missing tool.\n\nset -u\nset -o pipefail\n\ndie() {\n printf 'verify-live: %s\\n' \"$*\" >&2\n exit 1\n}\n\nCURL=\"${VERIFY_CURL:-curl}\"\nGH=\"${VERIFY_GH:-gh}\"\nNPM=\"${VERIFY_NPM:-npm}\"\nNODE=\"${VERIFY_NODE:-node}\"\n\nneed() { command -v \"$1\" >/dev/null 2>&1 || die \"$2: '$1' not found\"; }\n\nis_url() { case \"$1\" in http://*|https://*) return 0 ;; *) return 1 ;; esac; }\n\ncmd_npm() {\n [ $# -ge 1 ] || die \"usage: verify-live.sh npm PKG[@VERSION]...\"\n need \"$NPM\" npm\n local spec v\n for spec in \"$@\"; do\n case \"$spec\" in\n *[!A-Za-z0-9@/._-]*|'') die \"npm: '$spec' is not a package spec\" ;;\n esac\n # A scoped name starts with @, so a version is an @ after the first character.\n case \"${spec#?}\" in\n *@*)\n v=\"$(\"$NPM\" view \"$spec\" version 2>/dev/null | tail -n 1)\" || v=\"\"\n if [ -n \"$v\" ]; then printf '%s listed\\n' \"$spec\"; else printf '%s not listed on npm yet\\n' \"$spec\"; fi\n ;;\n *)\n v=\"$(\"$NPM\" view \"$spec\" version 2>/dev/null | tail -n 1)\" || v=\"\"\n if [ -n \"$v\" ]; then printf '%s latest=%s\\n' \"$spec\" \"$v\"; else printf '%s ? (npm view failed)\\n' \"$spec\"; fi\n ;;\n esac\n done\n}\n\ncmd_api() {\n local base=\"${1:-https://api.mzizi.dev}\" url hdr code src\n is_url \"$base\" || die \"api: '$base' is not an http(s) URL\"\n need \"$CURL\" curl\n url=\"${base%/}/v1/brand\"\n hdr=\"$(\"$CURL\" -sI --max-time 15 \"$url\" 2>/dev/null | tr -d '\\r')\" || hdr=\"\"\n code=\"$(printf '%s\\n' \"$hdr\" | awk 'toupper($1) ~ /^HTTP/ { c = $2 } END { print c }')\"\n src=\"$(printf '%s\\n' \"$hdr\" | awk 'tolower($1) == \"x-mzizi-source:\" { sub(/^[^:]*: */, \"\"); print; exit }')\"\n printf '%s %s\\n' \"${code:-000}\" \"$url\"\n printf 'x-mzizi-source %s\\n' \"${src:-?}\"\n}\n\ncmd_mcp() {\n local base=\"${1:-https://mcp.mzizi.dev}\" body parsed code\n is_url \"$base\" || die \"mcp: '$base' is not an http(s) URL\"\n need \"$CURL\" curl\n need \"$NODE\" node\n base=\"${base%/}\"\n body=\"$(\"$CURL\" -s --max-time 15 \"$base/catalogue.json\" 2>/dev/null)\" || body=\"\"\n parsed=\"$(printf '%s' \"$body\" | \"$NODE\" -e '\n let t = \"\";\n process.stdin.on(\"data\", (c) => (t += c)).on(\"end\", () => {\n try {\n const d = JSON.parse(t);\n const r = (d.source && d.source.registry) || \"\";\n const sha = r.split(\"/\").pop();\n console.log(\"version \" + (d.version ?? \"?\"));\n console.log(\"registry \" + (sha ? sha.slice(0, 12) : \"?\"));\n } catch {\n console.log(\"version ?\");\n console.log(\"registry ?\");\n }\n });' 2>/dev/null)\" || parsed=\"version ?\nregistry ?\"\n printf 'catalogue.json %s\\n' \"$(printf '%s' \"$parsed\" | sed -n 1p)\"\n printf 'catalogue.json %s\\n' \"$(printf '%s' \"$parsed\" | sed -n 2p)\"\n code=\"$(\"$CURL\" -s -o /dev/null --max-time 15 -w '%{http_code}' -X POST -H 'Origin: https://evil.example' \\\n -H 'Content-Type: application/json' -d '{}' \"$base/mcp\" 2>/dev/null)\" || code=\"${code:-000}\"\n printf 'origin probe %s (want 403)\\n' \"${code:-000}\"\n}\n\ncmd_release() {\n [ $# -eq 2 ] || die \"usage: verify-live.sh release OWNER/REPO TAG\"\n need \"$GH\" gh\n local repo=\"$1\" tag=\"$2\" sha info\n case \"$repo\" in */*) ;; *) die \"release: '$repo' is not OWNER/REPO\" ;; esac\n case \"$tag\" in *[!A-Za-z0-9@/._-]*|'') die \"release: '$tag' is not a tag name\" ;; esac\n sha=\"$(\"$GH\" api \"repos/$repo/git/ref/tags/$tag\" --jq '.object.sha' 2>/dev/null)\" || sha=\"\"\n if [ -n \"$sha\" ]; then printf 'tag %s -> object %s\\n' \"$tag\" \"$sha\"; else printf 'tag %s not found\\n' \"$tag\"; fi\n # releases/tags/<tag> answers 404 for a draft, so list the releases and match the tag name:\n # a draft that was never published shows draft=true instead of \"not found\".\n info=\"$(\"$GH\" api \"repos/$repo/releases?per_page=100\" \\\n --jq \"[.[] | select(.tag_name == \\\"$tag\\\")][0] | select(. != null) | \\\"draft=\\\\(.draft) prerelease=\\\\(.prerelease) notes_chars=\\\\(.body | length)\\\"\" 2>/dev/null)\" || info=\"\"\n if [ -n \"$info\" ]; then printf 'release %s %s\\n' \"$tag\" \"$info\"; else printf 'release %s not found\\n' \"$tag\"; fi\n}\n\ncmd_http() {\n [ $# -ge 1 ] || die \"usage: verify-live.sh http URL...\"\n need \"$CURL\" curl\n local u code\n for u in \"$@\"; do\n is_url \"$u\" || die \"http: '$u' is not an http(s) URL\"\n code=\"$(\"$CURL\" -s -o /dev/null -L --max-time 15 -w '%{http_code}' \"$u\" 2>/dev/null)\" || code=\"${code:-000}\"\n printf '%s %s\\n' \"${code:-000}\" \"$u\"\n done\n}\n\nCMD=\"${1:-}\"\n[ $# -gt 0 ] && shift\ncase \"$CMD\" in\n npm) cmd_npm \"$@\" ;;\n api) cmd_api \"$@\" ;;\n mcp) cmd_mcp \"$@\" ;;\n release) cmd_release \"$@\" ;;\n http) cmd_http \"$@\" ;;\n -h|--help) sed -n '2,21p' \"$0\" ;;\n *) die \"unknown command: ${CMD:-<none>} (npm, api, mcp, release, http)\" ;;\nesac\n"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"name": "registry-propagation",
|
|
274
|
+
"category": "dev",
|
|
275
|
+
"description": "Use this skill when a change in mzizi-registry has to reach the products that read it, or when someone asks whether a registry change is live. It maps the chain: a registry release on main, then the pins on staging (mzizi-api scripts/registry-ref.json with build:data, parity and PIN_ entries in EXPECTED; mzizi-mcp registry.pin.json; @bundu/ui scripts/registry-ref.json with registry:sync, registry:check and contracts:check), docs (check-freshness.mjs), the site (builds from the API, so verify-rendered.py counts move), and the skills (agent-tools mzizi-skills, then the registry's skills:generate and plugin:skills). It gives the rules (pin a released registry main commit, bots open PRs against staging, parity non-strict into staging and strict into main), the order, what each product shows once live, and a live alignment table to fill with commands. Releasing each repo uses ship-release.",
|
|
276
|
+
"body_mdx": "# Registry propagation: from a registry release to every product, proven live\n\n> **Covenant:** _A registry change is live in a product when that product says so, not when its PR merges._\n\n`mzizi-dev/mzizi-registry` is the source. The API, the MCP server, `@bundu/ui`, the docs, the\nsite and the skills each read it a different way, each through its own pin or build. When one\nlags, an agent or a visitor gets a different answer depending on which product they ask. This\nskill is the map and the proof: the order, the commands, and a table you fill with what you read.\n\n## The chain\n\n```text\nmzizi-registry main (a release, e.g. v4.25.0)\n |\n +--> mzizi-api scripts/registry-ref.json -> api.mzizi.dev (build:data, parity)\n +--> mzizi-mcp mzizi-mcp/registry.pin.json -> mcp.mzizi.dev (agent-tools)\n +--> @bundu/ui scripts/registry-ref.json -> npm @bundu/ui (packages-npm; registry:sync)\n |\n +--> mzizi-site builds from api.mzizi.dev -> mzizi.dev (counts in verify-rendered.py)\n +--> mzizi-docs facts checked against the API -> docs.mzizi.dev (check-freshness.mjs)\n |\n +--> skills agent-tools mzizi-skills (npm) -> the registry's skills:generate and plugin:skills\n -> api /v1/skills, mcp mzizi_get_skills, the plugin\n```\n\nEach arrow is a PR on `staging` of the receiving repo, then a release of that repo to `main`\n(use the `ship-release` skill). Nothing below is live until that repo's release is live.\n\n## Rules\n\n- **Pin a registry `main` commit that is released.** A pin is a full commit SHA. Read the\n latest release tag and the commit it points at; do not pin a branch tip that is not released,\n and do not pin a commit from a PR branch.\n- **Pin bots open PRs against `staging`**, not `main`, where the repo has moved them (mzizi-api\n api#120 merged; the agent-tools workflow sets `PIN_BASE_BRANCH: staging` from the release that\n carries it). Older copies of a repo's guide may still say `main`: read the base branch of the\n bot's PR and `PIN_BASE_BRANCH` in its workflow, and report where the bump actually landed. Do not push to `bot/registry-pin`\n unless you take the bump over (then it is yours, with a CHANGELOG entry).\n- **Parity is non-strict on PRs into `staging`** (the recorded `EXPECTED` differences are\n honoured) and **strict on PRs into `main`** (`EXPECTED` is ignored, so every difference is\n unexplained). A bump that passes on `staging` can still fail the release PR: prune or fix\n `EXPECTED` before releasing, never edit the check to pass.\n- **Never skip a gate to land a pin.** A pin that fails a gate means a handler, a count or a\n contract moved: fix that, or stop and report.\n- **Pin first, then release, then verify.** Report a product as live only when the table below\n shows its value.\n\n## Order\n\n1. **Registry released.** Read the tag and the commit: `gh api repos/mzizi-dev/mzizi-registry/releases/latest --jq .tag_name`\n and `gh api repos/mzizi-dev/mzizi-registry/commits/main --jq .sha`. Pin the released commit.\n2. **API** (mzizi-api, base `staging`). Move `ref` in `scripts/registry-ref.json` (and `pinned`,\n `note`). Then:\n\n ```bash\n npm ci\n npm run build:data # clones the pinned registry, writes src/data/*.json\n npm run typecheck && npm run check && npm test\n npm run dev # in a second shell: wrangler dev on http://localhost:8787\n npm run parity # live api.mzizi.dev against that candidate; `npm run parity -- --strict` ignores EXPECTED\n ```\n\n An intentional difference goes into `EXPECTED` in `scripts/parity.mjs` as a `PIN_<sha>`\n constant (the first characters of the commit) with its reason, and into the PR body. Add a\n `CHANGELOG.md` entry saying what a caller of the API sees differently.\n\n3. **MCP** (agent-tools, base `staging`). Move `ref` in `mzizi-mcp/registry.pin.json`; run\n `pnpm --filter @nyuchi/mzizi-mcp generate` (or the package's `test`) so the bundled data\n rebuilds, and fix any test that counts registry data. A change to what the MCP serves is a\n package version bump (next minor above npm) and a CHANGELOG section.\n4. **`@bundu/ui`** (packages-npm, base `staging`). Move `ref` in `scripts/registry-ref.json`, then:\n\n ```bash\n pnpm install --frozen-lockfile\n pnpm registry:sync # rebuild the components from the pin\n pnpm contracts:fetch # refresh packages/bundu-ui/contracts/\n pnpm registry:check && pnpm contracts:check && pnpm tokens:check\n pnpm test\n ```\n\n Generated files are never hand-edited. The package version is the next minor above npm,\n with a CHANGELOG section; the release publishes it.\n\n5. **Skills.** A skills change starts in agent-tools `mzizi-skills` (a release to npm, see\n `ship-release`). The registry then takes it: its `@nyuchi/mzizi-skills` range lets\n `pnpm skills:generate` and `pnpm plugin:skills` regenerate the bundled copies (check with\n `pnpm skills:generate:check` and `pnpm plugin:skills:check`). The API serves skills through\n the registry's dependency and its pin, the MCP bundles them from agent-tools at build time,\n and the public plugin carries the generated copy. A skills release is done only when npm,\n the MCP and the API all serve it.\n6. **Site** (mzizi-site, base `staging`). It builds from the live API, so its counts move\n when the API changes and the rendered gate fails on every branch until they are updated:\n `python3 scripts/verify-rendered.py dist` (after `pnpm build`). Update the expected numbers\n there and the same counts in `AGENTS.md` and `README.md`, with a CHANGELOG entry. Move the\n `@bundu/ui` range in `package.json` when a new version should land (`npm view @bundu/ui version`).\n7. **Docs** (mzizi-docs, base `staging`). Run `node scripts/check-freshness.mjs` (network),\n update the pages it names, keep the sentence shapes it matches (or update the script in the\n same change), and add a `CHANGELOG.md` entry naming the facts and pages that moved.\n8. **Release each repo** with `ship-release`, in the order the data flows: API, MCP and\n `@bundu/ui` first, then the site and docs that read them.\n\n## What each product shows once live\n\n| Product | Live signal |\n| ------- | ------------------------------------------------------------------------------------------------ |\n| API | `x-mzizi-source: mzizi-api-gateway; registry=<sha>` on every response; new fields in `/v1/brand` |\n| MCP | `catalogue.json`: `version`, `source.registry` (the commit), `skills.version` |\n| Skills | npm `latest`; `catalogue.json` `skills.version`; `/v1/skills` `meta.version` |\n| UI | npm `@bundu/ui` `latest`; the pin file on `main` equals the commit you pinned |\n| Site | the built page shows the new counts; `verify-rendered.py` passes on `main` |\n| Docs | `check-freshness.mjs` reports no drift against the live sources |\n\nFor the Bundu floor in 4.23.0 and the spacing floor in 4.24.0, the signal in `/v1/brand` is the\n`accessibility` block: `minTouchTarget`, `defaultTouchTarget`, `minInset`, `minControlGap`,\n`minLabelGap`, `minItemGap` and `minBodyLeading` present and not null.\n\n## Live alignment check\n\nFill one row per product, with the value you read in this session. A row with no value is\n\"not checked\", never \"aligned\". Expected is the registry release's commit (first 12 characters\nof the SHA) or the version the release carried. Cloudflare deploys lag a minute or two after a\nmerge to `main`, so read again before calling a row stale.\n\n```bash\nV=node_modules/@nyuchi/mzizi-skills/skills/ship-release/verify-live.sh # or fetch it, see ship-release\ngh api repos/mzizi-dev/mzizi-registry/commits/main --jq '.sha[0:12]'\n```\n\n| Product | Where its version or pin is read | Expected | Command |\n| ------------ | ---------------------------------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------- |\n| Registry | latest release tag and the commit it points at | the release being shipped | `gh api repos/mzizi-dev/mzizi-registry/releases/latest --jq .tag_name` |\n| API live | `x-mzizi-source` header | `registry=<sha>` | `curl -sI https://api.mzizi.dev/v1/brand \\| grep -i x-mzizi-source` |\n| API pin | `scripts/registry-ref.json` `ref` on `main` and on `staging` | the released commit | `gh api \"repos/mzizi-dev/mzizi-api/contents/scripts/registry-ref.json?ref=main\" --jq .content \\| base64 -d` |\n| MCP live | `catalogue.json` `source.registry` and `version` | the released commit | `bash \"$V\" mcp` |\n| MCP pin | `mzizi-mcp/registry.pin.json` `ref` on `main` | the released commit | `gh api \"repos/mzizi-dev/agent-tools/contents/mzizi-mcp/registry.pin.json?ref=main\" --jq .content \\| base64 -d` |\n| UI pin | `scripts/registry-ref.json` `ref` in packages-npm | the released commit | `gh api \"repos/mzizi-dev/packages-npm/contents/scripts/registry-ref.json?ref=main\" --jq .content \\| base64 -d` |\n| UI on npm | `@bundu/ui` `latest` | the version that was cut | `npm view @bundu/ui version` |\n| Skills (npm) | `@nyuchi/mzizi-skills` `latest` | the version that was cut | `npm view @nyuchi/mzizi-skills version` |\n| Skills (MCP) | `catalogue.json` `skills.version` | the same version | `curl -s https://mcp.mzizi.dev/catalogue.json \\| grep -o '\"skills\":{\"version\":\"[^\"]*\"'` |\n| Skills (API) | `/v1/skills` `meta.version` (it can lag npm: it follows the pin) | the same version | `curl -s https://api.mzizi.dev/v1/skills \\| grep -o '\"meta\":{[^}]*}'` |\n| Components | `/v1/ui` `meta.total` (the count the site and docs state) | the registry's count | `curl -s https://api.mzizi.dev/v1/ui \\| grep -o '\"meta\":{\"total\":[0-9]*'` |\n| Site | the rendered gate on `main`, and the page itself | counts equal the API's | `python3 scripts/verify-rendered.py dist` (in mzizi-site, after `pnpm build`) |\n| Docs | the freshness check | no drift | `node scripts/check-freshness.mjs` (in mzizi-docs; needs the network) |\n\nRead the pin files from `main` for what is live and from `staging` for what is queued; if\nthey differ, the release is still to do. A pin on `main` that equals the header the API serves\nis the proof that API deploy finished.\n\n## Do not\n\n- Do not pin an unreleased registry commit, or edit generated data (`src/data/`,\n `packages/bundu-ui` components, the plugin's `skills/`) by hand: change the source or the pin.\n- Do not loosen parity, a count or a contract check to pass; fix the cause or stop.\n- Do not claim a product is live from a merged PR. Read the header, the catalogue or npm.\n- Do not push to a pin bot's branch unless you are taking the bump over.\n\n## Checklist\n\n- [ ] The registry commit is a released one; its tag and SHA are written down.\n- [ ] Each receiving repo has a `staging` PR with the new pin, its generator or build run, its gates green and a CHANGELOG entry.\n- [ ] Parity on the API PR: non-strict into `staging`, strict into `main`, with `PIN_<sha>` entries pruned or recorded.\n- [ ] Each repo released with `ship-release`, data producers before the site and docs.\n- [ ] The live alignment table is filled with values read this session; a row not read says \"not checked\".",
|
|
277
|
+
"source": "mzizi-dev/agent-tools/mzizi-skills/skills/registry-propagation",
|
|
278
|
+
"files": []
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"name": "pr-gates",
|
|
282
|
+
"category": "dev",
|
|
283
|
+
"description": "Use this skill before the first push of any pull request in a Mzizi repo, and whenever a required check is red. It makes the first push green by naming the checks that failed again and again and the fix for each: issue attached (the line must start with Closes, Fixes, Refs or No issue and sit on its own line), changelog entry required (an entry under Unreleased with a descriptive heading, so markdownlint MD024 does not flag duplicates; no-changelog only for CI, lint or typo changes), markdownlint, yamllint line length, no agent-local files (never commit CLAUDE.md or .claude), oxfmt and vp fmt (CI is the authority, never format a whole package locally), CodeQL (bad HTML filtering regexp, polynomial regular expression), parity (strict ignores EXPECTED), rendered-content gates, the version policy on staging, CHANGELOG merge conflicts and merge methods. Never skip a test, never --admin.",
|
|
284
|
+
"body_mdx": "# PR gates: make the first push green\n\n> **Covenant:** _A red check is information. Fix its cause; never switch the check off._\n\nMost red first pushes in the Mzizi repos fail on the same dozen checks. Each has a cause you can\nread before you push and a fix that leaves the check meaning what it meant. This skill lists\nthem. It is not a way around a gate: **never skip, disable or loosen a test or a check to go\ngreen, and never `--admin`.** If a gate is wrong, say so in the PR and let a person change it.\n\nEach repo's own `AGENTS.md` is the authority where it differs, and CI is the authority over\nanything you ran locally.\n\n## Before you push\n\n```bash\ngit status --short # only the files you meant\ngit diff --name-only origin/staging...HEAD | grep -E '(^|/)(CLAUDE\\.local\\.md|\\.claude/)' && echo \"STOP: agent-local file\"\nCHANGELOG_BASE=origin/staging bash scripts/changelog-gate.sh # where the repo has the gate (see below)\npnpm check # the repo's own check script, where it has one\n```\n\nBefore every push, read what the commit holds, not what you meant it to hold:\n\n```bash\ngit show --stat HEAD # every file and line count in the commit you are about to push\ngit diff --stat origin/staging...HEAD\n```\n\nA file you did not mean to touch, or a huge line count, is the signal. `git add -A` sweeps\nin whatever a tool rewrote: in one session an audit run rewrote a tracked file\n(`audit-out/run.json`, about 160,000 lines) and it landed in a PR, which failed the formatter\ncheck. Add files by name, and run audits and generators with their output **outside** the\nrepo (a `--out \"${TMPDIR:-/tmp}/audit-out\"` style option, or a temp directory), or first\nconfirm the tool does not rewrite tracked files. If a tracked file was changed by accident,\nrestore the original from the base branch:\n\n```bash\ngit checkout origin/staging -- path/to/file\n```\n\nNever delete a tracked file to make the diff smaller; that is a change too.\n\nThen write the PR body (below) and read the checks the REST way, because GraphQL is blocked in\ncloud sessions (so `gh pr checks` fails there):\n\n```bash\nSHA=$(gh api repos/OWNER/REPO/pulls/N --jq .head.sha)\ngh api \"repos/OWNER/REPO/commits/$SHA/check-runs?per_page=100\" --jq '.check_runs[] | [(.conclusion // .status), .name] | @tsv'\ngh api repos/OWNER/REPO/actions/jobs/JOB_ID/logs # a failed job's log (or the GitHub MCP get_job_logs tool)\n```\n\n## The checks that failed, and the fix\n\n| Check | Why it fails | Fix |\n| -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `issue attached` | No line in the PR body **starts with** `Closes`, `Fixes`, `Refs` or `No issue:`. A mention in the middle of a sentence does not count. | Put `Refs #n` (or `Refs owner/repo#n`, `Closes #n`, `No issue: <reason>`) alone on its own line at the start of a line. It reads the body snapshot of the event: after fixing it, save the body again. |\n| `changelog / entry required` | No new line under `## [Unreleased]` in `CHANGELOG.md`, for a change outside `.github/`, lockfiles and lint config. | Add an entry in the repo's style (a `###` heading per package and version, then what a user sees). The `no-changelog` label is only for pure CI, lint or typo changes. |\n| markdownlint (MD024) | Two headings with the same text next to each other (siblings), usually two `### mzizi-skills` entries under Unreleased. | Make each heading descriptive and unique: package, version and what changed, as in `### mzizi-skills 0.18.0 - the dev skills for releases`. |\n| markdownlint (other) | A skipped heading level, a bad list marker, trailing spaces, a missing blank line around a list or fence. | `npx markdownlint-cli2 path/to/file.md` with the repo's `.markdownlint.jsonc` and fix what it names. |\n| yamllint | A line over 140 characters in a workflow, or a bad indent. | Break the line (a `run: \\|` block, or a folded `>-` scalar). `yamllint -c .yamllint.yaml .github/workflows` where yamllint is installed. |\n| `no agent-local files` | A personal or local agent file is in the diff: a `.claude/` path, `CLAUDE.local.md`, or a `CLAUDE.md` in a repo that gitignores it (agent-tools does). Some repos track `CLAUDE.md` and `AGENTS.md` as committed guides; the check there is the repo's own, and an edit to them needs a changelog entry. | `git rm --cached` the file and keep it local. Never commit a `.claude/` path, and do not edit a repo's guide just to make a PR pass. |\n| `oxfmt` / `vp fmt` | The file is not formatted the way CI's formatter writes it (tables, wrapping, trailing commas). | CI is the authority. Format only the files you changed, with the repo's own formatter, and read the diff. **Do not run `vp fmt` over a whole package**: it reformatted about 40 files in one session. |\n| CodeQL: bad HTML filtering regexp | A regex strips or matches an HTML comment with `-->` only; the browser also closes a comment with `--!>`. | Handle `--!>` as well as `-->`, or stop using a regex: find the opener with `indexOf` and the closer with `indexOf`, and cut between them. |\n| CodeQL: polynomial regular expression | A regex with nested or overlapping quantifiers (a trim like `\\s+$`, or `(a+)+`) backtracks on long input. | Replace the backtracking trim with a loop (`while (end > start && isSpace(s[end - 1])) end--`) or `indexOf`; keep any remaining regex linear and anchored. |\n| CodeQL: incomplete sanitization | A replace escapes one character (`*`) but not the backslash that escapes it. | Escape the backslash too (`/[\\\\*]/g`), or build the string without replacing. |\n| parity | `--strict` ignores `EXPECTED`, so every difference counts as unexplained. Strict runs on automated pin bumps and on PRs into `main`. | Run `npm run parity -- --strict` yourself. Fix the cause, or record the intended difference as a `PIN_<sha>` entry in `EXPECTED` and in the PR body. Prune stale entries before a release PR. |\n| rendered-content gate (`verify-rendered.py`, `check-facts.py`) | The live API changed (a count, a node total), so a number the gate expects moved on every branch. | Update the expected numbers there and the same counts in `AGENTS.md` and `README.md`, with a CHANGELOG entry. Fix the site from upstream, not the check. |\n| version policy on `staging` | `package.json` moved backwards, or a version was bumped that the workflow owns. The next staging patch comes from the tags. | Never lower a version. Read the latest tag and npm (`npm view <pkg> version`), keep `package.json` at or above them, and bump only the package you are releasing, to the next minor. |\n| merge conflict in `CHANGELOG.md` | Two PRs added entries under `## [Unreleased]`. | Merge the base branch into yours and **keep both sides**; keep headings unique. Never resolve by dropping the other PR's entry. |\n| rendered-geometry guard (`audit-ui.mjs --guard`) | Run against a plain static server such as `python3 -m http.server`: the site uses clean URLs (`build.format` file, so `/ecosystem` is `ecosystem.html`), which that server cannot resolve, so pages answer 404 and the guard reports false line-height failures (an \"Error code: 404\" page). | Run the guard against a Cloudflare preview URL, `wrangler dev` or `astro preview`, or the live site with `--url`, never a bare file server. A failure on a 404 page is a bad harness, not a pass or a real failure. |\n| `release-version-check` (release PRs) | `main` has commits `staging` may not have. | That is the `ship-release` skill: an owner decision (`forward-ported` label), never `--admin`. |\n\n## The PR body\n\n```markdown\nRefs #343\n\nWhat changed and why, in two or three sentences.\n\n## Site/docs/skills impact\n\nNone. (Or: what a reader of the site, docs or skills sees differently, and which pages or skills.)\n```\n\n- The issue line starts at the beginning of a line, alone. Substantial work has a tracking issue;\n a tiny fix may say `No issue: <reason>`.\n- Some repos ask for an impact heading in the body (agent-tools does); keep the exact heading.\n- Say how you tested it, and what you did not.\n- No secrets, tokens or credential status, and no personal information.\n\n## Merging\n\n- `staging` takes a **squash** through the merge queue; `main` takes its own method (see\n `ship-release`). Do not pick a method by hand.\n- GraphQL is blocked in cloud sessions, so enqueue with the GitHub MCP `enable_pr_auto_merge`\n tool or `gh api -X PUT repos/OWNER/REPO/pulls/N/ccr/auto_merge`.\n- Enqueue only past the merge gate: the work is complete, CI is green, it is verified at\n runtime, and `/code-review` has run with its findings resolved.\n- A dequeue with `MERGE_CONFLICT` means the base moved: merge the base into your branch,\n resolve (CHANGELOG: keep both sides) and enqueue again.\n\n## Do not\n\n- Do not skip, `.skip`, delete or loosen a test, a lint rule or a gate to go green.\n- Do not use `--admin`, or add a label (`forward-ported`, `no-changelog`) that the checks above\n do not support.\n- Do not run a repo-wide formatter locally, or edit generated files by hand.\n- Do not retry a red check without reading why it failed. A flake is proven by a re-run that\n goes green with no change, and you say so in the PR.\n\n## Checklist\n\n- [ ] `Refs #n` (or `Closes`, `Fixes`, `No issue: reason`) alone at the start of a line in the body.\n- [ ] A `## [Unreleased]` entry with a unique, descriptive heading; `no-changelog` only for CI, lint or typo.\n- [ ] No `.claude/` path, `CLAUDE.local.md` or gitignored `CLAUDE.md` in the diff.\n- [ ] Only the files I changed are formatted; the repo's `check` script passes locally.\n- [ ] No regex that can backtrack on user input; HTML comments handle `--!>`.\n- [ ] Parity and rendered-content gates run where they apply, and recorded differences are in the PR.\n- [ ] `package.json` versions did not move backwards.\n- [ ] `git show --stat HEAD` reviewed before the push; audit and generator output went outside the repo; no tracked file rewritten by a tool.\n- [ ] Nothing skipped, disabled or bypassed.",
|
|
285
|
+
"source": "mzizi-dev/agent-tools/mzizi-skills/skills/pr-gates",
|
|
286
|
+
"files": []
|
|
255
287
|
}
|
|
256
288
|
];
|
|
257
289
|
/** Bundle version, from mzizi-skills/index.json. */
|
|
258
|
-
export const SKILLS_VERSION = "0.
|
|
290
|
+
export const SKILLS_VERSION = "0.18.0";
|
|
259
291
|
//# sourceMappingURL=skills.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/generated/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,6DAA6D;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAC,QAAQ,EAAC,UAAU,EAAC,OAAO,CAAU,CAAA;AAuB5E,MAAM,CAAC,MAAM,cAAc,GAA4B;IACrD;QACE,MAAM,EAAE,gBAAgB;QACxB,UAAU,EAAE,UAAU;QACtB,aAAa,EAAE,u9BAAu9B;QACt+B,UAAU,EAAE,mh4CAAmh4C;QAC/h4C,QAAQ,EAAE,0DAA0D;QACpE,OAAO,EAAE,EAAE;KACZ;IACD;QACE,MAAM,EAAE,aAAa;QACrB,UAAU,EAAE,OAAO;QACnB,aAAa,EAAE,2/BAA2/B;QAC1gC,UAAU,EAAE,0/2DAA0/2D;QACtg3D,QAAQ,EAAE,uDAAuD;QACjE,OAAO,EAAE,EAAE;KACZ;IACD;QACE,MAAM,EAAE,cAAc;QACtB,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,4/BAA4/B;QAC3gC,UAAU,EAAE,6/7CAA6/7C;QACzg8C,QAAQ,EAAE,wDAAwD;QAClE,OAAO,EAAE;YACP;gBACE,MAAM,EAAE,mBAAmB;gBAC3B,UAAU,EAAE,UAAU;gBACtB,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,MAAM;gBAClB,SAAS,EAAE,ssQAAssQ;aACltQ;YACD;gBACE,MAAM,EAAE,qBAAqB;gBAC7B,UAAU,EAAE,U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OAAO,EAAE,EAAE;KACZ;IACD;QACE,MAAM,EAAE,UAAU;QAClB,UAAU,EAAE,KAAK;QACjB,aAAa,EAAE,i4BAAi4B;QACh5B,UAAU,EAAE,4qeAA4qe;QACxre,QAAQ,EAAE,oDAAoD;QAC9D,OAAO,EAAE,EAAE;KACZ;CACO,CAAA;AAEV,oDAAoD;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAA"}
|
package/dist/origin.d.ts
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* - a present `Origin` allowed only if its host is on the list, otherwise
|
|
11
11
|
* 403 before any MCP server is built;
|
|
12
12
|
* - CORS `Access-Control-Allow-Origin` echoes an allowed
|
|
13
|
-
* `Origin` (with `Vary: Origin`). It is never
|
|
13
|
+
* `Origin` (with `Vary: Origin`). It is never `*`
|
|
14
|
+
* here; the public discovery documents are `*` (`auth/cors.ts`).
|
|
14
15
|
*
|
|
15
16
|
* The list is hostnames. A localhost name matches over `http` or `https` on any
|
|
16
17
|
* port (the MCP Inspector runs at http://localhost:6274). Every other name
|
|
@@ -42,14 +43,26 @@ export declare function isAllowedOrigin(origin: string | null, hosts?: readonly
|
|
|
42
43
|
export declare function forbiddenOrigin(origin: string | null): Response;
|
|
43
44
|
/** A 403 for a present-but-unlisted `Origin`, or undefined when the request may proceed. */
|
|
44
45
|
export declare function originRejection(request: Request, hosts?: readonly string[]): Response | undefined;
|
|
46
|
+
/** What a route's CORS answer advertises beyond the origin decision. */
|
|
47
|
+
export interface CorsPolicy {
|
|
48
|
+
readonly methods: string;
|
|
49
|
+
readonly headers: string;
|
|
50
|
+
/** Seconds a browser may cache a preflight; omitted when not set. */
|
|
51
|
+
readonly maxAge?: number;
|
|
52
|
+
}
|
|
53
|
+
/** The MCP endpoint (`/mcp`): its methods and the headers a Streamable HTTP client sends. */
|
|
54
|
+
export declare const MCP_CORS: CorsPolicy;
|
|
55
|
+
/** `/token` and `/register`: POST only, a form or JSON body, and client credentials in `Authorization`. */
|
|
56
|
+
export declare const OAUTH_ENDPOINT_CORS: CorsPolicy;
|
|
45
57
|
/**
|
|
46
58
|
* The CORS headers for a request whose `Origin` is `origin`, already judged
|
|
47
59
|
* `allowed`: the origin echoed back, never `*`. No `Origin`, or one that is not
|
|
48
60
|
* allowed, gets no `Access-Control-Allow-Origin`; `Vary: Origin` is always
|
|
49
61
|
* present so a cache cannot hand one origin's answer to another. Merge `Vary`
|
|
50
|
-
* with `Headers.append`, not `set`.
|
|
62
|
+
* with `Headers.append`, not `set`. No `Access-Control-Allow-Credentials`: no
|
|
63
|
+
* route reads a cookie cross-origin.
|
|
51
64
|
*/
|
|
52
|
-
export declare function corsHeadersFor(origin: string | null, allowed: boolean): Record<string, string>;
|
|
65
|
+
export declare function corsHeadersFor(origin: string | null, allowed: boolean, policy?: CorsPolicy): Record<string, string>;
|
|
53
66
|
/** `corsHeadersFor`, judging the request's own `Origin` against `hosts`. */
|
|
54
67
|
export declare function corsHeaders(request: Request, hosts?: readonly string[]): Record<string, string>;
|
|
55
68
|
//# sourceMappingURL=origin.d.ts.map
|
package/dist/origin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"origin.d.ts","sourceRoot":"","sources":["../src/origin.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"origin.d.ts","sourceRoot":"","sources":["../src/origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAMjD,CAAA;AAED,6DAA6D;AAC7D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAA8C,CAAA;AAIjG;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE;IAAE,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,MAAM,EAAE,CAsB9F;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,GAAE,SAAS,MAAM,EAA0B,GAAG,OAAO,CAahH;AAED,+FAA+F;AAC/F,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAK/D;AAED,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,QAAQ,GAAG,SAAS,CAGjG;AAED,wEAAwE;AACxE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,6FAA6F;AAC7F,eAAO,MAAM,QAAQ,EAAE,UAGtB,CAAA;AAED,2GAA2G;AAC3G,eAAO,MAAM,mBAAmB,EAAE,UAIjC,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAE,UAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAS7H;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAG/F"}
|
package/dist/origin.js
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* - a present `Origin` allowed only if its host is on the list, otherwise
|
|
11
11
|
* 403 before any MCP server is built;
|
|
12
12
|
* - CORS `Access-Control-Allow-Origin` echoes an allowed
|
|
13
|
-
* `Origin` (with `Vary: Origin`). It is never
|
|
13
|
+
* `Origin` (with `Vary: Origin`). It is never `*`
|
|
14
|
+
* here; the public discovery documents are `*` (`auth/cors.ts`).
|
|
14
15
|
*
|
|
15
16
|
* The list is hostnames. A localhost name matches over `http` or `https` on any
|
|
16
17
|
* port (the MCP Inspector runs at http://localhost:6274). Every other name
|
|
@@ -102,20 +103,33 @@ export function originRejection(request, hosts) {
|
|
|
102
103
|
const origin = request.headers.get("origin");
|
|
103
104
|
return isAllowedOrigin(origin, hosts) ? undefined : forbiddenOrigin(origin);
|
|
104
105
|
}
|
|
106
|
+
/** The MCP endpoint (`/mcp`): its methods and the headers a Streamable HTTP client sends. */
|
|
107
|
+
export const MCP_CORS = {
|
|
108
|
+
methods: "GET, POST, DELETE, OPTIONS",
|
|
109
|
+
headers: "Content-Type, MCP-Protocol-Version, MCP-Session-Id, Mcp-Method, Mcp-Name, apikey",
|
|
110
|
+
};
|
|
111
|
+
/** `/token` and `/register`: POST only, a form or JSON body, and client credentials in `Authorization`. */
|
|
112
|
+
export const OAUTH_ENDPOINT_CORS = {
|
|
113
|
+
methods: "POST, OPTIONS",
|
|
114
|
+
headers: "Content-Type, Authorization",
|
|
115
|
+
maxAge: 600,
|
|
116
|
+
};
|
|
105
117
|
/**
|
|
106
118
|
* The CORS headers for a request whose `Origin` is `origin`, already judged
|
|
107
119
|
* `allowed`: the origin echoed back, never `*`. No `Origin`, or one that is not
|
|
108
120
|
* allowed, gets no `Access-Control-Allow-Origin`; `Vary: Origin` is always
|
|
109
121
|
* present so a cache cannot hand one origin's answer to another. Merge `Vary`
|
|
110
|
-
* with `Headers.append`, not `set`.
|
|
122
|
+
* with `Headers.append`, not `set`. No `Access-Control-Allow-Credentials`: no
|
|
123
|
+
* route reads a cookie cross-origin.
|
|
111
124
|
*/
|
|
112
|
-
export function corsHeadersFor(origin, allowed) {
|
|
125
|
+
export function corsHeadersFor(origin, allowed, policy = MCP_CORS) {
|
|
113
126
|
const headers = { Vary: "Origin" };
|
|
114
127
|
if (origin && allowed) {
|
|
115
128
|
headers["Access-Control-Allow-Origin"] = origin;
|
|
116
|
-
headers["Access-Control-Allow-Methods"] =
|
|
117
|
-
headers["Access-Control-Allow-Headers"] =
|
|
118
|
-
|
|
129
|
+
headers["Access-Control-Allow-Methods"] = policy.methods;
|
|
130
|
+
headers["Access-Control-Allow-Headers"] = policy.headers;
|
|
131
|
+
if (policy.maxAge !== undefined)
|
|
132
|
+
headers["Access-Control-Max-Age"] = String(policy.maxAge);
|
|
119
133
|
}
|
|
120
134
|
return headers;
|
|
121
135
|
}
|
package/dist/origin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"origin.js","sourceRoot":"","sources":["../src/origin.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"origin.js","sourceRoot":"","sources":["../src/origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAEtE,iDAAiD;AACjD,MAAM,WAAW,GAAsB,uBAAuB,EAAE,CAAA;AAEhE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAsB;IACrD,WAAW;IACX,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,eAAe;CAChB,CAAA;AAED,6DAA6D;AAC7D,MAAM,CAAC,MAAM,qBAAqB,GAAsB,CAAC,GAAG,oBAAoB,EAAE,GAAG,WAAW,CAAC,CAAA;AAEjG,MAAM,UAAU,GAAG,IAAI,GAAG,EAA6B,CAAA;AAEvD;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAuC;IACzE,MAAM,GAAG,GAAG,GAAG,CAAC,qBAAqB,CAAA;IACrC,IAAI,CAAC,GAAG;QAAE,OAAO,qBAAqB,CAAA;IACtC,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAClC,IAAI,MAAM;QAAE,OAAO,MAAM,CAAA;IACzB,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,KAA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MAAM,UAAU,cAAc,CAAC,MAAqB,EAAE,OAAgB,EAAE,SAAqB,QAAQ;IACnG,MAAM,OAAO,GAA2B,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;IAC1D,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;QACtB,OAAO,CAAC,6BAA6B,CAAC,GAAG,MAAM,CAAA;QAC/C,OAAO,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAC,OAAO,CAAA;QACxD,OAAO,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAC,OAAO,CAAA;QACxD,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;YAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC5F,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,WAAW,CAAC,OAAgB,EAAE,KAAyB;IACrE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAC5C,OAAO,cAAc,CAAC,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;AAC/D,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { floorsOf } from "./floors.js";
|
|
|
17
17
|
import { type DocsFederationOptions } from "./docs-federation.js";
|
|
18
18
|
import type { FundiToolContext } from "./fundi-client.js";
|
|
19
19
|
import { type IssueDeskContext } from "./tools.js";
|
|
20
|
-
export declare const MZIZI_MCP_VERSION = "0.
|
|
20
|
+
export declare const MZIZI_MCP_VERSION = "0.17.0";
|
|
21
21
|
export type CreateServerOptions = {
|
|
22
22
|
fundi?: FundiToolContext;
|
|
23
23
|
/** The signed-in user's issue desk. See `tools.ts` — absent off the Worker. */
|
package/dist/server.js
CHANGED
|
@@ -21,7 +21,7 @@ import { registerDocsTools, DOCS_MCP_URL } from "./docs-federation.js";
|
|
|
21
21
|
import { registerMziziTools, TOOL_COVERAGE, TOOL_PREFIX } from "./tools.js";
|
|
22
22
|
import { jsonContent } from "./tool-result.js";
|
|
23
23
|
import { accessFor, accessSummary } from "./access.js";
|
|
24
|
-
export const MZIZI_MCP_VERSION = "0.
|
|
24
|
+
export const MZIZI_MCP_VERSION = "0.17.0";
|
|
25
25
|
/**
|
|
26
26
|
* What this server exposes, computed from what was actually registered.
|
|
27
27
|
*
|
package/dist/tools.js
CHANGED
|
@@ -720,7 +720,7 @@ export function registerMziziTools(server, opts) {
|
|
|
720
720
|
// 7 ─ get_skills — served from the bundle this Worker ships with
|
|
721
721
|
server.registerTool(note("get_skills"), {
|
|
722
722
|
title: "Get agent skills",
|
|
723
|
-
description: "List the published Mzizi agent skills, or fetch one in full. Skills are what an agent loads first. Each skill has a category: `dev` (how every agent works in every repo: digital-hygiene
|
|
723
|
+
description: "List the published Mzizi agent skills, or fetch one in full. Skills are what an agent loads first. Each skill has a category: `dev` (how every agent works in every repo: digital-hygiene, progress-report, ship-release, registry-propagation and pr-gates — load these before any dev work), `design`, `language` or `build`. Pass `category` to get every skill in it in full (e.g. category=dev), or `name` for one skill. A skill's answer lists the files it ships beside its SKILL.md (scripts such as hygiene.sh, token stylesheets); pass `name` and `file` to get one file's content. Each skill is also an MCP resource (mzizi://skills/<name>, files at mzizi://skills/<name>/<path>) and a prompt (skill-<name>). Served from the skill files bundled into this server at build time, so they are exactly the text in mzizi-dev/agent-tools at the deployed commit.",
|
|
724
724
|
inputSchema: z.object({
|
|
725
725
|
name: z.string().max(200).optional().describe("Skill name. Omit to list all."),
|
|
726
726
|
file: z
|
|
@@ -730,7 +730,7 @@ export function registerMziziTools(server, opts) {
|
|
|
730
730
|
category: z
|
|
731
731
|
.enum(SKILL_CATEGORIES)
|
|
732
732
|
.optional()
|
|
733
|
-
.describe("Return every skill in this category in full: dev (digital-hygiene, progress-report — for every agent in every repo), design, language or build."),
|
|
733
|
+
.describe("Return every skill in this category in full: dev (digital-hygiene, progress-report, ship-release, registry-propagation, pr-gates — for every agent in every repo), design, language or build."),
|
|
734
734
|
}),
|
|
735
735
|
annotations: READ,
|
|
736
736
|
},
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAA6D,MAAM,eAAe,CAAC;AAE3G,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAExH,2GAA2G;AAC3G,MAAM,cAAc,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAqB,MAAM,uBAAuB,CAAC;AAE5G,+EAA+E;AAC/E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,kBAAkB,IAAI,EAAE,CAAC;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,IAAY,EAAE,EAAE,CAAC,kBAAkB,IAAI,IAAI,IAAI,EAAE,CAAC;AAE7F,kGAAkG;AAClG,MAAM,UAAU,SAAS,CAAC,KAAmB;IAC3C,MAAM,EAA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AC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
package/dist/worker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAOnC,YAAY,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAMnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;;mBASpB,OAAO,OAAO,GAAG,OAAO,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;;AADnF,wBAyBgC"}
|
package/dist/worker.js
CHANGED
|
@@ -32,6 +32,7 @@ import { limitAnonymous } from "./rate-limit.js";
|
|
|
32
32
|
import { isAnonymousMcpRequest, isProviderApiPath } from "./auth/front.js";
|
|
33
33
|
import { PROVIDER_OPTIONS } from "./auth/provider-options.js";
|
|
34
34
|
import { allowedHostsFromEnv, originRejection } from "./origin.js";
|
|
35
|
+
import { withProviderCors } from "./auth/cors.js";
|
|
35
36
|
// The per-user issue desk. Exported here because Cloudflare resolves a Durable
|
|
36
37
|
// Object class off the Worker's entry module, and `wrangler.toml` names this
|
|
37
38
|
// file — an unexported class fails the deploy with "class not found", which
|
|
@@ -51,7 +52,7 @@ export default {
|
|
|
51
52
|
// on its API route, which is why the signed-in front needs the gate here
|
|
52
53
|
// too, and it matches the provider's own prefix rule (any path starting
|
|
53
54
|
// with `/mcp`), so `/mcpx` and `/mcp%2Fsignin` cannot slip past. OAuth's own endpoints (`/token`, `/register`, `/authorize`,
|
|
54
|
-
// `/.well-known/*`) are
|
|
55
|
+
// `/.well-known/*`) are not Origin-gated; a refused Origin there only loses CORS (auth/cors.ts).
|
|
55
56
|
if (isProviderApiPath(new URL(request.url).pathname)) {
|
|
56
57
|
const rejected = originRejection(request, hosts);
|
|
57
58
|
if (rejected)
|
|
@@ -63,6 +64,11 @@ export default {
|
|
|
63
64
|
return limited;
|
|
64
65
|
return serveAnonymous(request, env, hosts);
|
|
65
66
|
}
|
|
67
|
+
// `/token`, `/register` and `/.well-known/*` are served by the provider, but
|
|
68
|
+
// its CORS (any Origin echoed) is replaced with ours (auth/cors.ts).
|
|
69
|
+
const cors = await withProviderCors(request, hosts, () => oauth.fetch(request, env, ctx));
|
|
70
|
+
if (cors)
|
|
71
|
+
return cors;
|
|
66
72
|
return oauth.fetch(request, env, ctx);
|
|
67
73
|
},
|
|
68
74
|
};
|
package/dist/worker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,aAAa,MAAM,oCAAoC,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,aAAa,MAAM,oCAAoC,CAAA;AAC9D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