@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
package/README.md CHANGED
@@ -24,12 +24,22 @@ Install Postman in every compatible coding agent detected on your machine:
24
24
  npx @postman/postman-plugin
25
25
  ```
26
26
 
27
- One command configures **Claude Code, Codex, Cursor, Factory Droid, Kimi Code,
28
- OpenCode and Pi**. Run it again to update, `status` to see what's installed,
27
+ One command configures **Antigravity, Claude Code, Codex, GitHub Copilot CLI, Cursor,
28
+ Factory Droid, Kimi Code, OpenCode and Pi**. Run it again to update, `status` to see what's installed,
29
29
  and `remove` to uninstall; `--agent <id>` limits any of them to one agent.
30
30
 
31
31
  You can also use the following commands to install individually:
32
32
 
33
+ ### Antigravity
34
+
35
+ ```bash
36
+ agy plugin install https://github.com/postmanlabs/postman-plugin
37
+ ```
38
+
39
+ Run the same command again to update; `agy plugin uninstall postman` removes it.
40
+ In the Antigravity app, **Customizations → Plugins → + Install from URL** takes
41
+ the same URL.
42
+
33
43
  ### Claude Code
34
44
 
35
45
  [View Postman on Claude Plugins](https://claude.com/plugins/postman)
@@ -60,6 +70,16 @@ codex plugin add postman@postman
60
70
  /add-plugin postman
61
71
  ```
62
72
 
73
+ ### GitHub Copilot CLI
74
+
75
+ ```bash
76
+ copilot plugin marketplace add postmanlabs/postman-plugin
77
+ copilot plugin install postman@postman
78
+ ```
79
+
80
+ `copilot plugin marketplace update postman`, then `copilot plugin update postman`, updates it. Sign in to Postman's MCP server
81
+ with `/mcp` inside a Copilot CLI session.
82
+
63
83
  ### Factory Droid
64
84
 
65
85
  ```bash
@@ -172,15 +192,19 @@ test consumers without waiting for the real service to be ready or available.
172
192
 
173
193
  The mock stays local until you choose to push and deploy it. When teammates or
174
194
  external systems need access, the same mock can become a durable hosted URL
175
- without rebuilding it in another tool.
195
+ without rebuilding it in another tool. Pushed to the service's own workspace,
196
+ it's the mock other teams' simulations pull first.
176
197
 
177
198
  ### Develop against simulated dependencies
178
199
 
179
- The [`api-simulation`](https://github.com/postmanlabs/postman-plugin/blob/main/skills/api-simulation/) skill is the local loop for a
180
- service change: find every dependency the service calls, mock each one (reusing
181
- the owning team's mock when they publish one), serve them on one port from one
182
- `.sim.yaml`, run the real service against them, test, and push. It needs
183
- Postman CLI 1.70.0 or later:
200
+ The [`api-simulation`](https://github.com/postmanlabs/postman-plugin/blob/main/skills/api-simulation/) skill runs your code (a service
201
+ you're changing, a frontend, a test suite or a demo) for real against stand-ins
202
+ for the HTTP services it calls, served together on one port from one
203
+ `.sim.yaml`. Each stand-in is the owning team's mock when they publish one.
204
+ It reuses an existing `.sim.yaml`, proves a change with a request through the
205
+ changed path, and answers "what happens if X goes down" by running each failure.
206
+ Pushing the simulation is optional and needs your approval. It needs Postman CLI
207
+ 1.70.0 or later:
184
208
 
185
209
  ```bash
186
210
  postman simulation run postman/simulations/orders-dev.sim.yaml --port 4900
