@niadra/sdk 0.7.0 → 0.9.1

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 (125) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +55 -7
  3. package/dist/ai-sdk.cjs +3 -4
  4. package/dist/ai-sdk.cjs.map +1 -1
  5. package/dist/ai-sdk.d.cts +3 -3
  6. package/dist/ai-sdk.d.ts +3 -3
  7. package/dist/ai-sdk.js +3 -4
  8. package/dist/ai-sdk.js.map +1 -1
  9. package/dist/anthropic.cjs +1 -1
  10. package/dist/anthropic.cjs.map +1 -1
  11. package/dist/anthropic.d.cts +4 -4
  12. package/dist/anthropic.d.ts +4 -4
  13. package/dist/anthropic.js +1 -1
  14. package/dist/anthropic.js.map +1 -1
  15. package/dist/bedrock.cjs +1 -1
  16. package/dist/bedrock.cjs.map +1 -1
  17. package/dist/bedrock.d.cts +4 -4
  18. package/dist/bedrock.d.ts +4 -4
  19. package/dist/bedrock.js +1 -1
  20. package/dist/bedrock.js.map +1 -1
  21. package/dist/cli.js +157 -60
  22. package/dist/cli.js.map +1 -1
  23. package/dist/{client-DsIxZxZk.d.cts → client-CWMxmJHs.d.cts} +91 -28
  24. package/dist/{client-DsIxZxZk.d.ts → client-CWMxmJHs.d.ts} +91 -28
  25. package/dist/cloudflare-agents.cjs +1 -1
  26. package/dist/cloudflare-agents.cjs.map +1 -1
  27. package/dist/cloudflare-agents.d.cts +3 -3
  28. package/dist/cloudflare-agents.d.ts +3 -3
  29. package/dist/cloudflare-agents.js +1 -1
  30. package/dist/cloudflare-agents.js.map +1 -1
  31. package/dist/elevenlabs.cjs +1 -1
  32. package/dist/elevenlabs.cjs.map +1 -1
  33. package/dist/elevenlabs.d.cts +5 -5
  34. package/dist/elevenlabs.d.ts +5 -5
  35. package/dist/elevenlabs.js +1 -1
  36. package/dist/elevenlabs.js.map +1 -1
  37. package/dist/genkit.cjs +1 -1
  38. package/dist/genkit.cjs.map +1 -1
  39. package/dist/genkit.d.cts +3 -3
  40. package/dist/genkit.d.ts +3 -3
  41. package/dist/genkit.js +1 -1
  42. package/dist/genkit.js.map +1 -1
  43. package/dist/google-adk.cjs +1 -1
  44. package/dist/google-adk.cjs.map +1 -1
  45. package/dist/google-adk.d.cts +3 -3
  46. package/dist/google-adk.d.ts +3 -3
  47. package/dist/google-adk.js +1 -1
  48. package/dist/google-adk.js.map +1 -1
  49. package/dist/google-genai.cjs +1 -1
  50. package/dist/google-genai.cjs.map +1 -1
  51. package/dist/google-genai.d.cts +4 -4
  52. package/dist/google-genai.d.ts +4 -4
  53. package/dist/google-genai.js +1 -1
  54. package/dist/google-genai.js.map +1 -1
  55. package/dist/index.cjs +156 -57
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.d.cts +6 -8
  58. package/dist/index.d.ts +6 -8
  59. package/dist/index.js +156 -57
  60. package/dist/index.js.map +1 -1
  61. package/dist/{intercept-D7qFCaRb.d.ts → intercept-Bv0nLpSw.d.ts} +1 -1
  62. package/dist/{intercept-0_lJE6k1.d.cts → intercept-CGngQI8B.d.cts} +1 -1
  63. package/dist/langchain.cjs +3 -4
  64. package/dist/langchain.cjs.map +1 -1
  65. package/dist/langchain.d.cts +3 -3
  66. package/dist/langchain.d.ts +3 -3
  67. package/dist/langchain.js +3 -4
  68. package/dist/langchain.js.map +1 -1
  69. package/dist/livekit.cjs +1 -1
  70. package/dist/livekit.cjs.map +1 -1
  71. package/dist/livekit.d.cts +3 -3
  72. package/dist/livekit.d.ts +3 -3
  73. package/dist/livekit.js +1 -1
  74. package/dist/livekit.js.map +1 -1
  75. package/dist/llamaindex.cjs +1 -1
  76. package/dist/llamaindex.cjs.map +1 -1
  77. package/dist/llamaindex.d.cts +3 -3
  78. package/dist/llamaindex.d.ts +3 -3
  79. package/dist/llamaindex.js +1 -1
  80. package/dist/llamaindex.js.map +1 -1
  81. package/dist/mastra.cjs +3 -4
  82. package/dist/mastra.cjs.map +1 -1
  83. package/dist/mastra.d.cts +3 -3
  84. package/dist/mastra.d.ts +3 -3
  85. package/dist/mastra.js +3 -4
  86. package/dist/mastra.js.map +1 -1
  87. package/dist/openai-agents.cjs +1 -1
  88. package/dist/openai-agents.cjs.map +1 -1
  89. package/dist/openai-agents.d.cts +3 -3
  90. package/dist/openai-agents.d.ts +3 -3
  91. package/dist/openai-agents.js +1 -1
  92. package/dist/openai-agents.js.map +1 -1
  93. package/dist/retell.cjs +1 -1
  94. package/dist/retell.cjs.map +1 -1
  95. package/dist/retell.d.cts +5 -5
  96. package/dist/retell.d.ts +5 -5
  97. package/dist/retell.js +1 -1
  98. package/dist/retell.js.map +1 -1
  99. package/dist/{shared-Bb5B59Bu.d.ts → shared-B4Ef2Wpg.d.ts} +1 -1
  100. package/dist/{shared-DTPWVlWm.d.cts → shared-Cq8mz-7m.d.cts} +1 -1
  101. package/dist/strands.cjs +1 -1
  102. package/dist/strands.cjs.map +1 -1
  103. package/dist/strands.d.cts +3 -3
  104. package/dist/strands.d.ts +3 -3
  105. package/dist/strands.js +1 -1
  106. package/dist/strands.js.map +1 -1
  107. package/dist/twilio.d.cts +4 -4
  108. package/dist/twilio.d.ts +4 -4
  109. package/dist/vapi.cjs +1 -1
  110. package/dist/vapi.cjs.map +1 -1
  111. package/dist/vapi.d.cts +5 -5
  112. package/dist/vapi.d.ts +5 -5
  113. package/dist/vapi.js +1 -1
  114. package/dist/vapi.js.map +1 -1
  115. package/dist/voltagent.cjs +1 -1
  116. package/dist/voltagent.cjs.map +1 -1
  117. package/dist/voltagent.d.cts +3 -3
  118. package/dist/voltagent.d.ts +3 -3
  119. package/dist/voltagent.js +1 -1
  120. package/dist/voltagent.js.map +1 -1
  121. package/dist/{webhook-CG4om_DK.d.cts → webhook-jTx_SegV.d.cts} +1 -1
  122. package/dist/{webhook-1ozGyksG.d.ts → webhook-z2TjUzjv.d.ts} +1 -1
  123. package/dist/whatsapp.d.cts +2 -2
  124. package/dist/whatsapp.d.ts +2 -2
  125. package/package.json +3 -2
@@ -848,10 +848,27 @@ interface Rendered {
848
848
  residual?: string[];
849
849
  tool: string;
850
850
  }
851
+ /** A number an object showed the subject, as they were shown it. */
852
+ interface ShownValue {
853
+ /**
854
+ * Whether it may be claimed now: its type allows claims of the field, and no more than the field's age for
855
+ * claims has passed since it was shown.
856
+ */
857
+ claim_safe: boolean;
858
+ /** The field's role, for claims. */
859
+ role?: string | null;
860
+ v: number;
861
+ }
851
862
  interface Shown {
852
863
  last_at?: string | null;
853
864
  ref: string;
854
865
  times: number;
866
+ /**
867
+ * The numbers the object was last shown with (a price, a total, a discount, an installment), by field: each
868
+ * field its type declares as `money`, `percent` or `number`. A claim check takes them as evidence for the
869
+ * offer an agent quotes back.
870
+ */
871
+ values?: Record<string, ShownValue>;
855
872
  }
