@pidgeon-ai/sdk 1.49.0 → 1.51.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/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ 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.51.0 — a key can check what a message declared
11
+
12
+ - `messagesRaw({ path: { id }, query: { headers: 'original' } })` returns only
13
+ the original's header section: the agent declaration and the DKIM signature
14
+ that covers it, checkable as /verify checks it. A key's plain `messagesRaw`
15
+ is a rebuild carrying a canary token, which cannot verify. A 404 once the
16
+ original is no longer kept.
17
+
18
+ ## 1.50.0 — a loop stops at the second message, and an agent can ask first
19
+
20
+ - `messagesCheck({ body })` takes the body `messagesSend` takes, plus
21
+ `forward`, and runs every check a send makes without sending: it returns a
22
+ `SendCheck` (`would_send`, `status`, the envelope) or the exact error the
23
+ send would give. Nothing is written or counted.
24
+ - `Identity.recipient_cooldown_minutes` (default 10, 0 is off, at most 1440),
25
+ settable with `identitiesUpdate`. A send that is not a reply, to somebody the
26
+ address wrote to inside it, is refused `429 recipient_cooldown` with
27
+ `Retry-After`. Replies are exempt.
28
+ - No send's result type changed.
29
+
10
30
  ## 1.49.0 — what stands between a key and sending
11
31
 
12
32
  - `agentSetup({ query: { identity_id } })` asks every check a send would
package/dist/index.cjs CHANGED
@@ -103,6 +103,7 @@ __export(index_exports, {
103
103
  meGet: () => meGet,
104
104
  messagesAct: () => messagesAct,
105
105
  messagesAwait: () => messagesAwait,
106
+ messagesCheck: () => messagesCheck,
106
107
  messagesForward: () => messagesForward,
107
108
  messagesGet: () => messagesGet,
108
109
  messagesListInThread: () => messagesListInThread,
@@ -1192,6 +1193,15 @@ var messagesSend = (options) => (options.client ?? client).post({
1192
1193
  ...options.headers
1193
1194
  }
1194
1195
  });
1196
+ var messagesCheck = (options) => (options.client ?? client).post({
1197
+ security: [{ scheme: "bearer", type: "http" }],
1198
+ url: "/messages/check",
1199
+ ...options,
1200
+ headers: {
1201
+ "Content-Type": "application/json",
1202
+ ...options.headers
1203
+ }
1204
+ });
1195
1205
  var messagesSearch = (options) => (options?.client ?? client).get({
1196
1206
  security: [{ scheme: "bearer", type: "http" }],
1197
1207
  url: "/messages/search",
@@ -1961,6 +1971,7 @@ function sleep(ms, signal) {
1961
1971
  meGet,
1962
1972
  messagesAct,
1963
1973
  messagesAwait,
1974
+ messagesCheck,
1964
1975
  messagesForward,
1965
1976
  messagesGet,
1966
1977
  messagesListInThread,