@@ -0,0 +1,47 @@
1
+ import { REPO } from '../source.js';
2
+ import { guard, mustProbeJson, mustRun, parseJson } from './shared.js';
3
+ import { result } from './types.js';
4
+ // `agy plugin install` clones a git URL into ~/.gemini/config/plugins/<name>. It has no update
5
+ // command; installing again replaces the copy in place, so a re-run is the update.
6
+ const PLUGIN_NAME = 'postman', SOURCE = `https://github.com/${REPO}`, NEXT = 'Restart Antigravity for the change to take effect.';
7
+ const isOurs = (plugin) => plugin.name === PLUGIN_NAME;
8
+ export const antigravity = {
9
+ id: 'antigravity',
10
+ name: 'Antigravity',
11
+ route: '.antigravity-plugin',
12
+ async detect(system) {
13
+ return (await system.which('agy')) !== null;
14
+ },
15
+ async status(system) {
16
+ const exec = await system.probe('agy', ['plugin', 'list', '--json']), plugins = exec.code === 0 ? parseJson(exec.stdout) : null;
17
+ if (!Array.isArray(plugins)) {
18
+ return { installed: null, detail: 'could not read `agy plugin list --json`', notes: [] };
19
+ }
20
+ const installed = plugins.find(isOurs);
21
+ if (!installed) {
22
+ return { installed: false, detail: 'not installed', notes: [] };
23
+ }
24
+ return {
25
+ installed: true,
26
+ detail: `${PLUGIN_NAME} ${installed.version ?? ''}`.trim(),
27
+ notes: installed.enabled === false ? ['installed but disabled; run `agy plugin enable postman`'] : []
28
+ };
29
+ },
30
+ install(system) {
31
+ return guard(async () => {
32
+ const plugins = await mustProbeJson(system, 'agy', ['plugin', 'list', '--json']), current = plugins.some(isOurs);
33
+ await mustRun(system, 'agy', ['plugin', 'install', SOURCE]);
34
+ return result('done', `${current ? 'updated' : 'installed'} ${PLUGIN_NAME}`, NEXT);
35
+ });
36
+ },
37
+ remove(system) {
38
+ return guard(async () => {
39
+ const plugins = await mustProbeJson(system, 'agy', ['plugin', 'list', '--json']);
40
+ if (!plugins.some(isOurs)) {
41
+ return result('skipped', 'not installed');
42
+ }
43
+ await mustRun(system, 'agy', ['plugin', 'uninstall', PLUGIN_NAME]);
44
+ return result('done', `uninstalled ${PLUGIN_NAME}`, NEXT);
45
+ });
46
+ }
47
+ };
@@ -0,0 +1,60 @@
1
+ import { REPO } from '../source.js';
2
+ import { guard, mustProbeJson, mustRun, parseJson } from './shared.js';
3
+ import { result } from './types.js';
4
+ // Copilot CLI is deprecating direct installs (repos, URLs, local paths), so this installs from this
5
+ // repo as a marketplace, which Copilot reads from `.claude-plugin/marketplace.json`. Once Postman is
6
+ // listed in awesome-copilot, which Copilot ships registered, `postman@awesome-copilot` replaces it.
7
+ const PLUGIN_NAME = 'postman', MARKETPLACE = 'postman', PLUGIN_ID = `${PLUGIN_NAME}@${MARKETPLACE}`, NEXT = 'Restart Copilot CLI (or run /restart) for the change to take effect.';
8
+ const isOurs = (plugin) => plugin.name === PLUGIN_NAME,
9
+ // A direct install has no marketplace; it would load the same skills a second time.
10
+ isDirect = (plugin) => isOurs(plugin) && !plugin.marketplace;
11
+ export const copilot = {
12
+ id: 'copilot',
13
+ name: 'GitHub Copilot CLI',
14
+ route: '.github/plugin',
15
+ async detect(system) {
16
+ return (await system.which('copilot')) !== null;
17
+ },
18
+ async status(system) {
19
+ const exec = await system.probe('copilot', ['plugin', 'list', '--json']), plugins = exec.code === 0 ? parseJson(exec.stdout) : null;
20
+ if (!Array.isArray(plugins)) {
21
+ return { installed: null, detail: 'could not read `copilot plugin list --json`', notes: [] };
22
+ }
23
+ const installed = plugins.find(isOurs);
24
+ if (!installed) {
25
+ return { installed: false, detail: 'not installed', notes: [] };
26
+ }
27
+ return {
28
+ installed: true,
29
+ detail: `${PLUGIN_NAME} ${installed.version ?? ''}`.trim(),
30
+ notes: installed.enabled === false ? ['installed but disabled; run `copilot plugin enable postman`'] : []
31
+ };
32
+ },
33
+ install(system) {
34
+ return guard(async () => {
35
+ const plugins = await mustProbeJson(system, 'copilot', ['plugin', 'list', '--json']), marketplaces = await mustProbeJson(system, 'copilot', ['plugin', 'marketplace', 'list', '--json']), current = plugins.some((plugin) => isOurs(plugin) && plugin.marketplace === MARKETPLACE);
36
+ if (marketplaces.some((marketplace) => marketplace.name === MARKETPLACE)) {
37
+ await mustRun(system, 'copilot', ['plugin', 'marketplace', 'update', MARKETPLACE]);
38
+ }
39
+ else {
40
+ await mustRun(system, 'copilot', ['plugin', 'marketplace', 'add', REPO]);
41
+ }
42
+ // The same name can't be installed twice, so a direct install goes first.
43
+ if (plugins.some(isDirect)) {
44
+ await mustRun(system, 'copilot', ['plugin', 'uninstall', PLUGIN_NAME]);
45
+ }
46
+ await mustRun(system, 'copilot', current ? ['plugin', 'update', PLUGIN_NAME] : ['plugin', 'install', PLUGIN_ID]);
47
+ return result('done', `${current ? 'updated' : 'installed'} ${PLUGIN_ID}`, NEXT);
48
+ });
49
+ },
50
+ remove(system) {
51
+ return guard(async () => {
52
+ const plugins = await mustProbeJson(system, 'copilot', ['plugin', 'list', '--json']);
53
+ if (!plugins.some(isOurs)) {
54
+ return result('skipped', 'not installed');
55
+ }
56
+ await mustRun(system, 'copilot', ['plugin', 'uninstall', PLUGIN_NAME]);
57
+ return result('done', `uninstalled ${PLUGIN_NAME}`, NEXT);
58
+ });
59
+ }
60
+ };
@@ -1,8 +1,10 @@
1
+ import { antigravity } from './antigravity.js';
1
2
  import { claudeCode } from './claude-code.js';
