@maintainabilityai/research-runner 0.1.16 → 0.1.17

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.
@@ -100,11 +100,17 @@ async function usptoSearch(opts) {
100
100
  try {
101
101
  const xmlRes = await fetchImpl(r._xmlUri, {
102
102
  method: 'GET',
103
- // The signed XML URI lives on a CDN/storage host, not api.uspto.gov.
104
- // It accepts unauthenticated GETs; sending X-API-Key actually causes
105
- // some hosts to 403. Use a vanilla request with a polite User-Agent.
103
+ // Mirror the NCMS reference exactly: same headers dict on the
104
+ // search call AND the XML fetch (X-API-Key + Accept: json). My
105
+ // earlier "drop X-API-Key on stage 2" was wrong the CDN does
106
+ // gate on it, and removing it produced http403 across the
107
+ // board (seen in #49 logs: "0/5 fetched, failures: http403 ×5").
108
+ // The Accept header looks wrong-shape (json for an XML doc) but
109
+ // the upstream ignores it and returns XML regardless; matches
110
+ // the NCMS pattern that works in production.
106
111
  headers: {
107
- accept: 'application/xml,text/xml,*/*',
112
+ accept: 'application/json',
113
+ 'X-API-Key': opts.apiKey,
108
114
  'user-agent': 'maintainabilityai-research-runner/1.0',
109
115
  },
110
116
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maintainabilityai/research-runner",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Research + PRD agent runner — orchestrates the Archeologist and PRD pipelines for the MaintainabilityAI governance mesh",
5
5
  "license": "MIT",
6
6
  "author": "MaintainabilityAI",