autotel-genai 0.15.0 → 0.15.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 (43) hide show
  1. package/dist/agent/index.d.cts +2 -2
  2. package/dist/agent/index.d.ts +2 -2
  3. package/dist/{agent-security-DfVSj0_D.d.cts → agent-security-Bw7YX5sg.d.cts} +17 -17
  4. package/dist/{agent-security-DRDb8zn3.d.ts → agent-security-D3ZjviBy.d.ts} +17 -17
  5. package/dist/ai-sdk-bridge.d.cts +28 -29
  6. package/dist/ai-sdk-bridge.d.ts +28 -29
  7. package/dist/{attributes-BUctoUWQ.d.cts → attributes-DAOZehAi.d.cts} +1 -1
  8. package/dist/{attributes-nMd8kWhJ.d.ts → attributes-DAYkQi4W.d.ts} +1 -1
  9. package/dist/{events-m7H2tLOc.d.cts → events-Bckm2Em5.d.cts} +1 -1
  10. package/dist/{events-CGPuUt4R.d.ts → events-BpmHGMQR.d.ts} +1 -1
  11. package/dist/events.d.cts +1 -1
  12. package/dist/events.d.ts +1 -1
  13. package/dist/guard.cjs +0 -0
  14. package/dist/guard.d.cts +24 -25
  15. package/dist/guard.d.ts +24 -25
  16. package/dist/guard.js +0 -0
  17. package/dist/{index-TAp4yMD_.d.ts → index-B6KKh0Ay.d.ts} +4 -4
  18. package/dist/{index-RQs4XIvP.d.ts → index-C7NU4O3l.d.ts} +17 -17
  19. package/dist/{index-T809UWnA.d.cts → index-Dg6xJssP.d.cts} +17 -17
  20. package/dist/{index-B-ZxoFHl.d.cts → index-St79Z2tO.d.cts} +4 -4
  21. package/dist/index.cjs +2 -2
  22. package/dist/index.d.cts +19 -19
  23. package/dist/index.d.ts +19 -19
  24. package/dist/index.js +2 -2
  25. package/dist/metrics.d.cts +10 -11
  26. package/dist/metrics.d.ts +10 -11
  27. package/dist/observer/index.d.cts +1 -1
  28. package/dist/observer/index.d.ts +1 -1
  29. package/dist/semconv--uhj8agp.d.cts +272 -0
  30. package/dist/semconv--uhj8agp.d.ts +272 -0
  31. package/dist/semconv.d.cts +1 -1
  32. package/dist/semconv.d.ts +1 -1
  33. package/dist/streaming.cjs +1 -1
  34. package/dist/streaming.d.cts +9 -10
  35. package/dist/streaming.d.ts +9 -10
  36. package/dist/streaming.js +1 -1
  37. package/dist/trace.cjs +1 -1
  38. package/dist/trace.d.cts +8 -9
  39. package/dist/trace.d.ts +8 -9
  40. package/dist/trace.js +1 -1
  41. package/package.json +9 -14
  42. package/dist/semconv-u0jJusEo.d.cts +0 -272
  43. package/dist/semconv-u0jJusEo.d.ts +0 -272
@@ -1,4 +1,4 @@
1
- import { $ as withScopedTool, A as TOOL_CALL_ID_LABEL, B as HoneyTokenToolOptions, C as SEQUENCE_RULES, Ct as hashPayload, D as SequenceSecurityEvent, E as SequenceRule, F as spansToSequenceEvents, G as CrossAgentMonitor, H as EVAL_IDENTITY_ATTR, I as EvalIncidentQueryResult, J as CrossAgentEvent, K as CrossAgentMonitorOptions, L as querySpansForEvalIncident, M as detectSequences, N as emitSequenceDetections, O as SequenceSeverity, P as sequenceDetectionsToSecurityEvents, Q as detectCrossAgentPattern, R as spansToCrossAgentEvents, S as POLICY_DECISION_LABEL, St as canonicalizeForHash, T as SequenceEvent, U as RecordEvalRunIdentityInput, V as createHoneyTokenTool, W as recordEvalRunIdentity, X as DetectCrossAgentPatternOptions, Y as CrossAgentSecurityEvent, Z as crossAgentDetectionsToSecurityEvents, _ as sequenceRulesToSigma, _t as recordAgentHandoff, a as AgentPlanRiskVerdict, at as RotateAgentIdentityInput, b as DETECTION_EVENT, bt as createAgentAuditMetadata, c as recordPlanRiskAssessment, ct as defineAgentAction, d as DETECTION_DISPOSITION_EVENT, dt as recordPolicyDecision, et as CreateSignedEventEnvelopeOptions, f as DetectionDispositionStatus, ft as withAgentAction, g as sequenceRuleToSigma, gt as delegateToAgent, h as SigmaDocument, ht as RecordAgentHandoffMetadata, i as AgentPlanClassifierResult, it as RevokeAgentIdentityInput, j as TOOL_NAME_LABEL, k as SequenceSpanLike, l as runAgentPlanClassifier, lt as defineAgentToolCall, m as recordDetectionDisposition, mt as DelegateToAgentInput, n as AgentPlanClassifier, nt as verifyEventEnvelopeHash, o as RecordPlanRiskAssessmentOptions, ot as createAgentIdentityRegistry, p as RecordDetectionDispositionInput, pt as withAgentToolCall, q as CrossAgentDetection, r as AgentPlanClassifierInput, rt as ProvisionAgentIdentityInput, s as heuristicPlanRiskClassifier, st as withAgentSession, t as AGENT_PLAN_RISK_ATTR, tt as createSignedEventEnvelope, u as DETECTION_DISPOSITION_ATTR, ut as recordDecisionBasis, v as AGENT_OUTCOME_LABEL, vt as flattenAgentAttributes, w as SequenceDetection, wt as AGENT_AUDIT_SCHEMA_VERSION, x as EmitSequenceDetectionsOptions, xt as HashPayloadOptions, y as DETECTION_ATTR, yt as setAgentAttributes, z as HoneyTokenToolDefinition } from "../index-T809UWnA.cjs";
1
+ import { $ as withScopedTool, A as TOOL_CALL_ID_LABEL, B as HoneyTokenToolOptions, C as SEQUENCE_RULES, Ct as hashPayload, D as SequenceSecurityEvent, E as SequenceRule, F as spansToSequenceEvents, G as CrossAgentMonitor, H as EVAL_IDENTITY_ATTR, I as EvalIncidentQueryResult, J as CrossAgentEvent, K as CrossAgentMonitorOptions, L as querySpansForEvalIncident, M as detectSequences, N as emitSequenceDetections, O as SequenceSeverity, P as sequenceDetectionsToSecurityEvents, Q as detectCrossAgentPattern, R as spansToCrossAgentEvents, S as POLICY_DECISION_LABEL, St as canonicalizeForHash, T as SequenceEvent, U as RecordEvalRunIdentityInput, V as createHoneyTokenTool, W as recordEvalRunIdentity, X as DetectCrossAgentPatternOptions, Y as CrossAgentSecurityEvent, Z as crossAgentDetectionsToSecurityEvents, _ as sequenceRulesToSigma, _t as recordAgentHandoff, a as AgentPlanRiskVerdict, at as RotateAgentIdentityInput, b as DETECTION_EVENT, bt as createAgentAuditMetadata, c as recordPlanRiskAssessment, ct as defineAgentAction, d as DETECTION_DISPOSITION_EVENT, dt as recordPolicyDecision, et as CreateSignedEventEnvelopeOptions, f as DetectionDispositionStatus, ft as withAgentAction, g as sequenceRuleToSigma, gt as delegateToAgent, h as SigmaDocument, ht as RecordAgentHandoffMetadata, i as AgentPlanClassifierResult, it as RevokeAgentIdentityInput, j as TOOL_NAME_LABEL, k as SequenceSpanLike, l as runAgentPlanClassifier, lt as defineAgentToolCall, m as recordDetectionDisposition, mt as DelegateToAgentInput, n as AgentPlanClassifier, nt as verifyEventEnvelopeHash, o as RecordPlanRiskAssessmentOptions, ot as createAgentIdentityRegistry, p as RecordDetectionDispositionInput, pt as withAgentToolCall, q as CrossAgentDetection, r as AgentPlanClassifierInput, rt as ProvisionAgentIdentityInput, s as heuristicPlanRiskClassifier, st as withAgentSession, t as AGENT_PLAN_RISK_ATTR, tt as createSignedEventEnvelope, u as DETECTION_DISPOSITION_ATTR, ut as recordDecisionBasis, v as AGENT_OUTCOME_LABEL, vt as flattenAgentAttributes, w as SequenceDetection, wt as AGENT_AUDIT_SCHEMA_VERSION, x as EmitSequenceDetectionsOptions, xt as HashPayloadOptions, y as DETECTION_ATTR, yt as setAgentAttributes, z as HoneyTokenToolDefinition } from "../index-Dg6xJssP.cjs";
2
2
  import { i as ModelPricing, s as TokenUsage } from "../cost-B8rIvXTK.cjs";
