caplets 0.12.5 → 0.12.7

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.
Files changed (3) hide show
  1. package/README.md +42 -6
  2. package/dist/index.js +63560 -3
  3. package/package.json +2 -3
package/README.md CHANGED
@@ -125,8 +125,8 @@ exposed two ways: direct flat MCP aggregation versus Caplets progressive disclos
125
125
  | Initial Agent Surface | Direct Flat MCP | Caplets | Reduction |
126
126
  | ------------------------- | ----------------: | -----------: | ------------: |
127
127
  | Visible tools | 106 | 3 | 97.2% fewer |
128
- | Serialized MCP payload | 32,090 bytes | 8,400 bytes | 73.8% smaller |
129
- | Approx. context surface | 8,023 tokens | 2,100 tokens | 5,923 fewer |
128
+ | Serialized MCP payload | 32,090 bytes | 8,442 bytes | 73.7% smaller |
129
+ | Approx. context surface | 8,023 tokens | 2,111 tokens | 5,912 fewer |
130
130
  | Top-level name collisions | 3 duplicate names | 0 | eliminated |
131
131
 
132
132
  Caplets does not remove access to downstream tools. It places them behind scoped
@@ -301,7 +301,7 @@ the committed schema stays in sync with the Zod config validator.
301
301
 
302
302
  For richer skill-like cards, add Markdown Caplet files beside `config.json`. Every Caplet
303
303
  file must include exactly one executable backend: `mcpServer`, `openapiEndpoint`,
304
- `graphqlEndpoint`, `httpApi`, or `cliTools`;
304
+ `graphqlEndpoint`, `httpApi`, `cliTools`, or `capletSet`;
305
305
  serverless Caplets are intentionally out of scope.
306
306
 
307
307
  Top-level files derive the Caplet ID from the filename:
@@ -454,7 +454,7 @@ caplets init --force
454
454
 
455
455
  ### Caplet IDs
456
456
 
457
- Each key under `mcpServers`, `openapiEndpoints`, `graphqlEndpoints`, `httpApis`, or `cliTools` is the
457
+ Each key under `mcpServers`, `openapiEndpoints`, `graphqlEndpoints`, `httpApis`, `cliTools`, or `capletSets` is the
458
458
  stable Caplet ID. It becomes the generated MCP tool name exactly, so keep it short and specific:
459
459
 
460
460
  ```json
@@ -471,7 +471,7 @@ stable Caplet ID. It becomes the generated MCP tool name exactly, so keep it sho
471
471
  ```
472
472
 
473
473
  Caplet IDs must match `^[a-zA-Z0-9_-]{1,64}$` and must be unique across `mcpServers`,
474
- `openapiEndpoints`, `graphqlEndpoints`, `httpApis`, and `cliTools`. Spaces, dots, slashes, colons, and Unicode IDs are rejected.
474
+ `openapiEndpoints`, `graphqlEndpoints`, `httpApis`, `cliTools`, and `capletSets`. Spaces, dots, slashes, colons, and Unicode IDs are rejected.
475
475
 
476
476
  ### Stdio Servers
477
477
 
@@ -689,6 +689,42 @@ Pass `-g` or `--global` to write to the user Caplets root, `--print` to review t
689
689
  manifest without writing, `--output <path>` for an explicit destination, or `--force` to overwrite
690
690
  an existing destination file.
691
691
 
692
+ ### Caplet Sets
693
+
694
+ Use `capletSets` to expose another Caplets collection as nested Caplets. Each child Caplet appears
695
+ as one downstream tool and supports the full Caplets operation set: `get_caplet`, `check_backend`,
696
+ `check_mcp_server`, `list_tools`, `search_tools`, `get_tool`, and `call_tool`.
697
+
698
+ ```json
699
+ {
700
+ "capletSets": {
701
+ "team": {
702
+ "name": "Team Caplets",
703
+ "description": "Use the team's shared Caplets collection.",
704
+ "configPath": "./team-caplets/config.json",
705
+ "capletsRoot": "./team-caplets/caplets"
706
+ }
707
+ }
708
+ }
709
+ ```
710
+
711
+ `configPath` and `capletsRoot` are independently optional, but at least one is required. Child
712
+ collections are isolated from the parent collection; they use their own config and Caplet files,
713
+ with their own `defaultSearchLimit` and `maxSearchLimit` when set on the `capletSets` entry.
714
+ Recursive nesting is supported, and repeated source paths are rejected as cycles.
715
+
716
+ Markdown Caplet files use `capletSet` frontmatter:
717
+
718
+ ```yaml
719
+ ---
720
+ name: Team Caplets
721
+ description: Use the team's shared Caplets collection.
722
+ capletSet:
723
+ configPath: ./team-caplets/config.json
724
+ capletsRoot: ./team-caplets/caplets
725
+ ---
726
+ ```
727
+
692
728
  Add MCP, OpenAPI, GraphQL, and HTTP API Caplets with the same destination options:
693
729
 
694
730
  ```sh
@@ -854,7 +890,7 @@ Call one exact downstream tool:
854
890
  Available operations:
855
891
 
856
892
  - `get_caplet`: return the configured capability card without starting the downstream server.
857
- - `check_backend`: verify the selected backend, whether MCP, OpenAPI, or GraphQL.
893
+ - `check_backend`: verify the selected backend, whether MCP, OpenAPI, GraphQL, HTTP, CLI, or nested Caplets.
858
894
  - `check_mcp_server`: start or connect to an MCP server and verify its tool list.
859
895
  - `list_tools`: return compact downstream tool metadata.
860
896
  - `search_tools`: search downstream tool names and descriptions within this Caplet.