@postman/postman-plugin 0.3.0 → 0.4.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.
Files changed (46) hide show
  1. package/README.md +32 -8
  2. package/dist/hosts/antigravity.js +47 -0
  3. package/dist/hosts/copilot.js +60 -0
  4. package/dist/hosts/index.js +3 -1
  5. package/mcp.pi.json +2 -2
  6. package/package.json +1 -1
  7. package/skills/ai-readiness/SKILL.md +40 -44
  8. package/skills/api-discovery/SKILL.md +64 -145
  9. package/skills/api-discovery/reference/orbit.md +17 -5
  10. package/skills/api-documentation/SKILL.md +41 -46
  11. package/skills/api-engineer/SKILL.md +78 -23
  12. package/skills/api-mocking/SKILL.md +117 -163
  13. package/skills/api-monitoring/SKILL.md +52 -129
  14. package/skills/api-simulation/SKILL.md +130 -178
  15. package/skills/api-simulation/reference/sim_yaml_schema.md +41 -103
  16. package/skills/api-testing/SKILL.md +48 -95
  17. package/skills/bootstrap/SKILL.md +123 -224
  18. package/skills/ci-integration/SKILL.md +53 -113
  19. package/skills/collection-schema-v3/SKILL.md +43 -204
  20. package/skills/collection-schema-v3/reference/http.md +150 -0
  21. package/skills/datasets/SKILL.md +89 -315
  22. package/skills/datasets/reference/spreadsheets.md +25 -0
  23. package/skills/flows/SKILL.md +57 -206
  24. package/skills/flows/reference/flow_cli_flags.md +3 -2
  25. package/skills/performance-testing/SKILL.md +46 -62
  26. package/skills/performance-testing/references/jmeter-import/README.md +113 -0
  27. package/skills/performance-testing/references/jmeter-import/import-report.md +52 -0
  28. package/skills/performance-testing/references/jmeter-import/mapping-table.md +97 -0
  29. package/skills/performance-testing/references/jmeter-import/postman-perf-capabilities.md +56 -0
  30. package/skills/performance-testing/references/jmeter-import/script-translation.md +98 -0
  31. package/skills/performance-testing/references/jmeter-import/scripts/groovy_to_js.py +83 -0
  32. package/skills/performance-testing/references/jmeter-import/scripts/jmx_to_postman.py +1433 -0
  33. package/skills/postman-mcp-server/SKILL.md +53 -59
  34. package/skills/postman-mcp-server/references/docs.md +0 -1
  35. package/skills/postman-mcp-server/references/learn.md +10 -9
  36. package/skills/postman-mcp-server/references/mock.md +0 -1
  37. package/skills/postman-mcp-server/references/search.md +0 -1
  38. package/skills/postman-mcp-server/references/security.md +0 -1
  39. package/skills/postman-mcp-server/references/setup.md +0 -1
  40. package/skills/postman-mcp-server/references/sync.md +0 -1
  41. package/skills/postman-mcp-server/references/test.md +0 -1
  42. package/skills/variables/SKILL.md +44 -87
  43. package/skills/webhook-testing/SKILL.md +103 -0
  44. package/skills/webhook-testing/reference/forwarding.md +10 -0
  45. package/skills/webhook-testing/reference/outbound_webhooks.md +25 -0
  46. package/skills/webhook-testing/reference/webhook_scripts.md +163 -0
@@ -1,210 +1,49 @@
1
1
  ---
2
2
  name: collection-schema-v3
3
- description: The reference for the git-native v3 collection file format — one YAML file per request/folder/example under postman/collections/, plus postman/environments/. Read before writing, editing, or generating any file in either directory by hand, or before debugging a `collection lint` failure. Covers the HTTP request/example/definition schema, environment schema, and the YAML/naming rules that make files parse — GraphQL, gRPC, WebSocket, Socket.IO, MQTT, MCP, and LLM request schemas are non-HTTP protocols and live in reference/other_protocols.md, read only when a collection actually uses one.
3
+ description: Use when writing or debugging local Postman v3 collection and environment YAML, including collection lint failures. Preserves the per-entity files, inherited context, and schema shapes that make API changes reusable and reviewable in Git. Use for requests such as "fix this request YAML".
4
4
  ---
5
5
 
6
6
  # Collection Schema (v3, Git-Native)
7
7
 
