@flashdsm/genome 0.1.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/LICENSE +21 -0
- package/README.md +157 -0
- package/dist/chunk-6OCQZNS7.js +851 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +3775 -0
- package/dist/smoke.js +41 -0
- package/fixtures/brand-dna.json +12 -0
- package/fixtures/components.json +26 -0
- package/fixtures/design-tokens.json +61 -0
- package/fixtures/flash-ds.config.json +12 -0
- package/package.json +71 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* flash-genome - Flash Genome, the local MCP for a customer design system (stdio).
|
|
6
|
+
*
|
|
7
|
+
* One bin, `flash-genome`. There is no alias for the pre-rename name: that
|
|
8
|
+
* package was never published, so nobody's config can be naming it.
|
|
9
|
+
*
|
|
10
|
+
* Tools: get_tokens, list_components, get_component, get_brand_dna,
|
|
11
|
+
* suggest_token, apply_token_patch, generate_component_prompt,
|
|
12
|
+
* check_violations, scan_workspace, pull_from_web, detect_drift, push_to_web,
|
|
13
|
+
* list_modules, get_module, get_relations, get_impact, sync_context, api_health,
|
|
14
|
+
* list_design_systems. The pre-rename names (get_design_tokens,
|
|
15
|
+
* suggest_token_usage, list_violations) answer too, for one release.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
declare const TOOL_NAMES: readonly ["get_tokens", "list_components", "get_component", "get_brand_dna", "suggest_token", "apply_token_patch", "generate_component_prompt", "check_violations", "scan_workspace", "pull_from_web", "detect_drift", "push_to_web", "list_modules", "get_module", "get_relations", "get_impact", "sync_context", "api_health", "list_design_systems"];
|
|
19
|
+
declare function createServer(opts: {
|
|
20
|
+
tokenFile: string;
|
|
21
|
+
componentsFile: string;
|
|
22
|
+
apiUrl: string;
|
|
23
|
+
accessToken: string | null;
|
|
24
|
+
/** The MCP token, for the tools that reach the hosted server. */
|
|
25
|
+
token?: string | null;
|
|
26
|
+
/** An explicit --config, so the workspace tools resolve the same file. */
|
|
27
|
+
configPath?: string;
|
|
28
|
+
}): Promise<McpServer>;
|
|
29
|
+
/**
|
|
30
|
+
* Whether this module is the script node was asked to run, rather than an
|
|
31
|
+
* import (the tests import it, and must not start a server on stdio).
|
|
32
|
+
*
|
|
33
|
+
* Compared by real path. `npx` and `node_modules/.bin` run the bin through a
|
|
34
|
+
* symlink, so `argv[1]` is the link while `import.meta.url` is the file it
|
|
35
|
+
* points at; a plain comparison said "not the CLI" and the process exited
|
|
36
|
+
* having done nothing - `--help` included - for every install from npm.
|
|
37
|
+
*/
|
|
38
|
+
declare function isEntryPoint(argv1: string | undefined, moduleUrl: string): boolean;
|
|
39
|
+
|
|
40
|
+
export { TOOL_NAMES, createServer, isEntryPoint };
|