@postmcp/types 0.1.25 → 0.1.26
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 +8 -8
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +12 -1
package/README.md
CHANGED
|
@@ -27,20 +27,20 @@ pnpm add -D @postmcp/types
|
|
|
27
27
|
## Core Types Exported
|
|
28
28
|
|
|
29
29
|
### 1. AST & Operation Definitions
|
|
30
|
-
* `
|
|
31
|
-
* `
|
|
30
|
+
* `NormalizedSpec`: The parsed OpenAPI representation containing title, version, servers, and operations.
|
|
31
|
+
* `NormalizedOperation`: Standardized operation definition with JSON Schema input/response schemas and risk tier.
|
|
32
32
|
* `RiskTier`: `'READ_ONLY' | 'MUTATION' | 'CRITICAL'`.
|
|
33
33
|
|
|
34
34
|
### 2. Token Diet & Optimization
|
|
35
|
-
* `TokenDietOptions`: Configuration for null
|
|
36
|
-
* `
|
|
35
|
+
* `TokenDietOptions`: Configuration for null pruning, field masking, and Markdown table conversion.
|
|
36
|
+
* `TokenDietResult`: Output containing text, structured payload, token counts, and savings percentage.
|
|
37
37
|
|
|
38
38
|
### 3. Macro Pipelines
|
|
39
39
|
* `MacroDefinition`: Composite multi-step tool definition.
|
|
40
40
|
* `MacroStep`: Individual execution step in a macro workflow.
|
|
41
41
|
|
|
42
42
|
### 4. Configuration & CLI
|
|
43
|
-
* `
|
|
43
|
+
* `PostMcpCliConfig`: Structure of `postmcp.config.json` workspace configuration files.
|
|
44
44
|
* `RunCommandOptions`: Options for `postmcp run`.
|
|
45
45
|
* `StudioCommandOptions`: Options for `postmcp studio`.
|
|
46
46
|
* `GenerateCommandOptions`: Options for `postmcp generate`.
|
|
@@ -51,15 +51,15 @@ pnpm add -D @postmcp/types
|
|
|
51
51
|
## Usage Example
|
|
52
52
|
|
|
53
53
|
```typescript
|
|
54
|
-
import type {
|
|
54
|
+
import type { NormalizedSpec, RiskTier, TokenDietOptions } from '@postmcp/types';
|
|
55
55
|
|
|
56
56
|
function analyzeSafety(tier: RiskTier): boolean {
|
|
57
57
|
return tier === 'READ_ONLY';
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const options: TokenDietOptions = {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
convertToMarkdownTable: true,
|
|
62
|
+
maxTokens: 2500,
|
|
63
63
|
};
|
|
64
64
|
```
|
|
65
65
|
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postmcp/types",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "Unified TypeScript types and interfaces for the PostMCP ecosystem",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "PostMCP Contributors",
|
|
7
|
+
"homepage": "https://postmcp.dev",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/BraveRam/postmcp.git",
|
|
11
|
+
"directory": "packages/types"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/BraveRam/postmcp/issues"
|
|
15
|
+
},
|
|
5
16
|
"publishConfig": {
|
|
6
17
|
"access": "public"
|
|
7
18
|
},
|