@cyanheads/anime-mcp-server 0.1.1
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/AGENTS.md +346 -0
- package/CLAUDE.md +346 -0
- package/Dockerfile +99 -0
- package/LICENSE +201 -0
- package/README.md +313 -0
- package/changelog/0.1.x/0.1.1.md +42 -0
- package/changelog/template.md +127 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/prompts/index.d.ts +7 -0
- package/dist/mcp-server/prompts/index.d.ts.map +1 -0
- package/dist/mcp-server/prompts/index.js +7 -0
- package/dist/mcp-server/prompts/index.js.map +1 -0
- package/dist/mcp-server/resources/definitions/anime-media.resource.d.ts +31 -0
- package/dist/mcp-server/resources/definitions/anime-media.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/anime-media.resource.js +100 -0
- package/dist/mcp-server/resources/definitions/anime-media.resource.js.map +1 -0
- package/dist/mcp-server/resources/index.d.ts +29 -0
- package/dist/mcp-server/resources/index.d.ts.map +1 -0
- package/dist/mcp-server/resources/index.js +7 -0
- package/dist/mcp-server/resources/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-find-characters.tool.d.ts +77 -0
- package/dist/mcp-server/tools/definitions/anime-find-characters.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-find-characters.tool.js +308 -0
- package/dist/mcp-server/tools/definitions/anime-find-characters.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-media.tool.d.ts +92 -0
- package/dist/mcp-server/tools/definitions/anime-get-media.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-media.tool.js +425 -0
- package/dist/mcp-server/tools/definitions/anime-get-media.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-rankings.tool.d.ts +73 -0
- package/dist/mcp-server/tools/definitions/anime-get-rankings.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-rankings.tool.js +154 -0
- package/dist/mcp-server/tools/definitions/anime-get-rankings.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-recommendations.tool.d.ts +35 -0
- package/dist/mcp-server/tools/definitions/anime-get-recommendations.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-recommendations.tool.js +174 -0
- package/dist/mcp-server/tools/definitions/anime-get-recommendations.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-relations.tool.d.ts +43 -0
- package/dist/mcp-server/tools/definitions/anime-get-relations.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-relations.tool.js +245 -0
- package/dist/mcp-server/tools/definitions/anime-get-relations.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-schedule.tool.d.ts +51 -0
- package/dist/mcp-server/tools/definitions/anime-get-schedule.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-schedule.tool.js +196 -0
- package/dist/mcp-server/tools/definitions/anime-get-schedule.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-studio.tool.d.ts +50 -0
- package/dist/mcp-server/tools/definitions/anime-get-studio.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-get-studio.tool.js +163 -0
- package/dist/mcp-server/tools/definitions/anime-get-studio.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-search-media.tool.d.ts +73 -0
- package/dist/mcp-server/tools/definitions/anime-search-media.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/anime-search-media.tool.js +229 -0
- package/dist/mcp-server/tools/definitions/anime-search-media.tool.js.map +1 -0
- package/dist/mcp-server/tools/index.d.ts +435 -0
- package/dist/mcp-server/tools/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/index.js +23 -0
- package/dist/mcp-server/tools/index.js.map +1 -0
- package/dist/services/anilist/anilist-service.d.ts +90 -0
- package/dist/services/anilist/anilist-service.d.ts.map +1 -0
- package/dist/services/anilist/anilist-service.js +496 -0
- package/dist/services/anilist/anilist-service.js.map +1 -0
- package/dist/services/anilist/types.d.ts +255 -0
- package/dist/services/anilist/types.d.ts.map +1 -0
- package/dist/services/anilist/types.js +6 -0
- package/dist/services/anilist/types.js.map +1 -0
- package/dist/services/jikan/jikan-service.d.ts +22 -0
- package/dist/services/jikan/jikan-service.d.ts.map +1 -0
- package/dist/services/jikan/jikan-service.js +89 -0
- package/dist/services/jikan/jikan-service.js.map +1 -0
- package/dist/services/jikan/types.d.ts +85 -0
- package/dist/services/jikan/types.d.ts.map +1 -0
- package/dist/services/jikan/types.js +6 -0
- package/dist/services/jikan/types.js.map +1 -0
- package/dist/services/kitsu/kitsu-service.d.ts +14 -0
- package/dist/services/kitsu/kitsu-service.d.ts.map +1 -0
- package/dist/services/kitsu/kitsu-service.js +94 -0
- package/dist/services/kitsu/kitsu-service.js.map +1 -0
- package/dist/services/kitsu/types.d.ts +17 -0
- package/dist/services/kitsu/types.d.ts.map +1 -0
- package/dist/services/kitsu/types.js +6 -0
- package/dist/services/kitsu/types.js.map +1 -0
- package/package.json +103 -0
- package/server.json +99 -0
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
# Developer Protocol
|
|
2
|
+
|
|
3
|
+
**Server:** anime-mcp-server
|
|
4
|
+
**Version:** 0.1.1
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.21`
|
|
6
|
+
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
|
|
8
|
+
**Zod:** ^4.4.3
|
|
9
|
+
|
|
10
|
+
> **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## What's Next?
|
|
15
|
+
|
|
16
|
+
When the user asks what's next or needs direction, suggest options based on the current project state. Common next steps:
|
|
17
|
+
|
|
18
|
+
1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
|
|
19
|
+
2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
|
|
20
|
+
3. **Add tools/resources/prompts** — scaffold new definitions using the `add-tool`, `add-app-tool`, `add-resource`, `add-prompt` skills
|
|
21
|
+
4. **Add services** — scaffold domain service integrations using the `add-service` skill
|
|
22
|
+
5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
|
|
23
|
+
6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
|
|
24
|
+
7. **Run `devcheck`** — lint, format, typecheck, and security audit
|
|
25
|
+
8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation
|
|
26
|
+
9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
|
|
27
|
+
10. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
|
|
28
|
+
|
|
29
|
+
Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Core Rules
|
|
34
|
+
|
|
35
|
+
- **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
|
|
36
|
+
- **Use `ctx.log`** for request-scoped logging. No `console` calls.
|
|
37
|
+
- **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
|
|
38
|
+
- **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
|
|
39
|
+
- **Secrets in env vars only** — never hardcoded.
|
|
40
|
+
- **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Patterns
|
|
45
|
+
|
|
46
|
+
### Tool
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
50
|
+
import * as anilist from '@/services/anilist/anilist-service.js';
|
|
51
|
+
|
|
52
|
+
export const animeGetRankings = tool('anime_get_rankings', {
|
|
53
|
+
description: 'Top, trending, or seasonal rankings for anime or manga.',
|
|
54
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
55
|
+
input: z.object({
|
|
56
|
+
mode: z.enum(['top', 'trending', 'seasonal']).describe('Ranking mode.'),
|
|
57
|
+
media_type: z.enum(['ANIME', 'MANGA']).default('ANIME').describe('Media type.'),
|
|
58
|
+
page: z.number().int().default(1).describe('Page number.'),
|
|
59
|
+
per_page: z.number().int().default(20).describe('Results per page.'),
|
|
60
|
+
}),
|
|
61
|
+
output: z.object({
|
|
62
|
+
media: z.array(z.object({
|
|
63
|
+
id: z.number().int().describe('AniList media ID.'),
|
|
64
|
+
title: z.string().describe('Primary display title.'),
|
|
65
|
+
mean_score: z.number().nullable().describe('AniList mean score 0–100, or null.'),
|
|
66
|
+
})).describe('Ranked media entries.'),
|
|
67
|
+
}),
|
|
68
|
+
async handler(input, ctx) {
|
|
69
|
+
ctx.log.info('Fetching rankings', { mode: input.mode });
|
|
70
|
+
const media = await anilist.getRankings(input.mode, input.media_type, input.page, input.per_page);
|
|
71
|
+
return { media };
|
|
72
|
+
},
|
|
73
|
+
format: (result) => [{
|
|
74
|
+
type: 'text',
|
|
75
|
+
text: result.media.map((m, i) => `${i + 1}. **${m.title}** (ID: ${m.id}) — score: ${m.mean_score ?? 'N/A'}`).join('\n'),
|
|
76
|
+
}],
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Resource
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import { resource, z } from '@cyanheads/mcp-ts-core';
|
|
84
|
+
import { notFound } from '@cyanheads/mcp-ts-core/errors';
|
|
85
|
+
import * as anilist from '@/services/anilist/anilist-service.js';
|
|
86
|
+
|
|
87
|
+
export const animeMediaResource = resource('anime://media/{id}', {
|
|
88
|
+
name: 'anime-media',
|
|
89
|
+
description: 'Full media record for an anime or manga by AniList ID.',
|
|
90
|
+
mimeType: 'application/json',
|
|
91
|
+
params: z.object({
|
|
92
|
+
id: z.string().describe('AniList media ID as a string. Obtain from anime_search_media.'),
|
|
93
|
+
}),
|
|
94
|
+
async handler(params, ctx) {
|
|
95
|
+
const numericId = parseInt(params.id, 10);
|
|
96
|
+
if (isNaN(numericId) || numericId < 1) throw notFound(`Invalid AniList media ID: ${params.id}`);
|
|
97
|
+
const detail = await anilist.getMediaById(numericId);
|
|
98
|
+
if (!detail) throw notFound(`No media found with AniList ID ${numericId}`, { id: numericId });
|
|
99
|
+
return detail;
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Server instructions
|
|
105
|
+
|
|
106
|
+
`createApp({ instructions })` set in `src/index.ts` — orients clients: discovery workflow (search → get), dual-score policy, adult content opt-in, rate limit notes. No `server-config.ts` — all three upstream sources (AniList, Jikan, Kitsu) are keyless; no server-specific env vars.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Context
|
|
111
|
+
|
|
112
|
+
Handlers receive a unified `ctx` object. Key properties:
|
|
113
|
+
|
|
114
|
+
| Property | Description |
|
|
115
|
+
|:---------|:------------|
|
|
116
|
+
| `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Used in all handlers. |
|
|
117
|
+
| `ctx.fail` | Typed error factory for declared error contracts — `ctx.fail('reason', message, { recovery })`. |
|
|
118
|
+
| `ctx.signal` | `AbortSignal` for cancellation (pass to fetch calls in service layer). |
|
|
119
|
+
| `ctx.requestId` | Unique request ID. |
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Errors
|
|
124
|
+
|
|
125
|
+
Handlers throw — the framework catches, classifies, and formats.
|
|
126
|
+
|
|
127
|
+
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
131
|
+
|
|
132
|
+
errors: [
|
|
133
|
+
{ reason: 'no_match', code: JsonRpcErrorCode.NotFound,
|
|
134
|
+
when: 'No item matched the query',
|
|
135
|
+
recovery: 'Broaden the query or check the spelling and try again.' },
|
|
136
|
+
],
|
|
137
|
+
async handler(input, ctx) {
|
|
138
|
+
const item = await db.find(input.id);
|
|
139
|
+
if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
|
|
140
|
+
return item;
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Declare contracts inline on each tool.** The contract is part of the tool's public surface — one file should give the full picture. Don't extract a shared `errors[]` constant; per-tool repetition is the intended cost of locality.
|
|
145
|
+
|
|
146
|
+
**Fallback (no contract entry fits):** throw via factories or plain `Error`.
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
// Error factories — explicit code
|
|
150
|
+
import { notFound, serviceUnavailable } from '@cyanheads/mcp-ts-core/errors';
|
|
151
|
+
throw notFound('Item not found', { itemId });
|
|
152
|
+
throw serviceUnavailable('API unavailable', { url }, { cause: err });
|
|
153
|
+
|
|
154
|
+
// Plain Error — framework auto-classifies from message patterns
|
|
155
|
+
throw new Error('Item not found'); // → NotFound
|
|
156
|
+
throw new Error('Invalid query format'); // → ValidationError
|
|
157
|
+
|
|
158
|
+
// McpError — when no factory exists for the code
|
|
159
|
+
import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
160
|
+
throw new McpError(JsonRpcErrorCode.DatabaseError, 'Connection failed', { pool: 'primary' });
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
See framework CLAUDE.md and the `api-errors` skill for the full auto-classification table, all available factories, and the contract reference.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Structure
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
src/
|
|
171
|
+
index.ts # createApp() entry point — server instructions, tool/resource registration
|
|
172
|
+
services/
|
|
173
|
+
anilist/
|
|
174
|
+
anilist-service.ts # AniList GraphQL client (primary source)
|
|
175
|
+
types.ts # AniList domain types
|
|
176
|
+
jikan/
|
|
177
|
+
jikan-service.ts # Jikan v4 REST client (MAL scores, recommendations)
|
|
178
|
+
types.ts # Jikan domain types
|
|
179
|
+
kitsu/
|
|
180
|
+
kitsu-service.ts # Kitsu JSON:API client (streaming links)
|
|
181
|
+
types.ts # Kitsu domain types
|
|
182
|
+
mcp-server/
|
|
183
|
+
tools/definitions/
|
|
184
|
+
anime-search-media.tool.ts
|
|
185
|
+
anime-get-media.tool.ts
|
|
186
|
+
anime-get-relations.tool.ts
|
|
187
|
+
anime-get-schedule.tool.ts
|
|
188
|
+
anime-find-characters.tool.ts
|
|
189
|
+
anime-get-recommendations.tool.ts
|
|
190
|
+
anime-get-rankings.tool.ts
|
|
191
|
+
anime-get-studio.tool.ts
|
|
192
|
+
resources/definitions/
|
|
193
|
+
anime-media.resource.ts # anime://media/{id}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Naming
|
|
199
|
+
|
|
200
|
+
| What | Convention | Example |
|
|
201
|
+
|:-----|:-----------|:--------|
|
|
202
|
+
| Files | kebab-case with suffix | `search-docs.tool.ts` |
|
|
203
|
+
| Tool/resource/prompt names | snake_case | `search_docs` |
|
|
204
|
+
| Directories | kebab-case | `src/services/doc-search/` |
|
|
205
|
+
| Descriptions | Single string or template literal, no `+` concatenation | `'Search items by query and filter.'` |
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Skills
|
|
210
|
+
|
|
211
|
+
Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
|
|
212
|
+
|
|
213
|
+
**Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
|
|
214
|
+
|
|
215
|
+
Available skills:
|
|
216
|
+
|
|
217
|
+
| Skill | Purpose |
|
|
218
|
+
|:------|:--------|
|
|
219
|
+
| `setup` | Post-init project orientation |
|
|
220
|
+
| `design-mcp-server` | Design tool surface, resources, and services for a new server |
|
|
221
|
+
| `add-tool` | Scaffold a new tool definition |
|
|
222
|
+
| `add-app-tool` | Scaffold an MCP App tool + paired UI resource |
|
|
223
|
+
| `add-resource` | Scaffold a new resource definition |
|
|
224
|
+
| `add-prompt` | Scaffold a new prompt definition |
|
|
225
|
+
| `add-service` | Scaffold a new service integration |
|
|
226
|
+
| `add-test` | Scaffold test file for a tool, resource, or service |
|
|
227
|
+
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
228
|
+
| `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
|
|
229
|
+
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
230
|
+
| `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
|
|
231
|
+
| `devcheck` | Lint, format, typecheck, audit |
|
|
232
|
+
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
233
|
+
| `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
|
|
234
|
+
| `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
|
|
235
|
+
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
236
|
+
| `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
|
|
237
|
+
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
238
|
+
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
239
|
+
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
240
|
+
| `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
|
|
241
|
+
| `api-config` | AppConfig, parseConfig, env vars |
|
|
242
|
+
| `api-context` | Context interface, logger, state, progress |
|
|
243
|
+
| `api-errors` | McpError, JsonRpcErrorCode, error patterns |
|
|
244
|
+
| `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
|
|
245
|
+
| `api-services` | LLM, Speech, Graph services |
|
|
246
|
+
| `api-testing` | createMockContext, test patterns |
|
|
247
|
+
| `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
|
|
248
|
+
| `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
|
|
249
|
+
| `api-workers` | Cloudflare Workers runtime |
|
|
250
|
+
|
|
251
|
+
**Chaining skills into pipelines.** When the user wants a multi-phase effort — build this server out, QA-and-fix the surface, update-and-ship — *and you can spawn sub-agents*, `skills/orchestrations/SKILL.md` sequences the task skills above into a gated pipeline with verification at each step. Read it to drive the run. Optional: skip it if you can't orchestrate sub-agents, and ignore it entirely if you were *spawned* as one — you've already been scoped to a single phase.
|
|
252
|
+
|
|
253
|
+
When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Commands
|
|
258
|
+
|
|
259
|
+
**Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. `bun` is slightly faster for script invocation but not required.
|
|
260
|
+
|
|
261
|
+
| Command | Purpose |
|
|
262
|
+
|:--------|:--------|
|
|
263
|
+
| `npm run build` | Compile TypeScript |
|
|
264
|
+
| `npm run rebuild` | Clean + build |
|
|
265
|
+
| `npm run clean` | Remove build artifacts |
|
|
266
|
+
| `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
|
|
267
|
+
| `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
|
|
268
|
+
| `npm run tree` | Generate directory structure doc |
|
|
269
|
+
| `npm run format` | Auto-fix formatting (safe fixes only) |
|
|
270
|
+
| `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
|
|
271
|
+
| `npm test` | Run tests |
|
|
272
|
+
| `npm run start:stdio` | Production mode (stdio) |
|
|
273
|
+
| `npm run start:http` | Production mode (HTTP) |
|
|
274
|
+
| `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
|
|
275
|
+
| `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
|
|
276
|
+
| `npm run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Bundling
|
|
281
|
+
|
|
282
|
+
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
283
|
+
|
|
284
|
+
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
|
|
285
|
+
|
|
286
|
+
**README install badges** (Claude Desktop `.mcpb`, Cursor, VS Code) and the `base64` / `encodeURIComponent` config-generation commands are ship-time concerns — run the `polish-docs-meta` skill, which carries the badge format, layout, and generation snippets in `skills/polish-docs-meta/references/readme.md`.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Changelog
|
|
291
|
+
|
|
292
|
+
Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `npm run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `npm run changelog:build` — devcheck hard-fails on drift; never hand-edit it.
|
|
293
|
+
|
|
294
|
+
Each per-version file opens with YAML frontmatter:
|
|
295
|
+
|
|
296
|
+
```markdown
|
|
297
|
+
---
|
|
298
|
+
summary: "One-line headline, ≤350 chars" # required — powers the rollup index
|
|
299
|
+
breaking: false # optional — true flags breaking changes
|
|
300
|
+
security: false # optional — true flags security fixes
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
# 0.1.0 — YYYY-MM-DD
|
|
304
|
+
...
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
`breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
|
|
308
|
+
|
|
309
|
+
`agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
|
|
310
|
+
|
|
311
|
+
**Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
|
|
312
|
+
|
|
313
|
+
**Tag annotations** render as GitHub Release bodies via `--notes-from-tag`. They must be structured markdown — never a flat comma-separated string. Subject omits the version number (GitHub prepends it). See `changelog/template.md` for the full format reference.
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Imports
|
|
318
|
+
|
|
319
|
+
```ts
|
|
320
|
+
// Framework — z is re-exported, no separate zod import needed
|
|
321
|
+
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
322
|
+
import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
323
|
+
|
|
324
|
+
// Server's own code — via path alias
|
|
325
|
+
import { getMyService } from '@/services/my-domain/my-service.js';
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Checklist
|
|
331
|
+
|
|
332
|
+
- [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, `z.bigint()`, `z.symbol()`, `z.void()`, `z.map()`, `z.set()`, `z.function()`, `z.nan()`)
|
|
333
|
+
- [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`). When regex/length constraints matter, use `z.union([z.literal(''), z.string().regex(...).describe(...)])` — literal variants are exempt from `describe-on-fields`.
|
|
334
|
+
- [ ] JSDoc `@fileoverview` + `@module` on every file
|
|
335
|
+
- [ ] `ctx.log` for logging, `ctx.state` for storage
|
|
336
|
+
- [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
|
|
337
|
+
- [ ] `format()` renders all data the LLM needs — different clients forward different surfaces (Claude Code → `structuredContent`, Claude Desktop → `content[]`); both must carry the same data
|
|
338
|
+
- [ ] If wrapping external API: raw/domain/output schemas reviewed against real upstream sparsity/nullability before finalizing required vs optional fields
|
|
339
|
+
- [ ] If wrapping external API: normalization and `format()` preserve uncertainty; do not fabricate facts from missing upstream data
|
|
340
|
+
- [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
|
|
341
|
+
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
342
|
+
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
343
|
+
- [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
|
|
344
|
+
- [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
|
|
345
|
+
- [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; inline `mcpServers` entry with server name key, env vars for any required API keys
|
|
346
|
+
- [ ] `npm run devcheck` passes
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# Build Stage
|
|
3
|
+
#
|
|
4
|
+
# This stage installs all dependencies (including dev), builds the TypeScript
|
|
5
|
+
# source code into JavaScript, and prepares the production assets.
|
|
6
|
+
# ==============================================================================
|
|
7
|
+
FROM oven/bun:1.3 AS build
|
|
8
|
+
|
|
9
|
+
WORKDIR /usr/src/app
|
|
10
|
+
|
|
11
|
+
# Copy dependency manifests for optimized layer caching
|
|
12
|
+
COPY package.json bun.lock ./
|
|
13
|
+
|
|
14
|
+
# Install all dependencies (including dev dependencies for building)
|
|
15
|
+
RUN bun install --frozen-lockfile
|
|
16
|
+
|
|
17
|
+
# Copy the rest of the source code
|
|
18
|
+
COPY . .
|
|
19
|
+
|
|
20
|
+
# Build the application
|
|
21
|
+
RUN bun run build
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# ==============================================================================
|
|
25
|
+
# Production Stage
|
|
26
|
+
#
|
|
27
|
+
# This stage creates a minimal, optimized, and secure image for running the
|
|
28
|
+
# application. It uses a slim base image and only includes production
|
|
29
|
+
# dependencies and build artifacts.
|
|
30
|
+
# ==============================================================================
|
|
31
|
+
FROM oven/bun:1.3-slim AS production
|
|
32
|
+
|
|
33
|
+
WORKDIR /usr/src/app
|
|
34
|
+
|
|
35
|
+
# Set the environment to production for performance and to ensure only
|
|
36
|
+
# production dependencies are installed.
|
|
37
|
+
ENV NODE_ENV=production
|
|
38
|
+
|
|
39
|
+
# OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
|
|
40
|
+
LABEL org.opencontainers.image.title="anime-mcp-server"
|
|
41
|
+
LABEL org.opencontainers.image.description="Search anime/manga, get full detail, watch order, schedule, characters, rankings, and studio filmography."
|
|
42
|
+
LABEL org.opencontainers.image.source="https://github.com/cyanheads/anime-mcp-server"
|
|
43
|
+
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
44
|
+
|
|
45
|
+
# Copy dependency manifests
|
|
46
|
+
COPY package.json bun.lock ./
|
|
47
|
+
|
|
48
|
+
# Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
|
|
49
|
+
# that are not needed in the final production image.
|
|
50
|
+
RUN bun install --production --frozen-lockfile --ignore-scripts
|
|
51
|
+
|
|
52
|
+
# Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
|
|
53
|
+
# These are not bundled by default to keep the base image lean. Enable at build time
|
|
54
|
+
# with: docker build --build-arg OTEL_ENABLED=true
|
|
55
|
+
ARG OTEL_ENABLED=true
|
|
56
|
+
RUN if [ "$OTEL_ENABLED" = "true" ]; then \
|
|
57
|
+
bun add @hono/otel \
|
|
58
|
+
@opentelemetry/instrumentation-http \
|
|
59
|
+
@opentelemetry/exporter-metrics-otlp-http \
|
|
60
|
+
@opentelemetry/exporter-trace-otlp-http \
|
|
61
|
+
@opentelemetry/instrumentation-pino \
|
|
62
|
+
@opentelemetry/resources \
|
|
63
|
+
@opentelemetry/sdk-metrics \
|
|
64
|
+
@opentelemetry/sdk-node \
|
|
65
|
+
@opentelemetry/sdk-trace-node \
|
|
66
|
+
@opentelemetry/semantic-conventions; \
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
# Copy the compiled application code from the build stage
|
|
70
|
+
COPY --from=build /usr/src/app/dist ./dist
|
|
71
|
+
|
|
72
|
+
# The 'oven/bun' image already provides a non-root user named 'bun'.
|
|
73
|
+
# We will use this existing user for enhanced security.
|
|
74
|
+
|
|
75
|
+
# Create and set permissions for the log directory, assigning ownership to the 'bun' user.
|
|
76
|
+
RUN mkdir -p /var/log/anime-mcp-server && chown -R bun:bun /var/log/anime-mcp-server
|
|
77
|
+
|
|
78
|
+
# Switch to the non-root user
|
|
79
|
+
USER bun
|
|
80
|
+
|
|
81
|
+
# Define an argument for the port, allowing it to be overridden at build time.
|
|
82
|
+
# The `PORT` variable is often injected by cloud environments at runtime.
|
|
83
|
+
ARG PORT
|
|
84
|
+
|
|
85
|
+
# Set runtime environment variables
|
|
86
|
+
# Note: PORT is an automatic variable in many cloud environments (e.g., Cloud Run)
|
|
87
|
+
ENV MCP_HTTP_PORT=${PORT:-3010}
|
|
88
|
+
ENV MCP_HTTP_HOST="0.0.0.0"
|
|
89
|
+
ENV MCP_TRANSPORT_TYPE="http"
|
|
90
|
+
ENV MCP_SESSION_MODE="stateless"
|
|
91
|
+
ENV MCP_LOG_LEVEL="info"
|
|
92
|
+
ENV LOGS_DIR="/var/log/anime-mcp-server"
|
|
93
|
+
ENV MCP_FORCE_CONSOLE_LOGGING="true"
|
|
94
|
+
|
|
95
|
+
# Expose the port the server listens on
|
|
96
|
+
EXPOSE ${MCP_HTTP_PORT}
|
|
97
|
+
|
|
98
|
+
# The command to start the server
|
|
99
|
+
CMD ["bun", "run", "dist/index.js"]
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Casey Hand @cyanheads
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|