@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.
- package/README.md +32 -8
- package/dist/hosts/antigravity.js +47 -0
- package/dist/hosts/copilot.js +60 -0
- package/dist/hosts/index.js +3 -1
- package/mcp.pi.json +2 -2
- package/package.json +1 -1
- package/skills/ai-readiness/SKILL.md +40 -44
- package/skills/api-discovery/SKILL.md +64 -145
- package/skills/api-discovery/reference/orbit.md +17 -5
- package/skills/api-documentation/SKILL.md +41 -46
- package/skills/api-engineer/SKILL.md +78 -23
- package/skills/api-mocking/SKILL.md +117 -163
- package/skills/api-monitoring/SKILL.md +52 -129
- package/skills/api-simulation/SKILL.md +130 -178
- package/skills/api-simulation/reference/sim_yaml_schema.md +41 -103
- package/skills/api-testing/SKILL.md +48 -95
- package/skills/bootstrap/SKILL.md +123 -224
- package/skills/ci-integration/SKILL.md +53 -113
- package/skills/collection-schema-v3/SKILL.md +43 -204
- package/skills/collection-schema-v3/reference/http.md +150 -0
- package/skills/datasets/SKILL.md +89 -315
- package/skills/datasets/reference/spreadsheets.md +25 -0
- package/skills/flows/SKILL.md +57 -206
- package/skills/flows/reference/flow_cli_flags.md +3 -2
- package/skills/performance-testing/SKILL.md +46 -62
- package/skills/performance-testing/references/jmeter-import/README.md +113 -0
- package/skills/performance-testing/references/jmeter-import/import-report.md +52 -0
- package/skills/performance-testing/references/jmeter-import/mapping-table.md +97 -0
- package/skills/performance-testing/references/jmeter-import/postman-perf-capabilities.md +56 -0
- package/skills/performance-testing/references/jmeter-import/script-translation.md +98 -0
- package/skills/performance-testing/references/jmeter-import/scripts/groovy_to_js.py +83 -0
- package/skills/performance-testing/references/jmeter-import/scripts/jmx_to_postman.py +1433 -0
- package/skills/postman-mcp-server/SKILL.md +53 -59
- package/skills/postman-mcp-server/references/docs.md +0 -1
- package/skills/postman-mcp-server/references/learn.md +10 -9
- package/skills/postman-mcp-server/references/mock.md +0 -1
- package/skills/postman-mcp-server/references/search.md +0 -1
- package/skills/postman-mcp-server/references/security.md +0 -1
- package/skills/postman-mcp-server/references/setup.md +0 -1
- package/skills/postman-mcp-server/references/sync.md +0 -1
- package/skills/postman-mcp-server/references/test.md +0 -1
- package/skills/variables/SKILL.md +44 -87
- package/skills/webhook-testing/SKILL.md +103 -0
- package/skills/webhook-testing/reference/forwarding.md +10 -0
- package/skills/webhook-testing/reference/outbound_webhooks.md +25 -0
- package/skills/webhook-testing/reference/webhook_scripts.md +163 -0
|
@@ -1,230 +1,129 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bootstrap
|
|
3
|
-
description:
|
|
3
|
+
description: Use when resolving Postman CLI setup, authentication, or a repository workspace binding; initializing local API files; handling a CLI error that says an operation isn't allowed because of insufficient entitlements; or importing, pulling, pushing, syncing, or sharing workspace resources. Reuses existing context and chooses sync direction without duplicating a workspace or rebinding a dependency. Use for requests such as "set up Postman for this repo".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Bootstrap Postman for This Repo
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
Read `.postman/resources.yaml` for `localResources` and `workspace.id`, and
|
|
132
|
-
inspect the local `postman/` tree. When the user names an existing workspace or
|
|
133
|
-
asks to import, sync, or share one, use `workspace list --json` and `workspace
|
|
134
|
-
get <id> --elements --json` to confirm the workspace side. Also establish
|
|
135
|
-
whether that workspace owns the service represented by this repository. Never
|
|
136
|
-
create a second workspace merely because this repository is not connected yet,
|
|
137
|
-
and never replace this repository's binding with another service's workspace.
|
|
138
|
-
|
|
139
|
-
Prefer filesystem-first work. For the current service, materialize its existing
|
|
140
|
-
workspace with `workspace pull <id>`, or create and bind one with `postman init
|
|
141
|
-
--json --visibility <personal|team>` when no workspace exists. For another
|
|
142
|
-
service, use `postman dependency add <type> <name-or-id>` as described in
|
|
143
|
-
`api-discovery`. Then inspect, edit, diff, and validate the version-controlled
|
|
144
|
-
files before any push.
|
|
145
|
-
|
|
146
|
-
| Existing state and intent | Use | Why |
|
|
147
|
-
| --- | --- | --- |
|
|
148
|
-
| No workspace exists; create and bind one | `postman init --json --visibility <personal|team>` or `postman workspace create --visibility <value>` | Creates and binds the owning workspace; the init path also creates the git-native filesystem. |
|
|
149
|
-
| The current service's workspace exists; enable filesystem work in its repository | `postman workspace pull <workspace-id>` | Connects the owning workspace to the repository and materializes its entities under `postman/`. |
|
|
150
|
-
| The current service's workspace exists; record only the Git binding | `postman workspace connect-git <workspace-id> [path]` | Binds its repository without downloading its contents. |
|
|
151
|
-
| Another service's resource is needed here | `postman dependency add <type> <name-or-id>`; add `--workspace <workspace-id>` when resolving a name in a specific workspace | Declares and downloads only that collection, environment, or mock without rebinding this repository or pulling the other service's whole workspace. |
|
|
152
|
-
| Bound workspace; the workspace is authoritative | `postman workspace pull` | Refreshes local files from the connected workspace. |
|
|
153
|
-
| Bound workspace; local files are authoritative | `postman workspace diff --push-strategy default`, then `postman workspace push` | Persists the local API context for future work and sharing with others by publishing creates/updates without deleting unmatched workspace entities. |
|
|
154
|
-
| “Share this existing workspace with my team” and it is already team-accessible | Diff, then `postman workspace push` | Persists local context in the existing workspace so teammates can share and build on it; `create` would make a duplicate. |
|
|
155
|
-
|
|
156
|
-
If “share” also requires changing a personal workspace's visibility or team
|
|
157
|
-
permissions, inspect its metadata first. `push` synchronizes entities; it does
|
|
158
|
-
not change access control. Do not create a replacement to work around a missing
|
|
159
|
-
metadata-update command.
|
|
160
|
-
|
|
161
|
-
`workspace diff` is read-only. Match its push strategy to the intended push.
|
|
162
|
-
`--push-strategy force-sync` can delete workspace entities absent locally, so use it
|
|
163
|
-
only when the user explicitly requests mirroring and approves the shown
|
|
164
|
-
deletions. Do not add `-y` merely to bypass a prompt.
|
|
165
|
-
|
|
166
|
-
### 2.3 Initialize only when there is no workspace to pull
|
|
167
|
-
|
|
168
|
-
`postman init --json` is the agent-facing form. It writes
|
|
169
|
-
`.postman/resources.yaml` and scaffolds `postman/` for specs, collections and
|
|
170
|
-
environments. Downstream skills read that file and nothing else.
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
postman init --json --visibility personal
|
|
174
|
-
postman init --json --visibility team
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Use `--visibility` only when a new workspace is actually wanted. If the
|
|
178
|
-
current service's workspace already exists, use `pull` from that service's
|
|
179
|
-
repository to enable the filesystem workflow. If the existing workspace
|
|
180
|
-
belongs to another service, use it as a dependency instead. Use `push` only
|
|
181
|
-
when publishing local changes to an already-bound workspace.
|
|
182
|
-
|
|
183
|
-
Without `--visibility`, interactive init prompts for the workspace step, while
|
|
184
|
-
`--json` skips that step because it may not prompt. Use `--visibility` when an
|
|
185
|
-
agent should create and bind a workspace non-interactively; omit it when a
|
|
186
|
-
local-only setup is intended.
|
|
187
|
-
|
|
188
|
-
**Read the payload, not stderr.** Take `bindings` and `exitCode` from the JSON.
|
|
189
|
-
Each binding reports a `source` of `inferred` or `none` — an inferred spec is a
|
|
190
|
-
guess worth confirming before building on it.
|
|
191
|
-
|
|
192
|
-
**Exit codes that are not failures:** 2 means several specs could be
|
|
193
|
-
authoritative, so re-run with `--spec <path>`. 5 means the local files were
|
|
194
|
-
written but the requested workspace was not created — it does *not* mean re-run.
|
|
195
|
-
|
|
196
|
-
## 3. Verify and report
|
|
197
|
-
|
|
198
|
-
### 3.1 Checkpoints
|
|
199
|
-
|
|
200
|
-
- `postman --version` returned a real version.
|
|
201
|
-
- Auth is confirmed, or established as not required for this task.
|
|
202
|
-
- `.postman/resources.yaml` names a spec or a collections directory.
|
|
203
|
-
- When workspace creation was requested or the repository was already bound,
|
|
204
|
-
`workspace.id` is set to the owning workspace. A deliberately local-only
|
|
205
|
-
init may omit it.
|
|
206
|
-
- After `pull`, expected workspace entities exist under `postman/`. After
|
|
207
|
-
`push`, report created/updated entities and conflicts; do not claim a
|
|
208
|
-
workspace is shared unless its access level permits the intended teammates.
|
|
209
|
-
|
|
210
|
-
"The CLI is installed" is not the bar, and a loaded skill configures nothing.
|
|
211
|
-
|
|
212
|
-
### 3.2 Summary format
|
|
213
|
-
|
|
214
|
-
```md
|
|
215
|
-
## Postman bootstrap
|
|
216
|
-
- **CLI**: <version> (latest: <version> | not checked)
|
|
217
|
-
- **Auth**: <api-key | browser | not required for this task>
|
|
218
|
-
- **Workspace**: <id | not requested | creation failed: reason>
|
|
219
|
-
- **Spec path**: <path (inferred | explicit) | none — user must create>
|
|
220
|
-
- **Collections dir**: <path | none — user must create>
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
# Reference Files
|
|
226
|
-
|
|
227
|
-
- `collection-schema-v3` skill — read when inspecting or writing the
|
|
228
|
-
collection files this skill resolves.
|
|
229
|
-
- [CLI Installation](reference/cli_installation.md) — read for install, update
|
|
230
|
-
and uninstall commands per platform.
|
|
8
|
+
A local Postman project puts contracts, runnable requests, environments, and
|
|
9
|
+
mocks beside implementation code so they can be inspected, diffed, and reviewed
|
|
10
|
+
in a PR. A workspace binding connects that work to maintained shared context.
|
|
11
|
+
Setup is useful when it resolves a missing capability or binding; a local API
|
|
12
|
+
check does not need a new workspace merely to proceed.
|
|
13
|
+
|
|
14
|
+
## Resolve only the missing setup
|
|
15
|
+
|
|
16
|
+
Inspect `postman --version`, `.postman/resources.yaml`, and the relevant
|
|
17
|
+
`postman/` files before installing or initializing. Existing files are clues,
|
|
18
|
+
not proof that paths and workspace IDs still describe this service. Preserve
|
|
19
|
+
confirmed bindings for downstream skills rather than rediscovering them.
|
|
20
|
+
|
|
21
|
+
**api-engineer**, **api-documentation**, **api-mocking**, **api-testing**, and
|
|
22
|
+
**ci-integration** depend on this skill only for unresolved setup, authentication,
|
|
23
|
+
or bindings. After resolving those prerequisites, return to the requesting
|
|
24
|
+
skill's workflow; local work with confirmed setup can skip bootstrap entirely.
|
|
25
|
+
|
|
26
|
+
If the CLI is missing, use `npm install -g postman-cli` or the applicable
|
|
27
|
+
[platform installer](reference/cli_installation.md). Update an existing CLI
|
|
28
|
+
through its original installation route; installing a second copy can leave
|
|
29
|
+
the shell invoking the old binary. If installation is blocked, report the
|
|
30
|
+
constraint and use **postman-mcp-server** for supported hosted operations.
|
|
31
|
+
|
|
32
|
+
Use `postman <resource> <action> -h` to resolve flags and defaults for the
|
|
33
|
+
installed CLI; cached examples can describe another version. Compare versions
|
|
34
|
+
when diagnosing a missing capability rather than making an update a universal
|
|
35
|
+
prerequisite. Spec lint belongs to `postman spec lint`; the deprecated
|
|
36
|
+
`postman api` surface is not interchangeable.
|
|
37
|
+
|
|
38
|
+
Local file operations need no normal login. `postman init` uses an agent-scoped
|
|
39
|
+
session, so logging in first adds no value to that branch. Authenticate when
|
|
40
|
+
an operation needs existing workspace resources: use
|
|
41
|
+
`postman login --with-api-key "$POSTMAN_API_KEY"` when the key is already in
|
|
42
|
+
the environment, otherwise `postman login`. Keep credential values out of
|
|
43
|
+
logs and committed files; **variables** owns request-secret handling.
|
|
44
|
+
|
|
45
|
+
## Owning workspace versus dependency
|
|
46
|
+
|
|
47
|
+
Read `localResources` and `workspace.id` in `.postman/resources.yaml`. When
|
|
48
|
+
working with an existing workspace, inspect its identity and elements with
|
|
49
|
+
`workspace list --json` and `workspace get <id> --elements --json`.
|
|
50
|
+
The owning workspace represents this repository's service; another service's
|
|
51
|
+
resource is a dependency. That distinction determines which context can be
|
|
52
|
+
pulled without replacing the repository's binding.
|
|
53
|
+
|
|
54
|
+
| State and intended outcome | Operation |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| Existing local layout meets the task | Reuse its files and bindings |
|
|
57
|
+
| This service has a workspace; work on it locally | `postman workspace pull <workspace-id>` |
|
|
58
|
+
| Only record this service's Git binding | `postman workspace connect-git <workspace-id> [path]` |
|
|
59
|
+
| Another service's collection, environment, or mock is needed | Use **api-discovery**'s dependency workflow |
|
|
60
|
+
| New project with no existing workspace | `postman init --json`; add `--visibility personal` or `--visibility team` when creating a workspace is intended |
|
|
61
|
+
| Bound workspace is authoritative | `postman workspace pull` |
|
|
62
|
+
| Validated local changes should be published | Preview with `postman workspace diff --push-strategy default`, then `postman workspace push` |
|
|
63
|
+
|
|
64
|
+
Inspect local changes before pulling so an import does not discard work.
|
|
65
|
+
Creating a second workspace does not connect an existing one, and pushing to a
|
|
66
|
+
workspace does not grant teammates access. If sharing requires a visibility
|
|
67
|
+
or permission change, inspect that metadata and resolve the access change
|
|
68
|
+
separately rather than creating a replacement.
|
|
69
|
+
|
|
70
|
+
`workspace diff` is read-only; use the strategy planned for the push.
|
|
71
|
+
The default push creates/updates entities without deleting unmatched ones.
|
|
72
|
+
`--push-strategy force-sync` can delete entities absent locally and belongs
|
|
73
|
+
only to explicitly requested mirroring with the shown deletions approved.
|
|
74
|
+
A request to publish supplies consent for its scoped push; otherwise obtain
|
|
75
|
+
consent after the diff is reviewable. See **ci-integration** for publishing
|
|
76
|
+
reviewed changes after merge.
|
|
77
|
+
|
|
78
|
+
## Interpret initialization without losing partial success
|
|
79
|
+
|
|
80
|
+
Run init inside the intended repository. It scaffolds Postman files and
|
|
81
|
+
`.postman/resources.yaml`; API implementation and a starter contract are
|
|
82
|
+
separate work, not prerequisites to setup.
|
|
83
|
+
|
|
84
|
+
`--json` avoids interactive prompts. Without `--visibility` it skips workspace
|
|
85
|
+
creation; with it, creation and binding are requested. Read `bindings` and
|
|
86
|
+
`exitCode` from the JSON payload. A binding marked `inferred` is a candidate
|
|
87
|
+
contract, not a confirmed source of truth. Exit 2 means multiple specs need
|
|
88
|
+
selection with `--spec <path>`. Exit 5 means local files were written but
|
|
89
|
+
workspace creation failed; inspect that partial result before retrying.
|
|
90
|
+
|
|
91
|
+
## Subscription or usage limit
|
|
92
|
+
|
|
93
|
+
A CLI command can fail because the user's subscription does not allow the
|
|
94
|
+
operation or its credits or usage quota are exhausted. There is no fixed
|
|
95
|
+
message for this; recognize wording such as "usage limit exceeded", "usage
|
|
96
|
+
quota has been exceeded", or "reached" or "breached" or "exceeded" a limit for the account,
|
|
97
|
+
team, or a plan-governed operation. Also recognize plan-dependent caps phrased
|
|
98
|
+
as an operation that "does not allow more than" or "requires at least" a stated
|
|
99
|
+
amount. Do not classify a temporary rate limit or a fixed per-resource
|
|
100
|
+
validation cap as a subscription limit. Retrying will not clear a subscription
|
|
101
|
+
limit, so stop retrying and run `postman whoami` to see whose session the CLI
|
|
102
|
+
is using.
|
|
103
|
+
|
|
104
|
+
If it reports a guest session ("Using Postman as a guest", or
|
|
105
|
+
`"status": "guest"` with `--json`), such as the one `postman init` creates
|
|
106
|
+
without a login, tell the user - so do it explicitly and cleanly in a new paragraph,
|
|
107
|
+
that they need to sign up for a Postman account to get more credits and continue work,
|
|
108
|
+
which also keeps the work done as a guest.
|
|
109
|
+
If you run it for them, `postman signup --json` prints a `claimUrl`
|
|
110
|
+
to hand over and then waits until they finish signing up in the browser.
|
|
111
|
+
Ask the user if they want you to initiate signup for them.
|
|
112
|
+
|
|
113
|
+
If the whoami probe reports a signed-in account, then explicitly and cleanly in a new paragraph,
|
|
114
|
+
tell the user that they need to upgrade their plan, and that they can do so at
|
|
115
|
+
https://postman.postman.co/settings/team/billing.
|
|
116
|
+
|
|
117
|
+
## Verification
|
|
118
|
+
|
|
119
|
+
Report the working CLI, relevant paths, and actual binding or remaining gap.
|
|
120
|
+
For a pull, confirm the intended entities appeared locally; for a push, report
|
|
121
|
+
created/updated entities and conflicts. Installation alone does not establish
|
|
122
|
+
a usable project, and successful sync does not establish teammate access.
|
|
123
|
+
|
|
124
|
+
## Reporting CLI and skill gaps
|
|
125
|
+
|
|
126
|
+
Concrete reports help fix recurring CLI failures and misleading skill guidance.
|
|
127
|
+
When actual use exposes one, handle the user's task first, then report the gap
|
|
128
|
+
with `postman feedback`. Include a sanitized reproduction and the expected and
|
|
129
|
+
observed behavior; exclude secrets, user data, and proprietary content.
|
|
@@ -1,122 +1,62 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ci-integration
|
|
3
|
-
description:
|
|
3
|
+
description: Use when adding API tests, structural or governance lint, or AI-readiness gates to CI, or publishing reviewed API artifacts to a Postman workspace after merge. Makes contract checks repeatable and separates validation from shared workspace changes. Use for requests such as "run this collection on every PR".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# CI Integration
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## AI readiness threshold
|
|
56
|
-
|
|
57
|
-
`collection ai-readiness <path> --min-score <n>` and its spec-side
|
|
58
|
-
counterpart `spec ai-readiness <path> --min-score <n>` (see `ai-readiness`
|
|
59
|
-
skill) are a fourth, separate gate — they score AI-agent consumability, not
|
|
60
|
-
test results or governance/structural style. Keep either in its own step:
|
|
61
|
-
folding it into the same step as `run` or one of the `lint` verbs above
|
|
62
|
-
hides which kind of check actually failed when the job goes red. Pick the
|
|
63
|
-
verb that matches what's checked into the repo — `collection ai-readiness`
|
|
64
|
-
for a git-synced collection, `spec ai-readiness` for an OpenAPI spec with no
|
|
65
|
-
collection generated from it yet.
|
|
66
|
-
|
|
67
|
-
```yaml
|
|
68
|
-
- run: postman collection ai-readiness ./postman/collections/My\ API --min-score 70
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Critical Rules
|
|
72
|
-
|
|
73
|
-
1. **Never collapse `run`, `lint`, and `ai-readiness` into one step, and
|
|
74
|
-
never pass `-x`/`--suppress-exit-code` to a CI run.** One combined exit
|
|
75
|
-
code hides which check broke; a suppressed one hides that anything broke
|
|
76
|
-
at all.
|
|
77
|
-
2. **Gate `workspace push` to the merge event, never a PR event.** Everything
|
|
78
|
-
else in this skill is read-only against the cloud; this is the one
|
|
79
|
-
command that writes to it, so a PR-triggered push ships an unmerged
|
|
80
|
-
branch's entities to the shared workspace.
|
|
81
|
-
3. **`--push-strategy force-sync` deletes cloud entities absent locally.**
|
|
82
|
-
Only add it to a job whose explicit job is mirroring the workspace exactly,
|
|
83
|
-
with that intent confirmed — never as the default merge step, where the
|
|
84
|
-
default (create/update-only) strategy is the safe choice.
|
|
85
|
-
4. **Authenticate once, non-interactively:**
|
|
86
|
-
`postman login --with-api-key "$POSTMAN_API_KEY"`, reading the key from
|
|
87
|
-
the CI provider's secret store. Don't reach for `collection run`'s
|
|
88
|
-
`--postman-api-key` as the general answer — it's US-region only — and
|
|
89
|
-
`spec lint`/`workspace push` don't take it at all.
|
|
90
|
-
|
|
91
|
-
```yaml
|
|
92
|
-
# WRONG — key committed in plain text, and scoped to one command anyway
|
|
93
|
-
- run: postman collection run api.json --postman-api-key PMAK-abc123...
|
|
94
|
-
|
|
95
|
-
# CORRECT — one non-interactive login, key from the provider's secret store
|
|
96
|
-
- run: postman login --with-api-key "$POSTMAN_API_KEY"
|
|
97
|
-
- run: postman collection run api.json
|
|
98
|
-
- run: postman spec lint spec.yaml --workspace-id $WS -f error
|
|
99
|
-
```
|
|
100
|
-
5. **Never `newman run` in place of `postman collection run`.** The CLI is
|
|
101
|
-
the supported runner every other skill here assumes; Newman forks the
|
|
102
|
-
toolchain and skips whatever reporting/governance depends on the CLI
|
|
103
|
-
specifically.
|
|
8
|
+
Versioned collections and specs let a PR carry its API checks beside the code
|
|
9
|
+
change. CI reruns those checks independently of the author's session, while
|
|
10
|
+
publishing after merge makes the reviewed contract available to teammates and
|
|
11
|
+
future work. **api-discovery** helps identify consumers the gate should cover;
|
|
12
|
+
the author's own passing tests do not establish cross-service compatibility.
|
|
13
|
+
|
|
14
|
+
1. Select checks by the guarantee they establish:
|
|
15
|
+
|
|
16
|
+
| Guarantee | Gate |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| Saved behavioral assertions pass | `postman collection run <path-or-id>` |
|
|
19
|
+
| A collection's structure/style is valid | `postman collection lint <path> -f error` |
|
|
20
|
+
| A spec meets workspace governance rules | `postman spec lint <spec> --workspace-id <id> -f error` |
|
|
21
|
+
| Workspace entities and bindings pass lint/governance | `postman workspace lint --workspace-id <id> -f error` |
|
|
22
|
+
| Agent consumability meets an agreed threshold | `postman collection ai-readiness <path> --min-score <n>` or the spec equivalent |
|
|
23
|
+
|
|
24
|
+
Collection lint does not apply organization governance. Workspace-aware
|
|
25
|
+
lint evaluates the rules available to that workspace; it does not author
|
|
26
|
+
the policy. Confirm the intended rules are configured before claiming
|
|
27
|
+
compliance. Read command-specific `-h` for installed options.
|
|
28
|
+
2. Keep gate results distinguishable so a failed build identifies behavior,
|
|
29
|
+
structure, governance, or readiness. Preserve nonzero exits; suppressing
|
|
30
|
+
them with `-x`/`--suppress-exit-code` removes the gate. For collection runs,
|
|
31
|
+
`-r junit,html` produces reviewable reports; `--bail` trades a complete
|
|
32
|
+
failure inventory for an earlier signal. See **api-testing** for assertion
|
|
33
|
+
semantics and **ai-readiness** for score limitations.
|
|
34
|
+
3. Restore declared dependencies with `postman dependency install` when tests
|
|
35
|
+
use them. Choose the target deliberately: a mock checks behavior under a
|
|
36
|
+
model, while a live run sends real requests and can write data. PR gates
|
|
37
|
+
should use a suitable isolated target and credentials; being a test does
|
|
38
|
+
not make the command read-only.
|
|
39
|
+
4. Authenticate only jobs that need workspace resources. Use the CI secret
|
|
40
|
+
store to supply `POSTMAN_API_KEY`, then
|
|
41
|
+
`postman login --with-api-key "$POSTMAN_API_KEY"`. A local-only gate need
|
|
42
|
+
not log in. Command-specific API-key flags are not a general replacement
|
|
43
|
+
for login across lint and push operations. Use **bootstrap** for unresolved
|
|
44
|
+
bindings, and **variables** for request credentials.
|
|
45
|
+
5. Publish only the reviewed branch after its merge checks pass.
|
|
46
|
+
`postman workspace push -y` changes shared context; a PR-triggered push
|
|
47
|
+
would publish an unmerged contract. The normal prepare phase assigns IDs
|
|
48
|
+
to new entities, so `--no-prepare` can leave additions unpublished.
|
|
49
|
+
Inspect the intended diff and binding when configuring this job; `-y`
|
|
50
|
+
supplies noninteractive execution, not authorization for a different scope.
|
|
51
|
+
6. Use the default create/update strategy unless exact mirroring is the
|
|
52
|
+
explicit requirement. `--push-strategy force-sync` can delete workspace
|
|
53
|
+
entities absent from the checkout, including resources managed elsewhere.
|
|
54
|
+
Follow **bootstrap**'s diff and consent boundary for that branch.
|
|
104
55
|
|
|
105
56
|
## Verification
|
|
106
57
|
|
|
107
|
-
|
|
108
|
-
which
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
`Created`/`Updated` per entity rather than just "push succeeded." Confirm
|
|
113
|
-
no secret value appears literally in the committed workflow file.
|
|
114
|
-
|
|
115
|
-
## Reference
|
|
116
|
-
|
|
117
|
-
- `api-testing` skill — `collection run`'s exit-code semantics and reporter
|
|
118
|
-
flags in full.
|
|
119
|
-
- `collection-schema-v3` skill — what `workspace push` is actually pushing.
|
|
120
|
-
- `bootstrap` skill — CLI resolution, workspace linking, `.postman/resources.yaml`.
|
|
121
|
-
- `ai-readiness` skill — `collection ai-readiness`, `spec ai-readiness`, and
|
|
122
|
-
their `--min-score` gate.
|
|
58
|
+
Validate the workflow's event conditions and secret references, then report
|
|
59
|
+
which gates actually ran, their targets and individual results. Distinguish a
|
|
60
|
+
locally checked workflow from an observed CI run. For publication, establish
|
|
61
|
+
the merge trigger, push strategy, created/updated entities, and conflicts;
|
|
62
|
+
a green job alone does not prove the intended artifacts became available.
|