8
- ## Overview
9
-
10
- A v3 collection is a directory tree under `postman/collections/`, one file
11
- per entity — every request, every folder's metadata, every saved example is
12
- its own file. There is no single collection.json to open and edit; the
13
- directory structure itself *is* the collection.
14
-
15
- ```text
16
- postman/collections/
17
- bookstore api/
18
- .resources/
19
- definition.yaml (optional)
20
- get all books.resources/
21
- examples/
22
- 200 OK.example.yaml
23
- 400 Bad Request.example.yaml
24
- 500 Internal Server Error.example.yaml
25
- get all books.request.yaml
26
- get-book-by-id.request.yaml
27
- add new book.request.yaml
28
- authentication/
29
- .resources/
30
- definition.yaml (optional)
31
- signup.request.yaml
32
- login.request.yaml
33
- ```
34
-
35
- - Every folder under `postman/collections/` is a collection; it can contain
36
- subfolders and requests.
37
- - A folder or collection can have a `.resources/` directory — an optional
38
- metadata directory for that scope. `.resources/definition.yaml` holds the
39
- collection/folder's own metadata; request examples live under
40
- `.resources/<request-name>.resources/examples/`.
41
- - Never place a request file inside a `.resources/` directory — those are
42
- metadata-only.
43
-
44
- ## Definition file (`.resources/definition.yaml`)
45
-
46
- Optional metadata for a collection or folder:
47
-
48
- - `$kind: "collection"` — required, even for a folder's definition.
49
- - `name` — optional, defaults to the filesystem folder name.
50
- - `description` — optional.
51
- - `variables` — array of `{key, value, description?, disabled?}`. `value`
52
- must be a string; `disabled` a boolean.
53
- - `auth` — a single auth object `{type, credentials: [{key, value}, ...]}`,
54
- or an array for multiAuth: `[{id, name, type, credentials, rules?}, ...]`.
55
- - `scripts` — array of `{type, code, language: "text/javascript"}`. `type`
56
- is one of `http:beforeRequest`, `http:afterResponse`,
57
- `graphql:beforeQuery`, `graphql:afterResponse`, `grpc:beforeInvoke`,
58
- `grpc:onIncomingMessage`, `grpc:afterResponse`.
59
- - `order` — number, used for folder ordering.
60
-
61
- ## HTTP request (`*.request.yaml`)
62
-
63
- - `$kind: "http-request"` — required.
64
- - `name` — optional (see naming rules below for when to include it).
65
- - `order` — number; only used for relative comparison, so space values out
66
- (e.g. multiples of 1000) rather than packing them tight — a later
67
- insertion between two requests shouldn't force renumbering every sibling.
68
- - `url` — string, with `{{varName}}` variable syntax.
69
- - `method` — `GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS`.
70
- - `headers` — array of `{key, value, description?, disabled?}`.
71
- - `queryParams` — array of `{key, value, description?, disabled?}`.
72
- - `pathVariables` — array of `{key, value, description?}`.
73
- - `body` — `{type, content}`; `type` required whenever `body` is present.
74
- - Types: `json`, `formdata`, `urlencoded`, `text`, `xml`, `html`,
75
- `javascript`, `file`, `none`.
76
- - `json`/`text`/`xml`/`html`/`javascript`: `content` is a string.
77
- - `formdata`: `content` is an array of
78
- `{key, type: "text"|"file", value or src, contentType?, description?}`.
79
- - `urlencoded`: `content` is an array of `{key, value, description?}`.
80
- - `auth` — `{type, credentials}`.
81
- - `settings` —
82
- `{protocolVersion?, strictSSL?, followRedirects?, maxRedirects?, disabledSystemHeaders?}`.
83
- - `scripts` — array of `{type: "beforeRequest"|"afterResponse", code, language: "text/javascript"}`.
84
- - `examples` — optional, a relative path to the examples directory, e.g.
85
- `./.resources/<request-name>.resources/examples/`.
86
-
87
- ## HTTP example (`*.example.yaml`)
88
-
89
- - `$kind: "http-example"` — required.
90
- - `name` — optional.
91
- - `request: {url, method}`.
92
- - `response: {statusCode, statusText, headers: [{key, value}], body: {type, content}}`.
93
- - `order` — optional.
94
-
95
- Saved examples are what `collection ai-readiness` checks for — a request
96
- with no examples scores worse for agent consumption even if perfectly
97
- valid structurally.
98
-
99
- ## Environments (`postman/environments/*.environment.yaml`)
100
-
101
- Environment files are v3 YAML but are not collection entities: they do not use
102
- `$kind`. Before creating or editing one by hand, read
103
- [reference/environment.md](reference/environment.md) for the schema, secret
104
- handling, CLI-first edit commands, and a linted example.
105
-
106
- ## YAML rules
107
-
108
- Invalid YAML breaks parsing silently in confusing ways — when in doubt,
109
- single-quote it:
110
-
111
- 1. Single-quote any value containing `{{variables}}`:
112
- `url: '{{base_url}}/users'` — never leave it unquoted.
113
- 2. Single-quote values containing `: # & * ! [ ] { } > |`, e.g.
114
- `name: 'Health check: v2'`.
115
- 3. Multi-line content (JSON bodies, scripts, queries) uses a `|-` block
116
- scalar:
117
- ```yaml
118
- body:
119
- type: json
120
- content: |-
121
- {
122
- "name": "example"
123
- }
124
- ```
125
- 4. Quote strings that resemble booleans/numbers when a string is intended:
126
- `value: "true"`, `value: "123"`.
127
- 5. `order` must be a bare number, never quoted: `order: 1000`.
128
- 6. Single-quote file paths and use forward slashes only:
129
- `examples: './.resources/name.resources/examples'`.
130
-
131
- ## Naming rules
132
-
133
- - `<request-name>` (the filename stem before `.request.yaml`) must not
134
- contain `/ \ : * ? " < > |` — sanitize to `-`.
135
- - Include `name` in the file only when it differs from `<request-name>`
136
- (e.g. `name: 'Health/check'` inside `Health-check.request.yaml`, since the
137
- filename itself can't hold the `/`).
138
- - Filenames must be unique, case-insensitively, per directory.
139
-
140
- ## Worked example: "bookstore api"
141
-
142
- `postman/collections/bookstore api/get all books.request.yaml`
143
- ```yaml
144
- $kind: http-request
145
- method: GET
146
- url: '{{base_url}}/books'
147
- order: 1000
148
- ```
149
-
150
- `postman/collections/bookstore api/get-book-by-id.request.yaml`
151
- ```yaml
152
- $kind: http-request
153
- name: 'get book by :id'
154
- method: GET
155
- url: '{{base_url}}/books/:id'
156
- order: 2000
157
- pathVariables:
158
- - key: id
159
- value: '1'
160
- ```
161
-
162
- `postman/collections/bookstore api/add new book.request.yaml`
163
- ```yaml
164
- $kind: http-request
165
- method: POST
166
- url: '{{base_url}}/books'
167
- order: 3000
168
- headers:
169
- - key: Content-Type
170
- value: application/json
171
- body:
172
- type: json
173
- content: |-
174
- {
175
- "title": "Example Book",
176
- "author": "Jane Doe"
177
- }
178
- ```
179
-
180
- `postman/collections/bookstore api/.resources/definition.yaml`
181
- ```yaml
182
- $kind: collection
183
- name: Bookstore API
184
- variables:
185
- - key: base_url
186
- value: 'https://api.bookstore.com/v1'
187
- ```
188
-
189
- ## Critical Rules
190
-
191
- 1. **Every entity is its own file — there's no single collection.json to
192
- open.** A request, its parent folder's metadata, and its saved examples
193
- are three separate files, not sections of one document.
194
- 2. **Unquoted `{{variables}}` or special characters are the most common way
195
- a hand-written file fails to parse.** Single-quote per the YAML rules
196
- above rather than debugging a cryptic lint error after the fact.
197
- 3. **`order` is relative, not an index.** Don't renumber every sibling file
198
- to insert one request — leave headroom (spacing of 1000) from the start.
199
- 4. **This file covers HTTP only.** A collection using GraphQL, gRPC,
200
- WebSocket, Socket.IO, MQTT, MCP, or LLM requests needs
201
- [reference/other_protocols.md](reference/other_protocols.md) — don't
202
- guess those schemas from the HTTP shape above, they diverge in real ways
203
- (e.g. gRPC's `methodDescriptor`, LLM's `userPrompts`/`systemPrompts`).
204
-
205
- ## Reference
206
-
207
- - [Other request protocols](reference/other_protocols.md) — GraphQL, gRPC,
208
- WebSocket, Socket.IO, MQTT, MCP, and LLM request schemas.
209
- - [Environment schema](reference/environment.md) — v3 environment filenames,
210
- fields, variable types, safe editing commands, and validation.
8
+ A v3 collection is a directory of independently editable entities. A change to
9
+ one request, example, or assertion can be reviewed in a PR beside the code it
10
+ checks, without regenerating a single large collection export.
11
+
12
+ 1. Edit the entity that owns the change. Top-level directories under
13
+ `postman/collections/` are collections; nested folders organize requests.
14
+ Requests live in `*.request.yaml`, scope metadata in
15
+ `.resources/definition.yaml`, and saved responses in
16
+ `.resources/<request-name>.resources/examples/*.example.yaml`.
17
+ `.resources/` holds metadata and examples, not runnable request files.
18
+ 2. Preserve inherited auth, variables, and scripts when changing a request.
19
+ Collection/folder definitions supply shared context; copying every inherited
20
+ field into each request creates competing values and noisy future edits.
21
+ See **variables** when deciding the scope of a value or secret reference.
22
+ 3. Use [HTTP field shapes and examples](reference/http.md) when authoring
23
+ request, example, or definition files. For other protocols, read
24
+ [their schemas](reference/other_protocols.md); HTTP's URL/body/script shape
25
+ cannot be assumed for gRPC, WebSocket, MCP, or LLM requests.
26
+ [Environment files](reference/environment.md) have their own schema and
27
+ do not use the collection entity's `$kind` discriminator.
28
+ 4. Preserve types at the YAML boundary. Quote `{{variables}}` and strings that
29
+ resemble booleans or numbers; JSON bodies are string content, best expressed
30
+ with block scalars. A syntactically valid YAML object can still be the wrong
31
+ request body shape. The HTTP reference gives the exact fields.
32
+ 5. Keep edits local to the intended entity. `order` is a numeric relative
33
+ ordering, so spaced values allow insertion without renumbering siblings.
34
+ Keep filenames portable and unique case-insensitively; a display `name`
35
+ can preserve characters that cannot appear in a filename. Renaming a request
36
+ also requires checking its examples path.
37
+ 6. Save examples for behavior consumers need to understand or simulate.
38
+ Their schemas feed **api-documentation**, **api-mocking**, and
39
+ **ai-readiness**; structural validity alone does not make an example
40
+ accurate or useful. Assertions derived from the contract belong with the
41
+ request through **api-testing**.
42
+
43
+ ## Verification
44
+
45
+ Run `postman collection lint <collection-path>` for collection changes and
46
+ `postman environment lint <path>` for environment changes. Then inspect the
47
+ diff for unintended scope changes; when execution is appropriate, run the
48
+ changed request through its collection to check inherited context. Report
49
+ structural validation separately from behavior verified against a target.
@@ -0,0 +1,150 @@
1
+ # HTTP collection files
2
+
3
+ Read when authoring HTTP request, example, or definition YAML. These field
4
+ shapes distinguish v3 files from exported collection JSON; validate edits with
5
+ collection lint before relying on the result.
6
+
7
+ ## Definition file (`.resources/definition.yaml`)
8
+
9
+ Optional metadata for a collection or folder:
10
+
11
+ - `$kind: "collection"` — required, even for a folder's definition.
12
+ - `name` — optional, defaults to the filesystem folder name.
13
+ - `description` — optional.
14
+ - `variables` — array of `{key, value, description?, disabled?}`. `value`
15
+ must be a string; `disabled` a boolean.
16
+ - `auth` — a single auth object `{type, credentials: [{key, value}, ...]}`,
17
+ or an array for multiAuth: `[{id, name, type, credentials, rules?}, ...]`.
18
+ - `scripts` — array of `{type, code, language: "text/javascript"}`. `type`
19
+ is one of `http:beforeRequest`, `http:afterResponse`,
20
+ `graphql:beforeQuery`, `graphql:afterResponse`, `grpc:beforeInvoke`,
21
+ `grpc:onIncomingMessage`, `grpc:afterResponse`.
22
+ - `order` — number, used for folder ordering.
23
+
24
+ ## HTTP request (`*.request.yaml`)
25
+
26
+ - `$kind: "http-request"` — required.
27
+ - `name` — optional (see naming rules below for when to include it).
28
+ - `order` — number; only used for relative comparison, so space values out
29
+ (e.g. multiples of 1000) rather than packing them tight — a later
30
+ insertion between two requests shouldn't force renumbering every sibling.
31
+ - `url` — string, with `{{varName}}` variable syntax.
32
+ - `method` — `GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS`.
33
+ - `headers` — array of `{key, value, description?, disabled?}`.
34
+ - `queryParams` — array of `{key, value, description?, disabled?}`.
35
+ - `pathVariables` — array of `{key, value, description?}`.
36
+ - `body` — `{type, content}`; `type` required whenever `body` is present.
37
+ - Types: `json`, `formdata`, `urlencoded`, `text`, `xml`, `html`,
38
+ `javascript`, `file`, `none`.
39
+ - `json`/`text`/`xml`/`html`/`javascript`: `content` is a string.
40
+ - `formdata`: `content` is an array of
41
+ `{key, type: "text"|"file", value or src, contentType?, description?}`.
42
+ - `urlencoded`: `content` is an array of `{key, value, description?}`.
43
+ - `auth` — `{type, credentials}`.
44
+ - `settings` —
45
+ `{protocolVersion?, strictSSL?, followRedirects?, maxRedirects?, disabledSystemHeaders?}`.
46
+ - `scripts` — array of `{type: "beforeRequest"|"afterResponse", code, language: "text/javascript"}`.
47
+ - `examples` — optional, a relative path to the examples directory, e.g.
48
+ `./.resources/<request-name>.resources/examples/`.
49
+
50
+ ## HTTP example (`*.example.yaml`)
51
+
52
+ - `$kind: "http-example"` — required.
53
+ - `name` — optional.
54
+ - `request: {url, method}`.
55
+ - `response: {statusCode, statusText, headers: [{key, value}], body: {type, content}}`.
56
+ - `order` — optional.
57
+
58
+ Saved examples are what `collection ai-readiness` checks for — a request
59
+ with no examples scores worse for agent consumption even if perfectly
60
+ valid structurally.
61
+
62
+ ## Environments (`postman/environments/*.environment.yaml`)
63
+
64
+ Environment files are v3 YAML but are not collection entities: they do not use
65
+ `$kind`. Before creating or editing one by hand, read
66
+ [reference/environment.md](environment.md) for the schema, secret
67
+ handling, CLI-first edit commands, and a linted example.
68
+
69
+ ## YAML rules
70
+
71
+ Invalid YAML breaks parsing silently in confusing ways — when in doubt,
72
+ single-quote it:
73
+
74
+ 1. Single-quote any value containing `{{variables}}`:
75
+ `url: '{{base_url}}/users'` — never leave it unquoted.
76
+ 2. Single-quote values containing `: # & * ! [ ] { } > |`, e.g.
77
+ `name: 'Health check: v2'`.
78
+ 3. Multi-line content (JSON bodies, scripts, queries) uses a `|-` block
79
+ scalar:
80
+ ```yaml
81
+ body:
82
+ type: json
83
+ content: |-
84
+ {
85
+ "name": "example"
86
+ }
87
+ ```
88
+ 4. Quote strings that resemble booleans/numbers when a string is intended:
89
+ `value: "true"`, `value: "123"`.
90
+ 5. `order` must be a bare number, never quoted: `order: 1000`.
91
+ 6. Single-quote file paths and use forward slashes only:
92
+ `examples: './.resources/name.resources/examples'`.
93
+
94
+ ## Naming rules
95
+
96
+ - `<request-name>` (the filename stem before `.request.yaml`) must not
97
+ contain `/ \ : * ? " < > |` — sanitize to `-`.
98
+ - Include `name` in the file only when it differs from `<request-name>`
99
+ (e.g. `name: 'Health/check'` inside `Health-check.request.yaml`, since the
100
+ filename itself can't hold the `/`).
101
+ - Filenames must be unique, case-insensitively, per directory.
102
+
103
+ ## Worked example: "bookstore api"
104
+
105
+ `postman/collections/bookstore api/get all books.request.yaml`
106
+ ```yaml
107
+ $kind: http-request
108
+ method: GET
109
+ url: '{{base_url}}/books'
110
+ order: 1000
111
+ ```
112
+
113
+ `postman/collections/bookstore api/get-book-by-id.request.yaml`
114
+ ```yaml
115
+ $kind: http-request
116
+ name: 'get book by :id'
117
+ method: GET
118
+ url: '{{base_url}}/books/:id'
119
+ order: 2000
120
+ pathVariables:
121
+ - key: id
122
+ value: '1'
123
+ ```
124
+
125
+ `postman/collections/bookstore api/add new book.request.yaml`
126
+ ```yaml
127
+ $kind: http-request
128
+ method: POST
129
+ url: '{{base_url}}/books'
130
+ order: 3000
131
+ headers:
132
+ - key: Content-Type
133
+ value: application/json
134
+ body:
135
+ type: json
136
+ content: |-
137
+ {
138
+ "title": "Example Book",
139
+ "author": "Jane Doe"
140
+ }
141
+ ```
142
+
143
+ `postman/collections/bookstore api/.resources/definition.yaml`
144
+ ```yaml
145
+ $kind: collection
146
+ name: Bookstore API
147
+ variables:
148
+ - key: base_url
149
+ value: 'https://api.bookstore.com/v1'
150
+ ```