2
3
  import { codex } from './codex.js';
4
+ import { copilot } from './copilot.js';
3
5
  import { cursor } from './cursor.js';
4
6
  import { factory } from './factory.js';
5
7
  import { kimi } from './kimi.js';
6
8
  import { opencode } from './opencode.js';
7
9
  import { pi } from './pi.js';
8
- export const HOSTS = [claudeCode, codex, cursor, factory, kimi, opencode, pi];
10
+ export const HOSTS = [antigravity, claudeCode, codex, copilot, cursor, factory, kimi, opencode, pi];
package/mcp.pi.json CHANGED
@@ -6,8 +6,8 @@
6
6
  "description": "Postman workspaces, collections, specs, environments, mocks and monitors",
7
7
  "headers": {
8
8
  "X-Source": "postman-pi-plugin",
9
- "X-Plugin-Version": "0.3.0",
10
- "User-Agent": "postman-pi-plugin/0.3.0"
9
+ "X-Plugin-Version": "0.4.0",
10
+ "User-Agent": "postman-pi-plugin/0.4.0"
11
11
  }
12
12
  }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman/postman-plugin",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Postman's API engineering skills for coding agents: a Pi package, and an npx installer that sets up Claude Code, Codex, Cursor, Kimi Code, Factory Droid, OpenCode and Pi.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -1,50 +1,46 @@
1
1
  ---
2
2
  name: ai-readiness
