@niadra/sdk 0.11.0 → 0.11.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +19 -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 +32 -10
  9. package/dist/cli.js.map +1 -1
  10. package/dist/{client-CG257pe3.d.cts → client-C0FxHZgk.d.cts} +12 -1
  11. package/dist/{client-CG257pe3.d.ts → client-C0FxHZgk.d.ts} +12 -1
  12. package/dist/cloudflare-agents.d.cts +3 -3
  13. package/dist/cloudflare-agents.d.ts +3 -3
  14. package/dist/elevenlabs.d.cts +5 -5
  15. package/dist/elevenlabs.d.ts +5 -5
  16. package/dist/genkit.d.cts +3 -3
  17. package/dist/genkit.d.ts +3 -3
  18. package/dist/google-adk.d.cts +3 -3
  19. package/dist/google-adk.d.ts +3 -3
  20. package/dist/google-genai.d.cts +4 -4
  21. package/dist/google-genai.d.ts +4 -4
  22. package/dist/index.cjs +39 -10
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +10 -3
  25. package/dist/index.d.ts +10 -3
  26. package/dist/index.js +39 -10
  27. package/dist/index.js.map +1 -1
  28. package/dist/{intercept-CvbXtKsU.d.cts → intercept--jszljK3.d.cts} +1 -1
  29. package/dist/{intercept-EqNiV5f2.d.ts → intercept-BTSgDwBp.d.ts} +1 -1
  30. package/dist/langchain.d.cts +3 -3
  31. package/dist/langchain.d.ts +3 -3
  32. package/dist/livekit.cjs +7 -0
  33. package/dist/livekit.cjs.map +1 -1
  34. package/dist/livekit.d.cts +3 -3
  35. package/dist/livekit.d.ts +3 -3
  36. package/dist/livekit.js +7 -0
  37. package/dist/livekit.js.map +1 -1
  38. package/dist/llamaindex.d.cts +3 -3
  39. package/dist/llamaindex.d.ts +3 -3
  40. package/dist/mastra.d.cts +3 -3
  41. package/dist/mastra.d.ts +3 -3
  42. package/dist/openai-agents.d.cts +3 -3
  43. package/dist/openai-agents.d.ts +3 -3
  44. package/dist/retell.d.cts +5 -5
  45. package/dist/retell.d.ts +5 -5
  46. package/dist/{shared-Dmo7pRV5.d.cts → shared-BgH4GypR.d.cts} +1 -1
  47. package/dist/{shared--OTV6MgP.d.ts → shared-DNEUVdMh.d.ts} +1 -1
  48. package/dist/strands.d.cts +3 -3
  49. package/dist/strands.d.ts +3 -3
  50. package/dist/twilio.cjs +7 -0
  51. package/dist/twilio.cjs.map +1 -1
  52. package/dist/twilio.d.cts +4 -4
  53. package/dist/twilio.d.ts +4 -4
  54. package/dist/twilio.js +7 -0
  55. package/dist/twilio.js.map +1 -1
  56. package/dist/vapi.d.cts +5 -5
  57. package/dist/vapi.d.ts +5 -5
  58. package/dist/voltagent.d.cts +3 -3
  59. package/dist/voltagent.d.ts +3 -3
  60. package/dist/{webhook-Bcgl38Nz.d.ts → webhook-CmjN8aRy.d.ts} +1 -1
  61. package/dist/{webhook-CPc6wZKf.d.cts → webhook-JVLjLq-R.d.cts} +1 -1
  62. package/dist/whatsapp.cjs +7 -0
  63. package/dist/whatsapp.cjs.map +1 -1
  64. package/dist/whatsapp.d.cts +2 -2
  65. package/dist/whatsapp.d.ts +2 -2
  66. package/dist/whatsapp.js +7 -0
  67. package/dist/whatsapp.js.map +1 -1
  68. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ConstraintsBlock, H as HardConstraint, N as NiadraError, a as ClaimRecord, b as ClaimCategory, I as InternalText, s as shingles, c as Niadra, R as Resolvers, d as ContextResponse, M as Mode, T as TurnPins, e as ContextResult, f as ModelUsage, L as Logger, S as SubjectKind, g as Handle, O as ObjectRef } from './client-CG257pe3.cjs';