856
873
  interface SoftConstraint {
857
874
  attr: string;
@@ -1150,12 +1167,14 @@ interface OutcomeLink {
1150
1167
  /** The outcome definition of the `measurement` document. */
1151
1168
  outcome: string;
1152
1169
  position?: number | null;
1170
+ /** The purchase it counts in, when the revenue definition counts a split purchase's parts as one order. */
1171
+ purchase?: string | null;
1153
1172
  /** The state the object or its line is in. */
1154
1173
  state: string;
1155
1174
  turn_id?: string | null;
1156
1175
  /** When the outcome first counted. */
1157
1176
  valid_at: string;
1158
- /** In the currency's minor units; absent: none. */
1177
+ /** In the currency's minor units, as the signed revenue definition counts it; absent: none. */
1159
1178
  value_minor?: number | null;
1160
1179
  }
1161
1180
  interface OutcomePage {
@@ -1493,6 +1512,28 @@ interface ContentRelease {
1493
1512
  interface ContentReleaseResult {
1494
1513
  released: boolean;
1495
1514
  }
1515
+ /**
1516
+ * A field the type derives from the related objects of one relation (a look's pieces), computed at this
1517
+ * read and never stored. A related object whose data is not known leaves it `unobserved`, unless the answer
1518
+ * is already decided.
1519
+ */
1520
+ interface DerivedState {
1521
+ logic: "yes" | "no" | "unobserved";
1522
+ /** The related objects it was computed over. */
1523
+ over: number;
1524
+ /**
1525
+ * When it is not `yes`, the related objects, as `type:namespace:id`, that kept it from `yes`: for `all` and
1526
+ * `any` the ones the condition does not hold for or that are not known, for `count`, `min` and `max` the
1527
+ * ones not known. In the relation's order, the first 10.
1528
+ */
1529
+ pieces_out?: string[];
1530
+ /**
1531
+ * How many of them were not known: out of the working set, not an exact match (`status_field`), or with the
1532
+ * data the condition reads not observed.
1533
+ */
1534
+ unknown: number;
1535
+ v?: unknown;
1536
+ }
1496
1537
  /**
1497
1538
  * What changed between the declaration and the type the schema proposes now, as counts: never a new name,
1498
1539
  * a value or a definition (object-type spec, 8.8.2).
@@ -1628,6 +1669,8 @@ interface ObjectRead {
1628
1669
  */
1629
1670
  blocked?: Record<string, string[]>;
1630
1671
  declared_gaps?: string[];
1672
+ /** The type's derived fields, from the related objects. */
1673
+ derived?: Record<string, DerivedState>;
1631
1674
  derived_status?: "current" | "expired_by_input" | null;
1632
1675
  /** The inputs whose change expired it. */
1633
1676
  expired_by?: string[];
@@ -1680,9 +1723,10 @@ interface Provenance {
1680
1723
  interface ObjectPush {
1681
1724
  fields: Record<string, unknown>;
1682
1725
  /**
1683
- * For a customer's derived object (a quote): the objects its inputs are fields of, by the name its type
1684
- * gives them, as `type:namespace:id` (`{"lead": "lead:crm:L-9"}`). When a field of one of them changes, the
1685
- * object expires, naming the input.
1726
+ * For a derived object (a customer's quote, a shared best offer): the objects its inputs are fields of, by
1727
+ * the name its type gives them, as `type:namespace:id` (`{"lead": "lead:crm:L-9"}`). When a field of one of
1728
+ * them changes, the object expires, naming the input. A shared object's inputs are shared objects: a
1729
+ * customer's object is never one.
1686
1730
  */
1687
1731
  inputs?: Record<string, string> | null;
1688
1732
  provenance: Provenance;
@@ -2424,6 +2468,12 @@ interface ContextResult {
2424
2468
  /** The pack as typed sections, when read with `format: "json"`; otherwise `null`. */
2425
2469
  pack: ContextPack | null;
2426
2470
  source: ContextSource;
2471
+ /**
2472
+ * How long ago Niadra sent or confirmed the pack served, in milliseconds: 0 for an answer just received,
2473
+ * growing while a cached pack is served (`cache`, `stale`, or `fallback` with Niadra down), and `null` when
2474
+ * there is no pack.
2475
+ */
2476
+ ageMs: number | null;
2427
2477
  /** The response this result was built from; `null` when `source` is `none`. */
2428
2478
  response: ContextResponse | null;
2429
2479
  /** What went wrong, when `source` is `fallback` or `none`. */
@@ -2626,6 +2676,19 @@ declare const TOOL_DEFINITIONS: readonly ToolDefinition[];
2626
2676
  */
2627
2677
  declare const AGENT_MEMORY_TOOL_DEFINITIONS: readonly ToolDefinition[];
2628
2678
 
2679
+ /**
2680
+ * Where the SDK reports what it swallowed in fail-open mode. Messages carry status codes,
2681
+ * error codes and request ids, never handles, message text or other personal data.
2682
+ */
2683
+ interface Logger {
2684
+ debug(message: string, ...details: unknown[]): void;
2685
+ warn(message: string, ...details: unknown[]): void;
2686
+ error(message: string, ...details: unknown[]): void;
2687
+ }
2688
+ /** Warnings and errors go to the console; debug output is off unless you pass your own logger. */
2689
+ declare const consoleLogger: Logger;
2690
+ declare const silentLogger: Logger;
2691
+
2629
2692
  /**
2630
2693
  * When a request may be sent again.
2631
2694
  *
@@ -3861,19 +3924,6 @@ declare class InternalText {
3861
3924
  private fingerprints;
3862
3925
  }
3863
3926
 
3864
- /**
3865
- * Where the SDK reports what it swallowed in fail-open mode. Messages carry status codes,
3866
- * error codes and request ids, never handles, message text or other personal data.
3867
- */
3868
- interface Logger {
3869
- debug(message: string, ...details: unknown[]): void;
3870
- warn(message: string, ...details: unknown[]): void;
3871
- error(message: string, ...details: unknown[]): void;
3872
- }
3873
- /** Warnings and errors go to the console; debug output is off unless you pass your own logger. */
3874
- declare const consoleLogger: Logger;
3875
- declare const silentLogger: Logger;
3876
-
3877
3927
  /**
3878
3928
  * Writes the agent's code made that must reach Niadra, sent in the background and in order: coordination
3879
3929
  * declarations, and agent state writes made while Niadra was out of reach.
@@ -4738,7 +4788,8 @@ declare class TurnRecorder implements Submit {
4738
4788
  /**
4739
4789
  * The local copy of the suppression list (`spec/suppression-list.md`): the opt-out holds with Niadra down.
4740
4790
  *
4741
- * The copy is read by cursor from `GET /v1/suppressions`, with this reader's salt from
4791
+ * The copy is read by cursor from `GET /v1/suppressions` (a page shorter than the limit is the end of the
4792
+ * changes for now, and its cursor is where the next read starts), with this reader's salt from
4742
4793
  * `GET /v1/suppressions/salt`, and read again once it is a minute old. Before an outbound contact the SDK
4743
4794
  * computes the destination's key and looks it up here, in memory:
4744
4795
  *
@@ -4773,7 +4824,10 @@ declare class SuppressionCopy {
4773
4824
  read(reader: SuppressionReader, budgetMs: number): Promise<void>;
4774
4825
  private readAll;
4775
4826
  takeSalt(salt: SuppressionSalt): void;
4776
- /** Applies one page, in order. `true` when more pages follow. */
4827
+ /**
4828
+ * Applies one page, in order. `true` when more pages follow: a full page. Every page carries the cursor to
4829
+ * read from next, the last one too, which the next read starts from.
4830
+ */
4777
4831
  apply(page: SuppressionPage): boolean;
4778
4832
  /** A 404: the space keeps no list. Anything else: the copy stays as it is. */
4779
4833
  failed(error: unknown): void;
@@ -4803,7 +4857,8 @@ declare class SuppressionCopy {
4803
4857
  * decision comes from the purpose's direction (the coordination spec, 10):
4804
4858
  *
4805
4859
  * - a message the customer sent (`direction: "inbound"`) is never held: `allow`, `unchecked`;
4806
- * - any purpose whose opt-out the local copy of the suppression list holds: `deny`, `suppressed`;
4860
+ * - any purpose whose opt-out the local copy of the suppression list holds: `deny`, `suppressed` (each check
4861
+ * about an outbound contact keeps that copy, read in the background once a minute);
4807
4862
  * - an effect with a key: `defer`, `unavailable`, and what may have gone out is never sent again on its own;
4808
4863
  * - a purpose that fails closed (by default `marketing`, `retention` and `collection`, the ones a gateway
4809
4864
  * refuses without a token): `defer`, `unavailable`;
@@ -5056,10 +5111,10 @@ type OnUnknown = "pass" | "block";
5056
5111
  * pass through unchanged. An async generator is recorded piece by piece, and its result is the list of
5057
5112
  * pieces once it is consumed.
5058
5113
  *
5059
- * With a binding (the tool's binding, as `constraints/binding.ts` reads it: `binding`, else the one the SDK
5060
- * profile serves for the tool's name), a call in a turn that read the constraints block records what it did
5061
- * with the block: the hard constraints its arguments sent, and over the
5062
- * objects its result shows, how many were checked, broke one, or lacked the field. Nothing is changed.
5114
+ * When the space binds the tool (its `tool-bindings` document, which the SDK profile serves this source by the
5115
+ * tool's name), a call in a turn that read the constraints block records what it did with the block: the hard
5116
+ * constraints its arguments sent, and over the objects its result shows, how many were checked, broke one, or
5117
+ * lacked the field. Nothing is changed. A binding lives in the space's configuration, never in code.
5063
5118
  *
5064
5119
  * With `maskOutput: true`, the fields the key may not read never reach the model (`capture/mask.ts`); the record
5065
5120
  * keeps what the model saw. Left unset, the binding's `capabilities.mask_output` decides.
@@ -5082,8 +5137,6 @@ interface ToolOptions<A extends unknown[], R> {
5082
5137
  callId?: (...args: A) => string | null | undefined;
5083
5138
  /** The turn to record in when the async context does not carry one (a framework that runs tools elsewhere). */
5084
5139
  frame?: () => TurnFrame | null | undefined;
5085
- /** The tool's binding, to measure the constraints block against its calls; wins over the one the profile serves. */
5086
- binding?: RawBinding;
5087
5140
  /** The bindings the SDK profile serves, by tool name; by default the client's (`niadra.tool`) or the turn's. */
5088
5141
  served?: (tool: string) => RawBinding | null;
5089
5142
  /** Keeps the fields this key may not read from the model; left unset, the binding's capability decides. */
@@ -6306,7 +6359,11 @@ interface QueueOptions {
6306
6359
  maxBatchSize: number;
6307
6360
  /** Items held in memory before new ones are dropped. Keeps a long outage from exhausting memory. */
6308
6361
  maxQueueSize: number;
6309
- /** Attempts per batch, including the first. 4xx answers other than 408, 421 and 429 are never retried. */
6362
+ /**
6363
+ * Attempts per send of a batch, including the first. 4xx answers other than 408, 421 and 429 are never
6364
+ * retried. A batch still failing after them waits at the front of the queue and goes again after a pause
6365
+ * that doubles, up to a minute, while Niadra stays down.
6366
+ */
6310
6367
  maxAttempts: number;
6311
6368
  /** First backoff delay; each retry doubles it, with full jitter, up to `maxRetryDelayMs`. */
6312
6369
  retryDelayMs: number;
@@ -6625,6 +6682,12 @@ declare class Niadra {
6625
6682
  channel?: string;
6626
6683
  failOpen?: boolean;
6627
6684
  }): Promise<boolean>;
6685
+ private readSuppressions;
6686
+ /**
6687
+ * Reads the local copy of the suppression list in the background when it is due: a check that Niadra does not
6688
+ * answer falls back on it, so an opt-out holds through an outage.
6689
+ */
6690
+ private keepSuppressions;
6628
6691
  /**
6629
6692
  * The build a turn runs on, for `conversation.turn({ build })`: each prompt's version, the digest of the
6630
6693
  * corpus the agent consults (computed by you, never the files), the model, your context assembler's version
@@ -6902,4 +6965,4 @@ declare class Niadra {
6902
6965
  private sendBatch;
6903
6966
  }
6904
6967
 
6905
- export { type AssertionMethod as $, AGENT_MEMORY_TOOL_DEFINITIONS as A, AgentSession as B, type ConstraintsBlock as C, type AgentState as D, type Conflict as E, AgentStateHandle as F, type AgentStateMeta as G, type HardConstraint as H, InternalText as I, type AgentStateMetaPage as J, type AgentStateReadRequest as K, type Logger as L, type Mode as M, NiadraError as N, type ObjectRef as O, type AgentStateScope as P, type AgentStateWrite as Q, Resolvers as R, type SubjectKind as S, type TurnPins as T, type AgentStateWriteResult as U, type AgentTurnOptions as V, type AnchorEvidence as W, Api as X, type ArmComparison as Y, type ArmOutcomes as Z, type AskedAttribute as _, type ClaimRecord as a, type CompanyRule as a$, type AssertionOutcome as a0, type AssertionStats as a1, type Attribute as a2, type AttributeEntry as a3, type AttributionReport as a4, type AttributionRow as a5, type AttributionTotal as a6, type Backing as a7, type BackingReport as a8, Sources as a9, type CheckOptions as aA, type CheckRequest as aB, type CheckResult as aC, ClaimCheck as aD, type CheckOptions$1 as aE, type ClaimContractSummary as aF, type ClaimEvidence as aG, type ClaimEvidenceRef as aH, type ClaimKind as aI, type ClaimOutputs as aJ, type ClaimParams as aK, type ClaimRelease as aL, type ClaimRequest as aM, type ClaimValue as aN, type ClaimVerdict as aO, type ClaimVia as aP, type Claimed as aQ, type ClientOptions as aR, type Closes as aS, type Commitment as aT, type CommitmentDecided as aU, type CommitmentDecidedDetail as aV, type CommitmentMade as aW, type CommitmentMadeDetail as aX, type CommitmentRef as aY, type CommitmentWithdrawn as aZ, type CommitmentWithdrawnDetail as a_, type BatchItem as aa, type BatchRequest as ab, type BatchResponse as ac, type BiFile as ad, type BiUpload as ae, type BiUploadRequest as af, BlobError as ag, type BlobStore as ah, type BlockSubject as ai, type BoundArg as aj, type BoundTools as ak, type BudgetBlock as al, type BudgetCut as am, type BudgetPack as an, type BudgetUse as ao, type CacheDirectives as ap, type CacheOptions as aq, CallCapture as ar, type CaseClosed as as, type CaseOpened as at, type Change as au, type ChangePage as av, type ChangeSinceSeen as aw, type ChannelState as ax, type CheckBatchRequest as ay, type CheckBatchResponse as az, type ClaimCategory as b, type EffectDetail as b$, type Conflict$1 as b0, type ConflictCounts as b1, type ConstraintOrigin as b2, type ConstraintsRequest as b3, type ContactBudget as b4, type ContactBudgetUse as b5, type ContactClaims as b6, type ContactCount as b7, ContactGateway as b8, type ContactKey as b9, type CoordinationReport as bA, type CoordinationReportPage as bB, type CorrectParams as bC, type CorrectionAction as bD, type CorrectionRequest as bE, type CounterfactualCase as bF, type CounterfactualEngaged as bG, type CounterfactualEngagement as bH, type CounterfactualRunCreate as bI, type CounterfactualRunPage as bJ, type CreateAgentNoteRequest as bK, DEFAULT_CACHE as bL, DEFAULT_QUEUE as bM, DEFAULT_TIMEOUTS as bN, DEFAULT_VOICE as bO, DELETE as bP, type DataIssue as bQ, type DataIssuePage as bR, Declarations as bS, type DeclareRequest as bT, type DeclareResult as bU, type DeliveryPath as bV, type Detect as bW, type DriftChanges as bX, type Effect as bY, type EffectCount as bZ, type EffectDeclared as b_, type ContactKeys as ba, type ContactMade as bb, type ContactMadeDetail as bc, type VerifyParams$1 as bd, type Refusal as be, type Content as bf, type ContentMarker as bg, type ContentMode as bh, type ContentRelease as bi, type ContentReleaseResult as bj, ContentResolver as bk, type ContextFormat as bl, type ContextOptions as bm, type ContextPack as bn, type ContextParams as bo, type ContextRequest as bp, type ContextSource as bq, type ContextStamp as br, type ContextUseEntry as bs, Conversation as bt, type ConversationAction as bu, type ConversationEndedItem as bv, type ConversationEvent as bw, type ConversationParams as bx, type CoordinationBlock as by, type CoordinationOverview as bz, Niadra as c, type LeaseDetail as c$, type EffectKind as c0, type EffectReserve as c1, type EffectSeen as c2, type EffectSettle as c3, type EffectState as c4, type EffectStatus as c5, type Engaged as c6, type EpisodeOut as c7, type Erasure as c8, type EventItem as c9, type HandoffDeclared as cA, type HandoffDetail as cB, type HandoffItem as cC, type HandoffOutcome as cD, type HandoffPackage as cE, type HandoffParams as cF, type HeartbeatItem as cG, type HistoryFilters as cH, type HistoryItem as cI, type HistoryItemKind as cJ, type IdentifyItem as cK, type IdentifyParams as cL, type IdentityCalibration as cM, type Include as cN, type Inference as cO, type InferenceCorrection as cP, type InferencePage as cQ, type IngestStatus as cR, type InterestState as cS, type InterleavingReport as cT, type InterleavingRow as cU, type InterleavingTotal as cV, type InternalText$1 as cW, type ItemError as cX, type ItemVersion as cY, type KeyIdentity as cZ, type LeaseDeclared as c_, type EventKind as ca, type Evidence as cb, type ExperimentReport as cc, type ExperimentResult as cd, type ExportPackage as ce, FAIL_CLOSED as cf, type FactHistory as cg, type FactOut as ch, type Feature as ci, type Feedback as cj, type FeedbackAction as ck, type FeedbackParams as cl, type FeedbackRequest as cm, type Fetched as cn, type FieldCoverage as co, type FieldState as cp, type ForgetTarget as cq, type GatewayOptions as cr, Guard as cs, type GuardLike as ct, type GuardOptions as cu, type Guarded as cv, type HandleType as cw, type Handoff as cx, type HandoffContext as cy, type HandoffCreate as cz, type ContextResponse as d, type Presented as d$, type LegalHold as d0, type LegalHoldCreate as d1, type LegalHoldRelease as d2, type LiveTurn as d3, type Lock as d4, MAX_BATCH_ITEMS as d5, MAX_EVENT_TEXT as d6, MAX_MEDIA_BYTES as d7, type MediaUpload as d8, type MediaUploadRequest as d9, type ObjectTimelineParams as dA, type Observation as dB, type OpenItemOut as dC, type OpenItemRequest as dD, type OpenObject as dE, type OpenParams as dF, type OpenedItem as dG, type Origin as dH, type OutcomeLink as dI, type OutcomePage as dJ, type OutcomeRequest as dK, type OutcomeState as dL, type Owner as dM, type OwnershipClaim as dN, type OwnershipCount as dO, PERSONAL_DATA_TOOL_ERROR as dP, type PackGuard as dQ, type PackLayer as dR, type PackSection as dS, type PackSlot as dT, type PackSlotDerived as dU, type PackStamp as dV, type PowerRequest as dW, type PowerResult as dX, type Preference as dY, type PrefetchParams as dZ, type PrefetchRequest as d_, type MediaUploadResponse as da, MemorySeen as db, NOT_FOUND as dc, type Natures as dd, type Negation as de, NiadraAPIError as df, NiadraAbortError as dg, NiadraAuthenticationError as dh, NiadraConfigError as di, NiadraConnectionError as dj, NiadraContactTokenError as dk, NiadraPermissionError as dl, NiadraRateLimitError as dm, NiadraReplayRefusedError as dn, NiadraTimeoutError as dp, NiadraValidationError as dq, type Notification as dr, type NotificationPage as ds, type ObjectCoverage as dt, type ObjectPush as du, type ObjectPushRequest as dv, type ObjectPushResponse as dw, type ObjectRead as dx, type ObjectSnapshotResponse as dy, type ObjectTimeline as dz, type RawBinding as e, type Speaker as e$, type PresentedItem as e0, type PreviousValue as e1, type Problem as e2, type ProfileMatch as e3, type ProfileMemory as e4, type PromiseRef as e5, type PromoteRequest as e6, type PromoteResponse as e7, type ProposalStatus as e8, type Provenance as e9, type Result as eA, type ResultObjects as eB, type ReviewRequest as eC, type ReviewRequestCreate as eD, type ReviewRequestPage as eE, type ReviewResolution as eF, type Scenario as eG, type ScenarioCreate as eH, type ScenarioFromReport as eI, type ScenarioPage as eJ, type ScenarioRun as eK, type ScenarioRunCreate as eL, type ScenarioRunSummary as eM, type ScenarioUpdate as eN, type ScenarioVerdict as eO, type SdkProfile as eP, type SearchRequest as eQ, type SearchResponse as eR, type Seen as eS, type SeenTokens as eT, type ShadowRequest as eU, type ShadowRun as eV, type Shown as eW, type SlotChannelRank as eX, type SlotWhy as eY, type SoftConstraint as eZ, type SourceCoverage as e_, type QueueOptions as ea, type ReadingResult as eb, type ReconcileRequest as ec, type ReconcileResult as ed, type ReconciledLine as ee, type ToolOptions as ef, type Recurrence as eg, type Refetch as eh, type RefreshRelease as ei, type RefreshReleased as ej, type RefreshRequest as ek, type RefreshRequestPage as el, type Refusal$1 as em, type ReleaseDetail as en, type RememberParams as eo, type RememberResult as ep, type Rendered as eq, type ReplayAssertion as er, type ReplayBlocker as es, type ReplayCase as et, type ReplayCaseRequest as eu, type ReplayHistoryEntry as ev, type ReplayResult as ew, type RequestOptions as ex, type Resolved as ey, type Resolver as ez, type ContextResult as f, type TurnRecord as f$, type SpeakerRef as f0, type StateMode as f1, type StateReadRequest as f2, type StateReadResponse as f3, type StateRef as f4, type StateVerifyRequest as f5, type StateVerifyResponse as f6, type StateView as f7, type StateViewRequest as f8, type StateWrite as f9, type Timings as fA, type ToolBinding as fB, type ToolCapabilities as fC, type ToolDefinition as fD, type ToolOptions$1 as fE, type TrackEvent as fF, type TraitOut as fG, type TurnAgent as fH, type TurnBlob as fI, type TurnBuild as fJ, type TurnCall as fK, type TurnCompilerPins as fL, type TurnConstraints as fM, type TurnCoordination as fN, type TurnCost as fO, type TurnEffect as fP, type Flag as fQ, TurnFrame as fR, type TurnIndexEntry as fS, type TurnIndexPage as fT, type TurnKind as fU, type TurnObservation as fV, type TurnOptions as fW, type TurnOutput as fX, type TurnParams as fY, type TurnProvenance as fZ, type TurnRead as f_, type Subject as fa, type SubjectToken as fb, type SubjectTokenRequest as fc, type Suppression as fd, type SuppressionAdded as fe, type SuppressionAddedDetail as ff, type SuppressionLifted as fg, type SuppressionLiftedDetail as fh, type SuppressionPage as fi, type SuppressionSalt as fj, TOOL_DEFINITIONS as fk, TOOL_NAMES as fl, type TargetModel as fm, Task as fn, type TaskAction as fo, type TaskEndedItem as fp, type TaskEvent as fq, type TaskLockDeclared as fr, type TaskLockDetail as fs, type TaskParams as ft, type TimeWindow as fu, type TimelineRequest as fv, type TimelineResponse as fw, type Timeouts as fx, type TimerState as fy, type Timestamp as fz, type ModelUsage as g, TurnRecorder as g0, type TurnRecordingOptions as g1, type TurnRecordingSummary as g2, type TurnSearchRequest as g3, type TurnSearchResponse as g4, type TurnSummary as g5, type TurnTokens as g6, type TurnView as g7, type TurnsRequest as g8, type TurnsResponse as g9, check as gA, consoleLogger as gB, currentCall as gC, currentTurn as gD, guardStream as gE, guardText as gF, recipientHash as gG, renderLive as gH, renderSuffix as gI, silentLogger as gJ, tool as gK, verifyContactToken as gL, violated as gM, type TypeCoverage as ga, type TypeFingerprintRequest as gb, type TypeFingerprintResponse as gc, type UnbackedValue as gd, type UnmetDemand as ge, type UnmetDemandPage as gf, type Unwatch as gg, type UploadParams as gh, type ValueEvidence as gi, type ValueKind as gj, type ValueState as gk, type Verdict as gl, type Verification as gm, type VerificationResult as gn, type VerifyCheck as go, type VerifyItem as gp, type VerifyMethod as gq, type VerifyParams as gr, type View as gs, type Visibility as gt, type VoiceInfo as gu, type VoiceOptions as gv, type Watch as gw, type WhereExpression as gx, type WorkingState as gy, type WriteResult as gz, type Handle as h, AGENT_MEMORY_TOOL_NAMES as i, type ActionEvent as j, type ActionInfo as k, type Actions as l, Admin as m, type AgentMemoryBlock as n, type AgentMemoryParams as o, type AgentMemoryResult as p, type AgentMemorySearchRequest as q, type AgentMemorySearchResponse as r, shingles as s, type AgentMemorySource as t, type AgentNote as u, type AgentNoteKind as v, type AgentNoteOrigin as w, type AgentNoteProposal as x, type AgentNoteStatus as y, type AgentNoteVisibility as z };
6968
+ export { type AssertionOutcome as $, AGENT_MEMORY_TOOL_DEFINITIONS as A, type AgentState as B, type ConstraintsBlock as C, type Conflict as D, AgentStateHandle as E, type AgentStateMeta as F, type AgentStateMetaPage as G, type HardConstraint as H, InternalText as I, type AgentStateReadRequest as J, type AgentStateScope as K, type Logger as L, type Mode as M, NiadraError as N, type ObjectRef as O, type AgentStateWrite as P, type AgentStateWriteResult as Q, Resolvers as R, type SubjectKind as S, type TurnPins as T, type AgentTurnOptions as U, type AnchorEvidence as V, Api as W, type ArmComparison as X, type ArmOutcomes as Y, type AskedAttribute as Z, type AssertionMethod as _, type ClaimRecord as a, type Conflict$1 as a$, type AssertionStats as a0, type Attribute as a1, type AttributeEntry as a2, type AttributionReport as a3, type AttributionRow as a4, type AttributionTotal as a5, type Backing as a6, type BackingReport as a7, Sources as a8, type BatchItem as a9, type CheckRequest as aA, type CheckResult as aB, ClaimCheck as aC, type CheckOptions$1 as aD, type ClaimContractSummary as aE, type ClaimEvidence as aF, type ClaimEvidenceRef as aG, type ClaimKind as aH, type ClaimOutputs as aI, type ClaimParams as aJ, type ClaimRelease as aK, type ClaimRequest as aL, type ClaimValue as aM, type ClaimVerdict as aN, type ClaimVia as aO, type Claimed as aP, type ClientOptions as aQ, type Closes as aR, type Commitment as aS, type CommitmentDecided as aT, type CommitmentDecidedDetail as aU, type CommitmentMade as aV, type CommitmentMadeDetail as aW, type CommitmentRef as aX, type CommitmentWithdrawn as aY, type CommitmentWithdrawnDetail as aZ, type CompanyRule as a_, type BatchRequest as aa, type BatchResponse as ab, type BiFile as ac, type BiUpload as ad, type BiUploadRequest as ae, BlobError as af, type BlobStore as ag, type BlockSubject as ah, type BoundArg as ai, type BoundTools as aj, type BudgetBlock as ak, type BudgetCut as al, type BudgetPack as am, type BudgetUse as an, type CacheDirectives as ao, type CacheOptions as ap, CallCapture as aq, type CaseClosed as ar, type CaseOpened as as, type Change as at, type ChangePage as au, type ChangeSinceSeen as av, type ChannelState as aw, type CheckBatchRequest as ax, type CheckBatchResponse as ay, type CheckOptions as az, type ClaimCategory as b, type EffectDetail as b$, type ConflictCounts as b0, type ConstraintOrigin as b1, type ConstraintsRequest as b2, type ContactBudget as b3, type ContactBudgetUse as b4, type ContactClaims as b5, type ContactCount as b6, ContactGateway as b7, type ContactKey as b8, type ContactKeys as b9, type CoordinationReportPage as bA, type CorrectParams as bB, type CorrectionAction as bC, type CorrectionRequest as bD, type CounterfactualCase as bE, type CounterfactualEngaged as bF, type CounterfactualEngagement as bG, type CounterfactualRunCreate as bH, type CounterfactualRunPage as bI, type CreateAgentNoteRequest as bJ, DEFAULT_CACHE as bK, DEFAULT_QUEUE as bL, DEFAULT_TIMEOUTS as bM, DEFAULT_VOICE as bN, DELETE as bO, type DataIssue as bP, type DataIssuePage as bQ, Declarations as bR, type DeclareRequest as bS, type DeclareResult as bT, type DeliveryPath as bU, type DerivedState as bV, type Detect as bW, type DriftChanges as bX, type Effect as bY, type EffectCount as bZ, type EffectDeclared as b_, type ContactMade as ba, type ContactMadeDetail as bb, type VerifyParams$1 as bc, type Refusal as bd, type Content as be, type ContentMarker as bf, type ContentMode as bg, type ContentRelease as bh, type ContentReleaseResult as bi, ContentResolver as bj, type ContextFormat as bk, type ContextOptions as bl, type ContextPack as bm, type ContextParams as bn, type ContextRequest as bo, type ContextSource as bp, type ContextStamp as bq, type ContextUseEntry as br, Conversation as bs, type ConversationAction as bt, type ConversationEndedItem as bu, type ConversationEvent as bv, type ConversationParams as bw, type CoordinationBlock as bx, type CoordinationOverview as by, type CoordinationReport as bz, Niadra as c, type LeaseDetail as c$, type EffectKind as c0, type EffectReserve as c1, type EffectSeen as c2, type EffectSettle as c3, type EffectState as c4, type EffectStatus as c5, type Engaged as c6, type EpisodeOut as c7, type Erasure as c8, type EventItem as c9, type HandoffDeclared as cA, type HandoffDetail as cB, type HandoffItem as cC, type HandoffOutcome as cD, type HandoffPackage as cE, type HandoffParams as cF, type HeartbeatItem as cG, type HistoryFilters as cH, type HistoryItem as cI, type HistoryItemKind as cJ, type IdentifyItem as cK, type IdentifyParams as cL, type IdentityCalibration as cM, type Include as cN, type Inference as cO, type InferenceCorrection as cP, type InferencePage as cQ, type IngestStatus as cR, type InterestState as cS, type InterleavingReport as cT, type InterleavingRow as cU, type InterleavingTotal as cV, type InternalText$1 as cW, type ItemError as cX, type ItemVersion as cY, type KeyIdentity as cZ, type LeaseDeclared as c_, type EventKind as ca, type Evidence as cb, type ExperimentReport as cc, type ExperimentResult as cd, type ExportPackage as ce, FAIL_CLOSED as cf, type FactHistory as cg, type FactOut as ch, type Feature as ci, type Feedback as cj, type FeedbackAction as ck, type FeedbackParams as cl, type FeedbackRequest as cm, type Fetched as cn, type FieldCoverage as co, type FieldState as cp, type ForgetTarget as cq, type GatewayOptions as cr, Guard as cs, type GuardLike as ct, type GuardOptions as cu, type Guarded as cv, type HandleType as cw, type Handoff as cx, type HandoffContext as cy, type HandoffCreate as cz, type ContextResponse as d, type Presented as d$, type LegalHold as d0, type LegalHoldCreate as d1, type LegalHoldRelease as d2, type LiveTurn as d3, type Lock as d4, MAX_BATCH_ITEMS as d5, MAX_EVENT_TEXT as d6, MAX_MEDIA_BYTES as d7, type MediaUpload as d8, type MediaUploadRequest as d9, type ObjectTimelineParams as dA, type Observation as dB, type OpenItemOut as dC, type OpenItemRequest as dD, type OpenObject as dE, type OpenParams as dF, type OpenedItem as dG, type Origin as dH, type OutcomeLink as dI, type OutcomePage as dJ, type OutcomeRequest as dK, type OutcomeState as dL, type Owner as dM, type OwnershipClaim as dN, type OwnershipCount as dO, PERSONAL_DATA_TOOL_ERROR as dP, type PackGuard as dQ, type PackLayer as dR, type PackSection as dS, type PackSlot as dT, type PackSlotDerived as dU, type PackStamp as dV, type PowerRequest as dW, type PowerResult as dX, type Preference as dY, type PrefetchParams as dZ, type PrefetchRequest as d_, type MediaUploadResponse as da, MemorySeen as db, NOT_FOUND as dc, type Natures as dd, type Negation as de, NiadraAPIError as df, NiadraAbortError as dg, NiadraAuthenticationError as dh, NiadraConfigError as di, NiadraConnectionError as dj, NiadraContactTokenError as dk, NiadraPermissionError as dl, NiadraRateLimitError as dm, NiadraReplayRefusedError as dn, NiadraTimeoutError as dp, NiadraValidationError as dq, type Notification as dr, type NotificationPage as ds, type ObjectCoverage as dt, type ObjectPush as du, type ObjectPushRequest as dv, type ObjectPushResponse as dw, type ObjectRead as dx, type ObjectSnapshotResponse as dy, type ObjectTimeline as dz, type ContextResult as e, type SourceCoverage as e$, type PresentedItem as e0, type PreviousValue as e1, type Problem as e2, type ProfileMatch as e3, type ProfileMemory as e4, type PromiseRef as e5, type PromoteRequest as e6, type PromoteResponse as e7, type ProposalStatus as e8, type Provenance as e9, type Result as eA, type ResultObjects as eB, type ReviewRequest as eC, type ReviewRequestCreate as eD, type ReviewRequestPage as eE, type ReviewResolution as eF, type Scenario as eG, type ScenarioCreate as eH, type ScenarioFromReport as eI, type ScenarioPage as eJ, type ScenarioRun as eK, type ScenarioRunCreate as eL, type ScenarioRunSummary as eM, type ScenarioUpdate as eN, type ScenarioVerdict as eO, type SdkProfile as eP, type SearchRequest as eQ, type SearchResponse as eR, type Seen as eS, type SeenTokens as eT, type ShadowRequest as eU, type ShadowRun as eV, type Shown as eW, type ShownValue as eX, type SlotChannelRank as eY, type SlotWhy as eZ, type SoftConstraint as e_, type QueueOptions as ea, type ReadingResult as eb, type ReconcileRequest as ec, type ReconcileResult as ed, type ReconciledLine as ee, type ToolOptions as ef, type Recurrence as eg, type Refetch as eh, type RefreshRelease as ei, type RefreshReleased as ej, type RefreshRequest as ek, type RefreshRequestPage as el, type Refusal$1 as em, type ReleaseDetail as en, type RememberParams as eo, type RememberResult as ep, type Rendered as eq, type ReplayAssertion as er, type ReplayBlocker as es, type ReplayCase as et, type ReplayCaseRequest as eu, type ReplayHistoryEntry as ev, type ReplayResult as ew, type RequestOptions as ex, type Resolved as ey, type Resolver as ez, type ModelUsage as f, type TurnRead as f$, type Speaker as f0, type SpeakerRef as f1, type StateMode as f2, type StateReadRequest as f3, type StateReadResponse as f4, type StateRef as f5, type StateVerifyRequest as f6, type StateVerifyResponse as f7, type StateView as f8, type StateViewRequest as f9, type Timestamp as fA, type Timings as fB, type ToolBinding as fC, type ToolCapabilities as fD, type ToolDefinition as fE, type ToolOptions$1 as fF, type TrackEvent as fG, type TraitOut as fH, type TurnAgent as fI, type TurnBlob as fJ, type TurnBuild as fK, type TurnCall as fL, type TurnCompilerPins as fM, type TurnConstraints as fN, type TurnCoordination as fO, type TurnCost as fP, type TurnEffect as fQ, type Flag as fR, TurnFrame as fS, type TurnIndexEntry as fT, type TurnIndexPage as fU, type TurnKind as fV, type TurnObservation as fW, type TurnOptions as fX, type TurnOutput as fY, type TurnParams as fZ, type TurnProvenance as f_, type StateWrite as fa, type Subject as fb, type SubjectToken as fc, type SubjectTokenRequest as fd, type Suppression as fe, type SuppressionAdded as ff, type SuppressionAddedDetail as fg, type SuppressionLifted as fh, type SuppressionLiftedDetail as fi, type SuppressionPage as fj, type SuppressionSalt as fk, TOOL_DEFINITIONS as fl, TOOL_NAMES as fm, type TargetModel as fn, Task as fo, type TaskAction as fp, type TaskEndedItem as fq, type TaskEvent as fr, type TaskLockDeclared as fs, type TaskLockDetail as ft, type TaskParams as fu, type TimeWindow as fv, type TimelineRequest as fw, type TimelineResponse as fx, type Timeouts as fy, type TimerState as fz, type Handle as g, type TurnRecord as g0, TurnRecorder as g1, type TurnRecordingOptions as g2, type TurnRecordingSummary as g3, type TurnSearchRequest as g4, type TurnSearchResponse as g5, type TurnSummary as g6, type TurnTokens as g7, type TurnView as g8, type TurnsRequest as g9, type WriteResult as gA, check as gB, consoleLogger as gC, currentCall as gD, currentTurn as gE, guardStream as gF, guardText as gG, recipientHash as gH, renderLive as gI, renderSuffix as gJ, silentLogger as gK, tool as gL, verifyContactToken as gM, violated as gN, type TurnsResponse as ga, type TypeCoverage as gb, type TypeFingerprintRequest as gc, type TypeFingerprintResponse as gd, type UnbackedValue as ge, type UnmetDemand as gf, type UnmetDemandPage as gg, type Unwatch as gh, type UploadParams as gi, type ValueEvidence as gj, type ValueKind as gk, type ValueState as gl, type Verdict as gm, type Verification as gn, type VerificationResult as go, type VerifyCheck as gp, type VerifyItem as gq, type VerifyMethod as gr, type VerifyParams as gs, type View as gt, type Visibility as gu, type VoiceInfo as gv, type VoiceOptions as gw, type Watch as gx, type WhereExpression as gy, type WorkingState as gz, AGENT_MEMORY_TOOL_NAMES as h, type ActionEvent as i, type ActionInfo as j, type Actions as k, Admin as l, type AgentMemoryBlock as m, type AgentMemoryParams as n, type AgentMemoryResult as o, type AgentMemorySearchRequest as p, type AgentMemorySearchResponse as q, type AgentMemorySource as r, shingles as s, type AgentNote as t, type AgentNoteKind as u, type AgentNoteOrigin as v, type AgentNoteProposal as w, type AgentNoteStatus as x, type AgentNoteVisibility as y, AgentSession as z };
@@ -848,10 +848,27 @@ interface Rendered {
848
848
  residual?: string[];
849
849
  tool: string;
850
850
  }
851
+ /** A number an object showed the subject, as they were shown it. */
852
+ interface ShownValue {
853
+ /**
854
+ * Whether it may be claimed now: its type allows claims of the field, and no more than the field's age for
855
+ * claims has passed since it was shown.
856
+ */
857
+ claim_safe: boolean;
858
+ /** The field's role, for claims. */
859
+ role?: string | null;
860
+ v: number;
861
+ }
851
862
  interface Shown {
852
863
  last_at?: string | null;
853
864
  ref: string;
854
865
  times: number;
866
+ /**
867
+ * The numbers the object was last shown with (a price, a total, a discount, an installment), by field: each
868
+ * field its type declares as `money`, `percent` or `number`. A claim check takes them as evidence for the
869
+ * offer an agent quotes back.
870
+ */
871
+ values?: Record<string, ShownValue>;
855
872
  }
856
873
  interface SoftConstraint {
857
874
  attr: string;
@@ -1150,12 +1167,14 @@ interface OutcomeLink {
1150
1167
  /** The outcome definition of the `measurement` document. */
1151
1168
  outcome: string;
1152
1169
  position?: number | null;
1170
+ /** The purchase it counts in, when the revenue definition counts a split purchase's parts as one order. */
1171
+ purchase?: string | null;
1153
1172
  /** The state the object or its line is in. */
1154
1173
  state: string;
1155
1174
  turn_id?: string | null;
1156
1175
  /** When the outcome first counted. */
1157
1176
  valid_at: string;
1158
- /** In the currency's minor units; absent: none. */
1177
+ /** In the currency's minor units, as the signed revenue definition counts it; absent: none. */
1159
1178
  value_minor?: number | null;
1160
1179
  }
1161
1180
  interface OutcomePage {
@@ -1493,6 +1512,28 @@ interface ContentRelease {
1493
1512
  interface ContentReleaseResult {
1494
1513
  released: boolean;
1495
1514
  }
1515
+ /**
1516
+ * A field the type derives from the related objects of one relation (a look's pieces), computed at this
1517
+ * read and never stored. A related object whose data is not known leaves it `unobserved`, unless the answer
1518
+ * is already decided.
1519
+ */
1520
+ interface DerivedState {
1521
+ logic: "yes" | "no" | "unobserved";
1522
+ /** The related objects it was computed over. */
1523
+ over: number;
1524
+ /**
1525
+ * When it is not `yes`, the related objects, as `type:namespace:id`, that kept it from `yes`: for `all` and
1526
+ * `any` the ones the condition does not hold for or that are not known, for `count`, `min` and `max` the
1527
+ * ones not known. In the relation's order, the first 10.
1528
+ */
1529
+ pieces_out?: string[];
1530
+ /**
1531
+ * How many of them were not known: out of the working set, not an exact match (`status_field`), or with the
1532
+ * data the condition reads not observed.
1533
+ */
1534
+ unknown: number;
1535
+ v?: unknown;
1536
+ }
1496
1537
  /**
1497
1538
  * What changed between the declaration and the type the schema proposes now, as counts: never a new name,
1498
1539
  * a value or a definition (object-type spec, 8.8.2).
@@ -1628,6 +1669,8 @@ interface ObjectRead {
1628
1669
  */
1629
1670
  blocked?: Record<string, string[]>;
1630
1671
  declared_gaps?: string[];
1672
+ /** The type's derived fields, from the related objects. */
1673
+ derived?: Record<string, DerivedState>;
1631
1674
  derived_status?: "current" | "expired_by_input" | null;
1632
1675
  /** The inputs whose change expired it. */
1633
1676
  expired_by?: string[];
@@ -1680,9 +1723,10 @@ interface Provenance {
1680
1723
  interface ObjectPush {
1681
1724
  fields: Record<string, unknown>;
1682
1725
  /**
1683
- * For a customer's derived object (a quote): the objects its inputs are fields of, by the name its type
1684
- * gives them, as `type:namespace:id` (`{"lead": "lead:crm:L-9"}`). When a field of one of them changes, the
1685
- * object expires, naming the input.
1726
+ * For a derived object (a customer's quote, a shared best offer): the objects its inputs are fields of, by
1727
+ * the name its type gives them, as `type:namespace:id` (`{"lead": "lead:crm:L-9"}`). When a field of one of
1728
+ * them changes, the object expires, naming the input. A shared object's inputs are shared objects: a
1729
+ * customer's object is never one.
1686
1730
  */
1687
1731
  inputs?: Record<string, string> | null;
1688
1732
  provenance: Provenance;
@@ -2424,6 +2468,12 @@ interface ContextResult {
2424
2468
  /** The pack as typed sections, when read with `format: "json"`; otherwise `null`. */
2425
2469
  pack: ContextPack | null;
2426
2470
  source: ContextSource;
2471
+ /**
2472
+ * How long ago Niadra sent or confirmed the pack served, in milliseconds: 0 for an answer just received,
2473
+ * growing while a cached pack is served (`cache`, `stale`, or `fallback` with Niadra down), and `null` when
2474
+ * there is no pack.
2475
+ */
2476
+ ageMs: number | null;
2427
2477
  /** The response this result was built from; `null` when `source` is `none`. */
2428
2478
  response: ContextResponse | null;
2429
2479
  /** What went wrong, when `source` is `fallback` or `none`. */
@@ -2626,6 +2676,19 @@ declare const TOOL_DEFINITIONS: readonly ToolDefinition[];
2626
2676
  */
2627
2677
  declare const AGENT_MEMORY_TOOL_DEFINITIONS: readonly ToolDefinition[];
2628
2678
 
2679
+ /**
2680
+ * Where the SDK reports what it swallowed in fail-open mode. Messages carry status codes,
2681
+ * error codes and request ids, never handles, message text or other personal data.
2682
+ */
2683
+ interface Logger {
2684
+ debug(message: string, ...details: unknown[]): void;
2685
+ warn(message: string, ...details: unknown[]): void;
2686
+ error(message: string, ...details: unknown[]): void;
2687
+ }
2688
+ /** Warnings and errors go to the console; debug output is off unless you pass your own logger. */
2689
+ declare const consoleLogger: Logger;
2690
+ declare const silentLogger: Logger;
2691
+
2629
2692
  /**
2630
2693
  * When a request may be sent again.
2631
2694
  *
@@ -3861,19 +3924,6 @@ declare class InternalText {
3861
3924
  private fingerprints;
3862
3925
  }
3863
3926
 
3864
- /**
3865
- * Where the SDK reports what it swallowed in fail-open mode. Messages carry status codes,
3866
- * error codes and request ids, never handles, message text or other personal data.
3867
- */
3868
- interface Logger {
3869
- debug(message: string, ...details: unknown[]): void;
3870
- warn(message: string, ...details: unknown[]): void;
3871
- error(message: string, ...details: unknown[]): void;
3872
- }
3873
- /** Warnings and errors go to the console; debug output is off unless you pass your own logger. */
3874
- declare const consoleLogger: Logger;
3875
- declare const silentLogger: Logger;
3876
-
3877
3927
  /**
3878
3928
  * Writes the agent's code made that must reach Niadra, sent in the background and in order: coordination
3879
3929
  * declarations, and agent state writes made while Niadra was out of reach.
@@ -4738,7 +4788,8 @@ declare class TurnRecorder implements Submit {
4738
4788
  /**
4739
4789
  * The local copy of the suppression list (`spec/suppression-list.md`): the opt-out holds with Niadra down.
4740
4790
  *
4741
- * The copy is read by cursor from `GET /v1/suppressions`, with this reader's salt from
4791
+ * The copy is read by cursor from `GET /v1/suppressions` (a page shorter than the limit is the end of the
4792
+ * changes for now, and its cursor is where the next read starts), with this reader's salt from
4742
4793
  * `GET /v1/suppressions/salt`, and read again once it is a minute old. Before an outbound contact the SDK
4743
4794
  * computes the destination's key and looks it up here, in memory:
4744
4795
  *
@@ -4773,7 +4824,10 @@ declare class SuppressionCopy {
4773
4824
  read(reader: SuppressionReader, budgetMs: number): Promise<void>;
4774
4825
  private readAll;
4775
4826
  takeSalt(salt: SuppressionSalt): void;
4776
- /** Applies one page, in order. `true` when more pages follow. */
4827
+ /**
4828
+ * Applies one page, in order. `true` when more pages follow: a full page. Every page carries the cursor to
4829
+ * read from next, the last one too, which the next read starts from.
4830
+ */
4777
4831
  apply(page: SuppressionPage): boolean;
4778
4832
  /** A 404: the space keeps no list. Anything else: the copy stays as it is. */
4779
4833
  failed(error: unknown): void;
@@ -4803,7 +4857,8 @@ declare class SuppressionCopy {
4803
4857
  * decision comes from the purpose's direction (the coordination spec, 10):
4804
4858
  *
4805
4859
  * - a message the customer sent (`direction: "inbound"`) is never held: `allow`, `unchecked`;
4806
- * - any purpose whose opt-out the local copy of the suppression list holds: `deny`, `suppressed`;
4860
+ * - any purpose whose opt-out the local copy of the suppression list holds: `deny`, `suppressed` (each check
4861
+ * about an outbound contact keeps that copy, read in the background once a minute);
4807
4862
  * - an effect with a key: `defer`, `unavailable`, and what may have gone out is never sent again on its own;
4808
4863
  * - a purpose that fails closed (by default `marketing`, `retention` and `collection`, the ones a gateway
4809
4864
  * refuses without a token): `defer`, `unavailable`;
@@ -5056,10 +5111,10 @@ type OnUnknown = "pass" | "block";
5056
5111
  * pass through unchanged. An async generator is recorded piece by piece, and its result is the list of
5057
5112
  * pieces once it is consumed.
5058
5113
  *
5059
- * With a binding (the tool's binding, as `constraints/binding.ts` reads it: `binding`, else the one the SDK
5060
- * profile serves for the tool's name), a call in a turn that read the constraints block records what it did
5061
- * with the block: the hard constraints its arguments sent, and over the
5062
- * objects its result shows, how many were checked, broke one, or lacked the field. Nothing is changed.
5114
+ * When the space binds the tool (its `tool-bindings` document, which the SDK profile serves this source by the
5115
+ * tool's name), a call in a turn that read the constraints block records what it did with the block: the hard
5116
+ * constraints its arguments sent, and over the objects its result shows, how many were checked, broke one, or
5117
+ * lacked the field. Nothing is changed. A binding lives in the space's configuration, never in code.
5063
5118
  *
5064
5119
  * With `maskOutput: true`, the fields the key may not read never reach the model (`capture/mask.ts`); the record
5065
5120
  * keeps what the model saw. Left unset, the binding's `capabilities.mask_output` decides.
@@ -5082,8 +5137,6 @@ interface ToolOptions<A extends unknown[], R> {
5082
5137
  callId?: (...args: A) => string | null | undefined;
5083
5138
  /** The turn to record in when the async context does not carry one (a framework that runs tools elsewhere). */
5084
5139
  frame?: () => TurnFrame | null | undefined;
5085
- /** The tool's binding, to measure the constraints block against its calls; wins over the one the profile serves. */
5086
- binding?: RawBinding;
5087
5140
  /** The bindings the SDK profile serves, by tool name; by default the client's (`niadra.tool`) or the turn's. */
5088
5141
  served?: (tool: string) => RawBinding | null;
5089
5142
  /** Keeps the fields this key may not read from the model; left unset, the binding's capability decides. */
@@ -6306,7 +6359,11 @@ interface QueueOptions {
6306
6359
  maxBatchSize: number;
6307
6360
  /** Items held in memory before new ones are dropped. Keeps a long outage from exhausting memory. */
6308
6361
  maxQueueSize: number;
6309
- /** Attempts per batch, including the first. 4xx answers other than 408, 421 and 429 are never retried. */
6362
+ /**
6363
+ * Attempts per send of a batch, including the first. 4xx answers other than 408, 421 and 429 are never
6364
+ * retried. A batch still failing after them waits at the front of the queue and goes again after a pause
6365
+ * that doubles, up to a minute, while Niadra stays down.
6366
+ */
6310
6367
  maxAttempts: number;
6311
6368
  /** First backoff delay; each retry doubles it, with full jitter, up to `maxRetryDelayMs`. */
6312
6369
  retryDelayMs: number;
@@ -6625,6 +6682,12 @@ declare class Niadra {
6625
6682
  channel?: string;
6626
6683
  failOpen?: boolean;
6627
6684
  }): Promise<boolean>;
6685
+ private readSuppressions;
6686
+ /**
6687
+ * Reads the local copy of the suppression list in the background when it is due: a check that Niadra does not
6688
+ * answer falls back on it, so an opt-out holds through an outage.
6689
+ */
6690
+ private keepSuppressions;
6628
6691
  /**
6629
6692
  * The build a turn runs on, for `conversation.turn({ build })`: each prompt's version, the digest of the
6630
6693
  * corpus the agent consults (computed by you, never the files), the model, your context assembler's version
@@ -6902,4 +6965,4 @@ declare class Niadra {
6902
6965
  private sendBatch;
6903
6966
  }
6904
6967
 
6905
- export { type AssertionMethod as $, AGENT_MEMORY_TOOL_DEFINITIONS as A, AgentSession as B, type ConstraintsBlock as C, type AgentState as D, type Conflict as E, AgentStateHandle as F, type AgentStateMeta as G, type HardConstraint as H, InternalText as I, type AgentStateMetaPage as J, type AgentStateReadRequest as K, type Logger as L, type Mode as M, NiadraError as N, type ObjectRef as O, type AgentStateScope as P, type AgentStateWrite as Q, Resolvers as R, type SubjectKind as S, type TurnPins as T, type AgentStateWriteResult as U, type AgentTurnOptions as V, type AnchorEvidence as W, Api as X, type ArmComparison as Y, type ArmOutcomes as Z, type AskedAttribute as _, type ClaimRecord as a, type CompanyRule as a$, type AssertionOutcome as a0, type AssertionStats as a1, type Attribute as a2, type AttributeEntry as a3, type AttributionReport as a4, type AttributionRow as a5, type AttributionTotal as a6, type Backing as a7, type BackingReport as a8, Sources as a9, type CheckOptions as aA, type CheckRequest as aB, type CheckResult as aC, ClaimCheck as aD, type CheckOptions$1 as aE, type ClaimContractSummary as aF, type ClaimEvidence as aG, type ClaimEvidenceRef as aH, type ClaimKind as aI, type ClaimOutputs as aJ, type ClaimParams as aK, type ClaimRelease as aL, type ClaimRequest as aM, type ClaimValue as aN, type ClaimVerdict as aO, type ClaimVia as aP, type Claimed as aQ, type ClientOptions as aR, type Closes as aS, type Commitment as aT, type CommitmentDecided as aU, type CommitmentDecidedDetail as aV, type CommitmentMade as aW, type CommitmentMadeDetail as aX, type CommitmentRef as aY, type CommitmentWithdrawn as aZ, type CommitmentWithdrawnDetail as a_, type BatchItem as aa, type BatchRequest as ab, type BatchResponse as ac, type BiFile as ad, type BiUpload as ae, type BiUploadRequest as af, BlobError as ag, type BlobStore as ah, type BlockSubject as ai, type BoundArg as aj, type BoundTools as ak, type BudgetBlock as al, type BudgetCut as am, type BudgetPack as an, type BudgetUse as ao, type CacheDirectives as ap, type CacheOptions as aq, CallCapture as ar, type CaseClosed as as, type CaseOpened as at, type Change as au, type ChangePage as av, type ChangeSinceSeen as aw, type ChannelState as ax, type CheckBatchRequest as ay, type CheckBatchResponse as az, type ClaimCategory as b, type EffectDetail as b$, type Conflict$1 as b0, type ConflictCounts as b1, type ConstraintOrigin as b2, type ConstraintsRequest as b3, type ContactBudget as b4, type ContactBudgetUse as b5, type ContactClaims as b6, type ContactCount as b7, ContactGateway as b8, type ContactKey as b9, type CoordinationReport as bA, type CoordinationReportPage as bB, type CorrectParams as bC, type CorrectionAction as bD, type CorrectionRequest as bE, type CounterfactualCase as bF, type CounterfactualEngaged as bG, type CounterfactualEngagement as bH, type CounterfactualRunCreate as bI, type CounterfactualRunPage as bJ, type CreateAgentNoteRequest as bK, DEFAULT_CACHE as bL, DEFAULT_QUEUE as bM, DEFAULT_TIMEOUTS as bN, DEFAULT_VOICE as bO, DELETE as bP, type DataIssue as bQ, type DataIssuePage as bR, Declarations as bS, type DeclareRequest as bT, type DeclareResult as bU, type DeliveryPath as bV, type Detect as bW, type DriftChanges as bX, type Effect as bY, type EffectCount as bZ, type EffectDeclared as b_, type ContactKeys as ba, type ContactMade as bb, type ContactMadeDetail as bc, type VerifyParams$1 as bd, type Refusal as be, type Content as bf, type ContentMarker as bg, type ContentMode as bh, type ContentRelease as bi, type ContentReleaseResult as bj, ContentResolver as bk, type ContextFormat as bl, type ContextOptions as bm, type ContextPack as bn, type ContextParams as bo, type ContextRequest as bp, type ContextSource as bq, type ContextStamp as br, type ContextUseEntry as bs, Conversation as bt, type ConversationAction as bu, type ConversationEndedItem as bv, type ConversationEvent as bw, type ConversationParams as bx, type CoordinationBlock as by, type CoordinationOverview as bz, Niadra as c, type LeaseDetail as c$, type EffectKind as c0, type EffectReserve as c1, type EffectSeen as c2, type EffectSettle as c3, type EffectState as c4, type EffectStatus as c5, type Engaged as c6, type EpisodeOut as c7, type Erasure as c8, type EventItem as c9, type HandoffDeclared as cA, type HandoffDetail as cB, type HandoffItem as cC, type HandoffOutcome as cD, type HandoffPackage as cE, type HandoffParams as cF, type HeartbeatItem as cG, type HistoryFilters as cH, type HistoryItem as cI, type HistoryItemKind as cJ, type IdentifyItem as cK, type IdentifyParams as cL, type IdentityCalibration as cM, type Include as cN, type Inference as cO, type InferenceCorrection as cP, type InferencePage as cQ, type IngestStatus as cR, type InterestState as cS, type InterleavingReport as cT, type InterleavingRow as cU, type InterleavingTotal as cV, type InternalText$1 as cW, type ItemError as cX, type ItemVersion as cY, type KeyIdentity as cZ, type LeaseDeclared as c_, type EventKind as ca, type Evidence as cb, type ExperimentReport as cc, type ExperimentResult as cd, type ExportPackage as ce, FAIL_CLOSED as cf, type FactHistory as cg, type FactOut as ch, type Feature as ci, type Feedback as cj, type FeedbackAction as ck, type FeedbackParams as cl, type FeedbackRequest as cm, type Fetched as cn, type FieldCoverage as co, type FieldState as cp, type ForgetTarget as cq, type GatewayOptions as cr, Guard as cs, type GuardLike as ct, type GuardOptions as cu, type Guarded as cv, type HandleType as cw, type Handoff as cx, type HandoffContext as cy, type HandoffCreate as cz, type ContextResponse as d, type Presented as d$, type LegalHold as d0, type LegalHoldCreate as d1, type LegalHoldRelease as d2, type LiveTurn as d3, type Lock as d4, MAX_BATCH_ITEMS as d5, MAX_EVENT_TEXT as d6, MAX_MEDIA_BYTES as d7, type MediaUpload as d8, type MediaUploadRequest as d9, type ObjectTimelineParams as dA, type Observation as dB, type OpenItemOut as dC, type OpenItemRequest as dD, type OpenObject as dE, type OpenParams as dF, type OpenedItem as dG, type Origin as dH, type OutcomeLink as dI, type OutcomePage as dJ, type OutcomeRequest as dK, type OutcomeState as dL, type Owner as dM, type OwnershipClaim as dN, type OwnershipCount as dO, PERSONAL_DATA_TOOL_ERROR as dP, type PackGuard as dQ, type PackLayer as dR, type PackSection as dS, type PackSlot as dT, type PackSlotDerived as dU, type PackStamp as dV, type PowerRequest as dW, type PowerResult as dX, type Preference as dY, type PrefetchParams as dZ, type PrefetchRequest as d_, type MediaUploadResponse as da, MemorySeen as db, NOT_FOUND as dc, type Natures as dd, type Negation as de, NiadraAPIError as df, NiadraAbortError as dg, NiadraAuthenticationError as dh, NiadraConfigError as di, NiadraConnectionError as dj, NiadraContactTokenError as dk, NiadraPermissionError as dl, NiadraRateLimitError as dm, NiadraReplayRefusedError as dn, NiadraTimeoutError as dp, NiadraValidationError as dq, type Notification as dr, type NotificationPage as ds, type ObjectCoverage as dt, type ObjectPush as du, type ObjectPushRequest as dv, type ObjectPushResponse as dw, type ObjectRead as dx, type ObjectSnapshotResponse as dy, type ObjectTimeline as dz, type RawBinding as e, type Speaker as e$, type PresentedItem as e0, type PreviousValue as e1, type Problem as e2, type ProfileMatch as e3, type ProfileMemory as e4, type PromiseRef as e5, type PromoteRequest as e6, type PromoteResponse as e7, type ProposalStatus as e8, type Provenance as e9, type Result as eA, type ResultObjects as eB, type ReviewRequest as eC, type ReviewRequestCreate as eD, type ReviewRequestPage as eE, type ReviewResolution as eF, type Scenario as eG, type ScenarioCreate as eH, type ScenarioFromReport as eI, type ScenarioPage as eJ, type ScenarioRun as eK, type ScenarioRunCreate as eL, type ScenarioRunSummary as eM, type ScenarioUpdate as eN, type ScenarioVerdict as eO, type SdkProfile as eP, type SearchRequest as eQ, type SearchResponse as eR, type Seen as eS, type SeenTokens as eT, type ShadowRequest as eU, type ShadowRun as eV, type Shown as eW, type SlotChannelRank as eX, type SlotWhy as eY, type SoftConstraint as eZ, type SourceCoverage as e_, type QueueOptions as ea, type ReadingResult as eb, type ReconcileRequest as ec, type ReconcileResult as ed, type ReconciledLine as ee, type ToolOptions as ef, type Recurrence as eg, type Refetch as eh, type RefreshRelease as ei, type RefreshReleased as ej, type RefreshRequest as ek, type RefreshRequestPage as el, type Refusal$1 as em, type ReleaseDetail as en, type RememberParams as eo, type RememberResult as ep, type Rendered as eq, type ReplayAssertion as er, type ReplayBlocker as es, type ReplayCase as et, type ReplayCaseRequest as eu, type ReplayHistoryEntry as ev, type ReplayResult as ew, type RequestOptions as ex, type Resolved as ey, type Resolver as ez, type ContextResult as f, type TurnRecord as f$, type SpeakerRef as f0, type StateMode as f1, type StateReadRequest as f2, type StateReadResponse as f3, type StateRef as f4, type StateVerifyRequest as f5, type StateVerifyResponse as f6, type StateView as f7, type StateViewRequest as f8, type StateWrite as f9, type Timings as fA, type ToolBinding as fB, type ToolCapabilities as fC, type ToolDefinition as fD, type ToolOptions$1 as fE, type TrackEvent as fF, type TraitOut as fG, type TurnAgent as fH, type TurnBlob as fI, type TurnBuild as fJ, type TurnCall as fK, type TurnCompilerPins as fL, type TurnConstraints as fM, type TurnCoordination as fN, type TurnCost as fO, type TurnEffect as fP, type Flag as fQ, TurnFrame as fR, type TurnIndexEntry as fS, type TurnIndexPage as fT, type TurnKind as fU, type TurnObservation as fV, type TurnOptions as fW, type TurnOutput as fX, type TurnParams as fY, type TurnProvenance as fZ, type TurnRead as f_, type Subject as fa, type SubjectToken as fb, type SubjectTokenRequest as fc, type Suppression as fd, type SuppressionAdded as fe, type SuppressionAddedDetail as ff, type SuppressionLifted as fg, type SuppressionLiftedDetail as fh, type SuppressionPage as fi, type SuppressionSalt as fj, TOOL_DEFINITIONS as fk, TOOL_NAMES as fl, type TargetModel as fm, Task as fn, type TaskAction as fo, type TaskEndedItem as fp, type TaskEvent as fq, type TaskLockDeclared as fr, type TaskLockDetail as fs, type TaskParams as ft, type TimeWindow as fu, type TimelineRequest as fv, type TimelineResponse as fw, type Timeouts as fx, type TimerState as fy, type Timestamp as fz, type ModelUsage as g, TurnRecorder as g0, type TurnRecordingOptions as g1, type TurnRecordingSummary as g2, type TurnSearchRequest as g3, type TurnSearchResponse as g4, type TurnSummary as g5, type TurnTokens as g6, type TurnView as g7, type TurnsRequest as g8, type TurnsResponse as g9, check as gA, consoleLogger as gB, currentCall as gC, currentTurn as gD, guardStream as gE, guardText as gF, recipientHash as gG, renderLive as gH, renderSuffix as gI, silentLogger as gJ, tool as gK, verifyContactToken as gL, violated as gM, type TypeCoverage as ga, type TypeFingerprintRequest as gb, type TypeFingerprintResponse as gc, type UnbackedValue as gd, type UnmetDemand as ge, type UnmetDemandPage as gf, type Unwatch as gg, type UploadParams as gh, type ValueEvidence as gi, type ValueKind as gj, type ValueState as gk, type Verdict as gl, type Verification as gm, type VerificationResult as gn, type VerifyCheck as go, type VerifyItem as gp, type VerifyMethod as gq, type VerifyParams as gr, type View as gs, type Visibility as gt, type VoiceInfo as gu, type VoiceOptions as gv, type Watch as gw, type WhereExpression as gx, type WorkingState as gy, type WriteResult as gz, type Handle as h, AGENT_MEMORY_TOOL_NAMES as i, type ActionEvent as j, type ActionInfo as k, type Actions as l, Admin as m, type AgentMemoryBlock as n, type AgentMemoryParams as o, type AgentMemoryResult as p, type AgentMemorySearchRequest as q, type AgentMemorySearchResponse as r, shingles as s, type AgentMemorySource as t, type AgentNote as u, type AgentNoteKind as v, type AgentNoteOrigin as w, type AgentNoteProposal as x, type AgentNoteStatus as y, type AgentNoteVisibility as z };
6968
+ export { type AssertionOutcome as $, AGENT_MEMORY_TOOL_DEFINITIONS as A, type AgentState as B, type ConstraintsBlock as C, type Conflict as D, AgentStateHandle as E, type AgentStateMeta as F, type AgentStateMetaPage as G, type HardConstraint as H, InternalText as I, type AgentStateReadRequest as J, type AgentStateScope as K, type Logger as L, type Mode as M, NiadraError as N, type ObjectRef as O, type AgentStateWrite as P, type AgentStateWriteResult as Q, Resolvers as R, type SubjectKind as S, type TurnPins as T, type AgentTurnOptions as U, type AnchorEvidence as V, Api as W, type ArmComparison as X, type ArmOutcomes as Y, type AskedAttribute as Z, type AssertionMethod as _, type ClaimRecord as a, type Conflict$1 as a$, type AssertionStats as a0, type Attribute as a1, type AttributeEntry as a2, type AttributionReport as a3, type AttributionRow as a4, type AttributionTotal as a5, type Backing as a6, type BackingReport as a7, Sources as a8, type BatchItem as a9, type CheckRequest as aA, type CheckResult as aB, ClaimCheck as aC, type CheckOptions$1 as aD, type ClaimContractSummary as aE, type ClaimEvidence as aF, type ClaimEvidenceRef as aG, type ClaimKind as aH, type ClaimOutputs as aI, type ClaimParams as aJ, type ClaimRelease as aK, type ClaimRequest as aL, type ClaimValue as aM, type ClaimVerdict as aN, type ClaimVia as aO, type Claimed as aP, type ClientOptions as aQ, type Closes as aR, type Commitment as aS, type CommitmentDecided as aT, type CommitmentDecidedDetail as aU, type CommitmentMade as aV, type CommitmentMadeDetail as aW, type CommitmentRef as aX, type CommitmentWithdrawn as aY, type CommitmentWithdrawnDetail as aZ, type CompanyRule as a_, type BatchRequest as aa, type BatchResponse as ab, type BiFile as ac, type BiUpload as ad, type BiUploadRequest as ae, BlobError as af, type BlobStore as ag, type BlockSubject as ah, type BoundArg as ai, type BoundTools as aj, type BudgetBlock as ak, type BudgetCut as al, type BudgetPack as am, type BudgetUse as an, type CacheDirectives as ao, type CacheOptions as ap, CallCapture as aq, type CaseClosed as ar, type CaseOpened as as, type Change as at, type ChangePage as au, type ChangeSinceSeen as av, type ChannelState as aw, type CheckBatchRequest as ax, type CheckBatchResponse as ay, type CheckOptions as az, type ClaimCategory as b, type EffectDetail as b$, type ConflictCounts as b0, type ConstraintOrigin as b1, type ConstraintsRequest as b2, type ContactBudget as b3, type ContactBudgetUse as b4, type ContactClaims as b5, type ContactCount as b6, ContactGateway as b7, type ContactKey as b8, type ContactKeys as b9, type CoordinationReportPage as bA, type CorrectParams as bB, type CorrectionAction as bC, type CorrectionRequest as bD, type CounterfactualCase as bE, type CounterfactualEngaged as bF, type CounterfactualEngagement as bG, type CounterfactualRunCreate as bH, type CounterfactualRunPage as bI, type CreateAgentNoteRequest as bJ, DEFAULT_CACHE as bK, DEFAULT_QUEUE as bL, DEFAULT_TIMEOUTS as bM, DEFAULT_VOICE as bN, DELETE as bO, type DataIssue as bP, type DataIssuePage as bQ, Declarations as bR, type DeclareRequest as bS, type DeclareResult as bT, type DeliveryPath as bU, type DerivedState as bV, type Detect as bW, type DriftChanges as bX, type Effect as bY, type EffectCount as bZ, type EffectDeclared as b_, type ContactMade as ba, type ContactMadeDetail as bb, type VerifyParams$1 as bc, type Refusal as bd, type Content as be, type ContentMarker as bf, type ContentMode as bg, type ContentRelease as bh, type ContentReleaseResult as bi, ContentResolver as bj, type ContextFormat as bk, type ContextOptions as bl, type ContextPack as bm, type ContextParams as bn, type ContextRequest as bo, type ContextSource as bp, type ContextStamp as bq, type ContextUseEntry as br, Conversation as bs, type ConversationAction as bt, type ConversationEndedItem as bu, type ConversationEvent as bv, type ConversationParams as bw, type CoordinationBlock as bx, type CoordinationOverview as by, type CoordinationReport as bz, Niadra as c, type LeaseDetail as c$, type EffectKind as c0, type EffectReserve as c1, type EffectSeen as c2, type EffectSettle as c3, type EffectState as c4, type EffectStatus as c5, type Engaged as c6, type EpisodeOut as c7, type Erasure as c8, type EventItem as c9, type HandoffDeclared as cA, type HandoffDetail as cB, type HandoffItem as cC, type HandoffOutcome as cD, type HandoffPackage as cE, type HandoffParams as cF, type HeartbeatItem as cG, type HistoryFilters as cH, type HistoryItem as cI, type HistoryItemKind as cJ, type IdentifyItem as cK, type IdentifyParams as cL, type IdentityCalibration as cM, type Include as cN, type Inference as cO, type InferenceCorrection as cP, type InferencePage as cQ, type IngestStatus as cR, type InterestState as cS, type InterleavingReport as cT, type InterleavingRow as cU, type InterleavingTotal as cV, type InternalText$1 as cW, type ItemError as cX, type ItemVersion as cY, type KeyIdentity as cZ, type LeaseDeclared as c_, type EventKind as ca, type Evidence as cb, type ExperimentReport as cc, type ExperimentResult as cd, type ExportPackage as ce, FAIL_CLOSED as cf, type FactHistory as cg, type FactOut as ch, type Feature as ci, type Feedback as cj, type FeedbackAction as ck, type FeedbackParams as cl, type FeedbackRequest as cm, type Fetched as cn, type FieldCoverage as co, type FieldState as cp, type ForgetTarget as cq, type GatewayOptions as cr, Guard as cs, type GuardLike as ct, type GuardOptions as cu, type Guarded as cv, type HandleType as cw, type Handoff as cx, type HandoffContext as cy, type HandoffCreate as cz, type ContextResponse as d, type Presented as d$, type LegalHold as d0, type LegalHoldCreate as d1, type LegalHoldRelease as d2, type LiveTurn as d3, type Lock as d4, MAX_BATCH_ITEMS as d5, MAX_EVENT_TEXT as d6, MAX_MEDIA_BYTES as d7, type MediaUpload as d8, type MediaUploadRequest as d9, type ObjectTimelineParams as dA, type Observation as dB, type OpenItemOut as dC, type OpenItemRequest as dD, type OpenObject as dE, type OpenParams as dF, type OpenedItem as dG, type Origin as dH, type OutcomeLink as dI, type OutcomePage as dJ, type OutcomeRequest as dK, type OutcomeState as dL, type Owner as dM, type OwnershipClaim as dN, type OwnershipCount as dO, PERSONAL_DATA_TOOL_ERROR as dP, type PackGuard as dQ, type PackLayer as dR, type PackSection as dS, type PackSlot as dT, type PackSlotDerived as dU, type PackStamp as dV, type PowerRequest as dW, type PowerResult as dX, type Preference as dY, type PrefetchParams as dZ, type PrefetchRequest as d_, type MediaUploadResponse as da, MemorySeen as db, NOT_FOUND as dc, type Natures as dd, type Negation as de, NiadraAPIError as df, NiadraAbortError as dg, NiadraAuthenticationError as dh, NiadraConfigError as di, NiadraConnectionError as dj, NiadraContactTokenError as dk, NiadraPermissionError as dl, NiadraRateLimitError as dm, NiadraReplayRefusedError as dn, NiadraTimeoutError as dp, NiadraValidationError as dq, type Notification as dr, type NotificationPage as ds, type ObjectCoverage as dt, type ObjectPush as du, type ObjectPushRequest as dv, type ObjectPushResponse as dw, type ObjectRead as dx, type ObjectSnapshotResponse as dy, type ObjectTimeline as dz, type ContextResult as e, type SourceCoverage as e$, type PresentedItem as e0, type PreviousValue as e1, type Problem as e2, type ProfileMatch as e3, type ProfileMemory as e4, type PromiseRef as e5, type PromoteRequest as e6, type PromoteResponse as e7, type ProposalStatus as e8, type Provenance as e9, type Result as eA, type ResultObjects as eB, type ReviewRequest as eC, type ReviewRequestCreate as eD, type ReviewRequestPage as eE, type ReviewResolution as eF, type Scenario as eG, type ScenarioCreate as eH, type ScenarioFromReport as eI, type ScenarioPage as eJ, type ScenarioRun as eK, type ScenarioRunCreate as eL, type ScenarioRunSummary as eM, type ScenarioUpdate as eN, type ScenarioVerdict as eO, type SdkProfile as eP, type SearchRequest as eQ, type SearchResponse as eR, type Seen as eS, type SeenTokens as eT, type ShadowRequest as eU, type ShadowRun as eV, type Shown as eW, type ShownValue as eX, type SlotChannelRank as eY, type SlotWhy as eZ, type SoftConstraint as e_, type QueueOptions as ea, type ReadingResult as eb, type ReconcileRequest as ec, type ReconcileResult as ed, type ReconciledLine as ee, type ToolOptions as ef, type Recurrence as eg, type Refetch as eh, type RefreshRelease as ei, type RefreshReleased as ej, type RefreshRequest as ek, type RefreshRequestPage as el, type Refusal$1 as em, type ReleaseDetail as en, type RememberParams as eo, type RememberResult as ep, type Rendered as eq, type ReplayAssertion as er, type ReplayBlocker as es, type ReplayCase as et, type ReplayCaseRequest as eu, type ReplayHistoryEntry as ev, type ReplayResult as ew, type RequestOptions as ex, type Resolved as ey, type Resolver as ez, type ModelUsage as f, type TurnRead as f$, type Speaker as f0, type SpeakerRef as f1, type StateMode as f2, type StateReadRequest as f3, type StateReadResponse as f4, type StateRef as f5, type StateVerifyRequest as f6, type StateVerifyResponse as f7, type StateView as f8, type StateViewRequest as f9, type Timestamp as fA, type Timings as fB, type ToolBinding as fC, type ToolCapabilities as fD, type ToolDefinition as fE, type ToolOptions$1 as fF, type TrackEvent as fG, type TraitOut as fH, type TurnAgent as fI, type TurnBlob as fJ, type TurnBuild as fK, type TurnCall as fL, type TurnCompilerPins as fM, type TurnConstraints as fN, type TurnCoordination as fO, type TurnCost as fP, type TurnEffect as fQ, type Flag as fR, TurnFrame as fS, type TurnIndexEntry as fT, type TurnIndexPage as fU, type TurnKind as fV, type TurnObservation as fW, type TurnOptions as fX, type TurnOutput as fY, type TurnParams as fZ, type TurnProvenance as f_, type StateWrite as fa, type Subject as fb, type SubjectToken as fc, type SubjectTokenRequest as fd, type Suppression as fe, type SuppressionAdded as ff, type SuppressionAddedDetail as fg, type SuppressionLifted as fh, type SuppressionLiftedDetail as fi, type SuppressionPage as fj, type SuppressionSalt as fk, TOOL_DEFINITIONS as fl, TOOL_NAMES as fm, type TargetModel as fn, Task as fo, type TaskAction as fp, type TaskEndedItem as fq, type TaskEvent as fr, type TaskLockDeclared as fs, type TaskLockDetail as ft, type TaskParams as fu, type TimeWindow as fv, type TimelineRequest as fw, type TimelineResponse as fx, type Timeouts as fy, type TimerState as fz, type Handle as g, type TurnRecord as g0, TurnRecorder as g1, type TurnRecordingOptions as g2, type TurnRecordingSummary as g3, type TurnSearchRequest as g4, type TurnSearchResponse as g5, type TurnSummary as g6, type TurnTokens as g7, type TurnView as g8, type TurnsRequest as g9, type WriteResult as gA, check as gB, consoleLogger as gC, currentCall as gD, currentTurn as gE, guardStream as gF, guardText as gG, recipientHash as gH, renderLive as gI, renderSuffix as gJ, silentLogger as gK, tool as gL, verifyContactToken as gM, violated as gN, type TurnsResponse as ga, type TypeCoverage as gb, type TypeFingerprintRequest as gc, type TypeFingerprintResponse as gd, type UnbackedValue as ge, type UnmetDemand as gf, type UnmetDemandPage as gg, type Unwatch as gh, type UploadParams as gi, type ValueEvidence as gj, type ValueKind as gk, type ValueState as gl, type Verdict as gm, type Verification as gn, type VerificationResult as go, type VerifyCheck as gp, type VerifyItem as gq, type VerifyMethod as gr, type VerifyParams as gs, type View as gt, type Visibility as gu, type VoiceInfo as gv, type VoiceOptions as gw, type Watch as gx, type WhereExpression as gy, type WorkingState as gz, AGENT_MEMORY_TOOL_NAMES as h, type ActionEvent as i, type ActionInfo as j, type Actions as k, Admin as l, type AgentMemoryBlock as m, type AgentMemoryParams as n, type AgentMemoryResult as o, type AgentMemorySearchRequest as p, type AgentMemorySearchResponse as q, type AgentMemorySource as r, shingles as s, type AgentNote as t, type AgentNoteKind as u, type AgentNoteOrigin as v, type AgentNoteProposal as w, type AgentNoteStatus as x, type AgentNoteVisibility as y, AgentSession as z };
@@ -12,7 +12,7 @@ function recordedTool(fn) {
12
12
 
13
13
  // src/context.ts
14
14
  function emptyResult(error) {
15
- return { text: "", suffix: "", variables: {}, pack: null, source: "none", response: null, error, constraints: null, state: null, coordination: null };
15
+ return { text: "", suffix: "", variables: {}, pack: null, source: "none", ageMs: null, response: null, error, constraints: null, state: null, coordination: null };
16
16
  }
17
17
 
18
18
  // src/integrations/shared.ts