@niadra/sdk 0.9.1 → 0.10.4

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 (86) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/ai-sdk.d.cts +3 -3
  3. package/dist/ai-sdk.d.ts +3 -3
  4. package/dist/anthropic.d.cts +4 -4
  5. package/dist/anthropic.d.ts +4 -4
  6. package/dist/bedrock.d.cts +4 -4
  7. package/dist/bedrock.d.ts +4 -4
  8. package/dist/cli.js +331 -96
  9. package/dist/cli.js.map +1 -1
  10. package/dist/{client-CWMxmJHs.d.cts → client-7mkrdRI0.d.cts} +192 -7
  11. package/dist/{client-CWMxmJHs.d.ts → client-7mkrdRI0.d.ts} +192 -7
  12. package/dist/cloudflare-agents.d.cts +3 -3
  13. package/dist/cloudflare-agents.d.ts +3 -3
  14. package/dist/elevenlabs.cjs +7 -5
  15. package/dist/elevenlabs.cjs.map +1 -1
  16. package/dist/elevenlabs.d.cts +5 -5
  17. package/dist/elevenlabs.d.ts +5 -5
  18. package/dist/elevenlabs.js +7 -5
  19. package/dist/elevenlabs.js.map +1 -1
  20. package/dist/genkit.d.cts +3 -3
  21. package/dist/genkit.d.ts +3 -3
  22. package/dist/google-adk.cjs +7 -5
  23. package/dist/google-adk.cjs.map +1 -1
  24. package/dist/google-adk.d.cts +3 -3
  25. package/dist/google-adk.d.ts +3 -3
  26. package/dist/google-adk.js +7 -5
  27. package/dist/google-adk.js.map +1 -1
  28. package/dist/google-genai.d.cts +4 -4
  29. package/dist/google-genai.d.ts +4 -4
  30. package/dist/index.cjs +341 -98
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +13 -5
  33. package/dist/index.d.ts +13 -5
  34. package/dist/index.js +341 -98
  35. package/dist/index.js.map +1 -1
  36. package/dist/{intercept-CGngQI8B.d.cts → intercept-CGQhwAom.d.cts} +1 -1
  37. package/dist/{intercept-Bv0nLpSw.d.ts → intercept-CT0vglsd.d.ts} +1 -1
  38. package/dist/langchain.cjs.map +1 -1
  39. package/dist/langchain.d.cts +3 -3
  40. package/dist/langchain.d.ts +3 -3
  41. package/dist/langchain.js.map +1 -1
  42. package/dist/livekit.cjs +10 -2
  43. package/dist/livekit.cjs.map +1 -1
  44. package/dist/livekit.d.cts +3 -3
  45. package/dist/livekit.d.ts +3 -3
  46. package/dist/livekit.js +10 -2
  47. package/dist/livekit.js.map +1 -1
  48. package/dist/llamaindex.d.cts +3 -3
  49. package/dist/llamaindex.d.ts +3 -3
  50. package/dist/mastra.d.cts +3 -3
  51. package/dist/mastra.d.ts +3 -3
  52. package/dist/openai-agents.d.cts +3 -3
  53. package/dist/openai-agents.d.ts +3 -3
  54. package/dist/retell.cjs +7 -5
  55. package/dist/retell.cjs.map +1 -1
  56. package/dist/retell.d.cts +5 -5
  57. package/dist/retell.d.ts +5 -5
  58. package/dist/retell.js +7 -5
  59. package/dist/retell.js.map +1 -1
  60. package/dist/{shared-B4Ef2Wpg.d.ts → shared-Bf84jr3Y.d.ts} +1 -1
  61. package/dist/{shared-Cq8mz-7m.d.cts → shared-CxAwOcZI.d.cts} +1 -1
  62. package/dist/strands.d.cts +3 -3
  63. package/dist/strands.d.ts +3 -3
  64. package/dist/twilio.cjs +10 -2
  65. package/dist/twilio.cjs.map +1 -1
  66. package/dist/twilio.d.cts +4 -4
  67. package/dist/twilio.d.ts +4 -4
  68. package/dist/twilio.js +10 -2
  69. package/dist/twilio.js.map +1 -1
  70. package/dist/vapi.cjs +7 -5
  71. package/dist/vapi.cjs.map +1 -1
  72. package/dist/vapi.d.cts +5 -5
  73. package/dist/vapi.d.ts +5 -5
  74. package/dist/vapi.js +7 -5
  75. package/dist/vapi.js.map +1 -1
  76. package/dist/voltagent.d.cts +3 -3
  77. package/dist/voltagent.d.ts +3 -3
  78. package/dist/{webhook-jTx_SegV.d.cts → webhook-DE3HsGkb.d.cts} +1 -1
  79. package/dist/{webhook-z2TjUzjv.d.ts → webhook-QxYgxE6_.d.ts} +1 -1
  80. package/dist/whatsapp.cjs +10 -2
  81. package/dist/whatsapp.cjs.map +1 -1
  82. package/dist/whatsapp.d.cts +2 -2
  83. package/dist/whatsapp.d.ts +2 -2
  84. package/dist/whatsapp.js +10 -2
  85. package/dist/whatsapp.js.map +1 -1
  86. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,75 @@ All notable changes to this package are documented here. The format follows [Kee
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.10.4] - 2026-10-03
8
+
9
+ ### Fixed
10
+
11
+ - A read made before the startup probe measured the round trip used the bare default budget, and timed out
12
+ from Sao Paulo (the first context read carrying the customer's turn took 674 ms). While the probe is on its
13
+ way and a connection is open, `timeouts.context` and `timeouts.navigation` you did not set get
14
+ `timeouts.connect` on top; with no connection open the transport already adds it, never twice. A probe that
15
+ failed, or `voice: { probe: false }`, leaves the defaults as they are.
16
+
17
+ ## [0.10.3] - 2026-10-03
18
+
19
+ ### Added
20
+
21
+ - `keepWarm` (on by default): while a conversation or task is open (created and not ended) and the client was
22
+ used in the last 10 minutes, the client sends `GET /healthz` every 100 s when nothing else went out for 90 s,
23
+ one attempt with a 2-second budget, so the connection to the region stays open. A turn after a long pause no
24
+ longer pays TCP, TLS and often DNS again. The pings are not the client's use, the timer is `unref()`'d, and a
25
+ conversation nobody holds any more stops them. `keepWarm: false` never pings.
26
+
27
+ ## [0.10.2] - 2026-10-03
28
+
29
+ ### Changed
30
+
31
+ - The client measures the round trip to the region once when it starts (`GET /healthz`, twice), not only for
32
+ voice, which also opens the connection the first read uses. `timeouts.context` and `timeouts.navigation` left
33
+ at their defaults take the measured round trip on top: from Sao Paulo (170 ms to us-east-2) every chat read
34
+ with the defaults ran out of time. A value you set stays a ceiling, and the client logs one warning when the
35
+ round trip plus 50 ms exceeds it. The voice budgets are unchanged, and their warnings now come only once the
36
+ client reads in voice. `voice: { probe: false }` measures nothing.
37
+
38
+ ## [0.10.1] - 2026-10-03
39
+
40
+ ### Added
41
+
42
+ - `contextUse({ since, until, group_by, source_id, channel, view, experiment_group })`: the context-use report
43
+ (`GET /v1/context-use`) as `ContextUseReport`, with its buckets typed and the other blocks passing through.
44
+ A key of an `analyst` source with the `analytics` scope reads every source of the space.
45
+ - `link({ person, organization, role })` and `endLink(linkId)`: a system of record that knows who works for whom
46
+ (a CRM, an HR system) links a person to the account or partner they act for, and ends the link, with a key
47
+ that has the `identity:link` scope instead of `admin`. `can_see_contacts` still needs `admin`. `Link` and
48
+ `LinkRequest` are the types.
49
+
50
+ ## [0.10.0] - 2026-10-03
51
+
52
+ ### Added
53
+
54
+ - `open(id, { about })`: with the person bound in `subject`, also an item of the organization they act for that
55
+ their view shows (the pack's account block). `tools()` bound with `about` passes it, so the kit reaches what
56
+ the pack shows.
57
+ - `about_unlinked` on `ContextResponse`, `SearchResponse` and `TimelineResponse`: `about` named an organization
58
+ with no active link to the subject, and the read went on with the subject's own memory. A conversation or a
59
+ task warns once through its `logger`.
60
+ - `explain(error)`: an API refusal for a log line, with its code, detail and request id. A coordination check
61
+ takes the client's `logger`, and `HistoryItemKind` includes `system_event`.
62
+
63
+ ### Changed
64
+
65
+ - An API error's `message` ends with the request id: `422 invalid_input: <detail> (request <id>)`.
66
+ - `govIdHmac` and `orgRegistryHmac` take the document number itself; the space keeps only a keyed hash of it.
67
+ - Idle connections are kept for `keepAliveMs` between turns, and a call that has to open a connection gets
68
+ `timeouts.connect` (1,000 ms by default) on top of its method's budget, once per cold period, so a first read
69
+ after idle no longer times out on the TLS handshake.
70
+ - A coordination check the API refuses (400, 401, 403 or 422) is `invalid_request`, never `unchecked`: an
71
+ outbound contact is deferred and an inbound one allowed, and `strict` throws. Refusals of background writes
72
+ (the outbox, turn records) log the problem's detail and request id.
73
+ - The tool definitions follow the server's: the timeline tool says it also lists the open items, facts,
74
+ patterns or objects `filters.item_kinds` names.
75
+
7
76
  ## [0.9.1] - 2026-10-02
8
77
 
9
78
  ### Changed
package/dist/ai-sdk.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ToolSet } from 'ai';
2
- import { f as ModelUsage, fZ as TurnParams, fS as TurnFrame } from './client-CWMxmJHs.cjs';
3
- import { a as ProofSource, A as AgentMemoryOption, b as Session, S as SessionResolver } from './shared-Cq8mz-7m.cjs';
4
- export { P as Proof, c as attestationProof } from './shared-Cq8mz-7m.cjs';
2
+ import { f as ModelUsage, g5 as TurnParams, f_ as TurnFrame } from './client-7mkrdRI0.cjs';
3
+ import { a as ProofSource, A as AgentMemoryOption, b as Session, S as SessionResolver } from './shared-CxAwOcZI.cjs';
4
+ export { P as Proof, c as attestationProof } from './shared-CxAwOcZI.cjs';
5
5
 
6
6
  /**
7
7
  * Niadra for the Vercel AI SDK (`ai` 5, 6 and 7), the idiomatic way: a language model middleware
package/dist/ai-sdk.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ToolSet } from 'ai';
2
- import { f as ModelUsage, fZ as TurnParams, fS as TurnFrame } from './client-CWMxmJHs.js';
3
- import { a as ProofSource, A as AgentMemoryOption, b as Session, S as SessionResolver } from './shared-B4Ef2Wpg.js';
4
- export { P as Proof, c as attestationProof } from './shared-B4Ef2Wpg.js';
2
+ import { f as ModelUsage, g5 as TurnParams, f_ as TurnFrame } from './client-7mkrdRI0.js';
3
+ import { a as ProofSource, A as AgentMemoryOption, b as Session, S as SessionResolver } from './shared-Bf84jr3Y.js';
4
+ export { P as Proof, c as attestationProof } from './shared-Bf84jr3Y.js';
5
5
 
6
6
  /**
7
7
  * Niadra for the Vercel AI SDK (`ai` 5, 6 and 7), the idiomatic way: a language model middleware
@@ -1,7 +1,7 @@
1
- import { W as WrapOptions } from './intercept-CGngQI8B.cjs';
2
- import { S as SessionResolver } from './shared-Cq8mz-7m.cjs';
3
- export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-Cq8mz-7m.cjs';
4
- import './client-CWMxmJHs.cjs';
1
+ import { W as WrapOptions } from './intercept-CGQhwAom.cjs';
2
+ import { S as SessionResolver } from './shared-CxAwOcZI.cjs';
3
+ export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-CxAwOcZI.cjs';
4
+ import './client-7mkrdRI0.cjs';
5
5
 
6
6
  /**
7
7
  * Niadra for the Anthropic TypeScript SDK (`@anthropic-ai/sdk`), as `wrap()` is for OpenAI.
@@ -1,7 +1,7 @@
1
- import { W as WrapOptions } from './intercept-Bv0nLpSw.js';
2
- import { S as SessionResolver } from './shared-B4Ef2Wpg.js';
3
- export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-B4Ef2Wpg.js';
4
- import './client-CWMxmJHs.js';
1
+ import { W as WrapOptions } from './intercept-CT0vglsd.js';
2
+ import { S as SessionResolver } from './shared-Bf84jr3Y.js';
3
+ export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-Bf84jr3Y.js';
4
+ import './client-7mkrdRI0.js';
5
5
 
6
6
  /**
7
7
  * Niadra for the Anthropic TypeScript SDK (`@anthropic-ai/sdk`), as `wrap()` is for OpenAI.
@@ -1,7 +1,7 @@
1
- import { f as ModelUsage } from './client-CWMxmJHs.cjs';
2
- import { W as WrapOptions } from './intercept-CGngQI8B.cjs';
3
- import { S as SessionResolver } from './shared-Cq8mz-7m.cjs';
4
- export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-Cq8mz-7m.cjs';
1
+ import { f as ModelUsage } from './client-7mkrdRI0.cjs';
2
+ import { W as WrapOptions } from './intercept-CGQhwAom.cjs';
3
+ import { S as SessionResolver } from './shared-CxAwOcZI.cjs';
4
+ export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-CxAwOcZI.cjs';
5
5
 
6
6
  /**
7
7
  * Niadra for Amazon Bedrock's Converse API (`@aws-sdk/client-bedrock-runtime`), as `wrap()` is for
package/dist/bedrock.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { f as ModelUsage } from './client-CWMxmJHs.js';
2
- import { W as WrapOptions } from './intercept-Bv0nLpSw.js';
3
- import { S as SessionResolver } from './shared-B4Ef2Wpg.js';
4
- export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-B4Ef2Wpg.js';
1
+ import { f as ModelUsage } from './client-7mkrdRI0.js';
2
+ import { W as WrapOptions } from './intercept-CT0vglsd.js';
3
+ import { S as SessionResolver } from './shared-Bf84jr3Y.js';
4
+ export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-Bf84jr3Y.js';
5
5
 
6
6
  /**
7
7
  * Niadra for Amazon Bedrock's Converse API (`@aws-sdk/client-bedrock-runtime`), as `wrap()` is for