2
- export { A as AGENT_MEMORY_TOOL_DEFINITIONS, h as AGENT_MEMORY_TOOL_NAMES, i as ActionEvent, j as ActionInfo, k as Actions, l as Admin, m as AgentMemoryBlock, n as AgentMemoryParams, o as AgentMemoryResult, p as AgentMemorySearchRequest, q as AgentMemorySearchResponse, r as AgentMemorySource, t as AgentNote, u as AgentNoteKind, v as AgentNoteOrigin, w as AgentNoteProposal, x as AgentNoteStatus, y as AgentNoteVisibility, z as AgentSession, B as AgentState, D as AgentStateConflict, E as AgentStateHandle, F as AgentStateMeta, G as AgentStateMetaPage, J as AgentStateReadRequest, K as AgentStateScope, P as AgentStateWrite, Q as AgentStateWriteResult, U as AgentTurnOptions, V as AnchorEvidence, W as Api, X as ArmComparison, Y as ArmOutcomes, Z as AskedAttribute, _ as AssertionMethod, $ as AssertionOutcome, a0 as AssertionStats, a1 as Attribute, a2 as AttributeEntry, a3 as AttributionReport, a4 as AttributionRow, a5 as AttributionTotal, a6 as Backing, a7 as BackingReport, a8 as BackingSources, a9 as BatchItem, aa as BatchRequest, ab as BatchResponse, ac as BiFile, ad as BiUpload, ae as BiUploadRequest, af as BlobError, ag as BlobStore, ah as BlockSubject, ai as BoundArg, aj as BoundTools, ak as BudgetBlock, al as BudgetCut, am as BudgetPack, an as BudgetUse, ao as CacheDirectives, ap as CacheOptions, aq as CallCapture, ar as CaseClosed, as as CaseOpened, at as Change, au as ChangePage, av as ChangeSinceSeen, aw as ChannelState, ax as CheckBatchRequest, ay as CheckBatchResponse, az as CheckOptions, aA as CheckRequest, aB as CheckResult, aC as ClaimCheck, aD as ClaimCheckOptions, aE as ClaimContractSummary, aF as ClaimEvidence, aG as ClaimEvidenceRef, aH as ClaimKind, aI as ClaimOutputs, aJ as ClaimParams, aK as ClaimRelease, aL as ClaimRequest, aM as ClaimValue, aN as ClaimVerdict, aO as ClaimVia, aP as Claimed, aQ as ClientOptions, aR as ClosedBy, aS as Closes, aT as Commitment, aU as CommitmentDecided, aV as CommitmentDecidedDetail, aW as CommitmentMade, aX as CommitmentMadeDetail, aY as CommitmentRef, aZ as CommitmentWithdrawn, a_ as CommitmentWithdrawnDetail, a$ as CompanyRule, b0 as Conflict, b1 as ConflictCounts, b2 as ConstraintOrigin, b3 as ConstraintsRequest, b4 as ContactBudget, b5 as ContactBudgetUse, b6 as ContactClaims, b7 as ContactCount, b8 as ContactGateway, b9 as ContactKey, ba as ContactKeys, bb as ContactMade, bc as ContactMadeDetail, bd as ContactTokenParams, be as ContactTokenRefusal, bf as Content, bg as ContentMarker, bh as ContentMode, bi as ContentRelease, bj as ContentReleaseResult, bk as ContentResolver, bl as ContextFormat, bm as ContextOptions, bn as ContextPack, bo as ContextParams, bp as ContextRequest, bq as ContextSource, br as ContextStamp, bs as ContextUseBucket, bt as ContextUseDimension, bu as ContextUseEntry, bv as ContextUseParams, bw as ContextUseRate, bx as ContextUseReport, by as Conversation, bz as ConversationAction, bA as ConversationEndedItem, bB as ConversationEvent, bC as ConversationParams, bD as CoordinationBlock, bE as CoordinationOverview, bF as CoordinationReport, bG as CoordinationReportPage, bH as CorrectParams, bI as CorrectionAction, bJ as CorrectionRequest, bK as CounterfactualCase, bL as CounterfactualEngaged, bM as CounterfactualEngagement, bN as CounterfactualRunCreate, bO as CounterfactualRunPage, bP as CreateAgentNoteRequest, bQ as DEFAULT_CACHE, bR as DEFAULT_QUEUE, bS as DEFAULT_TIMEOUTS, bT as DEFAULT_VOICE, bU as DELETE, bV as DataIssue, bW as DataIssuePage, bX as Declarations, bY as DeclareRequest, bZ as DeclareResult, b_ as DeliveryPath, b$ as DerivedState, c0 as Detect, c1 as DriftChanges, c2 as Effect, c3 as EffectCount, c4 as EffectDeclared, c5 as EffectDetail, c6 as EffectKind, c7 as EffectReserve, c8 as EffectSeen, c9 as EffectSettle, ca as EffectState, cb as EffectStatus, cc as Engaged, cd as EpisodeOut, ce as Erasure, cf as EventItem, cg as EventKind, ch as Evidence, ci as ExperimentReport, cj as ExperimentResult, ck as ExportPackage, cl as FAIL_CLOSED, cm as FactHistory, cn as FactOut, co as Feature, cp as Feedback, cq as FeedbackAction, cr as FeedbackParams, cs as FeedbackRequest, ct as Fetched, cu as FieldCoverage, cv as FieldState, cw as ForgetTarget, cx as GatewayOptions, cy as Guard, cz as GuardLike, cA as GuardOptions, cB as Guarded, cC as HandleType, cD as Handoff, cE as HandoffContext, cF as HandoffCreate, cG as HandoffDeclared, cH as HandoffDetail, cI as HandoffItem, cJ as HandoffOutcome, cK as HandoffPackage, cL as HandoffParams, cM as HeartbeatItem, cN as HistoryFilters, cO as HistoryItem, cP as HistoryItemKind, cQ as IdentifyItem, cR as IdentifyParams, cS as IdentityCalibration, cT as Include, cU as Inference, cV as InferenceCorrection, cW as InferencePage, cX as IngestStatus, cY as InterestState, cZ as InterleavingReport, c_ as InterleavingRow, c$ as InterleavingTotal, d0 as InternalText, d1 as ItemError, d2 as ItemStatus, d3 as ItemVersion, d4 as KeyIdentity, d5 as LeaseDeclared, d6 as LeaseDetail, d7 as LegalHold, d8 as LegalHoldCreate, d9 as LegalHoldRelease, da as Link, db as LinkMethod, dc as LinkRequest, dd as LiveTurn, de as Lock, df as MAX_BATCH_ITEMS, dg as MAX_EVENT_TEXT, dh as MAX_MEDIA_BYTES, di as MediaUpload, dj as MediaUploadRequest, dk as MediaUploadResponse, dl as MemorySeen, dm as NOT_FOUND, dn as Natures, dp as Negation, dq as NiadraAPIError, dr as NiadraAbortError, ds as NiadraAuthenticationError, dt as NiadraConfigError, du as NiadraConnectionError, dv as NiadraContactTokenError, dw as NiadraPermissionError, dx as NiadraRateLimitError, dy as NiadraReplayRefusedError, dz as NiadraTimeoutError, dA as NiadraValidationError, dB as Notification, dC as NotificationPage, dD as ObjectCoverage, dE as ObjectInstruction, dF as ObjectMemoryOut, dG as ObjectPush, dH as ObjectPushRequest, dI as ObjectPushResponse, dJ as ObjectRead, dK as ObjectSnapshotResponse, dL as ObjectTimeline, dM as ObjectTimelineParams, dN as Observation, dO as OpenItemOut, dP as OpenItemRequest, dQ as OpenObject, dR as OpenParams, dS as OpenedItem, dT as Origin, dU as OutcomeLink, dV as OutcomePage, dW as OutcomeRequest, dX as OutcomeState, dY as Owner, dZ as OwnershipClaim, d_ as OwnershipCount, d$ as PERSONAL_DATA_TOOL_ERROR, e0 as PackGuard, e1 as PackLayer, e2 as PackSection, e3 as PackSlot, e4 as PackSlotDerived, e5 as PackStamp, e6 as PowerRequest, e7 as PowerResult, e8 as Preference, e9 as PrefetchParams, ea as PrefetchRequest, eb as Presented, ec as PresentedItem, ed as PreviousValue, ee as Problem, ef as ProfileMatch, eg as ProfileMemory, eh as PromiseRef, ei as PromoteRequest, ej as PromoteResponse, ek as ProposalStatus, el as Provenance, em as QueueOptions, en as ReadingResult, eo as ReconcileRequest, ep as ReconcileResult, eq as ReconciledLine, er as RecordedToolOptions, es as Recurrence, et as Refetch, eu as RefreshRelease, ev as RefreshReleased, ew as RefreshRequest, ex as RefreshRequestPage, ey as Refusal, ez as ReleaseDetail, eA as RememberParams, eB as RememberResult, eC as Rendered, eD as ReplayAssertion, eE as ReplayBlocker, eF as ReplayCase, eG as ReplayCaseRequest, eH as ReplayHistoryEntry, eI as ReplayResult, eJ as RequestOptions, eK as Resolved, eL as Resolver, eM as Result, eN as ResultObjects, eO as ReviewRequest, eP as ReviewRequestCreate, eQ as ReviewRequestPage, eR as ReviewResolution, eS as SaidAbout, eT as Scenario, eU as ScenarioCreate, eV as ScenarioFromReport, eW as ScenarioPage, eX as ScenarioRun, eY as ScenarioRunCreate, eZ as ScenarioRunSummary, e_ as ScenarioUpdate, e$ as ScenarioVerdict, f0 as SdkProfile, f1 as SearchRequest, f2 as SearchResponse, f3 as Seen, f4 as SeenTokens, f5 as ShadowRequest, f6 as ShadowRun, f7 as Shown, f8 as ShownValue, f9 as SlotChannelRank, fa as SlotWhy, fb as SoftConstraint, fc as SourceCoverage, fd as Speaker, fe as SpeakerRef, ff as StateMode, fg as StateReadRequest, fh as StateReadResponse, fi as StateRef, fj as StateVerifyRequest, fk as StateVerifyResponse, fl as StateView, fm as StateViewRequest, fn as StateWrite, fo as Subject, fp as SubjectToken, fq as SubjectTokenRequest, fr as Suppression, fs as SuppressionAdded, ft as SuppressionAddedDetail, fu as SuppressionLifted, fv as SuppressionLiftedDetail, fw as SuppressionPage, fx as SuppressionSalt, fy as TOOL_DEFINITIONS, fz as TOOL_NAMES, fA as TargetModel, fB as Task, fC as TaskAction, fD as TaskEndedItem, fE as TaskEvent, fF as TaskLockDeclared, fG as TaskLockDetail, fH as TaskParams, fI as TimeWindow, fJ as TimelineRequest, fK as TimelineResponse, fL as Timeouts, fM as TimerState, fN as Timestamp, fO as Timings, fP as ToolBinding, fQ as ToolCapabilities, fR as ToolDefinition, fS as ToolOptions, fT as TrackEvent, fU as TraitOut, fV as TurnAgent, fW as TurnBlob, fX as TurnBuild, fY as TurnCall, fZ as TurnCompilerPins, f_ as TurnConstraints, f$ as TurnCoordination, g0 as TurnCost, g1 as TurnEffect, g2 as TurnFlag, g3 as TurnFrame, g4 as TurnIndexEntry, g5 as TurnIndexPage, g6 as TurnKind, g7 as TurnObservation, g8 as TurnOptions, g9 as TurnOutput, ga as TurnParams, gb as TurnProvenance, gc as TurnRead, gd as TurnRecord, ge as TurnRecorder, gf as TurnRecordingOptions, gg as TurnRecordingSummary, gh as TurnSearchRequest, gi as TurnSearchResponse, gj as TurnSummary, gk as TurnTokens, gl as TurnView, gm as TurnsRequest, gn as TurnsResponse, go as TypeCoverage, gp as TypeFingerprintRequest, gq as TypeFingerprintResponse, gr as UnbackedValue, gs as UnmetDemand, gt as UnmetDemandPage, gu as Unwatch, gv as UploadParams, gw as ValueEvidence, gx as ValueKind, gy as ValueState, gz as Verdict, gA as Verification, gB as VerificationResult, gC as VerifyCheck, gD as VerifyItem, gE as VerifyMethod, gF as VerifyParams, gG as View, gH as Visibility, gI as VoiceInfo, gJ as VoiceOptions, gK as Watch, gL as WhereExpression, gM as WorkingState, gN as WriteResult, gO as checkBacking, gP as consoleLogger, gQ as currentCall, gR as currentTurn, gS as guardStream, gT as guardText, gU as recipientHash, gV as renderLive, gW as renderSuffix, gX as silentLogger, gY as tool, gZ as verifyContactToken, g_ as violatesGuard } from './client-CG257pe3.cjs';
1
+ import { C as ConstraintsBlock, H as HardConstraint, N as NiadraError, a as ClaimRecord, b as ClaimCategory, I as InternalText, s as shingles, c as Niadra, R as Resolvers, d as ContextResponse, M as Mode, T as TurnPins, e as ContextResult, f as ModelUsage, L as Logger, S as SubjectKind, g as Handle, O as ObjectRef } from './client-C0FxHZgk.cjs';
2
+ export { A as AGENT_MEMORY_TOOL_DEFINITIONS, h as AGENT_MEMORY_TOOL_NAMES, i as ActionEvent, j as ActionInfo, k as Actions, l as Admin, m as AgentMemoryBlock, n as AgentMemoryParams, o as AgentMemoryResult, p as AgentMemorySearchRequest, q as AgentMemorySearchResponse, r as AgentMemorySource, t as AgentNote, u as AgentNoteKind, v as AgentNoteOrigin, w as AgentNoteProposal, x as AgentNoteStatus, y as AgentNoteVisibility, z as AgentSession, B as AgentState, D as AgentStateConflict, E as AgentStateHandle, F as AgentStateMeta, G as AgentStateMetaPage, J as AgentStateReadRequest, K as AgentStateScope, P as AgentStateWrite, Q as AgentStateWriteResult, U as AgentTurnOptions, V as AnchorEvidence, W as Api, X as ArmComparison, Y as ArmOutcomes, Z as AskedAttribute, _ as AssertionMethod, $ as AssertionOutcome, a0 as AssertionStats, a1 as Attribute, a2 as AttributeEntry, a3 as AttributionReport, a4 as AttributionRow, a5 as AttributionTotal, a6 as Backing, a7 as BackingReport, a8 as BackingSources, a9 as BatchItem, aa as BatchRequest, ab as BatchResponse, ac as BiFile, ad as BiUpload, ae as BiUploadRequest, af as BlobError, ag as BlobStore, ah as BlockSubject, ai as BoundArg, aj as BoundTools, ak as BudgetBlock, al as BudgetCut, am as BudgetPack, an as BudgetUse, ao as CacheDirectives, ap as CacheOptions, aq as CallCapture, ar as CaseClosed, as as CaseOpened, at as Change, au as ChangePage, av as ChangeSinceSeen, aw as ChannelState, ax as CheckBatchRequest, ay as CheckBatchResponse, az as CheckOptions, aA as CheckRequest, aB as CheckResult, aC as ClaimCheck, aD as ClaimCheckOptions, aE as ClaimContractSummary, aF as ClaimEvidence, aG as ClaimEvidenceRef, aH as ClaimKind, aI as ClaimOutputs, aJ as ClaimParams, aK as ClaimRelease, aL as ClaimRequest, aM as ClaimValue, aN as ClaimVerdict, aO as ClaimVia, aP as Claimed, aQ as ClientOptions, aR as ClosedBy, aS as Closes, aT as Commitment, aU as CommitmentDecided, aV as CommitmentDecidedDetail, aW as CommitmentMade, aX as CommitmentMadeDetail, aY as CommitmentRef, aZ as CommitmentWithdrawn, a_ as CommitmentWithdrawnDetail, a$ as CompanyRule, b0 as Conflict, b1 as ConflictCounts, b2 as ConstraintOrigin, b3 as ConstraintsRequest, b4 as ContactBudget, b5 as ContactBudgetUse, b6 as ContactClaims, b7 as ContactCount, b8 as ContactGateway, b9 as ContactKey, ba as ContactKeys, bb as ContactMade, bc as ContactMadeDetail, bd as ContactTokenParams, be as ContactTokenRefusal, bf as Content, bg as ContentMarker, bh as ContentMode, bi as ContentRelease, bj as ContentReleaseResult, bk as ContentResolver, bl as ContextFormat, bm as ContextOptions, bn as ContextPack, bo as ContextParams, bp as ContextRequest, bq as ContextSource, br as ContextStamp, bs as ContextUseBucket, bt as ContextUseDimension, bu as ContextUseEntry, bv as ContextUseParams, bw as ContextUseRate, bx as ContextUseReport, by as Conversation, bz as ConversationAction, bA as ConversationEndedItem, bB as ConversationEvent, bC as ConversationParams, bD as CoordinationBlock, bE as CoordinationOverview, bF as CoordinationReport, bG as CoordinationReportPage, bH as CorrectParams, bI as CorrectionAction, bJ as CorrectionRequest, bK as CounterfactualCase, bL as CounterfactualEngaged, bM as CounterfactualEngagement, bN as CounterfactualRunCreate, bO as CounterfactualRunPage, bP as CreateAgentNoteRequest, bQ as DEFAULT_CACHE, bR as DEFAULT_QUEUE, bS as DEFAULT_TIMEOUTS, bT as DEFAULT_VOICE, bU as DELETE, bV as DataIssue, bW as DataIssuePage, bX as Declarations, bY as DeclareRequest, bZ as DeclareResult, b_ as DeliveryPath, b$ as DerivedState, c0 as Detect, c1 as DriftChanges, c2 as Effect, c3 as EffectCount, c4 as EffectDeclared, c5 as EffectDetail, c6 as EffectKind, c7 as EffectReserve, c8 as EffectSeen, c9 as EffectSettle, ca as EffectState, cb as EffectStatus, cc as Engaged, cd as EpisodeOut, ce as Erasure, cf as EventItem, cg as EventKind, ch as Evidence, ci as ExperimentReport, cj as ExperimentResult, ck as ExportPackage, cl as FAIL_CLOSED, cm as FactHistory, cn as FactOut, co as Feature, cp as Feedback, cq as FeedbackAction, cr as FeedbackParams, cs as FeedbackRequest, ct as Fetched, cu as FieldCoverage, cv as FieldState, cw as ForgetTarget, cx as GatewayOptions, cy as Guard, cz as GuardLike, cA as GuardOptions, cB as Guarded, cC as HandleType, cD as Handoff, cE as HandoffContext, cF as HandoffCreate, cG as HandoffDeclared, cH as HandoffDetail, cI as HandoffItem, cJ as HandoffOutcome, cK as HandoffPackage, cL as HandoffParams, cM as HeartbeatItem, cN as HistoryFilters, cO as HistoryItem, cP as HistoryItemKind, cQ as IdentifyItem, cR as IdentifyParams, cS as IdentityCalibration, cT as Include, cU as Inference, cV as InferenceCorrection, cW as InferencePage, cX as IngestStatus, cY as InterestState, cZ as InterleavingReport, c_ as InterleavingRow, c$ as InterleavingTotal, d0 as InternalText, d1 as ItemError, d2 as ItemStatus, d3 as ItemVersion, d4 as KeyIdentity, d5 as LeaseDeclared, d6 as LeaseDetail, d7 as LegalHold, d8 as LegalHoldCreate, d9 as LegalHoldRelease, da as Link, db as LinkMethod, dc as LinkRequest, dd as LiveTurn, de as Lock, df as MAX_BATCH_ITEMS, dg as MAX_EVENT_TEXT, dh as MAX_MEDIA_BYTES, di as MediaUpload, dj as MediaUploadRequest, dk as MediaUploadResponse, dl as MemorySeen, dm as NOT_FOUND, dn as Natures, dp as Negation, dq as NiadraAPIError, dr as NiadraAbortError, ds as NiadraAuthenticationError, dt as NiadraConfigError, du as NiadraConnectionError, dv as NiadraContactTokenError, dw as NiadraPermissionError, dx as NiadraRateLimitError, dy as NiadraReplayRefusedError, dz as NiadraTimeoutError, dA as NiadraValidationError, dB as Notification, dC as NotificationPage, dD as ObjectCoverage, dE as ObjectInstruction, dF as ObjectMemoryOut, dG as ObjectPush, dH as ObjectPushRequest, dI as ObjectPushResponse, dJ as ObjectRead, dK as ObjectSnapshotResponse, dL as ObjectTimeline, dM as ObjectTimelineParams, dN as Observation, dO as OpenItemOut, dP as OpenItemRequest, dQ as OpenObject, dR as OpenParams, dS as OpenedItem, dT as Origin, dU as OutcomeLink, dV as OutcomePage, dW as OutcomeRequest, dX as OutcomeState, dY as Owner, dZ as OwnershipClaim, d_ as OwnershipCount, d$ as PERSONAL_DATA_TOOL_ERROR, e0 as PackGuard, e1 as PackLayer, e2 as PackSection, e3 as PackSlot, e4 as PackSlotDerived, e5 as PackStamp, e6 as PowerRequest, e7 as PowerResult, e8 as Preference, e9 as PrefetchParams, ea as PrefetchRequest, eb as Presented, ec as PresentedItem, ed as PreviousValue, ee as Problem, ef as ProfileMatch, eg as ProfileMemory, eh as PromiseRef, ei as PromoteRequest, ej as PromoteResponse, ek as ProposalStatus, el as Provenance, em as QueueOptions, en as ReadingResult, eo as ReconcileRequest, ep as ReconcileResult, eq as ReconciledLine, er as RecordedToolOptions, es as Recurrence, et as Refetch, eu as RefreshRelease, ev as RefreshReleased, ew as RefreshRequest, ex as RefreshRequestPage, ey as Refusal, ez as ReleaseDetail, eA as RememberParams, eB as RememberResult, eC as Rendered, eD as ReplayAssertion, eE as ReplayBlocker, eF as ReplayCase, eG as ReplayCaseRequest, eH as ReplayHistoryEntry, eI as ReplayResult, eJ as RequestOptions, eK as Resolved, eL as Resolver, eM as Result, eN as ResultObjects, eO as ReviewRequest, eP as ReviewRequestCreate, eQ as ReviewRequestPage, eR as ReviewResolution, eS as SaidAbout, eT as Scenario, eU as ScenarioCreate, eV as ScenarioFromReport, eW as ScenarioPage, eX as ScenarioRun, eY as ScenarioRunCreate, eZ as ScenarioRunSummary, e_ as ScenarioUpdate, e$ as ScenarioVerdict, f0 as SdkProfile, f1 as SearchRequest, f2 as SearchResponse, f3 as Seen, f4 as SeenTokens, f5 as ShadowRequest, f6 as ShadowRun, f7 as Shown, f8 as ShownValue, f9 as SlotChannelRank, fa as SlotWhy, fb as SoftConstraint, fc as SourceCoverage, fd as Speaker, fe as SpeakerRef, ff as StateMode, fg as StateReadRequest, fh as StateReadResponse, fi as StateRef, fj as StateVerifyRequest, fk as StateVerifyResponse, fl as StateView, fm as StateViewRequest, fn as StateWrite, fo as Subject, fp as SubjectToken, fq as SubjectTokenRequest, fr as Suppression, fs as SuppressionAdded, ft as SuppressionAddedDetail, fu as SuppressionLifted, fv as SuppressionLiftedDetail, fw as SuppressionPage, fx as SuppressionSalt, fy as TOOL_DEFINITIONS, fz as TOOL_NAMES, fA as TargetModel, fB as Task, fC as TaskAction, fD as TaskEndedItem, fE as TaskEvent, fF as TaskLockDeclared, fG as TaskLockDetail, fH as TaskParams, fI as TimeWindow, fJ as TimelineRequest, fK as TimelineResponse, fL as Timeouts, fM as TimerState, fN as Timestamp, fO as Timings, fP as ToolBinding, fQ as ToolCapabilities, fR as ToolDefinition, fS as ToolOptions, fT as TrackEvent, fU as TraitOut, fV as TurnAgent, fW as TurnBlob, fX as TurnBuild, fY as TurnCall, fZ as TurnCompilerPins, f_ as TurnConstraints, f$ as TurnCoordination, g0 as TurnCost, g1 as TurnEffect, g2 as TurnFlag, g3 as TurnFrame, g4 as TurnIndexEntry, g5 as TurnIndexPage, g6 as TurnKind, g7 as TurnObservation, g8 as TurnOptions, g9 as TurnOutput, ga as TurnParams, gb as TurnProvenance, gc as TurnRead, gd as TurnRecord, ge as TurnRecorder, gf as TurnRecordingOptions, gg as TurnRecordingSummary, gh as TurnSearchRequest, gi as TurnSearchResponse, gj as TurnSummary, gk as TurnTokens, gl as TurnView, gm as TurnsRequest, gn as TurnsResponse, go as TypeCoverage, gp as TypeFingerprintRequest, gq as TypeFingerprintResponse, gr as UnbackedValue, gs as UnmetDemand, gt as UnmetDemandPage, gu as Unwatch, gv as UploadParams, gw as ValueEvidence, gx as ValueKind, gy as ValueState, gz as Verdict, gA as Verification, gB as VerificationResult, gC as VerifyCheck, gD as VerifyItem, gE as VerifyMethod, gF as VerifyParams, gG as View, gH as Visibility, gI as VoiceInfo, gJ as VoiceOptions, gK as Watch, gL as WhereExpression, gM as WorkingState, gN as WriteResult, gO as checkBacking, gP as consoleLogger, gQ as currentCall, gR as currentTurn, gS as guardStream, gT as guardText, gU as recipientHash, gV as renderLive, gW as renderSuffix, gX as silentLogger, gY as tool, gZ as verifyContactToken, g_ as violatesGuard } from './client-C0FxHZgk.cjs';
3
3
 
