@fragments-sdk/context 0.3.2 → 0.3.3

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/LICENSE CHANGED
@@ -1,10 +1,7 @@
1
1
  Functional Source License, Version 1.1, MIT Future License
2
2
 
3
3
  Licensor: Conan McNicholl
4
- Software: Fragments SDK (@fragments-sdk/cli, @fragments-sdk/mcp, @fragments-sdk/context)
5
-
6
- IMPORTANT: The @fragments-sdk/ui package is licensed separately under the MIT License.
7
- See libs/ui/LICENSE for details.
4
+ Software: @fragments-sdk/context
8
5
 
9
6
  ---
10
7
 
package/README.md CHANGED
@@ -60,3 +60,5 @@ pnpm add @fragments-sdk/context
60
60
  ```
61
61
 
62
62
  Requires Node.js 18+. Tree-sitter WASM grammars are included as dependencies.
63
+
64
+ <img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=a02beb71-df11-498d-8e1f-39de2e64ce5b" />
@@ -38,9 +38,18 @@ var MCP_TOOL_DEFINITIONS = [
38
38
  type: "boolean",
39
39
  description: "If true, includes code examples for each variant"
40
40
  },
41
+ limit: {
42
+ type: "number",
43
+ description: "Maximum number of results to return (default: 10 for useCase mode)"
44
+ },
41
45
  includeRelations: {
42
46
  type: "boolean",
43
47
  description: "If true, includes component relationships"
48
+ },
49
+ verbosity: {
50
+ type: "string",
51
+ enum: ["compact", "standard", "full"],
52
+ description: 'Response detail level: "compact" (names only), "standard" (default), "full" (everything including code)'
44
53
  }
45
54
  }
46
55
  },
@@ -55,7 +64,7 @@ var MCP_TOOL_DEFINITIONS = [
55
64
  fields: {
56
65
  type: "array",
57
66
  items: { type: "string" },
58
- description: 'Specific fields to return (e.g., ["meta", "usage.when", "contract.propsSummary", "props", "examples", "guidelines"]). If omitted, returns everything. Supports dot notation.'
67
+ description: 'Specific fields to return (e.g., ["meta", "guidelines.when", "contract.propsSummary", "props", "examples"]). If omitted, returns everything. Supports dot notation. Aliases: "usage" \u2192 "guidelines".'
59
68
  },
60
69
  variant: {
61
70
  type: "string",
@@ -68,6 +77,11 @@ var MCP_TOOL_DEFINITIONS = [
68
77
  maxLines: {
69
78
  type: "number",
70
79
  description: "Maximum lines per code example (truncates longer examples)"
80
+ },
81
+ verbosity: {
82
+ type: "string",
83
+ enum: ["compact", "standard", "full"],
84
+ description: 'Response detail level: "compact" (meta + prop names), "standard" (default), "full" (everything)'
71
85
  }
72
86
  },
73
87
  required: ["component"]
@@ -91,6 +105,15 @@ var MCP_TOOL_DEFINITIONS = [
91
105
  category: {
92
106
  type: "string",
93
107
  description: 'Filter by category (e.g., "authentication", "marketing", "dashboard", "settings", "ecommerce", "ai")'
108
+ },
109
+ limit: {
110
+ type: "number",
111
+ description: "Maximum number of blocks to return (default: all matching)"
112
+ },
113
+ verbosity: {
114
+ type: "string",
115
+ enum: ["compact", "standard", "full"],
116
+ description: 'Response detail level: "compact" (no code), "standard" (default, code preview for long blocks), "full" (full code)'
94
117
  }
95
118
  }
96
119
  },
@@ -105,6 +128,10 @@ var MCP_TOOL_DEFINITIONS = [
105
128
  search: {
106
129
  type: "string",
107
130
  description: 'Search token names (e.g., "accent", "hover", "padding")'
131
+ },
132
+ limit: {
133
+ type: "number",
134
+ description: "Maximum number of tokens to return per category (default: 25 for search, unlimited for category browsing)"
108
135
  }
109
136
  }
110
137
  },
@@ -115,6 +142,15 @@ var MCP_TOOL_DEFINITIONS = [
115
142
  useCase: {
116
143
  type: "string",
117
144
  description: 'What you want to implement (e.g., "login form", "data table with sorting", "streaming chat messages")'
145
+ },
146
+ limit: {
147
+ type: "number",
148
+ description: "Maximum number of components to return (default: 5)"
149
+ },
150
+ verbosity: {
151
+ type: "string",
152
+ enum: ["compact", "standard", "full"],
153
+ description: 'Response detail level: "compact" (names only), "standard" (default), "full" (all props + examples + full block code)'
118
154
  }
119
155
  },
120
156
  required: ["useCase"]
@@ -151,7 +187,7 @@ var MCP_TOOL_DEFINITIONS = [
151
187
  },
152
188
  variant: {
153
189
  type: "string",
154
- description: "Variant name for compare mode"
190
+ description: "Variant name to render (uses the variant's render function from the fragment definition). Works in both render and compare modes."
155
191
  },
156
192
  threshold: {
157
193
  type: "number",
@@ -182,7 +218,7 @@ var MCP_TOOL_DEFINITIONS = [
182
218
  },
183
219
  {
184
220
  key: "graph",
185
- description: 'Query the component relationship graph. Understand dependencies, impact analysis, composition trees, alternatives, and design system health. Use "health" for an overview, "dependencies"/"dependents" for direct relationships, "impact" for change analysis, "composition" for compound component trees.',
221
+ description: 'Query the component relationship graph. Understand dependencies, impact analysis, composition trees, alternatives, and design system health. Use "health" for an overview, "dependencies"/"dependents" for composition and declared relationships (not code-level imports), "impact" for change analysis, "composition" for compound component trees.',
186
222
  params: {
187
223
  mode: {
188
224
  type: "string",
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  MCP_TOOL_DEFINITIONS,
4
4
  buildMcpTools,
5
5
  buildToolNames
6
- } from "./chunk-HAJWPNLU.js";
6
+ } from "./chunk-NECSN43I.js";
7
7
  import {
8
8
  CLI_COMMANDS,
9
9
  CLI_COMMAND_CATEGORIES
@@ -3,7 +3,7 @@ import {
3
3
  MCP_TOOL_DEFINITIONS,
4
4
  buildMcpTools,
5
5
  buildToolNames
6
- } from "../chunk-HAJWPNLU.js";
6
+ } from "../chunk-NECSN43I.js";
7
7
  export {
8
8
  CLI_TOOL_EXTENSIONS,
9
9
  MCP_TOOL_DEFINITIONS,
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@fragments-sdk/context",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "license": "FSL-1.1-MIT",
5
5
  "description": "Code intelligence and RAG primitives for design system and codebase indexing",
6
+ "author": "Conan McNicholl",
7
+ "homepage": "https://usefragments.com",
6
8
  "repository": {
7
9
  "type": "git",
8
10
  "url": "https://github.com/ConanMcN/fragments"
@@ -73,7 +75,11 @@
73
75
  "files": [
74
76
  "dist"
75
77
  ],
78
+ "scarfSettings": {
79
+ "defaultOptIn": true
80
+ },
76
81
  "dependencies": {
82
+ "@scarf/scarf": "^1.4.0",
77
83
  "tree-sitter-go": "^0.25.0",
78
84
  "tree-sitter-java": "^0.23.5",
79
85
  "tree-sitter-javascript": "^0.25.0",