@pidgeon-ai/sdk 1.49.0 → 1.50.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,18 @@ 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.50.0 — a loop stops at the second message, and an agent can ask first
11
+
12
+ - `messagesCheck({ body })` takes the body `messagesSend` takes, plus
13
+ `forward`, and runs every check a send makes without sending: it returns a
14
+ `SendCheck` (`would_send`, `status`, the envelope) or the exact error the
15
+ send would give. Nothing is written or counted.
16
+ - `Identity.recipient_cooldown_minutes` (default 10, 0 is off, at most 1440),
17
+ settable with `identitiesUpdate`. A send that is not a reply, to somebody the
18
+ address wrote to inside it, is refused `429 recipient_cooldown` with
19
+ `Retry-After`. Replies are exempt.
20
+ - No send's result type changed.
21
+
10
22
  ## 1.49.0 — what stands between a key and sending
11
23
 
12
24
  - `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,