4
4
  /**
5
5
  * The constraints block rendered for one tool call (`spec/constraints.md`, sections 6 and 7): what the
@@ -1148,6 +1148,13 @@ declare const handles: {
1148
1148
  readonly appUserId: (value: string, options?: HandleOptions) => Handle;
1149
1149
  /** The id of a person or organization in a system of record; `system` names that system, such as `crm`. */
1150
1150
  readonly systemId: (value: string, system: string, options?: HandleOptions) => Handle;
1151
+ /**
1152
+ * Someone who works for your company, by the id one of your systems gives them: `staff("U-17", "hr")`.
1153
+ * A conversation with staff is internal: the agent reads what your team may read, and what the person says
1154
+ * is your company's word. A conversation with anyone else is customer-facing, whatever the key. Only a
1155
+ * system id names staff: a phone or an e-mail always names a customer.
1156
+ */
1157
+ readonly staff: (value: string, system: string) => Handle;
1151
1158
  /**
1152
1159
  * A person's national document, such as a CPF: `govIdHmac("529.982.247-25", "BR")`. Send the number
1153
1160
  * itself, never a hash of it: the server checks its check digits, then keeps only a keyed hash with your
@@ -1201,6 +1208,6 @@ declare function baseURLFromKey(key: ParsedApiKey): string;
1201
1208
  */