3
- description: Scores a Postman collection or an OpenAPI spec for how well an AI agent can discover, understand, call, and recover from errors with it — missing examples, undocumented errors, and ambiguous parameters all cost points. Use when the user asks "is my API agent-ready," "can AI agents use my API," "how agent-friendly is my API," or wants to scan, score, or improve a collection or spec for AI/agent consumption. Covers `postman collection ai-readiness` and `postman spec ai-readiness`.
3
+ description: Use when assessing or improving how well AI agents can discover, call, and recover from errors with an API. Scores an existing Postman collection or OpenAPI spec and turns measured gaps into contract improvements; supports a separate CI readiness threshold. Use for requests such as "is this API ready for agents".
4
4
  ---
5
5
 
6
6
  # AI Readiness
7
7
 
8
- ## Overview
9
-
10
- An "agent-ready" API is one that an AI agent can discover, understand, call correctly, and recover from errors without human intervention. Most APIs aren't there yet.
11
-
12
- Two ways to run this check, same rubric family, different target — pick by what exists:
13
-
14
- - `collection ai-readiness <collectionId/path>` scores a Postman collection
15
- — by cloud ID, local file path, or a `postman/collections/<name>`
16
- local-mode directory.
17
- - `spec ai-readiness <spec>` scores an OpenAPI specification directly — by
18
- cloud ID or local file path — with no collection involved at all.
19
-
20
-
21
-
22
- ## Scoring
23
-
24
- The command computes and prints the score itself — read the fields it
25
- gives you, don't recompute them:
26
-
27
- - **`readiness`** (score 0-100 + bucket) is the headline number. Buckets,
28
- low to high: **Limited → Fair → Good → Excellent**.
29
- - **`confidence`** (`high`/`medium`/`low`) says how many signals it
30
- could actually measure vs. had to mark `unknown` — a data-quality
31
- caveat, not part of the score.
32
-
33
- ## Interpreting Results
34
-
35
- Report the bucket, score, and confidence the command actually printed
36
- — don't infer a percentage band. Doc coverage is a modifier via its
37
- adjustment, not a separate gate; call it out by name when it's `low`,
38
- since recommendations flag that first. Also state which verb ran
39
- (`collection` vs. `spec` `ai-readiness`), which target was scored
40
- (local path vs. cloud ID), the output mode, and — if `--min-score` was
41
- set — the resulting exit code, not just "it passed."
42
-
43
- You can ask user if they would like to set this check with a min score guarantee to run on their CI.
44
-
45
- ## Reference
46
-
47
- - `collection-schema-v3` skill — what saved examples and descriptions look
48
- like in the git-synced format this command reads.
49
- - `ci-integration` skill — where `--min-score` fits as a pipeline gate
50
- alongside `spec lint`/`collection lint`/`workspace lint`.
8
+ An agent must choose an operation, supply valid inputs, and interpret failures
9
+ from the contract it can see. Postman's readiness check exposes gaps in that
10
+ context—such as missing examples or ambiguous parameters—so improvements live
11
+ in the shared contract instead of being rediscovered in each agent session.
12
+
13
+ Skip scoring for a typo fix, a one-off endpoint check, or a task that changes
14
+ neither the contract nor agent usability; inspect the relevant fields or use
15
+ **api-testing** instead. Score when prioritizing consumability improvements,
16
+ checking their effect, or enforcing an agreed readiness gate.
17
+
18
+ 1. Score the artifact consumers actually use. `postman collection ai-readiness
19
+ <path-or-id>` reads a collection, including a local v3 directory;
20
+ `postman spec ai-readiness <path-or-id>` reads an OpenAPI spec directly.
21
+ Generating a collection solely to score a spec adds a second artifact
22
+ without improving the evidence. Use the installed command's `-h` for options.
23
+ 2. Use the reported `readiness` score and bucket (Limited, Fair, Good,
24
+ Excellent). Keep `confidence` separate: low confidence means signals could
25
+ not be measured, so even a high score may leave consequential unknowns.
26
+ Report low documentation coverage when flagged; it modifies the score
27
+ rather than acting as an independent pass/fail gate.
28
+ 3. Prioritize gaps that would change a caller's behavior: unclear required
29
+ inputs, missing auth instructions, or errors with no recovery guidance.
30
+ Establish the actual behavior before adding descriptions or examples;
31
+ invented certainty can raise apparent completeness while misleading agents.
32
+ See **api-documentation** for improving the authoritative contract and
33
+ **collection-schema-v3** for saved examples.
34
+ 4. Re-run against the edited artifact to show which measured gaps closed.
35
+ A readiness score measures consumability, not live correctness; use
36
+ **api-testing** when the claim also depends on API behavior.
37
+ 5. A `--min-score` gate is useful when the team wants to prevent readiness
38
+ regressions. Choose the threshold from its baseline and expectations;
39
+ keep it separate from tests and lint through **ci-integration** so a failure
40
+ identifies the kind of regression.
41
+
42
+ ## Verification
43
+
44
+ Report the target, collection/spec mode, actual score, bucket, confidence,
45
+ and remaining gaps. If a threshold ran, include its exit code; a successful
46
+ scan alone does not establish that the threshold passed.
@@ -1,151 +1,70 @@
1
1
  ---