3
- import { $ as PrivacyProfileName, A as AgentAiMetadata, B as AgentOutcome, C as recordMemoryAccess, D as AgentActionFactory, E as tryRecordHumanApproval, F as AgentIdentity, G as AgentToolCallOptions, H as AgentSessionMetadata, I as AgentIdentityRecord, K as AiLifecycleStage, L as AgentIdentityRegistry, M as AgentDecisionMetadata, N as AgentEventKind, O as AgentActionMetadata, P as AgentHandler, Q as PrivacyProfile, R as AgentIdentityStatus, S as recordInputProvenance, T as recordRenderOutput, U as AgentSessionStatus, V as AgentSessionActionMetadata, W as AgentToolCallActionMetadata, X as PolicyDecision, Y as GovernanceMetadata, Z as PolicyMetadata, _ as deriveActionRiskClass, a as AgentConsentOutcome, at as resolvePrivacyProfile, b as recordControllerId, c as AgentOutputFormat, ct as AgentContext, d as RecordControllerInput, et as ScopedToolDefinition, f as RecordHumanApprovalInput, g as RecordRenderOutputInput, h as RecordPlanStepInput, i as AgentConsentEvidence, it as SanitizationEvidence, j as AgentAuditEventEnvelope, k as AgentActionOptions, l as AgentSecurityRecordOptions, lt as agentContextFromSpan, m as RecordMemoryAccessInput, n as ActionRiskHints, nt as ToolStatus, o as AgentInputProvenance, ot as sanitizeAuditPayload, p as RecordInputProvenanceInput, q as DelegationContext, r as AgentActionRiskClass, rt as PrivacyProfileInput, s as AgentMemoryOperation, st as sanitizeAuditPayloadWithEvidence, t as AGENT_SECURITY_ATTR, tt as ToolCallMetadata, u as RecordActiveScopesInput, v as recordActionRiskClass, w as recordPlanStep, x as recordHumanApproval, y as recordActiveScopes, z as AgentMetadataInput } from "../agent-security-DfVSj0_D.cjs";
3
+ import { $ as PrivacyProfileName, A as AgentAiMetadata, B as AgentOutcome, C as recordMemoryAccess, D as AgentActionFactory, E as tryRecordHumanApproval, F as AgentIdentity, G as AgentToolCallOptions, H as AgentSessionMetadata, I as AgentIdentityRecord, K as AiLifecycleStage, L as AgentIdentityRegistry, M as AgentDecisionMetadata, N as AgentEventKind, O as AgentActionMetadata, P as AgentHandler, Q as PrivacyProfile, R as AgentIdentityStatus, S as recordInputProvenance, T as recordRenderOutput, U as AgentSessionStatus, V as AgentSessionActionMetadata, W as AgentToolCallActionMetadata, X as PolicyDecision, Y as GovernanceMetadata, Z as PolicyMetadata, _ as deriveActionRiskClass, a as AgentConsentOutcome, at as resolvePrivacyProfile, b as recordControllerId, c as AgentOutputFormat, ct as AgentContext, d as RecordControllerInput, et as ScopedToolDefinition, f as RecordHumanApprovalInput, g as RecordRenderOutputInput, h as RecordPlanStepInput, i as AgentConsentEvidence, it as SanitizationEvidence, j as AgentAuditEventEnvelope, k as AgentActionOptions, l as AgentSecurityRecordOptions, lt as agentContextFromSpan, m as RecordMemoryAccessInput, n as ActionRiskHints, nt as ToolStatus, o as AgentInputProvenance, ot as sanitizeAuditPayload, p as RecordInputProvenanceInput, q as DelegationContext, r as AgentActionRiskClass, rt as PrivacyProfileInput, s as AgentMemoryOperation, st as sanitizeAuditPayloadWithEvidence, t as AGENT_SECURITY_ATTR, tt as ToolCallMetadata, u as RecordActiveScopesInput, v as recordActionRiskClass, w as recordPlanStep, x as recordHumanApproval, y as recordActiveScopes, z as AgentMetadataInput } from "../agent-security-Bw7YX5sg.cjs";
4
4
  export { AGENT_AUDIT_SCHEMA_VERSION, AGENT_OUTCOME_LABEL, AGENT_PLAN_RISK_ATTR, AGENT_SECURITY_ATTR, type ActionRiskHints, type AgentActionFactory, type AgentActionMetadata, type AgentActionOptions, type AgentActionRiskClass, type AgentAiMetadata, type AgentAuditEventEnvelope, type AgentConsentEvidence, type AgentConsentOutcome, type AgentContext, type AgentDecisionMetadata, type AgentEventKind, type AgentHandler, type AgentIdentity, type AgentIdentityRecord, type AgentIdentityRegistry, type AgentIdentityStatus, type AgentInputProvenance, type AgentMemoryOperation, type AgentMetadataInput, type AgentOutcome, type AgentOutputFormat, type AgentPlanClassifier, type AgentPlanClassifierInput, type AgentPlanClassifierResult, type AgentPlanRiskVerdict, type AgentSecurityRecordOptions, type AgentSessionActionMetadata, type AgentSessionMetadata, type AgentSessionStatus, type AgentToolCallActionMetadata, type AgentToolCallOptions, type AiLifecycleStage, type CreateSignedEventEnvelopeOptions, type CrossAgentDetection, type CrossAgentEvent, CrossAgentMonitor, type CrossAgentMonitorOptions, type CrossAgentSecurityEvent, DETECTION_ATTR, DETECTION_DISPOSITION_ATTR, DETECTION_DISPOSITION_EVENT, DETECTION_EVENT, type DelegateToAgentInput, type DelegationContext, type DetectCrossAgentPatternOptions, type DetectionDispositionStatus, EVAL_IDENTITY_ATTR, type EmitSequenceDetectionsOptions, type EvalIncidentQueryResult, type GovernanceMetadata, type HashPayloadOptions, type HoneyTokenToolDefinition, type HoneyTokenToolOptions, type ModelPricing, POLICY_DECISION_LABEL, type PolicyDecision, type PolicyMetadata, type PrivacyProfile, type PrivacyProfileInput, type PrivacyProfileName, type ProvisionAgentIdentityInput, type RecordActiveScopesInput, type RecordAgentHandoffMetadata, type RecordControllerInput, type RecordDetectionDispositionInput, type RecordEvalRunIdentityInput, type RecordHumanApprovalInput, type RecordInputProvenanceInput, type RecordMemoryAccessInput, type RecordPlanRiskAssessmentOptions, type RecordPlanStepInput, type RecordRenderOutputInput, type RevokeAgentIdentityInput, type RotateAgentIdentityInput, SEQUENCE_RULES, type SanitizationEvidence, type ScopedToolDefinition, type SequenceDetection, type SequenceEvent, type SequenceRule, type SequenceSecurityEvent, type SequenceSeverity, type SequenceSpanLike, type SigmaDocument, TOOL_CALL_ID_LABEL, TOOL_NAME_LABEL, type TokenUsage, type ToolCallMetadata, type ToolStatus, agentContextFromSpan, canonicalizeForHash, createAgentAuditMetadata, createAgentIdentityRegistry, createHoneyTokenTool, createSignedEventEnvelope, crossAgentDetectionsToSecurityEvents, defineAgentAction, defineAgentToolCall, delegateToAgent, deriveActionRiskClass, detectCrossAgentPattern, detectSequences, emitSequenceDetections, flattenAgentAttributes, hashPayload, heuristicPlanRiskClassifier, querySpansForEvalIncident, recordActionRiskClass, recordActiveScopes, recordAgentHandoff, recordControllerId, recordDecisionBasis, recordDetectionDisposition, recordEvalRunIdentity, recordHumanApproval, recordInputProvenance, recordMemoryAccess, recordPlanRiskAssessment, recordPlanStep, recordPolicyDecision, recordRenderOutput, resolvePrivacyProfile, runAgentPlanClassifier, sanitizeAuditPayload, sanitizeAuditPayloadWithEvidence, sequenceDetectionsToSecurityEvents, sequenceRuleToSigma, sequenceRulesToSigma, setAgentAttributes, spansToCrossAgentEvents, spansToSequenceEvents, tryRecordHumanApproval, verifyEventEnvelopeHash, withAgentAction, withAgentSession, withAgentToolCall, withScopedTool };