1202
1209
  declare function uuidv7(now?: number): string;
1203
1210
 
1204
- declare const VERSION = "0.11.0";
1211
+ declare const VERSION = "0.11.2";
1205
1212
 
1206
1213
  export { ClaimCategory, ClaimRecord, type Binding as ConstraintBinding, type BindingArg as ConstraintBindingArg, type Call$1 as ConstraintCall, type Rendering as ConstraintRendering, ConstraintsBlock, type Honored as ConstraintsHonored, ContextResponse, ContextResult, Counterfactual, type Element as CounterfactualElement, type CounterfactualOptions, type CounterfactualRun, type CounterfactualRunOptions, type ExposureTokenRefusal, Handle, HardConstraint, Logger, type Logic, ModelUsage, Niadra, NiadraDestinationError, NiadraError, NiadraExposureTokenError, ObjectRef, type ParsedApiKey, type ReplayAgent, type ReplayInput, Mode as ReplayMode, type RunOptions as ReplayOptions, type ReplayRun, Replayer, ResolverWorker, Resolvers, type SessionSource, SubjectKind, TurnPins, VERSION, type WrapSession, baseURLFromKey, canonicalDestination, canonicalJson, index as claims, exposureToken, expr, handles, honored as honoredConstraints, injectContext, derive$1 as introspect, jsonDigest, modelUsage, overlapAtK, parseApiKey, parseExposureToken, pinDifferences, providerOf, render as renderConstraints, satisfies as satisfiesConstraint, suppressionKey, toObjectRef, tokenCounts, useAsyncLocalStorage, uuidv7, wrap };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ConstraintsBlock, H as HardConstraint, N as NiadraError, a as ClaimRecord, b as ClaimCategory, I as InternalText, s as shingles, c as Niadra, R as Resolvers, d as ContextResponse, M as Mode, T as TurnPins, e as ContextResult, f as ModelUsage, L as Logger, S as SubjectKind, g as Handle, O as ObjectRef } from './client-CG257pe3.js';
