caplets 0.17.2 → 0.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -14
- package/dist/index.js +730 -138
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -219,6 +219,12 @@ opencode
|
|
|
219
219
|
|
|
220
220
|
For MCP-backed Codex or Claude Code configs, point the agent's MCP server entry at the derived `/mcp` URL using that agent's supported HTTP MCP configuration. If Basic Auth is needed, use the agent's secure secret or environment interpolation mechanism rather than hardcoding credentials.
|
|
221
221
|
|
|
222
|
+
In `CAPLETS_MODE=remote`, read and execute commands use a merged Caplets view. Remote server rows load first, user-global local Caplets overlay them, and project-local Caplets have the highest priority. A local Caplet with the same ID shadows the remote one, runs locally, and prints a warning such as `Warning: project Caplet shared shadows remote Caplet`; remote-only IDs continue through remote control.
|
|
223
|
+
|
|
224
|
+
Local overlays in remote mode are best-effort. Invalid local config sources warn and are ignored while remaining valid layers still load; invalid Caplet files warn and are skipped individually. For sibling file layouts, `foo/CAPLET.md` wins over `foo.md` and warns that `foo.md` was shadowed; if the winning `CAPLET.md` is invalid, that local ID is skipped instead of falling back to `foo.md`.
|
|
225
|
+
|
|
226
|
+
Mutating commands do not automatically write to the server just because remote mode is active. `caplets init`, `caplets add ...`, and `caplets install ...` write project-local by default, `--project` is the explicit project-local target, `--global` writes user-global local files, and `--remote` sends the mutation to the remote Caplets server. Target flags are mutually exclusive.
|
|
227
|
+
|
|
222
228
|
## Convert Existing Tooling
|
|
223
229
|
|
|
224
230
|
Caplets is designed to convert what you already use into agent-friendly capability domains.
|
|
@@ -299,7 +305,7 @@ the agent chooses that server and asks to search, list, inspect, or call them.
|
|
|
299
305
|
|
|
300
306
|
## Capabilities
|
|
301
307
|
|
|
302
|
-
- Reads downstream MCP server definitions, native OpenAPI endpoint definitions, native GraphQL endpoint definitions, explicit HTTP API action definitions, and curated CLI tool definitions from
|
|
308
|
+
- Reads downstream MCP server definitions, native OpenAPI endpoint definitions, native GraphQL endpoint definitions, explicit HTTP API action definitions, and curated CLI tool definitions from user and project config sources.
|
|
303
309
|
- Registers one generated MCP tool for each enabled MCP server, OpenAPI endpoint, GraphQL endpoint, HTTP API, or CLI tools backend.
|
|
304
310
|
- Uses the configured server ID as the generated tool name.
|
|
305
311
|
- Uses the configured `name` and `description` as the capability card shown to agents.
|
|
@@ -316,12 +322,20 @@ the agent chooses that server and asks to search, list, inspect, or call them.
|
|
|
316
322
|
|
|
317
323
|
## Configure
|
|
318
324
|
|
|
319
|
-
Create a starter
|
|
325
|
+
Create a starter project config at `./.caplets/config.json`:
|
|
320
326
|
|
|
321
327
|
```sh
|
|
322
328
|
caplets init
|
|
323
329
|
```
|
|
324
330
|
|
|
331
|
+
To create a starter user config instead, pass `--global`. The user config path is
|
|
332
|
+
`${XDG_CONFIG_HOME:-~/.config}/caplets/config.json` on Unix-like platforms and
|
|
333
|
+
`%APPDATA%\caplets\config.json` on Windows:
|
|
334
|
+
|
|
335
|
+
```sh
|
|
336
|
+
caplets init --global
|
|
337
|
+
```
|
|
338
|
+
|
|
325
339
|
The generated config includes a disabled example server. Replace it with the MCP servers
|
|
326
340
|
you want Caplets to expose:
|
|
327
341
|
|
|
@@ -406,10 +420,12 @@ you want Caplets to expose:
|
|
|
406
420
|
}
|
|
407
421
|
```
|
|
408
422
|
|
|
409
|
-
The
|
|
423
|
+
The user config path can be overridden with `CAPLETS_CONFIG`; the project config path can be
|
|
424
|
+
overridden with `CAPLETS_PROJECT_CONFIG`:
|
|
410
425
|
|
|
411
426
|
```sh
|
|
412
|
-
|
|
427
|
+
CAPLETS_PROJECT_CONFIG=/path/to/project/.caplets/config.json caplets init
|
|
428
|
+
CAPLETS_CONFIG=/path/to/user/config.json caplets init --global
|
|
413
429
|
CAPLETS_CONFIG=/path/to/config.json caplets serve
|
|
414
430
|
```
|
|
415
431
|
|
|
@@ -422,10 +438,9 @@ caplets config paths
|
|
|
422
438
|
caplets config paths --json
|
|
423
439
|
```
|
|
424
440
|
|
|
425
|
-
Caplets validates
|
|
441
|
+
Caplets validates config files at startup and hot reloads config changes while `caplets serve`
|
|
426
442
|
is running. Invalid edits are ignored until fixed, so the MCP server keeps serving the last
|
|
427
|
-
known-good config instead of dropping every tool because of a transient JSON or validation
|
|
428
|
-
error.
|
|
443
|
+
known-good config instead of dropping every tool because of a transient JSON or validation error.
|
|
429
444
|
|
|
430
445
|
The optional `$schema` field points editors at the generated JSON Schema in
|
|
431
446
|
[`schemas/caplets-config.schema.json`](schemas/caplets-config.schema.json). CI verifies that
|
|
@@ -548,7 +563,18 @@ This repository includes polished working examples under [`caplets/`](caplets/):
|
|
|
548
563
|
- `linear`: Linear's hosted OAuth MCP endpoint.
|
|
549
564
|
- `context7`: Context7 documentation lookup through `@upstash/context7-mcp`.
|
|
550
565
|
- `repo-cli`: Read-oriented repository CLI workflows through `git` and package scripts.
|
|
551
|
-
- `
|
|
566
|
+
- `ast-grep`: Structural code search, scan, rewrite, rule testing, and scaffolding through the `ast-grep` CLI.
|
|
567
|
+
- `osv`: OSV.dev vulnerability lookups through explicit read-only HTTP actions.
|
|
568
|
+
- `npm`: npm registry operations through npm's published OpenAPI spec URL.
|
|
569
|
+
- `pypi`: PyPI project metadata, release metadata, and Simple API JSON through a curated OpenAPI spec.
|
|
570
|
+
- `deepwiki`: Repository-focused documentation and architecture context through DeepWiki MCP.
|
|
571
|
+
- `sourcegraph`: Cross-repository code search and navigation through Sourcegraph MCP.
|
|
572
|
+
- `playwright`: Headless browser automation for frontend inspection and testing through Playwright MCP.
|
|
573
|
+
- `coding-agent-toolkit`: A CapletSet that bundles high-value coding-agent examples; source children are symlinks to canonical top-level examples and installed copies are materialized as self-contained files/directories.
|
|
574
|
+
- `github-cli`: Pre-existing secondary read-oriented GitHub workflows through the `gh` CLI; prefer the canonical `github` MCP example for the polished GitHub integration.
|
|
575
|
+
|
|
576
|
+
GraphQL is intentionally skipped in this showcase batch so the examples can focus on HTTP,
|
|
577
|
+
OpenAPI, MCP, CLI, and CapletSet coverage without duplicating GitHub or GitLab surfaces.
|
|
552
578
|
|
|
553
579
|
Install every example from a repo's `caplets/` directory into the current project's
|
|
554
580
|
`./.caplets` directory:
|
|
@@ -580,12 +606,14 @@ That means a project-local Caplet can intentionally replace a user-level Caplet
|
|
|
580
606
|
Use `caplets list` to see each Caplet's winning source; when a project Caplet shadows a user-level
|
|
581
607
|
Caplet, the list output includes a warning naming the shadowed path.
|
|
582
608
|
|
|
583
|
-
`caplets init` refuses to overwrite an existing config. To intentionally replace the file:
|
|
609
|
+
`caplets init` refuses to overwrite an existing project config. To intentionally replace the file:
|
|
584
610
|
|
|
585
611
|
```sh
|
|
586
612
|
caplets init --force
|
|
587
613
|
```
|
|
588
614
|
|
|
615
|
+
Use `caplets init --global --force` to replace the user config instead.
|
|
616
|
+
|
|
589
617
|
### Caplet IDs
|
|
590
618
|
|
|
591
619
|
Each key under `mcpServers`, `openapiEndpoints`, `graphqlEndpoints`, `httpApis`, `cliTools`, or `capletSets` is the
|
|
@@ -903,11 +931,16 @@ caplets auth login <server> --no-open
|
|
|
903
931
|
In local mode, OAuth/OIDC tokens are stored under
|
|
904
932
|
`${XDG_STATE_HOME:-~/.local/state}/caplets/auth/<server>.json` on Unix-like platforms and
|
|
905
933
|
`%LOCALAPPDATA%\caplets\auth\<server>.json` on Windows. Token files use owner-only file
|
|
906
|
-
permissions where the platform supports them. In `CAPLETS_MODE=remote`, `caplets auth list
|
|
907
|
-
|
|
908
|
-
server
|
|
909
|
-
|
|
910
|
-
|
|
934
|
+
permissions where the platform supports them. In `CAPLETS_MODE=remote`, `caplets auth list` shows
|
|
935
|
+
local and remote auth targets with a `source` field. `caplets auth login <server>` and
|
|
936
|
+
`caplets auth logout <server>` use the matching scope when it is unambiguous; if the same ID exists
|
|
937
|
+
in multiple scopes, pass `--project`, `--global`, or `--remote`. Remote OAuth/OIDC credentials are
|
|
938
|
+
stored server-side and are not returned to the local client. Caplets supports well-known OAuth/OIDC
|
|
939
|
+
discovery and dynamic client registration when advertised. When a token expires, run
|
|
940
|
+
`caplets auth login <server>` again.
|
|
941
|
+
|
|
942
|
+
Auth target flags are mutually exclusive. `caplets auth list --project`,
|
|
943
|
+
`caplets auth list --global`, and `caplets auth list --remote` filter the listing to one scope.
|
|
911
944
|
|
|
912
945
|
To inspect or remove stored OAuth credentials:
|
|
913
946
|
|