@pennant/mcp 1.0.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/README.md +78 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.js +29 -0
- package/dist/config.js.map +1 -0
- package/dist/console-client.d.ts +55 -0
- package/dist/console-client.js +128 -0
- package/dist/console-client.js.map +1 -0
- package/dist/explain.d.ts +21 -0
- package/dist/explain.js +168 -0
- package/dist/explain.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/sdk-guide.d.ts +27 -0
- package/dist/sdk-guide.js +259 -0
- package/dist/sdk-guide.js.map +1 -0
- package/dist/tools.d.ts +5 -0
- package/dist/tools.js +306 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +69 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/package.json +35 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** Shapes returned by the Pennant console API. Mirrors the console's own types. */
|
|
2
|
+
type Strategy = {
|
|
3
|
+
type: "everyone";
|
|
4
|
+
} | {
|
|
5
|
+
type: "gradual";
|
|
6
|
+
percentage: number;
|
|
7
|
+
} | {
|
|
8
|
+
type: "allowlist";
|
|
9
|
+
userIds: string[];
|
|
10
|
+
} | {
|
|
11
|
+
type: "remoteAddress";
|
|
12
|
+
addresses: string[];
|
|
13
|
+
} | {
|
|
14
|
+
type: "hostname";
|
|
15
|
+
hostnames: string[];
|
|
16
|
+
};
|
|
17
|
+
type Constraint = {
|
|
18
|
+
contextName: string;
|
|
19
|
+
operator: "IN" | "NOT_IN";
|
|
20
|
+
values: string[];
|
|
21
|
+
};
|
|
22
|
+
type Variant = {
|
|
23
|
+
name: string;
|
|
24
|
+
weight: number;
|
|
25
|
+
};
|
|
26
|
+
type EnvironmentConfig = {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
strategy: Strategy;
|
|
29
|
+
constraints?: Constraint[];
|
|
30
|
+
variants?: Variant[];
|
|
31
|
+
segmentIds?: string[];
|
|
32
|
+
};
|
|
33
|
+
declare const FLAG_TYPES: readonly ["release", "experiment", "operational", "kill-switch", "permission"];
|
|
34
|
+
type FlagType = (typeof FLAG_TYPES)[number];
|
|
35
|
+
type Flag = {
|
|
36
|
+
key: string;
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
type: FlagType;
|
|
40
|
+
parentKey?: string | null;
|
|
41
|
+
tags: string[];
|
|
42
|
+
archived: boolean;
|
|
43
|
+
impressionCounts?: Record<string, number>;
|
|
44
|
+
environments: Record<string, EnvironmentConfig>;
|
|
45
|
+
};
|
|
46
|
+
type Segment = {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
description: string;
|
|
50
|
+
constraints: Constraint[];
|
|
51
|
+
};
|
|
52
|
+
type ProjectSummary = {
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
};
|
|
57
|
+
type EvaluationContext = {
|
|
58
|
+
userId?: string;
|
|
59
|
+
sessionId?: string;
|
|
60
|
+
remoteAddress?: string;
|
|
61
|
+
hostname?: string;
|
|
62
|
+
properties?: Record<string, string>;
|
|
63
|
+
};
|
|
64
|
+
type FlagResult = {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
variant?: string;
|
|
67
|
+
};
|
|
68
|
+
export { FLAG_TYPES };
|
|
69
|
+
export type { Constraint, EnvironmentConfig, EvaluationContext, Flag, FlagResult, FlagType, ProjectSummary, Segment, Strategy, Variant, };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,mFAAmF;AAyBnF,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAU,CAAA;AAmCjG,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pennant/mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Model Context Protocol server for Pennant: read, explain, and change feature flags, and wire the SDK into a codebase",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"pennant-mcp": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc -p tsconfig.json",
|
|
17
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
18
|
+
"prepack": "npm run build"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/flypennant/pennant-sdks.git",
|
|
23
|
+
"directory": "mcp"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=20"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@modelcontextprotocol/sdk": "^1.32.0",
|
|
33
|
+
"zod": "^4.6.5"
|
|
34
|
+
}
|
|
35
|
+
}
|