2
- export { A as AGENT_MEMORY_TOOL_DEFINITIONS, h as AGENT_MEMORY_TOOL_NAMES, i as ActionEvent, j as ActionInfo, k as Actions, l as Admin, m as AgentMemoryBlock, n as AgentMemoryParams, o as AgentMemoryResult, p as AgentMemorySearchRequest, q as AgentMemorySearchResponse, r as AgentMemorySource, t as AgentNote, u as AgentNoteKind, v as AgentNoteOrigin, w as AgentNoteProposal, x as AgentNoteStatus, y as AgentNoteVisibility, z as AgentSession, B as AgentState, D as AgentStateConflict, E as AgentStateHandle, F as AgentStateMeta, G as AgentStateMetaPage, J as AgentStateReadRequest, K as AgentStateScope, P as AgentStateWrite, Q as AgentStateWriteResult, U as AgentTurnOptions, V as AnchorEvidence, W as Api, X as ArmComparison, Y as ArmOutcomes, Z as AskedAttribute, _ as AssertionMethod, $ as AssertionOutcome, a0 as AssertionStats, a1 as Attribute, a2 as AttributeEntry, a3 as AttributionReport, a4 as AttributionRow, a5 as AttributionTotal, a6 as Backing, a7 as BackingReport, a8 as BackingSources, a9 as BatchItem, aa as BatchRequest, ab as BatchResponse, ac as BiFile, ad as BiUpload, ae as BiUploadRequest, af as BlobError, ag as BlobStore, ah as BlockSubject, ai as BoundArg, aj as BoundTools, ak as BudgetBlock, al as BudgetCut, am as BudgetPack, an as BudgetUse, ao as CacheDirectives, ap as CacheOptions, aq as CallCapture, ar as CaseClosed, as as CaseOpened, at as Change, au as ChangePage, av as ChangeSinceSeen, aw as ChannelState, ax as CheckBatchRequest, ay as CheckBatchResponse, az as CheckOptions, aA as CheckRequest, aB as CheckResult, aC as ClaimCheck, aD as ClaimCheckOptions, aE as ClaimContractSummary, aF as ClaimEvidence, aG as ClaimEvidenceRef, aH as ClaimKind, aI as ClaimOutputs, aJ as ClaimParams, aK as ClaimRelease, aL as ClaimRequest, aM as ClaimValue, aN as ClaimVerdict, aO as ClaimVia, aP as Claimed, aQ as ClientOptions, aR as ClosedBy, aS as Closes, aT as Commitment, aU as CommitmentDecided, aV as CommitmentDecidedDetail, aW as CommitmentMade, aX as CommitmentMadeDetail, aY as CommitmentRef, aZ as CommitmentWithdrawn, a_ as CommitmentWithdrawnDetail, a$ as CompanyRule, b0 as Conflict, b1 as ConflictCounts, b2 as ConstraintOrigin, b3 as ConstraintsRequest, b4 as ContactBudget, b5 as ContactBudgetUse, b6 as ContactClaims, b7 as ContactCount, b8 as ContactGateway, b9 as ContactKey, ba as ContactKeys, bb as ContactMade, bc as ContactMadeDetail, bd as ContactTokenParams, be as ContactTokenRefusal, bf as Content, bg as ContentMarker, bh as ContentMode, bi as ContentRelease, bj as ContentReleaseResult, bk as ContentResolver, bl as ContextFormat, bm as ContextOptions, bn as ContextPack, bo as ContextParams, bp as ContextRequest, bq as ContextSource, br as ContextStamp, bs as ContextUseBucket, bt as ContextUseDimension, bu as ContextUseEntry, bv as ContextUseParams, bw as ContextUseRate, bx as ContextUseReport, by as Conversation, bz as ConversationAction, bA as ConversationEndedItem, bB as ConversationEvent, bC as ConversationParams, bD as CoordinationBlock, bE as CoordinationOverview, bF as CoordinationReport, bG as CoordinationReportPage, bH as CorrectParams, bI as CorrectionAction, bJ as CorrectionRequest, bK as CounterfactualCase, bL as CounterfactualEngaged, bM as CounterfactualEngagement, bN as CounterfactualRunCreate, bO as CounterfactualRunPage, bP as CreateAgentNoteRequest, bQ as DEFAULT_CACHE, bR as DEFAULT_QUEUE, bS as DEFAULT_TIMEOUTS, bT as DEFAULT_VOICE, bU as DELETE, bV as DataIssue, bW as DataIssuePage, bX as Declarations, bY as DeclareRequest, bZ as DeclareResult, b_ as DeliveryPath, b$ as DerivedState, c0 as Detect, c1 as DriftChanges, c2 as Effect, c3 as EffectCount, c4 as EffectDeclared, c5 as EffectDetail, c6 as EffectKind, c7 as EffectReserve, c8 as EffectSeen, c9 as EffectSettle, ca as EffectState, cb as EffectStatus, cc as Engaged, cd as EpisodeOut, ce as Erasure, cf as EventItem, cg as EventKind, ch as Evidence, ci as ExperimentReport, cj as ExperimentResult, ck as ExportPackage, cl as FAIL_CLOSED, cm as FactHistory, cn as FactOut, co as Feature, cp as Feedback, cq as FeedbackAction, cr as FeedbackParams, cs as FeedbackRequest, ct as Fetched, cu as FieldCoverage, cv as FieldState, cw as ForgetTarget, cx as GatewayOptions, cy as Guard, cz as GuardLike, cA as GuardOptions, cB as Guarded, cC as HandleType, cD as Handoff, cE as HandoffContext, cF as HandoffCreate, cG as HandoffDeclared, cH as HandoffDetail, cI as HandoffItem, cJ as HandoffOutcome, cK as HandoffPackage, cL as HandoffParams, cM as HeartbeatItem, cN as HistoryFilters, cO as HistoryItem, cP as HistoryItemKind, cQ as IdentifyItem, cR as IdentifyParams, cS as IdentityCalibration, cT as Include, cU as Inference, cV as InferenceCorrection, cW as InferencePage, cX as IngestStatus, cY as InterestState, cZ as InterleavingReport, c_ as InterleavingRow, c$ as InterleavingTotal, d0 as InternalText, d1 as ItemError, d2 as ItemStatus, d3 as ItemVersion, d4 as KeyIdentity, d5 as LeaseDeclared, d6 as LeaseDetail, d7 as LegalHold, d8 as LegalHoldCreate, d9 as LegalHoldRelease, da as Link, db as LinkMethod, dc as LinkRequest, dd as LiveTurn, de as Lock, df as MAX_BATCH_ITEMS, dg as MAX_EVENT_TEXT, dh as MAX_MEDIA_BYTES, di as MediaUpload, dj as MediaUploadRequest, dk as MediaUploadResponse, dl as MemorySeen, dm as NOT_FOUND, dn as Natures, dp as Negation, dq as NiadraAPIError, dr as NiadraAbortError, ds as NiadraAuthenticationError, dt as NiadraConfigError, du as NiadraConnectionError, dv as NiadraContactTokenError, dw as NiadraPermissionError, dx as NiadraRateLimitError, dy as NiadraReplayRefusedError, dz as NiadraTimeoutError, dA as NiadraValidationError, dB as Notification, dC as NotificationPage, dD as ObjectCoverage, dE as ObjectInstruction, dF as ObjectMemoryOut, dG as ObjectPush, dH as ObjectPushRequest, dI as ObjectPushResponse, dJ as ObjectRead, dK as ObjectSnapshotResponse, dL as ObjectTimeline, dM as ObjectTimelineParams, dN as Observation, dO as OpenItemOut, dP as OpenItemRequest, dQ as OpenObject, dR as OpenParams, dS as OpenedItem, dT as Origin, dU as OutcomeLink, dV as OutcomePage, dW as OutcomeRequest, dX as OutcomeState, dY as Owner, dZ as OwnershipClaim, d_ as OwnershipCount, d$ as PERSONAL_DATA_TOOL_ERROR, e0 as PackGuard, e1 as PackLayer, e2 as PackSection, e3 as PackSlot, e4 as PackSlotDerived, e5 as PackStamp, e6 as PowerRequest, e7 as PowerResult, e8 as Preference, e9 as PrefetchParams, ea as PrefetchRequest, eb as Presented, ec as PresentedItem, ed as PreviousValue, ee as Problem, ef as ProfileMatch, eg as ProfileMemory, eh as PromiseRef, ei as PromoteRequest, ej as PromoteResponse, ek as ProposalStatus, el as Provenance, em as QueueOptions, en as ReadingResult, eo as ReconcileRequest, ep as ReconcileResult, eq as ReconciledLine, er as RecordedToolOptions, es as Recurrence, et as Refetch, eu as RefreshRelease, ev as RefreshReleased, ew as RefreshRequest, ex as RefreshRequestPage, ey as Refusal, ez as ReleaseDetail, eA as RememberParams, eB as RememberResult, eC as Rendered, eD as ReplayAssertion, eE as ReplayBlocker, eF as ReplayCase, eG as ReplayCaseRequest, eH as ReplayHistoryEntry, eI as ReplayResult, eJ as RequestOptions, eK as Resolved, eL as Resolver, eM as Result, eN as ResultObjects, eO as ReviewRequest, eP as ReviewRequestCreate, eQ as ReviewRequestPage, eR as ReviewResolution, eS as SaidAbout, eT as Scenario, eU as ScenarioCreate, eV as ScenarioFromReport, eW as ScenarioPage, eX as ScenarioRun, eY as ScenarioRunCreate, eZ as ScenarioRunSummary, e_ as ScenarioUpdate, e$ as ScenarioVerdict, f0 as SdkProfile, f1 as SearchRequest, f2 as SearchResponse, f3 as Seen, f4 as SeenTokens, f5 as ShadowRequest, f6 as ShadowRun, f7 as Shown, f8 as ShownValue, f9 as SlotChannelRank, fa as SlotWhy, fb as SoftConstraint, fc as SourceCoverage, fd as Speaker, fe as SpeakerRef, ff as StateMode, fg as StateReadRequest, fh as StateReadResponse, fi as StateRef, fj as StateVerifyRequest, fk as StateVerifyResponse, fl as StateView, fm as StateViewRequest, fn as StateWrite, fo as Subject, fp as SubjectToken, fq as SubjectTokenRequest, fr as Suppression, fs as SuppressionAdded, ft as SuppressionAddedDetail, fu as SuppressionLifted, fv as SuppressionLiftedDetail, fw as SuppressionPage, fx as SuppressionSalt, fy as TOOL_DEFINITIONS, fz as TOOL_NAMES, fA as TargetModel, fB as Task, fC as TaskAction, fD as TaskEndedItem, fE as TaskEvent, fF as TaskLockDeclared, fG as TaskLockDetail, fH as TaskParams, fI as TimeWindow, fJ as TimelineRequest, fK as TimelineResponse, fL as Timeouts, fM as TimerState, fN as Timestamp, fO as Timings, fP as ToolBinding, fQ as ToolCapabilities, fR as ToolDefinition, fS as ToolOptions, fT as TrackEvent, fU as TraitOut, fV as TurnAgent, fW as TurnBlob, fX as TurnBuild, fY as TurnCall, fZ as TurnCompilerPins, f_ as TurnConstraints, f$ as TurnCoordination, g0 as TurnCost, g1 as TurnEffect, g2 as TurnFlag, g3 as TurnFrame, g4 as TurnIndexEntry, g5 as TurnIndexPage, g6 as TurnKind, g7 as TurnObservation, g8 as TurnOptions, g9 as TurnOutput, ga as TurnParams, gb as TurnProvenance, gc as TurnRead, gd as TurnRecord, ge as TurnRecorder, gf as TurnRecordingOptions, gg as TurnRecordingSummary, gh as TurnSearchRequest, gi as TurnSearchResponse, gj as TurnSummary, gk as TurnTokens, gl as TurnView, gm as TurnsRequest, gn as TurnsResponse, go as TypeCoverage, gp as TypeFingerprintRequest, gq as TypeFingerprintResponse, gr as UnbackedValue, gs as UnmetDemand, gt as UnmetDemandPage, gu as Unwatch, gv as UploadParams, gw as ValueEvidence, gx as ValueKind, gy as ValueState, gz as Verdict, gA as Verification, gB as VerificationResult, gC as VerifyCheck, gD as VerifyItem, gE as VerifyMethod, gF as VerifyParams, gG as View, gH as Visibility, gI as VoiceInfo, gJ as VoiceOptions, gK as Watch, gL as WhereExpression, gM as WorkingState, gN as WriteResult, gO as checkBacking, gP as consoleLogger, gQ as currentCall, gR as currentTurn, gS as guardStream, gT as guardText, gU as recipientHash, gV as renderLive, gW as renderSuffix, gX as silentLogger, gY as tool, gZ as verifyContactToken, g_ as violatesGuard } from './client-CG257pe3.js';
1
+ import { C as ConstraintsBlock, H as HardConstraint, N as NiadraError, a as ClaimRecord, b as ClaimCategory, I as InternalText, s as shingles, c as Niadra, R as Resolvers, d as ContextResponse, M as Mode, T as TurnPins, e as ContextResult, f as ModelUsage, L as Logger, S as SubjectKind, g as Handle, O as ObjectRef } from './client-C0FxHZgk.js';
2
+ export { A as AGENT_MEMORY_TOOL_DEFINITIONS, h as AGENT_MEMORY_TOOL_NAMES, i as ActionEvent, j as ActionInfo, k as Actions, l as Admin, m as AgentMemoryBlock, n as AgentMemoryParams, o as AgentMemoryResult, p as AgentMemorySearchRequest, q as AgentMemorySearchResponse, r as AgentMemorySource, t as AgentNote, u as AgentNoteKind, v as AgentNoteOrigin, w as AgentNoteProposal, x as AgentNoteStatus, y as AgentNoteVisibility, z as AgentSession, B as AgentState, D as AgentStateConflict, E as AgentStateHandle, F as AgentStateMeta, G as AgentStateMetaPage, J as AgentStateReadRequest, K as AgentStateScope, P as AgentStateWrite, Q as AgentStateWriteResult, U as AgentTurnOptions, V as AnchorEvidence, W as Api, X as ArmComparison, Y as ArmOutcomes, Z as AskedAttribute, _ as AssertionMethod, $ as AssertionOutcome, a0 as AssertionStats, a1 as Attribute, a2 as AttributeEntry, a3 as AttributionReport, a4 as AttributionRow, a5 as AttributionTotal, a6 as Backing, a7 as BackingReport, a8 as BackingSources, a9 as BatchItem, aa as BatchRequest, ab as BatchResponse, ac as BiFile, ad as BiUpload, ae as BiUploadRequest, af as BlobError, ag as BlobStore, ah as BlockSubject, ai as BoundArg, aj as BoundTools, ak as BudgetBlock, al as BudgetCut, am as BudgetPack, an as BudgetUse, ao as CacheDirectives, ap as CacheOptions, aq as CallCapture, ar as CaseClosed, as as CaseOpened, at as Change, au as ChangePage, av as ChangeSinceSeen, aw as ChannelState, ax as CheckBatchRequest, ay as CheckBatchResponse, az as CheckOptions, aA as CheckRequest, aB as CheckResult, aC as ClaimCheck, aD as ClaimCheckOptions, aE as ClaimContractSummary, aF as ClaimEvidence, aG as ClaimEvidenceRef, aH as ClaimKind, aI as ClaimOutputs, aJ as ClaimParams, aK as ClaimRelease, aL as ClaimRequest, aM as ClaimValue, aN as ClaimVerdict, aO as ClaimVia, aP as Claimed, aQ as ClientOptions, aR as ClosedBy, aS as Closes, aT as Commitment, aU as CommitmentDecided, aV as CommitmentDecidedDetail, aW as CommitmentMade, aX as CommitmentMadeDetail, aY as CommitmentRef, aZ as CommitmentWithdrawn, a_ as CommitmentWithdrawnDetail, a$ as CompanyRule, b0 as Conflict, b1 as ConflictCounts, b2 as ConstraintOrigin, b3 as ConstraintsRequest, b4 as ContactBudget, b5 as ContactBudgetUse, b6 as ContactClaims, b7 as ContactCount, b8 as ContactGateway, b9 as ContactKey, ba as ContactKeys, bb as ContactMade, bc as ContactMadeDetail, bd as ContactTokenParams, be as ContactTokenRefusal, bf as Content, bg as ContentMarker, bh as ContentMode, bi as ContentRelease, bj as ContentReleaseResult, bk as ContentResolver, bl as ContextFormat, bm as ContextOptions, bn as ContextPack, bo as ContextParams, bp as ContextRequest, bq as ContextSource, br as ContextStamp, bs as ContextUseBucket, bt as ContextUseDimension, bu as ContextUseEntry, bv as ContextUseParams, bw as ContextUseRate, bx as ContextUseReport, by as Conversation, bz as ConversationAction, bA as ConversationEndedItem, bB as ConversationEvent, bC as ConversationParams, bD as CoordinationBlock, bE as CoordinationOverview, bF as CoordinationReport, bG as CoordinationReportPage, bH as CorrectParams, bI as CorrectionAction, bJ as CorrectionRequest, bK as CounterfactualCase, bL as CounterfactualEngaged, bM as CounterfactualEngagement, bN as CounterfactualRunCreate, bO as CounterfactualRunPage, bP as CreateAgentNoteRequest, bQ as DEFAULT_CACHE, bR as DEFAULT_QUEUE, bS as DEFAULT_TIMEOUTS, bT as DEFAULT_VOICE, bU as DELETE, bV as DataIssue, bW as DataIssuePage, bX as Declarations, bY as DeclareRequest, bZ as DeclareResult, b_ as DeliveryPath, b$ as DerivedState, c0 as Detect, c1 as DriftChanges, c2 as Effect, c3 as EffectCount, c4 as EffectDeclared, c5 as EffectDetail, c6 as EffectKind, c7 as EffectReserve, c8 as EffectSeen, c9 as EffectSettle, ca as EffectState, cb as EffectStatus, cc as Engaged, cd as EpisodeOut, ce as Erasure, cf as EventItem, cg as EventKind, ch as Evidence, ci as ExperimentReport, cj as ExperimentResult, ck as ExportPackage, cl as FAIL_CLOSED, cm as FactHistory, cn as FactOut, co as Feature, cp as Feedback, cq as FeedbackAction, cr as FeedbackParams, cs as FeedbackRequest, ct as Fetched, cu as FieldCoverage, cv as FieldState, cw as ForgetTarget, cx as GatewayOptions, cy as Guard, cz as GuardLike, cA as GuardOptions, cB as Guarded, cC as HandleType, cD as Handoff, cE as HandoffContext, cF as HandoffCreate, cG as HandoffDeclared, cH as HandoffDetail, cI as HandoffItem, cJ as HandoffOutcome, cK as HandoffPackage, cL as HandoffParams, cM as HeartbeatItem, cN as HistoryFilters, cO as HistoryItem, cP as HistoryItemKind, cQ as IdentifyItem, cR as IdentifyParams, cS as IdentityCalibration, cT as Include, cU as Inference, cV as InferenceCorrection, cW as InferencePage, cX as IngestStatus, cY as InterestState, cZ as InterleavingReport, c_ as InterleavingRow, c$ as InterleavingTotal, d0 as InternalText, d1 as ItemError, d2 as ItemStatus, d3 as ItemVersion, d4 as KeyIdentity, d5 as LeaseDeclared, d6 as LeaseDetail, d7 as LegalHold, d8 as LegalHoldCreate, d9 as LegalHoldRelease, da as Link, db as LinkMethod, dc as LinkRequest, dd as LiveTurn, de as Lock, df as MAX_BATCH_ITEMS, dg as MAX_EVENT_TEXT, dh as MAX_MEDIA_BYTES, di as MediaUpload, dj as MediaUploadRequest, dk as MediaUploadResponse, dl as MemorySeen, dm as NOT_FOUND, dn as Natures, dp as Negation, dq as NiadraAPIError, dr as NiadraAbortError, ds as NiadraAuthenticationError, dt as NiadraConfigError, du as NiadraConnectionError, dv as NiadraContactTokenError, dw as NiadraPermissionError, dx as NiadraRateLimitError, dy as NiadraReplayRefusedError, dz as NiadraTimeoutError, dA as NiadraValidationError, dB as Notification, dC as NotificationPage, dD as ObjectCoverage, dE as ObjectInstruction, dF as ObjectMemoryOut, dG as ObjectPush, dH as ObjectPushRequest, dI as ObjectPushResponse, dJ as ObjectRead, dK as ObjectSnapshotResponse, dL as ObjectTimeline, dM as ObjectTimelineParams, dN as Observation, dO as OpenItemOut, dP as OpenItemRequest, dQ as OpenObject, dR as OpenParams, dS as OpenedItem, dT as Origin, dU as OutcomeLink, dV as OutcomePage, dW as OutcomeRequest, dX as OutcomeState, dY as Owner, dZ as OwnershipClaim, d_ as OwnershipCount, d$ as PERSONAL_DATA_TOOL_ERROR, e0 as PackGuard, e1 as PackLayer, e2 as PackSection, e3 as PackSlot, e4 as PackSlotDerived, e5 as PackStamp, e6 as PowerRequest, e7 as PowerResult, e8 as Preference, e9 as PrefetchParams, ea as PrefetchRequest, eb as Presented, ec as PresentedItem, ed as PreviousValue, ee as Problem, ef as ProfileMatch, eg as ProfileMemory, eh as PromiseRef, ei as PromoteRequest, ej as PromoteResponse, ek as ProposalStatus, el as Provenance, em as QueueOptions, en as ReadingResult, eo as ReconcileRequest, ep as ReconcileResult, eq as ReconciledLine, er as RecordedToolOptions, es as Recurrence, et as Refetch, eu as RefreshRelease, ev as RefreshReleased, ew as RefreshRequest, ex as RefreshRequestPage, ey as Refusal, ez as ReleaseDetail, eA as RememberParams, eB as RememberResult, eC as Rendered, eD as ReplayAssertion, eE as ReplayBlocker, eF as ReplayCase, eG as ReplayCaseRequest, eH as ReplayHistoryEntry, eI as ReplayResult, eJ as RequestOptions, eK as Resolved, eL as Resolver, eM as Result, eN as ResultObjects, eO as ReviewRequest, eP as ReviewRequestCreate, eQ as ReviewRequestPage, eR as ReviewResolution, eS as SaidAbout, eT as Scenario, eU as ScenarioCreate, eV as ScenarioFromReport, eW as ScenarioPage, eX as ScenarioRun, eY as ScenarioRunCreate, eZ as ScenarioRunSummary, e_ as ScenarioUpdate, e$ as ScenarioVerdict, f0 as SdkProfile, f1 as SearchRequest, f2 as SearchResponse, f3 as Seen, f4 as SeenTokens, f5 as ShadowRequest, f6 as ShadowRun, f7 as Shown, f8 as ShownValue, f9 as SlotChannelRank, fa as SlotWhy, fb as SoftConstraint, fc as SourceCoverage, fd as Speaker, fe as SpeakerRef, ff as StateMode, fg as StateReadRequest, fh as StateReadResponse, fi as StateRef, fj as StateVerifyRequest, fk as StateVerifyResponse, fl as StateView, fm as StateViewRequest, fn as StateWrite, fo as Subject, fp as SubjectToken, fq as SubjectTokenRequest, fr as Suppression, fs as SuppressionAdded, ft as SuppressionAddedDetail, fu as SuppressionLifted, fv as SuppressionLiftedDetail, fw as SuppressionPage, fx as SuppressionSalt, fy as TOOL_DEFINITIONS, fz as TOOL_NAMES, fA as TargetModel, fB as Task, fC as TaskAction, fD as TaskEndedItem, fE as TaskEvent, fF as TaskLockDeclared, fG as TaskLockDetail, fH as TaskParams, fI as TimeWindow, fJ as TimelineRequest, fK as TimelineResponse, fL as Timeouts, fM as TimerState, fN as Timestamp, fO as Timings, fP as ToolBinding, fQ as ToolCapabilities, fR as ToolDefinition, fS as ToolOptions, fT as TrackEvent, fU as TraitOut, fV as TurnAgent, fW as TurnBlob, fX as TurnBuild, fY as TurnCall, fZ as TurnCompilerPins, f_ as TurnConstraints, f$ as TurnCoordination, g0 as TurnCost, g1 as TurnEffect, g2 as TurnFlag, g3 as TurnFrame, g4 as TurnIndexEntry, g5 as TurnIndexPage, g6 as TurnKind, g7 as TurnObservation, g8 as TurnOptions, g9 as TurnOutput, ga as TurnParams, gb as TurnProvenance, gc as TurnRead, gd as TurnRecord, ge as TurnRecorder, gf as TurnRecordingOptions, gg as TurnRecordingSummary, gh as TurnSearchRequest, gi as TurnSearchResponse, gj as TurnSummary, gk as TurnTokens, gl as TurnView, gm as TurnsRequest, gn as TurnsResponse, go as TypeCoverage, gp as TypeFingerprintRequest, gq as TypeFingerprintResponse, gr as UnbackedValue, gs as UnmetDemand, gt as UnmetDemandPage, gu as Unwatch, gv as UploadParams, gw as ValueEvidence, gx as ValueKind, gy as ValueState, gz as Verdict, gA as Verification, gB as VerificationResult, gC as VerifyCheck, gD as VerifyItem, gE as VerifyMethod, gF as VerifyParams, gG as View, gH as Visibility, gI as VoiceInfo, gJ as VoiceOptions, gK as Watch, gL as WhereExpression, gM as WorkingState, gN as WriteResult, gO as checkBacking, gP as consoleLogger, gQ as currentCall, gR as currentTurn, gS as guardStream, gT as guardText, gU as recipientHash, gV as renderLive, gW as renderSuffix, gX as silentLogger, gY as tool, gZ as verifyContactToken, g_ as violatesGuard } from './client-C0FxHZgk.js';
3
3
 