@@ -1,4 +1,4 @@
1
- import { $ as withScopedTool, A as TOOL_CALL_ID_LABEL, B as HoneyTokenToolOptions, C as SEQUENCE_RULES, Ct as hashPayload, D as SequenceSecurityEvent, E as SequenceRule, F as spansToSequenceEvents, G as CrossAgentMonitor, H as EVAL_IDENTITY_ATTR, I as EvalIncidentQueryResult, J as CrossAgentEvent, K as CrossAgentMonitorOptions, L as querySpansForEvalIncident, M as detectSequences, N as emitSequenceDetections, O as SequenceSeverity, P as sequenceDetectionsToSecurityEvents, Q as detectCrossAgentPattern, R as spansToCrossAgentEvents, S as POLICY_DECISION_LABEL, St as canonicalizeForHash, T as SequenceEvent, U as RecordEvalRunIdentityInput, V as createHoneyTokenTool, W as recordEvalRunIdentity, X as DetectCrossAgentPatternOptions, Y as CrossAgentSecurityEvent, Z as crossAgentDetectionsToSecurityEvents, _ as sequenceRulesToSigma, _t as recordAgentHandoff, a as AgentPlanRiskVerdict, at as RotateAgentIdentityInput, b as DETECTION_EVENT, bt as createAgentAuditMetadata, c as recordPlanRiskAssessment, ct as defineAgentAction, d as DETECTION_DISPOSITION_EVENT, dt as recordPolicyDecision, et as CreateSignedEventEnvelopeOptions, f as DetectionDispositionStatus, ft as withAgentAction, g as sequenceRuleToSigma, gt as delegateToAgent, h as SigmaDocument, ht as RecordAgentHandoffMetadata, i as AgentPlanClassifierResult, it as RevokeAgentIdentityInput, j as TOOL_NAME_LABEL, k as SequenceSpanLike, l as runAgentPlanClassifier, lt as defineAgentToolCall, m as recordDetectionDisposition, mt as DelegateToAgentInput, n as AgentPlanClassifier, nt as verifyEventEnvelopeHash, o as RecordPlanRiskAssessmentOptions, ot as createAgentIdentityRegistry, p as RecordDetectionDispositionInput, pt as withAgentToolCall, q as CrossAgentDetection, r as AgentPlanClassifierInput, rt as ProvisionAgentIdentityInput, s as heuristicPlanRiskClassifier, st as withAgentSession, t as AGENT_PLAN_RISK_ATTR, tt as createSignedEventEnvelope, u as DETECTION_DISPOSITION_ATTR, ut as recordDecisionBasis, v as AGENT_OUTCOME_LABEL, vt as flattenAgentAttributes, w as SequenceDetection, wt as AGENT_AUDIT_SCHEMA_VERSION, x as EmitSequenceDetectionsOptions, xt as HashPayloadOptions, y as DETECTION_ATTR, yt as setAgentAttributes, z as HoneyTokenToolDefinition } from "../index-RQs4XIvP.js";
1
+ import { $ as withScopedTool, A as TOOL_CALL_ID_LABEL, B as HoneyTokenToolOptions, C as SEQUENCE_RULES, Ct as hashPayload, D as SequenceSecurityEvent, E as SequenceRule, F as spansToSequenceEvents, G as CrossAgentMonitor, H as EVAL_IDENTITY_ATTR, I as EvalIncidentQueryResult, J as CrossAgentEvent, K as CrossAgentMonitorOptions, L as querySpansForEvalIncident, M as detectSequences, N as emitSequenceDetections, O as SequenceSeverity, P as sequenceDetectionsToSecurityEvents, Q as detectCrossAgentPattern, R as spansToCrossAgentEvents, S as POLICY_DECISION_LABEL, St as canonicalizeForHash, T as SequenceEvent, U as RecordEvalRunIdentityInput, V as createHoneyTokenTool, W as recordEvalRunIdentity, X as DetectCrossAgentPatternOptions, Y as CrossAgentSecurityEvent, Z as crossAgentDetectionsToSecurityEvents, _ as sequenceRulesToSigma, _t as recordAgentHandoff, a as AgentPlanRiskVerdict, at as RotateAgentIdentityInput, b as DETECTION_EVENT, bt as createAgentAuditMetadata, c as recordPlanRiskAssessment, ct as defineAgentAction, d as DETECTION_DISPOSITION_EVENT, dt as recordPolicyDecision, et as CreateSignedEventEnvelopeOptions, f as DetectionDispositionStatus, ft as withAgentAction, g as sequenceRuleToSigma, gt as delegateToAgent, h as SigmaDocument, ht as RecordAgentHandoffMetadata, i as AgentPlanClassifierResult, it as RevokeAgentIdentityInput, j as TOOL_NAME_LABEL, k as SequenceSpanLike, l as runAgentPlanClassifier, lt as defineAgentToolCall, m as recordDetectionDisposition, mt as DelegateToAgentInput, n as AgentPlanClassifier, nt as verifyEventEnvelopeHash, o as RecordPlanRiskAssessmentOptions, ot as createAgentIdentityRegistry, p as RecordDetectionDispositionInput, pt as withAgentToolCall, q as CrossAgentDetection, r as AgentPlanClassifierInput, rt as ProvisionAgentIdentityInput, s as heuristicPlanRiskClassifier, st as withAgentSession, t as AGENT_PLAN_RISK_ATTR, tt as createSignedEventEnvelope, u as DETECTION_DISPOSITION_ATTR, ut as recordDecisionBasis, v as AGENT_OUTCOME_LABEL, vt as flattenAgentAttributes, w as SequenceDetection, wt as AGENT_AUDIT_SCHEMA_VERSION, x as EmitSequenceDetectionsOptions, xt as HashPayloadOptions, y as DETECTION_ATTR, yt as setAgentAttributes, z as HoneyTokenToolDefinition } from "../index-C7NU4O3l.js";
2
2
  import { i as ModelPricing, s as TokenUsage } from "../cost-B8rIvXTK.js";
