caplets 0.5.2 → 0.7.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 +54 -4
- package/caplets/context7.md +33 -0
- package/caplets/github/CAPLET.md +54 -0
- package/caplets/github/README.md +13 -0
- package/caplets/linear/CAPLET.md +50 -0
- package/caplets/linear/workflows.md +9 -0
- package/dist/index.js +57868 -57276
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -129,8 +129,19 @@ CAPLETS_CONFIG=/path/to/config.json caplets init
|
|
|
129
129
|
CAPLETS_CONFIG=/path/to/config.json caplets serve
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
Inspect the installed CLI version and resolved config locations:
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
caplets --version
|
|
136
|
+
caplets config path
|
|
137
|
+
caplets config paths
|
|
138
|
+
caplets config paths --json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Caplets validates this file at startup and hot reloads config changes while `caplets serve`
|
|
142
|
+
is running. Invalid edits are ignored until fixed, so the MCP server keeps serving the last
|
|
143
|
+
known-good config instead of dropping every tool because of a transient JSON or validation
|
|
144
|
+
error.
|
|
134
145
|
|
|
135
146
|
The optional `$schema` field points editors at the generated JSON Schema in
|
|
136
147
|
[`schemas/caplets-config.schema.json`](schemas/caplets-config.schema.json). CI verifies that
|
|
@@ -201,6 +212,30 @@ Top-level files derive their Caplet ID from the filename. Directory-style Caplet
|
|
|
201
212
|
`linear/CAPLET.md`, which is exposed as `linear`; sibling files can be referenced with
|
|
202
213
|
normal Markdown links from `CAPLET.md`.
|
|
203
214
|
|
|
215
|
+
This repository includes polished working examples under [`caplets/`](caplets/):
|
|
216
|
+
|
|
217
|
+
- `github`: GitHub's official MCP server container, using `GITHUB_PERSONAL_ACCESS_TOKEN`.
|
|
218
|
+
- `linear`: Linear's hosted OAuth MCP endpoint.
|
|
219
|
+
- `context7`: Context7 documentation lookup through `@upstash/context7-mcp`.
|
|
220
|
+
|
|
221
|
+
Install every example from a repo's `caplets/` directory:
|
|
222
|
+
|
|
223
|
+
```sh
|
|
224
|
+
caplets install spiritledsoftware/caplets
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Install one or more individual Caplets by ID:
|
|
228
|
+
|
|
229
|
+
```sh
|
|
230
|
+
caplets install spiritledsoftware/caplets github
|
|
231
|
+
caplets install spiritledsoftware/caplets github linear
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
`caplets install` accepts a GitHub `owner/repo` shorthand, a Git URL, or a local repository path.
|
|
235
|
+
It installs into your user Caplets root, which is `~/.caplets` by default or the parent directory
|
|
236
|
+
of `CAPLETS_CONFIG` when that environment variable is set. Existing Caplets are not overwritten
|
|
237
|
+
unless `--force` is passed.
|
|
238
|
+
|
|
204
239
|
Caplets always loads user Caplet files from `~/.caplets`. Project `./.caplets/config.json`
|
|
205
240
|
is still loaded as project config, but project Markdown Caplet files are executable
|
|
206
241
|
configuration and are ignored unless explicitly trusted:
|
|
@@ -390,6 +425,14 @@ caplets auth list
|
|
|
390
425
|
caplets auth logout <server>
|
|
391
426
|
```
|
|
392
427
|
|
|
428
|
+
To list configured Caplets without starting downstream backends:
|
|
429
|
+
|
|
430
|
+
```sh
|
|
431
|
+
caplets list
|
|
432
|
+
caplets list --all
|
|
433
|
+
caplets list --json
|
|
434
|
+
```
|
|
435
|
+
|
|
393
436
|
### Optional Server Settings
|
|
394
437
|
|
|
395
438
|
Every server can set:
|
|
@@ -417,6 +460,12 @@ Configure your MCP client to run Caplets as a stdio server:
|
|
|
417
460
|
If your client starts the configured command directly, `caplets` without arguments also
|
|
418
461
|
starts the MCP server. `serve` is explicit and recommended for clarity.
|
|
419
462
|
|
|
463
|
+
`caplets serve` watches the effective user config, project config, user Caplet files, and
|
|
464
|
+
trusted project Caplet files. Adding, editing, disabling, or removing a Caplet updates the
|
|
465
|
+
top-level MCP tool list without restarting Caplets. When an MCP-backed Caplet changes or is
|
|
466
|
+
removed, Caplets closes only that affected downstream connection; unrelated Caplets and
|
|
467
|
+
their downstream connections keep running.
|
|
468
|
+
|
|
420
469
|
## How Agents Use It
|
|
421
470
|
|
|
422
471
|
Caplets initially exposes one MCP tool per enabled Caplet. If the config has `filesystem`,
|
|
@@ -495,9 +544,10 @@ pnpm schema:check
|
|
|
495
544
|
pnpm verify
|
|
496
545
|
```
|
|
497
546
|
|
|
498
|
-
`pnpm dev` rebuilds
|
|
547
|
+
`pnpm dev` rebuilds Caplets source changes and restarts the local stdio MCP server from
|
|
499
548
|
`dist/index.js`. Use it for local development, not as the command configured in an MCP
|
|
500
|
-
client, because build logs are written to stdout.
|
|
549
|
+
client, because build logs are written to stdout. Runtime config hot reload is built into
|
|
550
|
+
normal `caplets serve` and does not require `pnpm dev`.
|
|
501
551
|
|
|
502
552
|
## Product Notes
|
|
503
553
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
$schema: https://raw.githubusercontent.com/spiritledsoftware/caplets/main/schemas/caplet.schema.json
|
|
3
|
+
name: Context7 Documentation
|
|
4
|
+
description: Fetch current library and framework documentation through Context7 before using version-sensitive APIs.
|
|
5
|
+
tags:
|
|
6
|
+
- docs
|
|
7
|
+
- libraries
|
|
8
|
+
- frameworks
|
|
9
|
+
- api-reference
|
|
10
|
+
mcpServer:
|
|
11
|
+
command: npx
|
|
12
|
+
args:
|
|
13
|
+
- -y
|
|
14
|
+
- "@upstash/context7-mcp"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Context7 Documentation
|
|
18
|
+
|
|
19
|
+
Use this Caplet when the agent needs up-to-date library, SDK, framework, CLI, or cloud-service
|
|
20
|
+
documentation before writing code or giving technical instructions.
|
|
21
|
+
|
|
22
|
+
## Good Fits
|
|
23
|
+
|
|
24
|
+
- Check current API signatures for fast-moving JavaScript, TypeScript, Python, or cloud libraries.
|
|
25
|
+
- Look up migration notes before changing framework configuration.
|
|
26
|
+
- Retrieve official examples for a specific package version.
|
|
27
|
+
- Resolve uncertainty about CLI flags, config files, or SDK initialization.
|
|
28
|
+
|
|
29
|
+
## Use Carefully
|
|
30
|
+
|
|
31
|
+
- Prefer primary documentation over snippets when implementation risk is high.
|
|
32
|
+
- Record the library or package name clearly before searching.
|
|
33
|
+
- Do not use this as a substitute for project-local types and tests.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
$schema: https://raw.githubusercontent.com/spiritledsoftware/caplets/main/schemas/caplet.schema.json
|
|
3
|
+
name: GitHub
|
|
4
|
+
description: Inspect and manage GitHub repositories, issues, pull requests, branches, commits, and code review workflows.
|
|
5
|
+
tags:
|
|
6
|
+
- code
|
|
7
|
+
- github
|
|
8
|
+
- pull-requests
|
|
9
|
+
- issues
|
|
10
|
+
- reviews
|
|
11
|
+
mcpServer:
|
|
12
|
+
command: docker
|
|
13
|
+
args:
|
|
14
|
+
- run
|
|
15
|
+
- -i
|
|
16
|
+
- --rm
|
|
17
|
+
- -e
|
|
18
|
+
- GITHUB_PERSONAL_ACCESS_TOKEN
|
|
19
|
+
- ghcr.io/github/github-mcp-server
|
|
20
|
+
env:
|
|
21
|
+
GITHUB_PERSONAL_ACCESS_TOKEN: $env:GITHUB_PERSONAL_ACCESS_TOKEN
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# GitHub
|
|
25
|
+
|
|
26
|
+
Use this Caplet when the agent needs live GitHub repository context or needs to act on
|
|
27
|
+
issues, pull requests, branches, commits, or review feedback.
|
|
28
|
+
|
|
29
|
+
## Good Fits
|
|
30
|
+
|
|
31
|
+
- Summarize recent pull request activity before a code review.
|
|
32
|
+
- Inspect open issues and identify implementation work.
|
|
33
|
+
- Create or update issues from an implementation plan.
|
|
34
|
+
- Compare branches, inspect commits, or review pull request files.
|
|
35
|
+
- Leave review comments after the agent has inspected the relevant diff.
|
|
36
|
+
|
|
37
|
+
## Use Carefully
|
|
38
|
+
|
|
39
|
+
- Mutating operations can affect real repositories. Prefer read operations first.
|
|
40
|
+
- Use a least-privilege `GITHUB_PERSONAL_ACCESS_TOKEN`.
|
|
41
|
+
- Do not ask the agent to expose token values, repository secrets, or private issue contents outside
|
|
42
|
+
the intended conversation.
|
|
43
|
+
|
|
44
|
+
## Setup
|
|
45
|
+
|
|
46
|
+
Create a GitHub personal access token with the minimum repository scopes needed for your workflow,
|
|
47
|
+
then export it before starting Caplets:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
export GITHUB_PERSONAL_ACCESS_TOKEN=github_pat_...
|
|
51
|
+
caplets serve
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This Caplet uses GitHub's official MCP server container, so Docker must be available on the host.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# GitHub Caplet
|
|
2
|
+
|
|
3
|
+
This Caplet wraps GitHub's official MCP server container:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Install it from this repo:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
caplets install spiritledsoftware/caplets github
|
|
13
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
$schema: https://raw.githubusercontent.com/spiritledsoftware/caplets/main/schemas/caplet.schema.json
|
|
3
|
+
name: Linear
|
|
4
|
+
description: Plan and track product work in Linear by reading teams, projects, cycles, issues, comments, and workflow state.
|
|
5
|
+
tags:
|
|
6
|
+
- planning
|
|
7
|
+
- linear
|
|
8
|
+
- issues
|
|
9
|
+
- projects
|
|
10
|
+
- triage
|
|
11
|
+
mcpServer:
|
|
12
|
+
transport: http
|
|
13
|
+
url: https://mcp.linear.app/mcp
|
|
14
|
+
auth:
|
|
15
|
+
type: oauth2
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Linear
|
|
19
|
+
|
|
20
|
+
Use this Caplet when the agent needs live product planning context from Linear or needs to keep
|
|
21
|
+
implementation work synchronized with issues, projects, and team workflows.
|
|
22
|
+
|
|
23
|
+
## Good Fits
|
|
24
|
+
|
|
25
|
+
- Find the current issue or project that matches a requested feature.
|
|
26
|
+
- Summarize open work by team, project, cycle, label, or assignee.
|
|
27
|
+
- Draft issue breakdowns from a technical plan.
|
|
28
|
+
- Add implementation notes or status comments after code changes.
|
|
29
|
+
- Check whether a bug or feature already has active work before creating a new issue.
|
|
30
|
+
|
|
31
|
+
## Reference Files
|
|
32
|
+
|
|
33
|
+
- [Workflows](./workflows.md): recommended lookup, planning, status update, and triage flows.
|
|
34
|
+
|
|
35
|
+
## Use Carefully
|
|
36
|
+
|
|
37
|
+
- Linear issue updates are visible to teammates. Read first, then write deliberately.
|
|
38
|
+
- Keep issue titles and comments concise; use links to detailed implementation artifacts when useful.
|
|
39
|
+
- Avoid broad, noisy searches when a team key, issue ID, project, or label is available.
|
|
40
|
+
|
|
41
|
+
## Setup
|
|
42
|
+
|
|
43
|
+
Authenticate once through Caplets:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
caplets auth login linear
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The Linear MCP endpoint supports OAuth. Caplets stores the resulting token bundle in your local
|
|
50
|
+
Caplets auth store.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Linear Workflows
|
|
2
|
+
|
|
3
|
+
Useful agent flows:
|
|
4
|
+
|
|
5
|
+
- **Issue lookup**: search by issue key first, then by title or project if no key is provided.
|
|
6
|
+
- **Planning**: read project context, summarize constraints, then create child issues only when the
|
|
7
|
+
requested breakdown is clear.
|
|
8
|
+
- **Status updates**: comment with what changed, verification run, and remaining risk.
|
|
9
|
+
- **Triage**: group candidate issues by urgency, owner, and whether they are blocked.
|