4
4
  /**
5
5
  * The constraints block rendered for one tool call (`spec/constraints.md`, sections 6 and 7): what the
@@ -1148,6 +1148,13 @@ declare const handles: {
1148
1148
  readonly appUserId: (value: string, options?: HandleOptions) => Handle;
1149
1149
  /** The id of a person or organization in a system of record; `system` names that system, such as `crm`. */
1150
1150
  readonly systemId: (value: string, system: string, options?: HandleOptions) => Handle;
1151
+ /**
1152
+ * Someone who works for your company, by the id one of your systems gives them: `staff("U-17", "hr")`.
1153
+ * A conversation with staff is internal: the agent reads what your team may read, and what the person says
1154
+ * is your company's word. A conversation with anyone else is customer-facing, whatever the key. Only a
1155
+ * system id names staff: a phone or an e-mail always names a customer.
1156
+ */
1157
+ readonly staff: (value: string, system: string) => Handle;
1151
1158
  /**
1152
1159
  * A person's national document, such as a CPF: `govIdHmac("529.982.247-25", "BR")`. Send the number
1153
1160
  * itself, never a hash of it: the server checks its check digits, then keeps only a keyed hash with your
@@ -1201,6 +1208,6 @@ declare function baseURLFromKey(key: ParsedApiKey): string;
1201
1208
  */