3
- import { $ as PrivacyProfileName, A as AgentAiMetadata, B as AgentOutcome, C as recordMemoryAccess, D as AgentActionFactory, E as tryRecordHumanApproval, F as AgentIdentity, G as AgentToolCallOptions, H as AgentSessionMetadata, I as AgentIdentityRecord, K as AiLifecycleStage, L as AgentIdentityRegistry, M as AgentDecisionMetadata, N as AgentEventKind, O as AgentActionMetadata, P as AgentHandler, Q as PrivacyProfile, R as AgentIdentityStatus, S as recordInputProvenance, T as recordRenderOutput, U as AgentSessionStatus, V as AgentSessionActionMetadata, W as AgentToolCallActionMetadata, X as PolicyDecision, Y as GovernanceMetadata, Z as PolicyMetadata, _ as deriveActionRiskClass, a as AgentConsentOutcome, at as resolvePrivacyProfile, b as recordControllerId, c as AgentOutputFormat, ct as AgentContext, d as RecordControllerInput, et as ScopedToolDefinition, f as RecordHumanApprovalInput, g as RecordRenderOutputInput, h as RecordPlanStepInput, i as AgentConsentEvidence, it as SanitizationEvidence, j as AgentAuditEventEnvelope, k as AgentActionOptions, l as AgentSecurityRecordOptions, lt as agentContextFromSpan, m as RecordMemoryAccessInput, n as ActionRiskHints, nt as ToolStatus, o as AgentInputProvenance, ot as sanitizeAuditPayload, p as RecordInputProvenanceInput, q as DelegationContext, r as AgentActionRiskClass, rt as PrivacyProfileInput, s as AgentMemoryOperation, st as sanitizeAuditPayloadWithEvidence, t as AGENT_SECURITY_ATTR, tt as ToolCallMetadata, u as RecordActiveScopesInput, v as recordActionRiskClass, w as recordPlanStep, x as recordHumanApproval, y as recordActiveScopes, z as AgentMetadataInput } from "../agent-security-DRDb8zn3.js";
3
+ import { $ as PrivacyProfileName, A as AgentAiMetadata, B as AgentOutcome, C as recordMemoryAccess, D as AgentActionFactory, E as tryRecordHumanApproval, F as AgentIdentity, G as AgentToolCallOptions, H as AgentSessionMetadata, I as AgentIdentityRecord, K as AiLifecycleStage, L as AgentIdentityRegistry, M as AgentDecisionMetadata, N as AgentEventKind, O as AgentActionMetadata, P as AgentHandler, Q as PrivacyProfile, R as AgentIdentityStatus, S as recordInputProvenance, T as recordRenderOutput, U as AgentSessionStatus, V as AgentSessionActionMetadata, W as AgentToolCallActionMetadata, X as PolicyDecision, Y as GovernanceMetadata, Z as PolicyMetadata, _ as deriveActionRiskClass, a as AgentConsentOutcome, at as resolvePrivacyProfile, b as recordControllerId, c as AgentOutputFormat, ct as AgentContext, d as RecordControllerInput, et as ScopedToolDefinition, f as RecordHumanApprovalInput, g as RecordRenderOutputInput, h as RecordPlanStepInput, i as AgentConsentEvidence, it as SanitizationEvidence, j as AgentAuditEventEnvelope, k as AgentActionOptions, l as AgentSecurityRecordOptions, lt as agentContextFromSpan, m as RecordMemoryAccessInput, n as ActionRiskHints, nt as ToolStatus, o as AgentInputProvenance, ot as sanitizeAuditPayload, p as RecordInputProvenanceInput, q as DelegationContext, r as AgentActionRiskClass, rt as PrivacyProfileInput, s as AgentMemoryOperation, st as sanitizeAuditPayloadWithEvidence, t as AGENT_SECURITY_ATTR, tt as ToolCallMetadata, u as RecordActiveScopesInput, v as recordActionRiskClass, w as recordPlanStep, x as recordHumanApproval, y as recordActiveScopes, z as AgentMetadataInput } from "../agent-security-D3ZjviBy.js";
4
4
  export { AGENT_AUDIT_SCHEMA_VERSION, AGENT_OUTCOME_LABEL, AGENT_PLAN_RISK_ATTR, AGENT_SECURITY_ATTR, type ActionRiskHints, type AgentActionFactory, type AgentActionMetadata, type AgentActionOptions, type AgentActionRiskClass, type AgentAiMetadata, type AgentAuditEventEnvelope, type AgentConsentEvidence, type AgentConsentOutcome, type AgentContext, type AgentDecisionMetadata, type AgentEventKind, type AgentHandler, type AgentIdentity, type AgentIdentityRecord, type AgentIdentityRegistry, type AgentIdentityStatus, type AgentInputProvenance, type AgentMemoryOperation, type AgentMetadataInput, type AgentOutcome, type AgentOutputFormat, type AgentPlanClassifier, type AgentPlanClassifierInput, type AgentPlanClassifierResult, type AgentPlanRiskVerdict, type AgentSecurityRecordOptions, type AgentSessionActionMetadata, type AgentSessionMetadata, type AgentSessionStatus, type AgentToolCallActionMetadata, type AgentToolCallOptions, type AiLifecycleStage, type CreateSignedEventEnvelopeOptions, type CrossAgentDetection, type CrossAgentEvent, CrossAgentMonitor, type CrossAgentMonitorOptions, type CrossAgentSecurityEvent, DETECTION_ATTR, DETECTION_DISPOSITION_ATTR, DETECTION_DISPOSITION_EVENT, DETECTION_EVENT, type DelegateToAgentInput, type DelegationContext, type DetectCrossAgentPatternOptions, type DetectionDispositionStatus, EVAL_IDENTITY_ATTR, type EmitSequenceDetectionsOptions, type EvalIncidentQueryResult, type GovernanceMetadata, type HashPayloadOptions, type HoneyTokenToolDefinition, type HoneyTokenToolOptions, type ModelPricing, POLICY_DECISION_LABEL, type PolicyDecision, type PolicyMetadata, type PrivacyProfile, type PrivacyProfileInput, type PrivacyProfileName, type ProvisionAgentIdentityInput, type RecordActiveScopesInput, type RecordAgentHandoffMetadata, type RecordControllerInput, type RecordDetectionDispositionInput, type RecordEvalRunIdentityInput, type RecordHumanApprovalInput, type RecordInputProvenanceInput, type RecordMemoryAccessInput, type RecordPlanRiskAssessmentOptions, type RecordPlanStepInput, type RecordRenderOutputInput, type RevokeAgentIdentityInput, type RotateAgentIdentityInput, SEQUENCE_RULES, type SanitizationEvidence, type ScopedToolDefinition, type SequenceDetection, type SequenceEvent, type SequenceRule, type SequenceSecurityEvent, type SequenceSeverity, type SequenceSpanLike, type SigmaDocument, TOOL_CALL_ID_LABEL, TOOL_NAME_LABEL, type TokenUsage, type ToolCallMetadata, type ToolStatus, agentContextFromSpan, canonicalizeForHash, createAgentAuditMetadata, createAgentIdentityRegistry, createHoneyTokenTool, createSignedEventEnvelope, crossAgentDetectionsToSecurityEvents, defineAgentAction, defineAgentToolCall, delegateToAgent, deriveActionRiskClass, detectCrossAgentPattern, detectSequences, emitSequenceDetections, flattenAgentAttributes, hashPayload, heuristicPlanRiskClassifier, querySpansForEvalIncident, recordActionRiskClass, recordActiveScopes, recordAgentHandoff, recordControllerId, recordDecisionBasis, recordDetectionDisposition, recordEvalRunIdentity, recordHumanApproval, recordInputProvenance, recordMemoryAccess, recordPlanRiskAssessment, recordPlanStep, recordPolicyDecision, recordRenderOutput, resolvePrivacyProfile, runAgentPlanClassifier, sanitizeAuditPayload, sanitizeAuditPayloadWithEvidence, sequenceDetectionsToSecurityEvents, sequenceRuleToSigma, sequenceRulesToSigma, setAgentAttributes, spansToCrossAgentEvents, spansToSequenceEvents, tryRecordHumanApproval, verifyEventEnvelopeHash, withAgentAction, withAgentSession, withAgentToolCall, withScopedTool };
@@ -1,5 +1,5 @@
1
1
  import { i as ModelPricing, s as TokenUsage } from "./cost-B8rIvXTK.cjs";
2
- import { h as GenAiProviderName } from "./semconv-u0jJusEo.cjs";
2
+ import { h as GenAiProviderName } from "./semconv--uhj8agp.cjs";
3
3
  import { RequestLogger } from "autotel";
4
4
  import { OnMissingContext } from "autotel-audit";
5
5
  //#region src/agent/context.d.ts
