@pidgeon-ai/sdk 1.31.1 → 1.31.2

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/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ the two would publish a release for every unrelated product deploy.
7
7
  Semver applies to **this package's own surface** — the exported names, the
8
8
  call shapes, the result shape — not to the API behind it.
9
9
 
10
+ ## 1.31.2 — the client names itself
11
+
12
+ Outside a browser the default client now sends `User-Agent: @pidgeon-ai/sdk`
13
+ on every request, so Pidgeon can tell an account made through the SDK from
14
+ one made with a hand-written `fetch`. A header you set yourself still wins.
15
+ In a browser nothing changes: the browser sets its own. The Python client
16
+ does the same as `pidgeon-python/<version>`.
17
+
10
18
  ## 1.31.1 — inbox, address, folder
11
19
 
12
20
  Descriptions only. Where the docs said "mailbox" they now say inbox (what an
package/README.md CHANGED
@@ -60,7 +60,7 @@ if (awaited.data.message) {
60
60
  ```
61
61
 
62
62
  `PIDGEON_API_KEY` is a `pgn_live_…` key. Make one at
63
- [pidgeon.ai/app/developers/keys](https://pidgeon.ai/app/developers/keys), or
63
+ [pidgeon.ai/app/developers/keys](https://pidgeon.ai/signup?utm_source=npm&utm_medium=readme&utm_campaign=sdk&next=/app/developers/keys), or
64
64
  let your agent sign itself up: [pidgeon.ai/skill.md](https://pidgeon.ai/skill.md)
65
65
  is two calls, and the only thing it needs from a person is a six-digit code.
66
66
 
package/dist/index.cjs CHANGED
@@ -943,9 +943,19 @@ var createClient = (config = {}) => {
943
943
  };
944
944
  };
945
945
 
946
+ // src/runtime-config.ts
947
+ var USER_AGENT = "@pidgeon-ai/sdk";
948
+ var createClientConfig = (config) => ({
949
+ ...config,
950
+ ...typeof window === "undefined" ? { headers: { "User-Agent": USER_AGENT, ...plain(config?.headers) } } : {}
951
+ });
952
+ function plain(headers) {
953
+ return headers && typeof headers === "object" && !(headers instanceof Headers) ? headers : {};
954
+ }
955
+
946
956
  // src/generated/client.gen.ts
947
957
  var client = createClient(
948
- createConfig({ baseUrl: "https://pidgeon.ai/api/v1" })
958
+ createClientConfig(createConfig({ baseUrl: "https://pidgeon.ai/api/v1" }))
949
959
  );
950
960
 
951
961
  // src/generated/sdk.gen.ts