1202
1209
  declare function uuidv7(now?: number): string;
1203
1210
 
1204
- declare const VERSION = "0.11.0";
1211
+ declare const VERSION = "0.11.2";
1205
1212
 
1206
1213
  export { ClaimCategory, ClaimRecord, type Binding as ConstraintBinding, type BindingArg as ConstraintBindingArg, type Call$1 as ConstraintCall, type Rendering as ConstraintRendering, ConstraintsBlock, type Honored as ConstraintsHonored, ContextResponse, ContextResult, Counterfactual, type Element as CounterfactualElement, type CounterfactualOptions, type CounterfactualRun, type CounterfactualRunOptions, type ExposureTokenRefusal, Handle, HardConstraint, Logger, type Logic, ModelUsage, Niadra, NiadraDestinationError, NiadraError, NiadraExposureTokenError, ObjectRef, type ParsedApiKey, type ReplayAgent, type ReplayInput, Mode as ReplayMode, type RunOptions as ReplayOptions, type ReplayRun, Replayer, ResolverWorker, Resolvers, type SessionSource, SubjectKind, TurnPins, VERSION, type WrapSession, baseURLFromKey, canonicalDestination, canonicalJson, index as claims, exposureToken, expr, handles, honored as honoredConstraints, injectContext, derive$1 as introspect, jsonDigest, modelUsage, overlapAtK, parseApiKey, parseExposureToken, pinDifferences, providerOf, render as renderConstraints, satisfies as satisfiesConstraint, suppressionKey, toObjectRef, tokenCounts, useAsyncLocalStorage, uuidv7, wrap };
