@niadra/sdk 0.11.1 → 0.11.3
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 +20 -0
- package/dist/ai-sdk.cjs.map +1 -1
- package/dist/ai-sdk.d.cts +3 -3
- package/dist/ai-sdk.d.ts +3 -3
- package/dist/ai-sdk.js.map +1 -1
- package/dist/anthropic.d.cts +4 -4
- package/dist/anthropic.d.ts +4 -4
- package/dist/bedrock.d.cts +4 -4
- package/dist/bedrock.d.ts +4 -4
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/{client-CdkRzWz6.d.cts → client-CUbAjxus.d.cts} +16 -4
- package/dist/{client-CdkRzWz6.d.ts → client-CUbAjxus.d.ts} +16 -4
- package/dist/cloudflare-agents.d.cts +3 -3
- package/dist/cloudflare-agents.d.ts +3 -3
- package/dist/elevenlabs.d.cts +5 -5
- package/dist/elevenlabs.d.ts +5 -5
- package/dist/genkit.d.cts +3 -3
- package/dist/genkit.d.ts +3 -3
- package/dist/google-adk.d.cts +3 -3
- package/dist/google-adk.d.ts +3 -3
- package/dist/google-genai.d.cts +4 -4
- package/dist/google-genai.d.ts +4 -4
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/{intercept-tVhq4GNK.d.ts → intercept-Dkzcel9G.d.ts} +1 -1
- package/dist/{intercept-C_9uxSRY.d.cts → intercept-Ue3ovmWl.d.cts} +1 -1
- package/dist/langchain.cjs.map +1 -1
- package/dist/langchain.d.cts +3 -3
- package/dist/langchain.d.ts +3 -3
- package/dist/langchain.js.map +1 -1
- package/dist/livekit.cjs +7 -0
- package/dist/livekit.cjs.map +1 -1
- package/dist/livekit.d.cts +3 -3
- package/dist/livekit.d.ts +3 -3
- package/dist/livekit.js +7 -0
- package/dist/livekit.js.map +1 -1
- package/dist/llamaindex.d.cts +3 -3
- package/dist/llamaindex.d.ts +3 -3
- package/dist/mastra.cjs.map +1 -1
- package/dist/mastra.d.cts +3 -3
- package/dist/mastra.d.ts +3 -3
- package/dist/mastra.js.map +1 -1
- package/dist/openai-agents.d.cts +3 -3
- package/dist/openai-agents.d.ts +3 -3
- package/dist/retell.d.cts +5 -5
- package/dist/retell.d.ts +5 -5
- package/dist/{shared-DH_QGnci.d.cts → shared-Bo7qdYgi.d.cts} +1 -1
- package/dist/{shared-SqZSrkls.d.ts → shared-PDIMXzXx.d.ts} +1 -1
- package/dist/strands.d.cts +3 -3
- package/dist/strands.d.ts +3 -3
- package/dist/twilio.cjs +7 -0
- package/dist/twilio.cjs.map +1 -1
- package/dist/twilio.d.cts +4 -4
- package/dist/twilio.d.ts +4 -4
- package/dist/twilio.js +7 -0
- package/dist/twilio.js.map +1 -1
- package/dist/vapi.d.cts +5 -5
- package/dist/vapi.d.ts +5 -5
- package/dist/voltagent.d.cts +3 -3
- package/dist/voltagent.d.ts +3 -3
- package/dist/{webhook-BNvRGq0g.d.ts → webhook-BXzrUf4z.d.ts} +1 -1
- package/dist/{webhook-DIHeQ7DO.d.cts → webhook-CS2V4I6e.d.cts} +1 -1
- package/dist/whatsapp.cjs +7 -0
- package/dist/whatsapp.cjs.map +1 -1
- package/dist/whatsapp.d.cts +2 -2
- package/dist/whatsapp.d.ts +2 -2
- package/dist/whatsapp.js +7 -0
- package/dist/whatsapp.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ type Speaker = "customer" | "ai_agent" | "human_agent" | "system";
|
|
|
9
9
|
/** `internal` events (notes between agents, system traces) never reach a customer-facing view. */
|
|
10
10
|
type Visibility = "public" | "internal";
|
|
11
11
|
/** Subjects are people by default; accounts and partners are organizations. */
|
|
12
|
-
type SubjectKind = "person" | "account" | "partner";
|
|
12
|
+
type SubjectKind = "person" | "account" | "partner" | "staff";
|
|
13
13
|
/**
|
|
14
14
|
* How a handle identifies a subject. Scoped types (`wa_bsuid`, `system_id`, `gov_id_hmac`,
|
|
15
15
|
* `org_registry_hmac`) need `scope` so the same value in two namespaces never collides.
|
|
@@ -852,12 +852,22 @@ interface ObjectInstruction {
|
|
|
852
852
|
about?: string | null;
|
|
853
853
|
/** The field of the object's type it is about. */
|
|
854
854
|
attr?: string | null;
|
|
855
|
+
/**
|
|
856
|
+
* A contact preference (a channel, hours): how the company reaches `only_with`, never a limit on what may
|
|
857
|
+
* be said to them.
|
|
858
|
+
*/
|
|
859
|
+
contact?: boolean;
|
|
855
860
|
expires_at?: string | null;
|
|
856
861
|
/** The entry of `hard` that carries it for a tool, when `attr` is set. */
|
|
857
862
|
hard?: string | null;
|
|
858
863
|
id: string;
|
|
859
864
|
/** The object it is about. */
|
|
860
865
|
object?: string | null;
|
|
866
|
+
/**
|
|
867
|
+
* The one person it holds with, as the conversation named them: it binds the readers dealing with that
|
|
868
|
+
* person, not whoever is speaking. With `contact`, the person it is the preference of.
|
|
869
|
+
*/
|
|
870
|
+
only_with?: string | null;
|
|
861
871
|
/** The role on the object of who said it (`owner`, `participant`, `lawyer`). */
|
|
862
872
|
role?: string | null;
|
|
863
873
|
said_at: string;
|
|
@@ -3573,10 +3583,12 @@ interface DataIssue {
|
|
|
3573
3583
|
/**
|
|
3574
3584
|
* `null_field`, `out_of_vocabulary`, `stale_source`, `invalid_value`: a value an agent's tool showed;
|
|
3575
3585
|
* `coverage_drop`: a field filled less often than before; `divergence`: two sources of one value disagree;
|
|
3576
|
-
* `drift`: the schema a type mirrors changed
|
|
3577
|
-
* `
|
|
3586
|
+
* `drift`: the schema a type mirrors changed, and a new field is already served to agents as it came (a
|
|
3587
|
+
* note, nothing to fix); `field_held`: a new field that may be personal data or free text, held from agents
|
|
3588
|
+
* until the type declares it; `rule_conflict`: two rules decide one thing differently; `type_undeclared`:
|
|
3589
|
+
* tools showed objects of a type the space never declared.
|
|
3578
3590
|
*/
|
|
3579
|
-
kind: "null_field" | "out_of_vocabulary" | "stale_source" | "coverage_drop" | "invalid_value" | "divergence" | "drift" | "rule_conflict" | "type_undeclared";
|
|
3591
|
+
kind: "null_field" | "out_of_vocabulary" | "stale_source" | "coverage_drop" | "invalid_value" | "divergence" | "drift" | "rule_conflict" | "type_undeclared" | "field_held";
|
|
3580
3592
|
last_seen_at: string;
|
|
3581
3593
|
object_type?: string | null;
|
|
3582
3594
|
occurrences: number;
|
|
@@ -9,7 +9,7 @@ type Speaker = "customer" | "ai_agent" | "human_agent" | "system";
|
|
|
9
9
|
/** `internal` events (notes between agents, system traces) never reach a customer-facing view. */
|
|
10
10
|
type Visibility = "public" | "internal";
|
|
11
11
|
/** Subjects are people by default; accounts and partners are organizations. */
|
|
12
|
-
type SubjectKind = "person" | "account" | "partner";
|
|
12
|
+
type SubjectKind = "person" | "account" | "partner" | "staff";
|
|
13
13
|
/**
|
|
14
14
|
* How a handle identifies a subject. Scoped types (`wa_bsuid`, `system_id`, `gov_id_hmac`,
|
|
15
15
|
* `org_registry_hmac`) need `scope` so the same value in two namespaces never collides.
|
|
@@ -852,12 +852,22 @@ interface ObjectInstruction {
|
|
|
852
852
|
about?: string | null;
|
|
853
853
|
/** The field of the object's type it is about. */
|
|
854
854
|
attr?: string | null;
|
|
855
|
+
/**
|
|
856
|
+
* A contact preference (a channel, hours): how the company reaches `only_with`, never a limit on what may
|
|
857
|
+
* be said to them.
|
|
858
|
+
*/
|
|
859
|
+
contact?: boolean;
|
|
855
860
|
expires_at?: string | null;
|
|
856
861
|
/** The entry of `hard` that carries it for a tool, when `attr` is set. */
|
|
857
862
|
hard?: string | null;
|
|
858
863
|
id: string;
|
|
859
864
|
/** The object it is about. */
|
|
860
865
|
object?: string | null;
|
|
866
|
+
/**
|
|
867
|
+
* The one person it holds with, as the conversation named them: it binds the readers dealing with that
|
|
868
|
+
* person, not whoever is speaking. With `contact`, the person it is the preference of.
|
|
869
|
+
*/
|
|
870
|
+
only_with?: string | null;
|
|
861
871
|
/** The role on the object of who said it (`owner`, `participant`, `lawyer`). */
|
|
862
872
|
role?: string | null;
|
|
863
873
|
said_at: string;
|
|
@@ -3573,10 +3583,12 @@ interface DataIssue {
|
|
|
3573
3583
|
/**
|
|
3574
3584
|
* `null_field`, `out_of_vocabulary`, `stale_source`, `invalid_value`: a value an agent's tool showed;
|
|
3575
3585
|
* `coverage_drop`: a field filled less often than before; `divergence`: two sources of one value disagree;
|
|
3576
|
-
* `drift`: the schema a type mirrors changed
|
|
3577
|
-
* `
|
|
3586
|
+
* `drift`: the schema a type mirrors changed, and a new field is already served to agents as it came (a
|
|
3587
|
+
* note, nothing to fix); `field_held`: a new field that may be personal data or free text, held from agents
|
|
3588
|
+
* until the type declares it; `rule_conflict`: two rules decide one thing differently; `type_undeclared`:
|
|
3589
|
+
* tools showed objects of a type the space never declared.
|
|
3578
3590
|
*/
|
|
3579
|
-
kind: "null_field" | "out_of_vocabulary" | "stale_source" | "coverage_drop" | "invalid_value" | "divergence" | "drift" | "rule_conflict" | "type_undeclared";
|
|
3591
|
+
kind: "null_field" | "out_of_vocabulary" | "stale_source" | "coverage_drop" | "invalid_value" | "divergence" | "drift" | "rule_conflict" | "type_undeclared" | "field_held";
|
|
3580
3592
|
last_seen_at: string;
|
|
3581
3593
|
object_type?: string | null;
|
|
3582
3594
|
occurrences: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ToolSet } from 'ai';
|
|
2
|
-
import { c as Niadra, g as Handle, g8 as TurnOptions, f as ModelUsage } from './client-
|
|
2
|
+
import { c as Niadra, g as Handle, g8 as TurnOptions, f as ModelUsage } from './client-CUbAjxus.cjs';
|
|
3
3
|
import { NiadraMiddleware } from './ai-sdk.cjs';
|
|
4
|
-
import { b as Session, a as ProofSource, A as AgentMemoryOption } from './shared-
|
|
5
|
-
export { P as Proof, c as attestationProof } from './shared-
|
|
4
|
+
import { b as Session, a as ProofSource, A as AgentMemoryOption } from './shared-Bo7qdYgi.cjs';
|
|
5
|
+
export { P as Proof, c as attestationProof } from './shared-Bo7qdYgi.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Niadra for the Cloudflare Agents SDK (`agents` 0.x): one helper per `Agent` instance (a Durable
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ToolSet } from 'ai';
|
|
2
|
-
import { c as Niadra, g as Handle, g8 as TurnOptions, f as ModelUsage } from './client-
|
|
2
|
+
import { c as Niadra, g as Handle, g8 as TurnOptions, f as ModelUsage } from './client-CUbAjxus.js';
|
|
3
3
|
import { NiadraMiddleware } from './ai-sdk.js';
|
|
4
|
-
import { b as Session, a as ProofSource, A as AgentMemoryOption } from './shared-
|
|
5
|
-
export { P as Proof, c as attestationProof } from './shared-
|
|
4
|
+
import { b as Session, a as ProofSource, A as AgentMemoryOption } from './shared-PDIMXzXx.js';
|
|
5
|
+
export { P as Proof, c as attestationProof } from './shared-PDIMXzXx.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Niadra for the Cloudflare Agents SDK (`agents` 0.x): one helper per `Agent` instance (a Durable
|
package/dist/elevenlabs.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as Niadra, g as Handle } from './client-
|
|
2
|
-
import { P as Proof, A as AgentMemoryOption } from './shared-
|
|
3
|
-
export { c as attestationProof } from './shared-
|
|
4
|
-
import { H as HeadersLike, W as WebhookResponse, C as CallStore } from './webhook-
|
|
5
|
-
export { a as CallRecord, m as memoryCallStore } from './webhook-
|
|
1
|
+
import { c as Niadra, g as Handle } from './client-CUbAjxus.cjs';
|
|
2
|
+
import { P as Proof, A as AgentMemoryOption } from './shared-Bo7qdYgi.cjs';
|
|
3
|
+
export { c as attestationProof } from './shared-Bo7qdYgi.cjs';
|
|
4
|
+
import { H as HeadersLike, W as WebhookResponse, C as CallStore } from './webhook-CS2V4I6e.cjs';
|
|
5
|
+
export { a as CallRecord, m as memoryCallStore } from './webhook-CS2V4I6e.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Niadra for the ElevenLabs Agents Platform, on the server side: a phone call reaches ElevenLabs,
|
package/dist/elevenlabs.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as Niadra, g as Handle } from './client-
|
|
2
|
-
import { P as Proof, A as AgentMemoryOption } from './shared-
|
|
3
|
-
export { c as attestationProof } from './shared-
|
|
4
|
-
import { H as HeadersLike, W as WebhookResponse, C as CallStore } from './webhook-
|
|
5
|
-
export { a as CallRecord, m as memoryCallStore } from './webhook-
|
|
1
|
+
import { c as Niadra, g as Handle } from './client-CUbAjxus.js';
|
|
2
|
+
import { P as Proof, A as AgentMemoryOption } from './shared-PDIMXzXx.js';
|
|
3
|
+
export { c as attestationProof } from './shared-PDIMXzXx.js';
|
|
4
|
+
import { H as HeadersLike, W as WebhookResponse, C as CallStore } from './webhook-BXzrUf4z.js';
|
|
5
|
+
export { a as CallRecord, m as memoryCallStore } from './webhook-BXzrUf4z.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Niadra for the ElevenLabs Agents Platform, on the server side: a phone call reaches ElevenLabs,
|
package/dist/genkit.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModelMiddleware } from 'genkit/model';
|
|
2
2
|
import { ToolAction } from 'genkit/tool';
|
|
3
|
-
import { f as ModelUsage } from './client-
|
|
4
|
-
import { a as ProofSource, A as AgentMemoryOption, S as SessionResolver, b as Session } from './shared-
|
|
5
|
-
export { P as Proof, c as attestationProof } from './shared-
|
|
3
|
+
import { f as ModelUsage } from './client-CUbAjxus.cjs';
|
|
4
|
+
import { a as ProofSource, A as AgentMemoryOption, S as SessionResolver, b as Session } from './shared-Bo7qdYgi.cjs';
|
|
5
|
+
export { P as Proof, c as attestationProof } from './shared-Bo7qdYgi.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Niadra for Genkit (`genkit` 1.x, Firebase Genkit for JavaScript): a model middleware for
|
package/dist/genkit.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModelMiddleware } from 'genkit/model';
|
|
2
2
|
import { ToolAction } from 'genkit/tool';
|
|
3
|
-
import { f as ModelUsage } from './client-
|
|
4
|
-
import { a as ProofSource, A as AgentMemoryOption, S as SessionResolver, b as Session } from './shared-
|
|
5
|
-
export { P as Proof, c as attestationProof } from './shared-
|
|
3
|
+
import { f as ModelUsage } from './client-CUbAjxus.js';
|
|
4
|
+
import { a as ProofSource, A as AgentMemoryOption, S as SessionResolver, b as Session } from './shared-PDIMXzXx.js';
|
|
5
|
+
export { P as Proof, c as attestationProof } from './shared-PDIMXzXx.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Niadra for Genkit (`genkit` 1.x, Firebase Genkit for JavaScript): a model middleware for
|
package/dist/google-adk.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context, LlmRequest, LlmResponse, BaseTool, ReadonlyContext } from '@google/adk';
|
|
2
|
-
import { f as ModelUsage } from './client-
|
|
3
|
-
import { b as Session, a as ProofSource, A as AgentMemoryOption } from './shared-
|
|
4
|
-
export { P as Proof, c as attestationProof } from './shared-
|
|
2
|
+
import { f as ModelUsage } from './client-CUbAjxus.cjs';
|
|
3
|
+
import { b as Session, a as ProofSource, A as AgentMemoryOption } from './shared-Bo7qdYgi.cjs';
|
|
4
|
+
export { P as Proof, c as attestationProof } from './shared-Bo7qdYgi.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Niadra for the Agent Development Kit for TypeScript (`@google/adk` 2.x): model callbacks and the
|
package/dist/google-adk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context, LlmRequest, LlmResponse, BaseTool, ReadonlyContext } from '@google/adk';
|
|
2
|
-
import { f as ModelUsage } from './client-
|
|
3
|
-
import { b as Session, a as ProofSource, A as AgentMemoryOption } from './shared-
|
|
4
|
-
export { P as Proof, c as attestationProof } from './shared-
|
|
2
|
+
import { f as ModelUsage } from './client-CUbAjxus.js';
|
|
3
|
+
import { b as Session, a as ProofSource, A as AgentMemoryOption } from './shared-PDIMXzXx.js';
|
|
4
|
+
export { P as Proof, c as attestationProof } from './shared-PDIMXzXx.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Niadra for the Agent Development Kit for TypeScript (`@google/adk` 2.x): model callbacks and the
|
package/dist/google-genai.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as ModelUsage } from './client-
|
|
2
|
-
import { W as WrapOptions } from './intercept-
|
|
3
|
-
import { S as SessionResolver } from './shared-
|
|
4
|
-
export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-
|
|
1
|
+
import { f as ModelUsage } from './client-CUbAjxus.cjs';
|
|
2
|
+
import { W as WrapOptions } from './intercept-Ue3ovmWl.cjs';
|
|
3
|
+
import { S as SessionResolver } from './shared-Bo7qdYgi.cjs';
|
|
4
|
+
export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-Bo7qdYgi.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Niadra for the Google Gen AI SDK (`@google/genai`), as `wrap()` is for OpenAI.
|
package/dist/google-genai.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as ModelUsage } from './client-
|
|
2
|
-
import { W as WrapOptions } from './intercept-
|
|
3
|
-
import { S as SessionResolver } from './shared-
|
|
4
|
-
export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-
|
|
1
|
+
import { f as ModelUsage } from './client-CUbAjxus.js';
|
|
2
|
+
import { W as WrapOptions } from './intercept-Dkzcel9G.js';
|
|
3
|
+
import { S as SessionResolver } from './shared-PDIMXzXx.js';
|
|
4
|
+
export { A as AgentMemoryOption, P as Proof, a as ProofSource, b as Session, c as attestationProof } from './shared-PDIMXzXx.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Niadra for the Google Gen AI SDK (`@google/genai`), as `wrap()` is for OpenAI.
|
package/dist/index.cjs
CHANGED
|
@@ -525,7 +525,7 @@ function internalRecord(span, ref, act) {
|
|
|
525
525
|
}
|
|
526
526
|
|
|
527
527
|
// src/version.ts
|
|
528
|
-
var VERSION = "0.11.
|
|
528
|
+
var VERSION = "0.11.3";
|
|
529
529
|
|
|
530
530
|
// src/transport.ts
|
|
531
531
|
var RETRYABLE_WRITE_STATUS = /* @__PURE__ */ new Set([408, 421, 429, 500, 502, 503, 504]);
|
|
@@ -5780,6 +5780,13 @@ var handles = {
|
|
|
5780
5780
|
appUserId: (value, options) => build("app_user_id", value, void 0, options),
|
|
5781
5781
|
/** The id of a person or organization in a system of record; `system` names that system, such as `crm`. */
|
|
5782
5782
|
systemId: (value, system, options) => build("system_id", value, system, options),
|
|
5783
|
+
/**
|
|
5784
|
+
* Someone who works for your company, by the id one of your systems gives them: `staff("U-17", "hr")`.
|
|
5785
|
+
* A conversation with staff is internal: the agent reads what your team may read, and what the person says
|
|
5786
|
+
* is your company's word. A conversation with anyone else is customer-facing, whatever the key. Only a
|
|
5787
|
+
* system id names staff: a phone or an e-mail always names a customer.
|
|
5788
|
+
*/
|
|
5789
|
+
staff: (value, system) => build("system_id", value, system, { subjectKind: "staff" }),
|
|
5783
5790
|
/**
|
|
5784
5791
|
* A person's national document, such as a CPF: `govIdHmac("529.982.247-25", "BR")`. Send the number
|
|
5785
5792
|
* itself, never a hash of it: the server checks its check digits, then keeps only a keyed hash with your
|