@pure-ds/core 0.7.4 → 0.7.5
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/.cursorrules +21 -0
- package/.github/copilot-instructions.md +21 -0
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
- package/package.json +8 -2
- package/packages/pds-cli/bin/pds-bootstrap.js +1 -1
- package/packages/pds-cli/bin/pds-import.js +1 -1
- package/packages/pds-cli/bin/pds-mcp-eval.js +79 -0
- package/packages/pds-cli/bin/pds-mcp-health.js +128 -0
- package/packages/pds-cli/bin/pds-mcp-server.js +140 -0
- package/packages/pds-cli/bin/pds-setup-mcp.js +72 -0
- package/packages/pds-cli/lib/pds-mcp-core.js +497 -0
- package/packages/pds-cli/lib/pds-mcp-eval-cases.json +72 -0
- package/public/assets/js/app.js +1582 -4
- package/public/assets/js/app.js.map +7 -0
- package/public/assets/js/lit.js +1078 -3
- package/public/assets/js/lit.js.map +7 -0
- package/public/assets/js/pds-ask.js +239 -9
- package/public/assets/js/pds-ask.js.map +7 -0
- package/public/assets/js/pds-autocomplete.js +590 -7
- package/public/assets/js/pds-autocomplete.js.map +7 -0
- package/public/assets/js/pds-enhancers.js +689 -1
- package/public/assets/js/pds-enhancers.js.map +7 -0
- package/public/assets/js/pds-manager.js +15947 -3101
- package/public/assets/js/pds-manager.js.map +7 -0
- package/public/assets/js/pds-toast.js +30 -1
- package/public/assets/js/pds-toast.js.map +7 -0
- package/public/assets/js/pds.js +1442 -2
- package/public/assets/js/pds.js.map +7 -0
- package/public/assets/pds/core/pds-ask.js +239 -9
- package/public/assets/pds/core/pds-autocomplete.js +590 -7
- package/public/assets/pds/core/pds-enhancers.js +689 -1
- package/public/assets/pds/core/pds-manager.js +15947 -3101
- package/public/assets/pds/core/pds-toast.js +30 -1
- package/public/assets/pds/core.js +1442 -2
- package/public/assets/pds/external/lit.js +1078 -3
- package/readme.md +44 -2
- package/src/js/pds-core/pds-start-helpers.js +0 -20
package/readme.md
CHANGED
|
@@ -186,6 +186,50 @@ Install `@pure-ds/storybook` and get a cloned PDS Storybook instance right where
|
|
|
186
186
|
|
|
187
187
|
Install `@pure-ds/core` and get instant PDS AI Coding Instrucions at your fingertips (GitHub Copilot & Cursor support built in)
|
|
188
188
|
|
|
189
|
+
#### MCP-first SSoT delegation for coding agents
|
|
190
|
+
|
|
191
|
+
PDS also ships a local MCP server so agents can delegate lookups to actual SSoT files instead of relying on duplicated prompt text.
|
|
192
|
+
|
|
193
|
+
**Included binaries**
|
|
194
|
+
- `pds-mcp-server` — stdio MCP server
|
|
195
|
+
- `pds-setup-mcp` — writes local MCP config for VS Code and Cursor
|
|
196
|
+
- `pds-mcp-eval` — runs baseline parity checks against bundled cases
|
|
197
|
+
|
|
198
|
+
**Tool coverage**
|
|
199
|
+
- `get_tokens` → `public/assets/pds/pds.css-data.json`
|
|
200
|
+
- `find_utility_class` → `src/js/pds-core/pds-ontology.js`
|
|
201
|
+
- `get_component_api` → `custom-elements.json`
|
|
202
|
+
- `get_enhancer_metadata` → `src/js/pds-core/pds-enhancers-meta.js`
|
|
203
|
+
- `get_config_relations` → `src/js/pds-core/pds-config.js` (`PDS_CONFIG_RELATIONS`)
|
|
204
|
+
- `validate_pds_snippet` → validates classes/tokens/components against SSoT indexes
|
|
205
|
+
|
|
206
|
+
**Consumer project setup**
|
|
207
|
+
|
|
208
|
+
Run this in any project that depends on `@pure-ds/core`:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
npx pds-setup-mcp
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
This creates/updates:
|
|
215
|
+
- `.vscode/mcp.json`
|
|
216
|
+
- `.cursor/mcp.json`
|
|
217
|
+
|
|
218
|
+
Both configs point to:
|
|
219
|
+
|
|
220
|
+
```text
|
|
221
|
+
node ./node_modules/@pure-ds/core/packages/pds-cli/bin/pds-mcp-server.js
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Restart your IDE/agent after setup.
|
|
225
|
+
|
|
226
|
+
**Quality/parity check**
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
npm run pds:mcp:health
|
|
230
|
+
npm run pds:mcp:eval
|
|
231
|
+
```
|
|
232
|
+
|
|
189
233
|
### How It Works
|
|
190
234
|
|
|
191
235
|
It all starts with your `pds.confog.js` file in the root of the project (auto-generated when installing)
|
|
@@ -1272,8 +1316,6 @@ await PDS.start({
|
|
|
1272
1316
|
patchAttachShadow?: boolean,
|
|
1273
1317
|
debounceMs?: number
|
|
1274
1318
|
},
|
|
1275
|
-
// Note: autoDefine.moduleURL is no longer supported.
|
|
1276
|
-
// AutoDefiner ships as part of the core runtime bundle.
|
|
1277
1319
|
|
|
1278
1320
|
// Progressive enhancements
|
|
1279
1321
|
enhancers?: Array<{
|
|
@@ -470,26 +470,6 @@ export async function setupAutoDefinerAndEnhancers(options, { baseEnhancers = []
|
|
|
470
470
|
},
|
|
471
471
|
};
|
|
472
472
|
|
|
473
|
-
const debugEnhancers =
|
|
474
|
-
Boolean(
|
|
475
|
-
(typeof window !== "undefined" && window.__PDS_DEBUG_AUTODEFINE__) ||
|
|
476
|
-
autoDefineOverrides?.debugAutoDefine
|
|
477
|
-
);
|
|
478
|
-
|
|
479
|
-
if (debugEnhancers) {
|
|
480
|
-
const missingRun = resolvedEnhancers
|
|
481
|
-
.filter((enhancer) => typeof enhancer?.run !== "function")
|
|
482
|
-
.map((enhancer) => enhancer?.selector)
|
|
483
|
-
.filter(Boolean);
|
|
484
|
-
console.info("[PDS][AutoDefiner] enhancer summary", {
|
|
485
|
-
baseEnhancers: (baseEnhancers || []).length,
|
|
486
|
-
userEnhancers: (enhancers || []).length,
|
|
487
|
-
overrideEnhancers: normalizedOverrideEnhancers.length,
|
|
488
|
-
resolvedEnhancers: resolvedEnhancers.length,
|
|
489
|
-
missingRun,
|
|
490
|
-
});
|
|
491
|
-
}
|
|
492
|
-
|
|
493
473
|
autoDefiner = new AutoDefinerCtor(autoDefineConfig);
|
|
494
474
|
if (
|
|
495
475
|
autoDefinePreload.length > 0 &&
|