@postmcp/types 0.1.24 → 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 CHANGED
@@ -27,20 +27,20 @@ pnpm add -D @postmcp/types
27
27
  ## Core Types Exported
28
28
 
29
29
  ### 1. AST & Operation Definitions
30
- * `NormalizedAST`: The parsed OpenAPI representation containing title, version, servers, and operations.
31
- * `ToolDefinition`: Standardized MCP tool definition with JSON Schema input parameters.
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 stripping, metadata pruning, field masking, and Markdown table conversion.
36
- * `TokenMetrics`: Token estimate before and after optimization with percentage saved.
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
- * `PostMCPConfig`: Structure of `postmcp.config.json` workspace files.
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 { NormalizedAST, RiskTier, TokenDietOptions } from '@postmcp/types';
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
- enableTable: true,
62
- stripNulls: true,
61
+ convertToMarkdownTable: true,
62
+ maxTokens: 2500,
63
63
  };
64
64
  ```
65
65
 
package/dist/index.d.mts CHANGED
@@ -275,6 +275,7 @@ interface Preset {
275
275
  authType: string;
276
276
  authEnvVar?: string;
277
277
  defaultBaseUrl?: string;
278
+ defaultHeaders?: Record<string, string>;
278
279
  specUrl?: string;
279
280
  bundledSpec?: object;
280
281
  tags?: string[];
package/dist/index.d.ts CHANGED
@@ -275,6 +275,7 @@ interface Preset {
275
275
  authType: string;
276
276
  authEnvVar?: string;
277
277
  defaultBaseUrl?: string;
278
+ defaultHeaders?: Record<string, string>;
278
279
  specUrl?: string;
279
280
  bundledSpec?: object;
280
281
  tags?: string[];
package/package.json CHANGED
@@ -1,7 +1,18 @@
1
1
  {
2
2
  "name": "@postmcp/types",
3
- "version": "0.1.24",
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
  },