2
2
  name: api-discovery
3
- description: Discover and use APIs from the web or Postman. Find and integrate public third-party APIs with Orbit, locate Postman entities with search, and use the Context Graph to investigate dependencies, ownership, runtime behavior, and change impact across an API ecosystem.
3
+ description: Use when finding an API or owner, integrating a public provider, locating Postman resources, or investigating consumers and change impact across services. Turns discovered contracts and mocks into reusable dependencies and identifies evidence outside the current checkout. Use for requests such as "who consumes this endpoint".
4
4
  ---
5
5
 
6
6
  # API Discovery
7
7
 
8
- ## Overview
9
-
10
- Use this guide for any task that involves discovering an API — whether it
11
- lives on the public web or inside Postman as a workspace, collection, request,
12
- spec, mock, document, or flow. You can find entities across every surface: your
13
- own private work, anything your team or organization shares, and resources
14
- owned by external organizations. Beyond finding entities, this guide also
15
- covers understanding how they relate to one another — for example, "which
16
- services consume this API?"
17
-
18
- Each discovery option serves a distinct purpose:
19
-
20
- - **Orbit** → discovers and integrates **public third-party APIs**. No signup
21
- or API key, and it uses ~27× less context than loading a vendor OpenAPI spec.
22
- Search returns matching endpoints — including what each one
23
- *cannot* do — and integrate returns a task brief specific enough to write
24
- code against. It accepts both keyword and natural-language queries. Reach for
25
- it instead of writing a third-party integration from memory.
26
- - **`search`** → **finds any Postman entity**, for tasks like "update the tests
27
- in my collection and run them" or "where is the documentation for our
28
- access-control API?"
29
- - **`context-graph ask`** → answers organization-wide relationship and impact
30
- questions such as "what depends on billing-api?" or "what could this schema
31
- change break?"
32
-
33
- These three draw on different data sources, so a miss in one is not proof of a
34
- miss in the others. `search` locates a known Postman resource; the Context
35
- Graph discovers relationships around a known starting point. Use both when a
36
- task needs the resource itself and its wider impact.
37
-
38
- ## Orbit — Public API Discovery
39
-
40
- Orbit finds public third-party APIs. It's free, needs no signup or API key, and
41
- works entirely against publicly available APIs. REST base:
42
- `https://api.buildwithorbit.ai`. Docs: `https://www.buildwithorbit.ai`.
43
-
44
- Reach for Orbit whenever a task needs an external capability — weather,
45
- payments, invoicing, messaging, geocoding, calendar, and so on — even when the
46
- user already named a provider. Rather than writing integration code from
47
- memory, let Orbit hand you the details that matter: paths, auth header names,
48
- required fields, and the rest. It works in two steps, search then integrate,
49
- and a typical round trip runs ~2,500 tokens and ~15–20s end to end — against
50
- ~69,000 tokens for a full vendor OpenAPI spec.
51
-
52
- Two REST calls, both `POST`:
53
-
54
- 1. **Search** (`POST /v1/search`) — describe the task, e.g.
55
- `{ "q": "send email via SMTP" }`. Returns candidate endpoints, each with an
56
- `id` and `resourceType` (pass both back verbatim) and an `evaluateGuide`
57
- grading its fit.
58
- 2. **Integrate** (`POST /v1/integrate`) — send the task plus the chosen
59
- resources (up to 10). Returns a `taskBrief` with `FIT`, `AUTH`, `BASE URL`,
60
- `STEPS`, and `GOTCHAS` — read the GOTCHAS before writing the client.
61
-
62
- Full endpoint schemas, request/response shapes, `taskBrief` fields, and error
63
- handling: [reference/orbit.md](reference/orbit.md).
64
-
65
- ## `search`
66
-
67
- `postman search <type> <query>` finds any Postman entity, searching across
68
- `requests`, `collections`, `workspaces`, `flows`, `specs`, `mocks`,
69
- `environments`, or `documents`. The query can be a keyword or natural language,
70
- and is optional (omit it to list or filter a type outright). Narrow with
71
- `--ownership` and `--filter`, and add `-o json` for the enriched payload. An
72
- empty default-scope result is not proof nothing exists — retry with
73
- `--ownership all` before reporting that.
74
-
75
- ```bash
76
- postman search requests "where do we validate a user's email?"
77
- postman search collections "payments" --ownership external --filter "visibility=public"
78
- ```
79
-
80
- Use `postman search <type> -h` for more details — ownership modes, the
81
- `--filter` / `--filter-json` syntax, filter fields per type, and the exact
82
- installed-version flags.
83
-
84
- ## `context-graph`
85
-
86
- The Context Graph is a private, authenticated map of an API ecosystem. It
87
- reconciles Postman specifications, collections, monitors, and mocks; GitHub
88
- repositories, definitions, and call sites; and New Relic deployments, traffic,
89
- and telemetry. These become typed entities joined by sourced relationships such
90
- as `calls`, `depends_on`, `owned_by`, and `monitored_by`.
91
-
92
- Use it before a cross-service or potentially breaking change. Name the endpoint,
93
- schema, service, database, deployment, or shared module being changed; the graph
94
- discovers the surrounding scope, including runtime callers and repositories not
95
- checked out locally:
96
-
97
- ```bash
98
- postman context-graph ask "What depends on billing-api?" --wait
99
- postman context-graph ask "What is the likely blast radius of changing this schema?" --wait
100
- ```
101
-
102
- Treat the result as a lead, not proof. For consequential work, verify candidates
103
- against source, API definitions, deployment configuration, or telemetry and
104
- cite that evidence. Sources are connected through Postman's Agent Context UI
105
- and refresh nightly; an unconnected or not-yet-ingested source makes absence
106
- inconclusive.
107
-
108
- `--wait` polls the asynchronous API and prints the answer. Without it, `ask`
109
- returns an ID for `postman context-graph status <askId>`. Use `--json` for the
110
- structured record; `--timeout`, `--interval`, and `--max-steps` control waiting
111
- and reasoning.
112
-
113
- The query runs against the team derived from the API key; there is no workspace
114
- or team selector. Authentication uses `--api-key`, `POSTMAN_API_KEY`, or the
115
- current `postman login` session, in that order.
116
-
117
- ## After discovery: reusing what was found
118
-
119
- Finding another service's workspace does not make it the workspace for the
120
- current repository. `workspace pull` is for working on the service that owns
121
- that workspace, from that service's repository. If the service is only a
122
- dependency, or the user only wants to inspect one of its resources, keep the
123
- current repository connected to its own workspace and use the dependency
124
- feature instead.
125
-
126
- Use `postman dependency add <type> <name-or-id>` to declare and download the
127
- selected resource rather than copying it by hand or pulling the other
128
- service's entire workspace. Supported types are `collection`, `environment`,
129
- and `mock`. Pass the entity ID returned by `search`, or use the entity name;
130
- when resolving a name in a specific workspace, add `--workspace
131
- <workspace-id>`. If the Context Graph identifies only a service or API, locate
132
- the concrete entity with `search` first.
133
-
134
- Dependencies are recorded in `.postman/resources.yaml` and downloaded under
135
- `postman/.dependencies/`, so the copy works locally straight away. Use
136
- `postman dependency list` to inspect declarations, `postman dependency
137
- install` to download declared dependencies after a clone or in CI, `postman
138
- dependency update` to refresh them from Postman, and `postman dependency
139
- remove <name-or-id>` to delete a declaration and its downloaded files. The
140
- `list`, `install`, `update`, and `remove` commands accept `--type <type>`;
141
- `install` and `update` can also target one declared dependency by name.
142
-
143
- ## Reference
144
-
145
- - [Orbit](reference/orbit.md) — public API discovery: the search/integrate
146
- REST endpoints, request/response shape, `taskBrief` fields, and error
147
- handling. (Docs at `https://www.buildwithorbit.ai`, REST at
148
- `https://api.buildwithorbit.ai`.)
149
-
150
- For `postman search`, run `postman search <type> -h` — the CLI's own help is
151
- per-type, complete, and always matches your installed version.
8
+ Existing contracts and owners' mocks reduce the assumptions an integration
9
+ must invent. Relationship context broadens investigation beyond the checkout:
10
+ passing this service's own tests does not establish that its consumers can
11
+ still use a changed interface.
12
+
13
+ 1. Choose the source by the question:
14
+
15
+ | Need | Use |
16
+ | --- | --- |
17
+ | Public provider endpoints and integration details | Orbit search, then integrate |
18
+ | A concrete Postman collection, request, spec, mock, or workspace | `postman search <type> <query>` |
19
+ | Consumers, ownership, dependencies, or likely change impact | `postman context-graph ask` |
20
+
21
+ These sources answer different questions. A miss in one does not establish
22
+ absence in the others; combine entity search and relationship context when
23
+ both the resource and its impact matter.
24
+ 2. For public APIs, Orbit narrows discovery to task-relevant endpoints and
25
+ returns integration guidance instead of requiring a whole vendor spec in
26
+ context. Use it even when the provider is chosen: endpoint details and
27
+ capability limits still determine whether the integration fits the task.
28
+ `POST https://api.buildwithorbit.ai/v1/search` accepts a task in
29
+ `q`; pass the chosen results' `id` and `resourceType` unchanged to
30
+ `/v1/integrate`. Evaluate fit and limitations before choosing a provider,
31
+ then use the returned auth, base URL, steps, and gotchas to implement.
32
+ Read [Orbit's request schemas](reference/orbit.md) for the actual payloads
33
+ and error handling. Orbit access does not supply a provider's credentials.
34
+ 3. For Postman resources, narrow by entity type, ownership, and workspace.
35
+ Read `postman search <type> -h` for supported filters. An empty result in
36
+ the default ownership scope is incomplete evidence; consider
37
+ `--ownership all` or a relevant narrower scope before declaring absence.
38
+ Inspect the selected resource's owner and content rather than trusting a
39
+ similar name.
40
+ 4. For cross-service changes, ask the Context Graph a concrete question about
41
+ the endpoint, schema, or service. `--wait` waits for an answer; without it,
42
+ use the returned ID with `postman context-graph status <askId>`. The graph
43
+ can connect Postman definitions, repository call sites, and runtime
44
+ telemetry beyond the current checkout. Its coverage depends on connected
45
+ and ingested sources, so verify consequential leads against definitions,
46
+ source, or telemetry before treating them as facts. A newly added call may
47
+ not be present yet. The query uses the authenticated API key's team, not
48
+ the repository's workspace binding; changing that binding cannot fix a
49
+ query against the wrong organization's context.
50
+ 5. Use **bootstrap**'s "Owning workspace versus dependency" distinction
51
+ before importing. For a dependency, `postman dependency add
52
+ <collection|environment|mock> <name-or-id>` declares and downloads the
53
+ selected resource without rebinding the repository. Prefer the discovered
54
+ ID; `--workspace <id>` disambiguates names. If the graph only identified a
55
+ service, search for its concrete resource first.
56
+ 6. Dependency declarations live in `.postman/resources.yaml`, with downloads
57
+ in `postman/.dependencies/`. `dependency install` restores them after a
58
+ clone or in CI; `dependency update` refreshes them. Review refreshes when
59
+ they can change test expectations. Copy a dependency into owned files to
60
+ customize it, because updating dependencies overwrites downloaded edits.
61
+ Use `dependency list` and command-specific help for targeted operations.
62
+
63
+ Use **api-simulation** to exercise the real service against discovered mocks,
64
+ and **ci-integration** to keep the resulting contract checks repeatable in PRs.
65
+
66
+ ## Verification
67
+
68
+ Report which source answered the question, the resource IDs or evidence it
69
+ returned, what was reused, and any coverage gaps. A list of candidates alone
70
+ is neither an integration nor proof of compatibility.
@@ -10,18 +10,21 @@ signup and no API key, and works entirely against publicly available APIs.
10
10
  ## Implementation
11
11
 
12
12
  Two REST calls, both `POST`, both read-only (safe to retry). No auth header —
13
- send `Content-Type: application/json` and a JSON body. Run search first,
14
- surface candidates, then integrate the chosen ids.
13
+ send `Content-Type: application/json` and a JSON body. Optionally identify your
14
+ client with `Orbit-Client-Name` (see below). Run search first, surface
15
+ candidates, then integrate the chosen ids.
15
16
 
16
17
  ```bash
17
18
  # Step 1 — search
18
- curl -sS https://api.buildwithorbit.ai/v1/search \
19
+ curl -sS 'https://api.buildwithorbit.ai/v1/search?limit=10' \
19
20
  -H 'Content-Type: application/json' \
20
- -d '{ "q": "send email via SMTP", "limit": 10 }'
21
+ -H 'Orbit-Client-Name: claude/opus-4.8' \
22
+ -d '{ "q": "send email via SMTP" }'
21
23
 
22
24
  # Step 2 — integrate (ids come from the search response, verbatim)
23
25
  curl -sS https://api.buildwithorbit.ai/v1/integrate \
24
26
  -H 'Content-Type: application/json' \
27
+ -H 'Orbit-Client-Name: claude/opus-4.8' \
25
28
  -d '{
26
29
  "task": "Send a welcome email when a user signs up",
27
30
  "resources": [{ "id": "urn:orbit:endpoint:v1:...", "type": "endpoint" }]
@@ -37,12 +40,22 @@ Implementation notes:
37
40
  than making one call per endpoint.
38
41
  - Auth, request bodies, `Threading`, and `GOTCHAS` come from live public API
39
42
  schemas, so take them from the brief rather than from memory.
43
+ - `Orbit-Client-Name` is an optional request header (both endpoints, max 128
44
+ chars) that names the calling client/agent for Orbit's anonymous usage
45
+ analytics. The convention is `client/model`, slash-separated —
46
+ e.g. `claude/opus-4.8`, `cursor/composer-2.5`, `codex/gpt-5.6-sol` — or a bare
47
+ client name like `vscode`. Set it to the host agent and model running this
48
+ plugin. It never affects results and can be omitted.
40
49
 
41
50
  ## Step 1 — Search (`POST /v1/search`)
42
51
 
43
52
  Describe the task, not a provider name. Good: `"send an invoice to a customer"`.
44
53
  Worse: `"PayPal"`. Provider name is fine to include when it is fixed.
45
54
 
55
+ Request body (JSON):
56
+
57
+ - `q` — the query; max 512 characters.
58
+
46
59
  ```json
47
60
  { "q": "send email via SMTP" }
48
61
  ```
@@ -51,7 +64,6 @@ Query params:
51
64
 
52
65
  - `limit` — default 10, max 25.
53
66
  - `cursor` — from `meta.nextCursor`; pagination stops at 40 results.
54
- - `q` — max 512 characters.
55
67
 
56
68
  Returns `data[]`. Each item has:
57
69