@@ -319,22 +319,22 @@ interface AgentAuditEventEnvelope {
319
319
  //#region src/agent/agent-security.d.ts
320
320
  /** Canonical agent security attribute keys (Google SAIF / human-control aligned). */
321
321
  declare const AGENT_SECURITY_ATTR: {
322
- readonly controllerId: "agent.controller.id";
323
- readonly inputProvenance: "agent.input.provenance";
324
- readonly actionRiskClass: "agent.action.risk_class";
325
- readonly consentRequired: "agent.consent.required";
326
- readonly consentOutcome: "agent.consent.outcome";
327
- readonly consentEvidence: "agent.consent.evidence";
328
- readonly scopeActive: "agent.scope.active";
329
- readonly memoryOperation: "agent.memory.operation";
330
- readonly memoryIsolationKey: "agent.memory.isolation_key";
331
- readonly memoryContentHash: "agent.memory.content_hash";
332
- readonly planStepIndex: "agent.plan.step_index";
333
- readonly planToolIntents: "agent.plan.tool_intents";
334
- readonly planPolicyIds: "agent.plan.policy_ids";
335
- readonly outputFormat: "agent.output.format";
336
- readonly outputContainsUrl: "agent.output.contains_url";
337
- readonly outputUrlCount: "agent.output.url_count";
322
+ readonly controllerId: 'agent.controller.id';
323
+ readonly inputProvenance: 'agent.input.provenance';
324
+ readonly actionRiskClass: 'agent.action.risk_class';
325
+ readonly consentRequired: 'agent.consent.required';
326
+ readonly consentOutcome: 'agent.consent.outcome';
327
+ readonly consentEvidence: 'agent.consent.evidence';
328
+ readonly scopeActive: 'agent.scope.active';
329
+ readonly memoryOperation: 'agent.memory.operation';
330
+ readonly memoryIsolationKey: 'agent.memory.isolation_key';
331
+ readonly memoryContentHash: 'agent.memory.content_hash';
332
+ readonly planStepIndex: 'agent.plan.step_index';
333
+ readonly planToolIntents: 'agent.plan.tool_intents';
334
+ readonly planPolicyIds: 'agent.plan.policy_ids';
335
+ readonly outputFormat: 'agent.output.format';
336
+ readonly outputContainsUrl: 'agent.output.contains_url';
337
+ readonly outputUrlCount: 'agent.output.url_count';
338
338
  };
339
339
  type AgentInputProvenance = 'user_direct' | 'user_voice' | 'rag' | 'memory' | 'tool_result' | 'external_untrusted';
340
340
  type AgentActionRiskClass = 'read' | 'write' | 'destructive' | 'financial' | 'exfiltration_capable';
@@ -1,5 +1,5 @@
1
1
  import { i as ModelPricing, s as TokenUsage } from "./cost-B8rIvXTK.js";
2
- import { h as GenAiProviderName } from "./semconv-u0jJusEo.js";
2
+ import { h as GenAiProviderName } from "./semconv--uhj8agp.js";
3
3
  import { RequestLogger } from "autotel";
4
4
  import { OnMissingContext } from "autotel-audit";
5
5
  //#region src/agent/context.d.ts
@@ -319,22 +319,22 @@ interface AgentAuditEventEnvelope {
319
319
  //#region src/agent/agent-security.d.ts
320
320
  /** Canonical agent security attribute keys (Google SAIF / human-control aligned). */
321
321
  declare const AGENT_SECURITY_ATTR: {
322
- readonly controllerId: "agent.controller.id";
323
- readonly inputProvenance: "agent.input.provenance";
324
- readonly actionRiskClass: "agent.action.risk_class";
325
- readonly consentRequired: "agent.consent.required";
326
- readonly consentOutcome: "agent.consent.outcome";
327
- readonly consentEvidence: "agent.consent.evidence";
328
- readonly scopeActive: "agent.scope.active";
329
- readonly memoryOperation: "agent.memory.operation";
330
- readonly memoryIsolationKey: "agent.memory.isolation_key";
331
- readonly memoryContentHash: "agent.memory.content_hash";
332
- readonly planStepIndex: "agent.plan.step_index";
333
- readonly planToolIntents: "agent.plan.tool_intents";
334
- readonly planPolicyIds: "agent.plan.policy_ids";
335
- readonly outputFormat: "agent.output.format";
336
- readonly outputContainsUrl: "agent.output.contains_url";
337
- readonly outputUrlCount: "agent.output.url_count";
322
+ readonly controllerId: 'agent.controller.id';
323
+ readonly inputProvenance: 'agent.input.provenance';
324
+ readonly actionRiskClass: 'agent.action.risk_class';
325
+ readonly consentRequired: 'agent.consent.required';
326
+ readonly consentOutcome: 'agent.consent.outcome';
327
+ readonly consentEvidence: 'agent.consent.evidence';
328
+ readonly scopeActive: 'agent.scope.active';
329
+ readonly memoryOperation: 'agent.memory.operation';
330
+ readonly memoryIsolationKey: 'agent.memory.isolation_key';
331
+ readonly memoryContentHash: 'agent.memory.content_hash';
332
+ readonly planStepIndex: 'agent.plan.step_index';
333
+ readonly planToolIntents: 'agent.plan.tool_intents';
334
+ readonly planPolicyIds: 'agent.plan.policy_ids';
335
+ readonly outputFormat: 'agent.output.format';
336
+ readonly outputContainsUrl: 'agent.output.contains_url';
337
+ readonly outputUrlCount: 'agent.output.url_count';
338
338
  };
339
339
  type AgentInputProvenance = 'user_direct' | 'user_voice' | 'rag' | 'memory' | 'tool_result' | 'external_untrusted';
340
340
  type AgentActionRiskClass = 'read' | 'write' | 'destructive' | 'financial' | 'exfiltration_capable';
@@ -1,71 +1,71 @@
1
1
  import { s as TokenUsage, t as EstimateCostOptions } from "./cost-B8rIvXTK.cjs";
2
- import { h as GenAiProviderName } from "./semconv-u0jJusEo.cjs";
3
- import { n as GenAiAttributeMap } from "./attributes-BUctoUWQ.cjs";
2
+ import { h as GenAiProviderName } from "./semconv--uhj8agp.cjs";
3
+ import { n as GenAiAttributeMap } from "./attributes-DAOZehAi.cjs";
4
4
  import { TraceContext } from "autotel";
5
5
  import { Attributes } from "@opentelemetry/api";
6
6
  //#region src/ai-sdk-bridge.d.ts
7
7
  /** Legacy AI SDK (`LegacyOpenTelemetry`) attribute keys we understand. */
8
- declare const AI_SDK_ATTR: {
9
- readonly MODEL_ID: "ai.model.id";
10
- readonly MODEL_PROVIDER: "ai.model.provider";
11
- readonly RESPONSE_MODEL: "ai.response.model";
12
- readonly RESPONSE_ID: "ai.response.id";
13
- readonly RESPONSE_FINISH_REASON: "ai.response.finishReason";
14
- readonly USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
15
- readonly USAGE_INPUT_TOKENS: "ai.usage.inputTokens";
16
- readonly USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
17
- readonly USAGE_OUTPUT_TOKENS: "ai.usage.outputTokens";
18
- readonly USAGE_CACHED_INPUT_TOKENS: "ai.usage.cachedInputTokens";
19
- readonly USAGE_REASONING_TOKENS: "ai.usage.reasoningTokens";
20
- readonly SETTINGS_MAX_TOKENS: "ai.settings.maxOutputTokens";
21
- readonly TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
8
+ export declare const AI_SDK_ATTR: {
9
+ readonly MODEL_ID: 'ai.model.id';
10
+ readonly MODEL_PROVIDER: 'ai.model.provider';
11
+ readonly RESPONSE_MODEL: 'ai.response.model';
12
+ readonly RESPONSE_ID: 'ai.response.id';
13
+ readonly RESPONSE_FINISH_REASON: 'ai.response.finishReason';
14
+ readonly USAGE_PROMPT_TOKENS: 'ai.usage.promptTokens';
15
+ readonly USAGE_INPUT_TOKENS: 'ai.usage.inputTokens';
16
+ readonly USAGE_COMPLETION_TOKENS: 'ai.usage.completionTokens';
17
+ readonly USAGE_OUTPUT_TOKENS: 'ai.usage.outputTokens';
18
+ readonly USAGE_CACHED_INPUT_TOKENS: 'ai.usage.cachedInputTokens';
19
+ readonly USAGE_REASONING_TOKENS: 'ai.usage.reasoningTokens';
20
+ readonly SETTINGS_MAX_TOKENS: 'ai.settings.maxOutputTokens';
21
+ readonly TELEMETRY_FUNCTION_ID: 'ai.telemetry.functionId';
22
22
  };
23
23
  /**
24
24
  * Normalize an AI SDK provider id (e.g. `openai.chat`, `amazon-bedrock`,
25
25
  * `google.generative-ai`) to a canonical `gen_ai.provider.name` value. Returns
26
26
  * the original string when it isn't a known provider.
27
27
  */
28
- declare function normalizeAiSdkProvider(provider: string): GenAiProviderName;
28
+ export declare function normalizeAiSdkProvider(provider: string): GenAiProviderName;
29
29
  /**
30
30
  * Extract {@link TokenUsage} from a span's attributes, reading canonical
31
31
  * `gen_ai.usage.*` first and falling back to legacy `ai.usage.*`. Returns
32
32
  * `undefined` when no token counts are present.
33
33
  */
34
- declare function extractAiSdkUsage(attributes: Attributes): TokenUsage | undefined;
34
+ export declare function extractAiSdkUsage(attributes: Attributes): TokenUsage | undefined;
35
35
  /** Read the request model from canonical or legacy attributes. */
36
- declare function extractAiSdkModel(attributes: Attributes): string | undefined;
36
+ export declare function extractAiSdkModel(attributes: Attributes): string | undefined;
37
37
  /**
38
38
  * Rewrite legacy `ai.*` telemetry attributes to canonical `gen_ai.*`. Pass the
39
39
  * attributes of an AI SDK span emitted by `LegacyOpenTelemetry` (or an older
40
40
  * SDK version); returns a fresh map with the canonical keys. Unknown keys are
41
41
  * dropped — this is a focused mapper, not a passthrough.
42
42
  */
43
- declare function mapAiSdkAttributes(attributes: Attributes): GenAiAttributeMap;
43
+ export declare function mapAiSdkAttributes(attributes: Attributes): GenAiAttributeMap;
44
44
  /**
45
45
  * Estimate the USD cost of an AI SDK call from a span's attributes (model +
46
46
  * usage, canonical or legacy). Returns `undefined` when model or usage is
47
47
  * missing, or the model has no known pricing.
48
48
  */
49
- declare function estimateAiSdkCost(attributes: Attributes, options?: EstimateCostOptions): number | undefined;
49
+ export declare function estimateAiSdkCost(attributes: Attributes, options?: EstimateCostOptions): number | undefined;
50
50
  /**
51
51
  * Estimate cost from AI SDK span attributes and record it as
52
52
  * `gen_ai.usage.cost.usd` on your own wrapping trace context. Useful when you
53
53
  * wrap a `generateText`/`streamText` call in an autotel span and want cost on
54
54
  * the parent. Returns the estimated cost, or `undefined`.
55
55
  */
56
- declare function recordAiSdkCost(ctx: Pick<TraceContext, 'setAttribute'>, attributes: Attributes, options?: EstimateCostOptions): number | undefined;
56
+ export declare function recordAiSdkCost(ctx: Pick<TraceContext, 'setAttribute'>, attributes: Attributes, options?: EstimateCostOptions): number | undefined;
57
57
  /** Marks a span as having passed through an autotel-aware `enrichSpan`. */
58
- declare const AUTOTEL_ENRICHED_ATTR = "autotel.enriched";
58
+ export declare const AUTOTEL_ENRICHED_ATTR = "autotel.enriched";
59
59
  /** Span kinds the `@ai-sdk/otel` `OpenTelemetry` integration emits. */
60
- type AiSdkSpanType = 'operation' | 'step' | 'languageModel' | 'tool' | 'embedding' | 'reranking';
60
+ export type AiSdkSpanType = 'operation' | 'step' | 'languageModel' | 'tool' | 'embedding' | 'reranking';
61
61
  /** The context `@ai-sdk/otel` passes to an `enrichSpan` callback. */
62
- interface AiSdkEnrichContext {
62
+ export interface AiSdkEnrichContext {
63
63
  spanType: AiSdkSpanType;
64
64
  operationId: string;
65
65
  callId: string;
66
66
  runtimeContext?: Record<string, unknown>;
67
67
  }
68
- interface AutotelEnrichOptions {
68
+ export interface AutotelEnrichOptions {
69
69
  /**
70
70
  * Map the enrich context to extra span attributes — e.g. promote
71
71
  * `runtimeContext` fields (sessionId, tenantId) onto the span. Returns
@@ -94,6 +94,5 @@ interface AutotelEnrichOptions {
94
94
  * fact with {@link estimateAiSdkCost}. `autotel-devtools` also prices `gen_ai`
95
95
  * spans on render regardless of which integration emitted them.
96
96
  */
97
- declare function autotelEnrich(options?: AutotelEnrichOptions): (ctx: AiSdkEnrichContext) => Record<string, string | number | boolean>;
98
- //#endregion
99
- export { AI_SDK_ATTR, AUTOTEL_ENRICHED_ATTR, AiSdkEnrichContext, AiSdkSpanType, AutotelEnrichOptions, autotelEnrich, estimateAiSdkCost, extractAiSdkModel, extractAiSdkUsage, mapAiSdkAttributes, normalizeAiSdkProvider, recordAiSdkCost };
97
+ export declare function autotelEnrich(options?: AutotelEnrichOptions): (ctx: AiSdkEnrichContext) => Record<string, string | number | boolean>;
98
+ //#endregion
@@ -1,71 +1,71 @@
1
1
  import { s as TokenUsage, t as EstimateCostOptions } from "./cost-B8rIvXTK.js";
2
- import { h as GenAiProviderName } from "./semconv-u0jJusEo.js";
3
- import { n as GenAiAttributeMap } from "./attributes-nMd8kWhJ.js";
2
+ import { h as GenAiProviderName } from "./semconv--uhj8agp.js";
3
+ import { n as GenAiAttributeMap } from "./attributes-DAYkQi4W.js";
4
4
  import { Attributes } from "@opentelemetry/api";
5
5
  import { TraceContext } from "autotel";
6
6
  //#region src/ai-sdk-bridge.d.ts
7
7
  /** Legacy AI SDK (`LegacyOpenTelemetry`) attribute keys we understand. */
8
- declare const AI_SDK_ATTR: {
9
- readonly MODEL_ID: "ai.model.id";
10
- readonly MODEL_PROVIDER: "ai.model.provider";
11
- readonly RESPONSE_MODEL: "ai.response.model";
12
- readonly RESPONSE_ID: "ai.response.id";
13
- readonly RESPONSE_FINISH_REASON: "ai.response.finishReason";
14
- readonly USAGE_PROMPT_TOKENS: "ai.usage.promptTokens";
15
- readonly USAGE_INPUT_TOKENS: "ai.usage.inputTokens";
16
- readonly USAGE_COMPLETION_TOKENS: "ai.usage.completionTokens";
17
- readonly USAGE_OUTPUT_TOKENS: "ai.usage.outputTokens";
18
- readonly USAGE_CACHED_INPUT_TOKENS: "ai.usage.cachedInputTokens";
19
- readonly USAGE_REASONING_TOKENS: "ai.usage.reasoningTokens";
20
- readonly SETTINGS_MAX_TOKENS: "ai.settings.maxOutputTokens";
21
- readonly TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId";
8
+ export declare const AI_SDK_ATTR: {
9
+ readonly MODEL_ID: 'ai.model.id';
10
+ readonly MODEL_PROVIDER: 'ai.model.provider';
11
+ readonly RESPONSE_MODEL: 'ai.response.model';
12
+ readonly RESPONSE_ID: 'ai.response.id';
13
+ readonly RESPONSE_FINISH_REASON: 'ai.response.finishReason';
14
+ readonly USAGE_PROMPT_TOKENS: 'ai.usage.promptTokens';
15
+ readonly USAGE_INPUT_TOKENS: 'ai.usage.inputTokens';
16
+ readonly USAGE_COMPLETION_TOKENS: 'ai.usage.completionTokens';
17
+ readonly USAGE_OUTPUT_TOKENS: 'ai.usage.outputTokens';
18
+ readonly USAGE_CACHED_INPUT_TOKENS: 'ai.usage.cachedInputTokens';
19
+ readonly USAGE_REASONING_TOKENS: 'ai.usage.reasoningTokens';
20
+ readonly SETTINGS_MAX_TOKENS: 'ai.settings.maxOutputTokens';
21
+ readonly TELEMETRY_FUNCTION_ID: 'ai.telemetry.functionId';
22
22
  };
23
23
  /**
24
24
  * Normalize an AI SDK provider id (e.g. `openai.chat`, `amazon-bedrock`,
25
25
  * `google.generative-ai`) to a canonical `gen_ai.provider.name` value. Returns
26
26
  * the original string when it isn't a known provider.
27
27
  */
28
- declare function normalizeAiSdkProvider(provider: string): GenAiProviderName;
28
+ export declare function normalizeAiSdkProvider(provider: string): GenAiProviderName;
29
29
  /**
30
30
  * Extract {@link TokenUsage} from a span's attributes, reading canonical
31
31
  * `gen_ai.usage.*` first and falling back to legacy `ai.usage.*`. Returns
32
32
  * `undefined` when no token counts are present.
33
33
  */
34
- declare function extractAiSdkUsage(attributes: Attributes): TokenUsage | undefined;
34
+ export declare function extractAiSdkUsage(attributes: Attributes): TokenUsage | undefined;
35
35
  /** Read the request model from canonical or legacy attributes. */
36
- declare function extractAiSdkModel(attributes: Attributes): string | undefined;
36
+ export declare function extractAiSdkModel(attributes: Attributes): string | undefined;
37
37
  /**
38
38
  * Rewrite legacy `ai.*` telemetry attributes to canonical `gen_ai.*`. Pass the
39
39
  * attributes of an AI SDK span emitted by `LegacyOpenTelemetry` (or an older
40
40
  * SDK version); returns a fresh map with the canonical keys. Unknown keys are
41
41
  * dropped — this is a focused mapper, not a passthrough.
42
42
  */
43
- declare function mapAiSdkAttributes(attributes: Attributes): GenAiAttributeMap;
43
+ export declare function mapAiSdkAttributes(attributes: Attributes): GenAiAttributeMap;
44
44
  /**
45
45
  * Estimate the USD cost of an AI SDK call from a span's attributes (model +
46
46
  * usage, canonical or legacy). Returns `undefined` when model or usage is
47
47
  * missing, or the model has no known pricing.
48
48
  */
49
- declare function estimateAiSdkCost(attributes: Attributes, options?: EstimateCostOptions): number | undefined;
49
+ export declare function estimateAiSdkCost(attributes: Attributes, options?: EstimateCostOptions): number | undefined;
50
50
  /**
51
51
  * Estimate cost from AI SDK span attributes and record it as
52
52
  * `gen_ai.usage.cost.usd` on your own wrapping trace context. Useful when you
53
53
  * wrap a `generateText`/`streamText` call in an autotel span and want cost on
54
54
  * the parent. Returns the estimated cost, or `undefined`.
55
55
  */
56
- declare function recordAiSdkCost(ctx: Pick<TraceContext, 'setAttribute'>, attributes: Attributes, options?: EstimateCostOptions): number | undefined;
56
+ export declare function recordAiSdkCost(ctx: Pick<TraceContext, 'setAttribute'>, attributes: Attributes, options?: EstimateCostOptions): number | undefined;
57
57
  /** Marks a span as having passed through an autotel-aware `enrichSpan`. */
58
- declare const AUTOTEL_ENRICHED_ATTR = "autotel.enriched";
58
+ export declare const AUTOTEL_ENRICHED_ATTR = "autotel.enriched";
59
59
  /** Span kinds the `@ai-sdk/otel` `OpenTelemetry` integration emits. */
60
- type AiSdkSpanType = 'operation' | 'step' | 'languageModel' | 'tool' | 'embedding' | 'reranking';
60
+ export type AiSdkSpanType = 'operation' | 'step' | 'languageModel' | 'tool' | 'embedding' | 'reranking';
61
61
  /** The context `@ai-sdk/otel` passes to an `enrichSpan` callback. */
62
- interface AiSdkEnrichContext {
62
+ export interface AiSdkEnrichContext {
63
63
  spanType: AiSdkSpanType;
64
64
  operationId: string;
65
65
  callId: string;
66
66
  runtimeContext?: Record<string, unknown>;
67
67
  }
68
- interface AutotelEnrichOptions {
68
+ export interface AutotelEnrichOptions {
69
69
  /**
70
70
  * Map the enrich context to extra span attributes — e.g. promote
71
71
  * `runtimeContext` fields (sessionId, tenantId) onto the span. Returns
@@ -94,6 +94,5 @@ interface AutotelEnrichOptions {
94
94
  * fact with {@link estimateAiSdkCost}. `autotel-devtools` also prices `gen_ai`
95
95
  * spans on render regardless of which integration emitted them.
96
96
  */
97
- declare function autotelEnrich(options?: AutotelEnrichOptions): (ctx: AiSdkEnrichContext) => Record<string, string | number | boolean>;
98
- //#endregion
99
- export { AI_SDK_ATTR, AUTOTEL_ENRICHED_ATTR, AiSdkEnrichContext, AiSdkSpanType, AutotelEnrichOptions, autotelEnrich, estimateAiSdkCost, extractAiSdkModel, extractAiSdkUsage, mapAiSdkAttributes, normalizeAiSdkProvider, recordAiSdkCost };
97
+ export declare function autotelEnrich(options?: AutotelEnrichOptions): (ctx: AiSdkEnrichContext) => Record<string, string | number | boolean>;
98
+ //#endregion
@@ -1,4 +1,4 @@
1
- import { _ as GenAiToolType, h as GenAiProviderName, m as GenAiOutputType, p as GenAiOperationName } from "./semconv-u0jJusEo.cjs";
1
+ import { _ as GenAiToolType, h as GenAiProviderName, m as GenAiOutputType, p as GenAiOperationName } from "./semconv--uhj8agp.cjs";
2
2
  //#region src/attributes.d.ts
3
3
  /**
4
4
  * OpenTelemetry span attribute value — primitives and homogeneous arrays.
@@ -1,4 +1,4 @@
1
- import { _ as GenAiToolType, h as GenAiProviderName, m as GenAiOutputType, p as GenAiOperationName } from "./semconv-u0jJusEo.js";
1
+ import { _ as GenAiToolType, h as GenAiProviderName, m as GenAiOutputType, p as GenAiOperationName } from "./semconv--uhj8agp.js";
2
2
  //#region src/attributes.d.ts
3
3
  /**
4
4
  * OpenTelemetry span attribute value — primitives and homogeneous arrays.
@@ -1,4 +1,4 @@
1
- import { h as GenAiProviderName, p as GenAiOperationName } from "./semconv-u0jJusEo.cjs";
1
+ import { h as GenAiProviderName, p as GenAiOperationName } from "./semconv--uhj8agp.cjs";
2
2
  import { TraceContext } from "autotel";
3
3
  //#region src/events.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { h as GenAiProviderName, p as GenAiOperationName } from "./semconv-u0jJusEo.js";
1
+ import { h as GenAiProviderName, p as GenAiOperationName } from "./semconv--uhj8agp.js";
2
2
  import { TraceContext } from "autotel";
3
3
  //#region src/events.d.ts
4
4
  /**
package/dist/events.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as GenAiMessage, c as GenAiWarning, d as recordInferenceDetails, f as recordModelWarnings, i as GenAiContentSink, l as InferenceDetailsEvent, m as setGenAiContent, n as DEFAULT_MAX_CONTENT_BYTES, o as GenAiMessagePart, p as recordOperationException, r as EvaluationResultEvent, s as GenAiOperationExceptionEvent, t as ContentCaptureSettings, u as recordEvaluationResult } from "./events-m7H2tLOc.cjs";
1
+ import { a as GenAiMessage, c as GenAiWarning, d as recordInferenceDetails, f as recordModelWarnings, i as GenAiContentSink, l as InferenceDetailsEvent, m as setGenAiContent, n as DEFAULT_MAX_CONTENT_BYTES, o as GenAiMessagePart, p as recordOperationException, r as EvaluationResultEvent, s as GenAiOperationExceptionEvent, t as ContentCaptureSettings, u as recordEvaluationResult } from "./events-Bckm2Em5.cjs";
2
2
  export { ContentCaptureSettings, DEFAULT_MAX_CONTENT_BYTES, EvaluationResultEvent, GenAiContentSink, GenAiMessage, GenAiMessagePart, GenAiOperationExceptionEvent, GenAiWarning, InferenceDetailsEvent, recordEvaluationResult, recordInferenceDetails, recordModelWarnings, recordOperationException, setGenAiContent };
package/dist/events.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as GenAiMessage, c as GenAiWarning, d as recordInferenceDetails, f as recordModelWarnings, i as GenAiContentSink, l as InferenceDetailsEvent, m as setGenAiContent, n as DEFAULT_MAX_CONTENT_BYTES, o as GenAiMessagePart, p as recordOperationException, r as EvaluationResultEvent, s as GenAiOperationExceptionEvent, t as ContentCaptureSettings, u as recordEvaluationResult } from "./events-CGPuUt4R.js";
1
+ import { a as GenAiMessage, c as GenAiWarning, d as recordInferenceDetails, f as recordModelWarnings, i as GenAiContentSink, l as InferenceDetailsEvent, m as setGenAiContent, n as DEFAULT_MAX_CONTENT_BYTES, o as GenAiMessagePart, p as recordOperationException, r as EvaluationResultEvent, s as GenAiOperationExceptionEvent, t as ContentCaptureSettings, u as recordEvaluationResult } from "./events-BpmHGMQR.js";
2
2
  export { ContentCaptureSettings, DEFAULT_MAX_CONTENT_BYTES, EvaluationResultEvent, GenAiContentSink, GenAiMessage, GenAiMessagePart, GenAiOperationExceptionEvent, GenAiWarning, InferenceDetailsEvent, recordEvaluationResult, recordInferenceDetails, recordModelWarnings, recordOperationException, setGenAiContent };
package/dist/guard.cjs CHANGED
Binary file
package/dist/guard.d.cts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { TraceContext } from "autotel";
2
2
  //#region src/guard.d.ts
3
3
  /** What a rule does when it crosses its threshold. */
4
- type GuardAction = 'warn' | 'stop';
4
+ export type GuardAction = 'warn' | 'stop';
5
5
  /** Usage contribution for a single step. */
6
- interface GuardUsage {
6
+ export interface GuardUsage {
7
7
  /**
8
8
  * Estimated USD cost for this step. Pair with
9
9
  * {@link import('./cost.js').estimateLLMCost} to compute it from token usage.
@@ -15,7 +15,7 @@ interface GuardUsage {
15
15
  outputTokens?: number;
16
16
  }
17
17
  /** A single supervised step: an LLM call, a tool call, a delegation, … */
18
- interface GenAiGuardStep {
18
+ export interface GenAiGuardStep {
19
19
  /**
20
20
  * Step kind. `tool` increments the tool-call counter; any value is allowed.
21
21
  */
@@ -34,7 +34,7 @@ interface GenAiGuardStep {
34
34
  usage?: GuardUsage;
35
35
  }
36
36
  /** Read-only snapshot of the accumulated session state. */
37
- interface GuardState {
37
+ export interface GuardState {
38
38
  /** Epoch ms when the guard was created. */
39
39
  readonly startedAt: number;
40
40
  /** Epoch ms at evaluation time. */
@@ -60,7 +60,7 @@ interface GuardState {
60
60
  }>;
61
61
  }
62
62
  /** A fired rule. */
63
- interface GuardViolation {
63
+ export interface GuardViolation {
64
64
  /** Rule name, e.g. `cost-ceiling:$5`. */
65
65
  rule: string;
66
66
  /** Whether the run continued (`warn`) or was halted (`stop`). */
@@ -73,7 +73,7 @@ interface GuardViolation {
73
73
  limit: number;
74
74
  }
75
75
  /** A guard rule: inspect the state after a step and optionally fire. */
76
- interface GenAiGuardRule {
76
+ export interface GenAiGuardRule {
77
77
  /** Stable identifier, surfaced on {@link GuardViolation.rule}. */
78
78
  name: string;
79
79
  /** Default {@link GuardAction} when the rule fires. Defaults to `stop`. */
@@ -90,16 +90,16 @@ interface GenAiGuardRule {
90
90
  } | undefined;
91
91
  }
92
92
  /** Minimal telemetry sink — the subset of {@link TraceContext} the guard uses. */
93
- type GuardSink = Pick<TraceContext, 'setAttributes' | 'track'>;
93
+ export type GuardSink = Pick<TraceContext, 'setAttributes' | 'track'>;
94
94
  /** What happens when a `stop` rule fires. */
95
- type GuardStopBehavior =
95
+ export type GuardStopBehavior =
96
96
  /** Abort the signal and throw a structured error (default). */
97
97
  'throw' |
98
98
  /** Abort the signal but do not throw — inspect `guard.stopped` yourself. */
99
99
  'abort' |
100
100
  /** Record the violation only; neither abort nor throw. */
101
101
  'silent';
102
- interface GenAiGuardOptions {
102
+ export interface GenAiGuardOptions {
103
103
  /** Rules to evaluate after each step. */
104
104
  rules: GenAiGuardRule[];
105
105
  /** What to do when a `stop` rule fires. Defaults to `throw`. */
@@ -113,7 +113,7 @@ interface GenAiGuardOptions {
113
113
  now?: () => number;
114
114
  }
115
115
  /** A live guard supervising an agent run. */
116
- interface GenAiGuard {
116
+ export interface GenAiGuard {
117
117
  /**
118
118
  * Record a step, accumulate its usage, and evaluate every rule. Returns the
119
119
  * violations that fired _this call_ (each rule fires at most once). When a
@@ -136,26 +136,26 @@ interface GenAiGuard {
136
136
  readonly violations: ReadonlyArray<GuardViolation>;
137
137
  }
138
138
  /** Stop / warn when accumulated cost exceeds `limitUsd`. */
139
- declare function costCeiling(limitUsd: number, action?: GuardAction): GenAiGuardRule;
139
+ export declare function costCeiling(limitUsd: number, action?: GuardAction): GenAiGuardRule;
140
140
  /** Stop / warn when accumulated input + output tokens exceed `limit`. */
141
- declare function tokenCeiling(limit: number, action?: GuardAction): GenAiGuardRule;
141
+ export declare function tokenCeiling(limit: number, action?: GuardAction): GenAiGuardRule;
142
142
  /** Stop / warn when the number of tool calls exceeds `limit`. */
143
- declare function maxToolCalls(limit: number, action?: GuardAction): GenAiGuardRule;
143
+ export declare function maxToolCalls(limit: number, action?: GuardAction): GenAiGuardRule;
144
144
  /** Stop / warn when the total number of steps exceeds `limit`. */
145
- declare function maxSteps(limit: number, action?: GuardAction): GenAiGuardRule;
145
+ export declare function maxSteps(limit: number, action?: GuardAction): GenAiGuardRule;
146
146
  /** Stop / warn when wall-clock time since start exceeds `limitMs`. */
147
- declare function maxDuration(limitMs: number, action?: GuardAction): GenAiGuardRule;
147
+ export declare function maxDuration(limitMs: number, action?: GuardAction): GenAiGuardRule;
148
148
  /**
149
149
  * Stop / warn on a spin loop: the same step (`name` + `signature`) repeated
150
150
  * `count` or more times within the last `window` steps. Steps without a `name`
151
151
  * are ignored (no identity to compare).
152
152
  */
153
- declare function spinLoop(options: {
153
+ export declare function spinLoop(options: {
154
154
  count: number;
155
155
  window: number;
156
156
  }, action?: GuardAction): GenAiGuardRule;
157
157
  /** Stop / warn on `count` or more consecutive failing steps. */
158
- declare function errorLoop(options: {
158
+ export declare function errorLoop(options: {
159
159
  count: number;
160
160
  }, action?: GuardAction): GenAiGuardRule;
161
161
  /**
@@ -163,13 +163,13 @@ declare function errorLoop(options: {
163
163
  * Matched exactly first, then by longest key prefix. Override via the `limit`
164
164
  * option on {@link contextBudget}.
165
165
  */
166
- declare const CONTEXT_LIMITS: Record<string, number>;
166
+ export declare const CONTEXT_LIMITS: Record<string, number>;
167
167
  /**
168
168
  * Stop / warn when cumulative input tokens reach `threshold` (default 0.9) of
169
169
  * the model's context window. Provide an explicit `limit`, or a `model` to look
170
170
  * one up from {@link CONTEXT_LIMITS}.
171
171
  */
172
- declare function contextBudget(options: {
172
+ export declare function contextBudget(options: {
173
173
  model?: string;
174
174
  limit?: number;
175
175
  threshold?: number;
@@ -189,14 +189,14 @@ declare function contextBudget(options: {
189
189
  * - `timeout:30m` — {@link maxDuration} (`ms`/`s`/`m`/`h`, default seconds)
190
190
  * - `context:0.9` / `context:0.9@gpt-4o` — {@link contextBudget}
191
191
  */
192
- declare function parseGuardRules(shorthand: string, options?: {
192
+ export declare function parseGuardRules(shorthand: string, options?: {
193
193
  defaultAction?: GuardAction;
194
194
  }): GenAiGuardRule[];
195
195
  /**
196
196
  * Create a guard that supervises an in-process agent run against `rules`.
197
197
  */
198
- declare function createGenAiGuard(options: GenAiGuardOptions): GenAiGuard;
199
- interface GenAiBudgetOptions {
198
+ export declare function createGenAiGuard(options: GenAiGuardOptions): GenAiGuard;
199
+ export interface GenAiBudgetOptions {
200
200
  /** Hard cost ceiling in USD — a `stop` rule. */
201
201
  maxCostUsd?: number;
202
202
  /** Soft cost threshold in USD — a `warn` rule. */
@@ -216,6 +216,5 @@ interface GenAiBudgetOptions {
216
216
  * Convenience preset that wires the common cost / token / tool-call / duration
217
217
  * ceilings into a {@link createGenAiGuard}. Returns the same {@link GenAiGuard}.
218
218
  */
219
- declare function createGenAiBudget(options: GenAiBudgetOptions): GenAiGuard;
220
- //#endregion
221
- export { CONTEXT_LIMITS, GenAiBudgetOptions, GenAiGuard, GenAiGuardOptions, GenAiGuardRule, GenAiGuardStep, GuardAction, GuardSink, GuardState, GuardStopBehavior, GuardUsage, GuardViolation, contextBudget, costCeiling, createGenAiBudget, createGenAiGuard, errorLoop, maxDuration, maxSteps, maxToolCalls, parseGuardRules, spinLoop, tokenCeiling };
219
+ export declare function createGenAiBudget(options: GenAiBudgetOptions): GenAiGuard;
220
+ //#endregion