package/dist/index.js CHANGED
@@ -523,7 +523,7 @@ function internalRecord(span, ref, act) {
523
523
  }
524
524
 
525
525
  // src/version.ts
526
- var VERSION = "0.11.0";
526
+ var VERSION = "0.11.2";
527
527
 
528
528
  // src/transport.ts
529
529
  var RETRYABLE_WRITE_STATUS = /* @__PURE__ */ new Set([408, 421, 429, 500, 502, 503, 504]);
@@ -5778,6 +5778,13 @@ var handles = {
5778
5778
  appUserId: (value, options) => build("app_user_id", value, void 0, options),
5779
5779
  /** The id of a person or organization in a system of record; `system` names that system, such as `crm`. */
5780
5780
  systemId: (value, system, options) => build("system_id", value, system, options),
5781
+ /**
5782
+ * Someone who works for your company, by the id one of your systems gives them: `staff("U-17", "hr")`.
5783
+ * A conversation with staff is internal: the agent reads what your team may read, and what the person says
5784
+ * is your company's word. A conversation with anyone else is customer-facing, whatever the key. Only a
5785
+ * system id names staff: a phone or an e-mail always names a customer.
5786
+ */
5787
+ staff: (value, system) => build("system_id", value, system, { subjectKind: "staff" }),
5781
5788
  /**
5782
5789
  * A person's national document, such as a CPF: `govIdHmac("529.982.247-25", "BR")`. Send the number
5783
5790
  * itself, never a hash of it: the server checks its check digits, then keeps only a keyed hash with your
@@ -7712,6 +7719,7 @@ var silentLogger = { debug: noop, warn: noop, error: noop };
7712
7719
  // src/options.ts
7713
7720
  var DEFAULT_TIMEOUTS = {
7714
7721
  context: 300,
7722
+ contextFirst: 1e3,
7715
7723
  contextVoice: 200,
7716
7724
  contextVoiceStart: 1500,
7717
7725
  navigation: 600,
@@ -8522,6 +8530,7 @@ function rttWarnings(rttMs, timeouts) {
8522
8530
  }
8523
8531
 
8524
8532
  // src/client.ts
8533
+ var READ_KEYS_KEPT = 4096;
8525
8534
  function readEnv(name) {
8526
8535
  try {
8527
8536
  const env = globalThis.process?.env;
@@ -8549,6 +8558,8 @@ var Niadra = class _Niadra {
8549
8558
  voiceStarted = false;
8550
8559
  /** A probe is on its way: until it ends, default read budgets get `timeouts.connect` on top. */
8551
8560
  measuring = false;
8561
+ /** The keys whose read answered in this client, oldest first: a first read gets `timeouts.contextFirst`. */
8562
+ answeredReads = /* @__PURE__ */ new Map();
8552
8563
  voiceWarned = false;
8553
8564
  strict;
8554
8565
  /** Where the client reports what it swallows in fail-open mode. */
@@ -8735,14 +8746,28 @@ var Niadra = class _Niadra {
8735
8746
  if (this.content.registered && result2.state) result2.state = await this.content.fill(result2.state);
8736
8747
  return result2;
8737
8748
  }
8738
- readContext(core, params, request, options) {
8739
- const timeout = options.timeout ?? (request.view === "voice" ? this.timeouts.contextVoice : this.readBudget("context"));
8749
+ async readContext(core, params, request, options) {
8740
8750
  const { query: own3, ...pinned2 } = request;
8741
8751
  const query = turnText(own3 ?? params.turn);
8752
+ const readKey = cacheKey(pinned2);
8753
+ const first = !this.answeredReads.has(readKey);
8754
+ const timeout = options.timeout ?? (request.view === "voice" ? this.timeouts.contextVoice : this.readBudget("context", first));
8742
8755
  const voiceCache = this.voiceCache(core, pinned2, options.cache);
8743
- if (voiceCache) return this.voiceContext(core, voiceCache, pinned2, query, timeout, options);
8744
- if (query !== null) return this.turnContext(core, pinned2, query, timeout, options);
8745
- return this.pinnedContext(core, pinned2, timeout, options);
8756
+ let result2;
8757
+ if (voiceCache) result2 = await this.voiceContext(core, voiceCache, pinned2, query, timeout, options);
8758
+ else if (query !== null) result2 = await this.turnContext(core, pinned2, query, timeout, options);
8759
+ else result2 = await this.pinnedContext(core, pinned2, timeout, options);
8760
+ if (result2.error === null) this.readAnswered(readKey);
8761
+ return result2;
8762
+ }
8763
+ readAnswered(key2) {
8764
+ this.answeredReads.delete(key2);
8765
+ this.answeredReads.set(key2, true);
8766
+ while (this.answeredReads.size > READ_KEYS_KEPT) {
8767
+ const oldest = this.answeredReads.keys().next().value;
8768
+ if (oldest === void 0) break;
8769
+ this.answeredReads.delete(oldest);
8770
+ }
8746
8771
  }
8747
8772
  /**
8748
8773
  * The SDK profile of this key's space: the features it turned on, the claim contract and the summarized
@@ -9150,7 +9175,9 @@ var Niadra = class _Niadra {
9150
9175
  const key2 = AgentMemoryCache.key(params);
9151
9176
  const fresh = cache?.fresh(key2);
9152
9177
  if (fresh) return blockResult(fresh, "cache");
9153
- const timeout = options.timeout ?? (params.view === "voice" ? this.timeouts.contextVoice : this.readBudget("context"));
9178
+ const readKey = `agent-memory:${key2}`;
9179
+ const first = !this.answeredReads.has(readKey);
9180
+ const timeout = options.timeout ?? (params.view === "voice" ? this.timeouts.contextVoice : this.readBudget("context", first));
9154
9181
  const spec = this.readSpec("GET", "/v1/agent-memory/block", void 0, timeout, options);
9155
9182
  spec.query = {
9156
9183
  max_tokens: String(params.max_tokens ?? 300),
@@ -9161,6 +9188,7 @@ var Niadra = class _Niadra {
9161
9188
  if (etag) spec.headers = { ...options.headers, "if-none-match": etag };
9162
9189
  try {
9163
9190
  const response = await core.transport.request(spec);
9191
+ this.readAnswered(readKey);
9164
9192
  cache?.store(key2, response.data);
9165
9193
  return blockResult(response.data, "network");
9166
9194
  } catch (error) {
@@ -9649,12 +9677,13 @@ var Niadra = class _Niadra {
9649
9677
  * to the region goes on top, so an agent far from the region (Sao Paulo, 170 ms from us-east-2) is not
9650
9678
  * timed out by the network; one the caller set is a ceiling.
9651
9679
  */
9652
- readBudget(name) {
9680
+ readBudget(name, first = false) {
9653
9681
  if (!this.defaultReads.has(name)) return this.timeouts[name];
9682
+ const base = first && name === "context" ? Math.max(this.timeouts.context, this.timeouts.contextFirst) : this.timeouts[name];
9654
9683
  const rtt = this.voice.rtt;
9655
- if (rtt !== null) return this.timeouts[name] + rtt;
9684
+ if (rtt !== null) return base + rtt;
9656
9685
  const open = this.core?.transport.connectionOpen() ?? false;
9657
- return this.measuring && open ? this.timeouts[name] + this.timeouts.connect : this.timeouts[name];
9686
+ return this.measuring && open ? base + this.timeouts.connect : base;
9658
9687
  }
9659
9688
  /** The client reads in voice: the voice budgets' warnings matter from now on. */
9660
9689
  startVoice(core) {