autotel-genai 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -38
- package/dist/agent/index.d.cts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent-CnXNAj9B.cjs.map +1 -1
- package/dist/agent-oCfaqmYw.js.map +1 -1
- package/dist/agent-security-BHdP6ZPG.d.cts.map +1 -1
- package/dist/agent-security-BHdP6ZPG.d.ts.map +1 -1
- package/dist/agent-security-CUDUKOEK.js.map +1 -1
- package/dist/agent-security-kfpXuwL4.cjs.map +1 -1
- package/dist/ai-sdk-bridge.cjs.map +1 -1
- package/dist/ai-sdk-bridge.d.cts +3 -4
- package/dist/ai-sdk-bridge.d.cts.map +1 -1
- package/dist/ai-sdk-bridge.d.ts +3 -4
- package/dist/ai-sdk-bridge.d.ts.map +1 -1
- package/dist/ai-sdk-bridge.js.map +1 -1
- package/dist/attributes-BSunBoIR.cjs.map +1 -1
- package/dist/{attributes-NcXer1Om.d.cts → attributes-BeU1n3Xb.d.cts} +2 -3
- package/dist/attributes-BeU1n3Xb.d.cts.map +1 -0
- package/dist/{attributes-CPLy8xLZ.d.ts → attributes-CLmcQcNP.d.ts} +2 -3
- package/dist/attributes-CLmcQcNP.d.ts.map +1 -0
- package/dist/attributes-DCv1cxKZ.js.map +1 -1
- package/dist/{cost-DXTkBUUW.d.ts → cost-C1FkUNG1.d.cts} +1 -2
- package/dist/cost-C1FkUNG1.d.cts.map +1 -0
- package/dist/{cost-DXTkBUUW.d.cts → cost-C1FkUNG1.d.ts} +1 -2
- package/dist/cost-C1FkUNG1.d.ts.map +1 -0
- package/dist/cost.cjs.map +1 -1
- package/dist/cost.d.cts +1 -1
- package/dist/cost.d.ts +1 -1
- package/dist/cost.js.map +1 -1
- package/dist/{events-DHPvmGyf.d.ts → events-BKns22B0.d.ts} +2 -3
- package/dist/events-BKns22B0.d.ts.map +1 -0
- package/dist/{events-BHt_Ru-3.d.cts → events-D2-Y94tX.d.cts} +2 -3
- package/dist/events-D2-Y94tX.d.cts.map +1 -0
- package/dist/events.d.cts +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/guard.cjs.map +1 -1
- package/dist/guard.d.cts +7 -2
- package/dist/guard.d.cts.map +1 -1
- package/dist/guard.d.ts +7 -2
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js.map +1 -1
- package/dist/{index-CjhfLhNX.d.cts → index-BIj0iUEx.d.cts} +3 -4
- package/dist/index-BIj0iUEx.d.cts.map +1 -0
- package/dist/{index-D64JGbkf.d.ts → index-Bdn7khCZ.d.ts} +9 -8
- package/dist/index-Bdn7khCZ.d.ts.map +1 -0
- package/dist/{index-BIa0Pptp.d.cts → index-D-6RBbqV.d.cts} +9 -8
- package/dist/index-D-6RBbqV.d.cts.map +1 -0
- package/dist/{index-DvdkwGf7.d.ts → index-DLdEgWWh.d.ts} +3 -4
- package/dist/index-DLdEgWWh.d.ts.map +1 -0
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/metrics.cjs.map +1 -1
- package/dist/metrics.d.cts +0 -1
- package/dist/metrics.d.cts.map +1 -1
- package/dist/metrics.d.ts +0 -1
- package/dist/metrics.d.ts.map +1 -1
- package/dist/metrics.js.map +1 -1
- package/dist/observer/index.d.cts +1 -1
- package/dist/observer/index.d.ts +1 -1
- package/dist/observer-BoQNdbkg.cjs.map +1 -1
- package/dist/observer-Ckha9xGv.js.map +1 -1
- package/dist/{semconv-D9KWKIw2.d.ts → semconv-2VyDPIuF.d.cts} +10 -5
- package/dist/semconv-2VyDPIuF.d.cts.map +1 -0
- package/dist/{semconv-D9KWKIw2.d.cts → semconv-2VyDPIuF.d.ts} +10 -5
- package/dist/semconv-2VyDPIuF.d.ts.map +1 -0
- package/dist/semconv.cjs.map +1 -1
- package/dist/semconv.d.cts +1 -1
- package/dist/semconv.d.ts +1 -1
- package/dist/semconv.js.map +1 -1
- package/dist/streaming.cjs.map +1 -1
- package/dist/streaming.d.cts +0 -1
- package/dist/streaming.d.cts.map +1 -1
- package/dist/streaming.d.ts +0 -1
- package/dist/streaming.d.ts.map +1 -1
- package/dist/streaming.js.map +1 -1
- package/dist/trace.cjs +9 -2
- package/dist/trace.cjs.map +1 -1
- package/dist/trace.d.cts +3 -4
- package/dist/trace.d.cts.map +1 -1
- package/dist/trace.d.ts +3 -4
- package/dist/trace.d.ts.map +1 -1
- package/dist/trace.js +10 -3
- package/dist/trace.js.map +1 -1
- package/package.json +9 -9
- package/skills/autotel-genai/SKILL.md +53 -22
- package/dist/attributes-CPLy8xLZ.d.ts.map +0 -1
- package/dist/attributes-NcXer1Om.d.cts.map +0 -1
- package/dist/cost-DXTkBUUW.d.cts.map +0 -1
- package/dist/cost-DXTkBUUW.d.ts.map +0 -1
- package/dist/events-BHt_Ru-3.d.cts.map +0 -1
- package/dist/events-DHPvmGyf.d.ts.map +0 -1
- package/dist/index-BIa0Pptp.d.cts.map +0 -1
- package/dist/index-CjhfLhNX.d.cts.map +0 -1
- package/dist/index-D64JGbkf.d.ts.map +0 -1
- package/dist/index-DvdkwGf7.d.ts.map +0 -1
- package/dist/semconv-D9KWKIw2.d.cts.map +0 -1
- package/dist/semconv-D9KWKIw2.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
`autotel-genai` is the AI layer for [autotel](https://github.com/jagreehal/autotel).
|
|
6
6
|
It emits the **canonical `gen_ai.*` semantic conventions** (OpenTelemetry semconv
|
|
7
|
-
**v1.42.0**) for everything from a single `chat` call to a multi-agent workflow
|
|
8
|
-
|
|
7
|
+
**v1.42.0**) for everything from a single `chat` call to a multi-agent workflow.
|
|
8
|
+
Token usage, cost, latency metrics, content/evaluation events, and an agent
|
|
9
9
|
identity / delegation / policy / audit governance layer.
|
|
10
10
|
|
|
11
11
|
Canonical-only by design: no legacy `gen.ai.*`, no `prompt_tokens` /
|
|
@@ -24,7 +24,11 @@ optional peer, needed only for `genAiMetricViews()`.
|
|
|
24
24
|
## Quick start
|
|
25
25
|
|
|
26
26
|
```ts
|
|
27
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
traceGenAI,
|
|
29
|
+
recordGenAiResponse,
|
|
30
|
+
recordGenAiUsage,
|
|
31
|
+
} from 'autotel-genai/trace';
|
|
28
32
|
import OpenAI from 'openai';
|
|
29
33
|
|
|
30
34
|
const openai = new OpenAI();
|
|
@@ -58,19 +62,19 @@ export const chat = traceGenAI({
|
|
|
58
62
|
|
|
59
63
|
## What you get
|
|
60
64
|
|
|
61
|
-
| Area
|
|
62
|
-
|
|
|
63
|
-
| **Semconv**
|
|
64
|
-
| **Cost**
|
|
65
|
-
| **Metrics**
|
|
66
|
-
| **Attributes**
|
|
67
|
-
| **Events**
|
|
68
|
-
| **Trace**
|
|
69
|
-
| **Guard**
|
|
70
|
-
| **Streaming**
|
|
71
|
-
| **AI SDK**
|
|
72
|
-
| **AI SDK (legacy)** | `autotel-genai/ai-sdk`
|
|
73
|
-
| **Agents**
|
|
65
|
+
| Area | Import | Highlights |
|
|
66
|
+
| ------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| **Semconv** | `autotel-genai/semconv` | `GEN_AI.*` keys, `GEN_AI_OPERATION`, `GEN_AI_PROVIDER`, `genAiSpanName()` |
|
|
68
|
+
| **Cost** | `autotel-genai/cost` | `estimateLLMCost`, `recordLLMCost`, `MODEL_PRICING` (cache-read/write aware) |
|
|
69
|
+
| **Metrics** | `autotel-genai/metrics` | `genAiMetricViews()` re-buckets the canonical histograms |
|
|
70
|
+
| **Attributes** | `autotel-genai` | typed builders → canonical attribute maps |
|
|
71
|
+
| **Events** | `autotel-genai/events` | opt-in content + `inference.operation.details` / `evaluation.result` |
|
|
72
|
+
| **Trace** | `autotel-genai/trace` | `traceGenAI()`, `recordGenAiResponse/Usage` |
|
|
73
|
+
| **Guard** | `autotel-genai/guard` | inline cost/token/loop kill-switch: `createGenAiBudget`, `createGenAiGuard`, `parseGuardRules` |
|
|
74
|
+
| **Streaming** | `autotel-genai/streaming` | TTFC, throughput, inter-chunk distribution: `createStreamTimer`, `recordStreamTiming` |
|
|
75
|
+
| **AI SDK** | `autotel-genai/observer` | `autotelTelemetry()`: `registerTelemetry()` integration: live `gen_ai.*` spans + cost + streaming + nested traces + opt-in content. `subscribeAiTelemetry()`: zero-config `ai:telemetry` channel path |
|
|
76
|
+
| **AI SDK (legacy)** | `autotel-genai/ai-sdk` | `ai.*` → `gen_ai.*` mapping + cost for `LegacyOpenTelemetry`/older versions; `autotelEnrich()` for `@ai-sdk/otel` `enrichSpan` |
|
|
77
|
+
| **Agents** | `autotel-genai/agent` | identity, delegation, policy, audit, privacy, non-repudiation |
|
|
74
78
|
|
|
75
79
|
### Cost
|
|
76
80
|
|
|
@@ -90,7 +94,10 @@ recordLLMCost(ctx, 'claude-sonnet-4', {
|
|
|
90
94
|
import { NodeSDK } from '@opentelemetry/sdk-node';
|
|
91
95
|
import { genAiMetricViews } from 'autotel-genai/metrics';
|
|
92
96
|
|
|
93
|
-
const sdk = new NodeSDK({
|
|
97
|
+
const sdk = new NodeSDK({
|
|
98
|
+
serviceName: 'my-agent',
|
|
99
|
+
views: [...genAiMetricViews()],
|
|
100
|
+
});
|
|
94
101
|
```
|
|
95
102
|
|
|
96
103
|
Re-buckets `gen_ai.client.operation.duration`, `…time_to_first_chunk`,
|
|
@@ -101,7 +108,7 @@ Re-buckets `gen_ai.client.operation.duration`, `…time_to_first_chunk`,
|
|
|
101
108
|
|
|
102
109
|
Most tracing tells you what an agent _did_, after the bill. A **guard** runs
|
|
103
110
|
_during_ the run: feed it each step, it accumulates cost / tokens / loop state,
|
|
104
|
-
and halts the run when a rule crosses its threshold
|
|
111
|
+
and halts the run when a rule crosses its threshold. Aborting an `AbortSignal`
|
|
105
112
|
and (by default) throwing a `GEN_AI_GUARD_STOP` structured error.
|
|
106
113
|
|
|
107
114
|
```ts
|
|
@@ -120,7 +127,7 @@ for (const task of tasks) {
|
|
|
120
127
|
}
|
|
121
128
|
```
|
|
122
129
|
|
|
123
|
-
Rules can also come from a shorthand string
|
|
130
|
+
Rules can also come from a shorthand string. Cost ceilings, token ceilings,
|
|
124
131
|
spin-loop detection (`N identical calls in a window of M`), error loops,
|
|
125
132
|
tool-call / step caps, wall-clock timeouts, and context-window budgets:
|
|
126
133
|
|
|
@@ -135,7 +142,7 @@ guard.record({ kind: 'tool', name: 'search', signature: JSON.stringify(args) });
|
|
|
135
142
|
```
|
|
136
143
|
|
|
137
144
|
Each rule fires once; `onStop` chooses `throw` (default), `abort` (signal only),
|
|
138
|
-
or `silent` (record only). All logic is deterministic
|
|
145
|
+
or `silent` (record only). All logic is deterministic. No LLM in the loop.
|
|
139
146
|
|
|
140
147
|
### Streaming performance
|
|
141
148
|
|
|
@@ -169,8 +176,11 @@ throughput, and an inter-chunk gap distribution `{min,p10,median,avg,p90,max}`).
|
|
|
169
176
|
```ts
|
|
170
177
|
import { setGenAiContent, recordModelWarnings } from 'autotel-genai';
|
|
171
178
|
|
|
172
|
-
setGenAiContent(
|
|
173
|
-
|
|
179
|
+
setGenAiContent(
|
|
180
|
+
ctx,
|
|
181
|
+
{ inputMessages, outputMessages },
|
|
182
|
+
{ recordInputs: false, recordOutputs: true },
|
|
183
|
+
); // keep prompts out of telemetry
|
|
174
184
|
|
|
175
185
|
recordModelWarnings(ctx, result.warnings); // surface provider warnings vendors only log
|
|
176
186
|
```
|
|
@@ -203,7 +213,7 @@ It honours spec breaking change #242 (`gen_ai.agent.id` is dropped on internal
|
|
|
203
213
|
### Vercel AI SDK
|
|
204
214
|
|
|
205
215
|
Register `autotelTelemetry()` once and every `generateText` / `streamText` /
|
|
206
|
-
`embed` call streams a canonical `gen_ai.*` span tree
|
|
216
|
+
`embed` call streams a canonical `gen_ai.*` span tree. Live, as it runs:
|
|
207
217
|
|
|
208
218
|
```ts
|
|
209
219
|
import { registerTelemetry } from 'ai';
|
|
@@ -216,7 +226,7 @@ See `apps/example-ai-sdk-observer` for a runnable AI SDK + Ollama demo
|
|
|
216
226
|
(generateText, tool loop, streamText timing, embeddings).
|
|
217
227
|
|
|
218
228
|
It implements the AI SDK's stable `Telemetry` lifecycle interface (ai v7+), so
|
|
219
|
-
it slots in exactly where `@ai-sdk/otel`'s `OpenTelemetry` does
|
|
229
|
+
it slots in exactly where `@ai-sdk/otel`'s `OpenTelemetry` does. But it also,
|
|
220
230
|
on every `chat` span:
|
|
221
231
|
|
|
222
232
|
- **prices the call** (`gen_ai.usage.cost.usd`) from `MODEL_PRICING`;
|
|
@@ -226,13 +236,13 @@ on every `chat` span:
|
|
|
226
236
|
double-counts.
|
|
227
237
|
|
|
228
238
|
It is push-based and concurrency-safe (every event carries the SDK `callId`),
|
|
229
|
-
and it pulls in **no** dependency on `ai
|
|
239
|
+
and it pulls in **no** dependency on `ai`. The returned object satisfies the
|
|
230
240
|
`Telemetry` interface structurally, so the snippet above type-checks as-is.
|
|
231
241
|
`rerank` has no canonical `gen_ai` operation and is intentionally not mapped.
|
|
232
242
|
|
|
233
243
|
**Nested traces.** It implements the SDK's `executeTool` / `executeLanguageModelCall`
|
|
234
|
-
context runners, so a tool whose `execute` calls `generateText
|
|
235
|
-
provider's own auto-instrumented HTTP spans
|
|
244
|
+
context runners, so a tool whose `execute` calls `generateText`. And the
|
|
245
|
+
provider's own auto-instrumented HTTP spans. Nest under the right span
|
|
236
246
|
automatically.
|
|
237
247
|
|
|
238
248
|
**Content capture (opt-in).** Off by default for privacy. Turn it on to record
|
|
@@ -262,7 +272,7 @@ const unsubscribe = subscribeAiTelemetry(); // once, at startup
|
|
|
262
272
|
|
|
263
273
|
The channel path gives you the same `invoke_agent › chat › execute_tool` tree
|
|
264
274
|
with usage and cost, but not the per-call streaming timing (which only the
|
|
265
|
-
lifecycle `onLanguageModelCallEnd` event carries)
|
|
275
|
+
lifecycle `onLanguageModelCallEnd` event carries). Prefer
|
|
266
276
|
`registerTelemetry(autotelTelemetry())` when you can.
|
|
267
277
|
|
|
268
278
|
Register globally, or pass per-call via `telemetry.integrations` to scope it to
|
|
@@ -276,7 +286,7 @@ walk the finished result with `observeAiSdkResult` (see
|
|
|
276
286
|
import { mapAiSdkAttributes, recordAiSdkCost } from 'autotel-genai/ai-sdk';
|
|
277
287
|
|
|
278
288
|
const canonical = mapAiSdkAttributes(span.attributes); // ai.* → gen_ai.*
|
|
279
|
-
recordAiSdkCost(ctx, span.attributes);
|
|
289
|
+
recordAiSdkCost(ctx, span.attributes); // sets gen_ai.usage.cost.usd
|
|
280
290
|
```
|
|
281
291
|
|
|
282
292
|
#### Already using `@ai-sdk/otel`?
|
|
@@ -291,7 +301,7 @@ import { autotelEnrich } from 'autotel-genai/ai-sdk';
|
|
|
291
301
|
registerTelemetry(new OpenTelemetry({ enrichSpan: autotelEnrich() }));
|
|
292
302
|
```
|
|
293
303
|
|
|
294
|
-
`enrichSpan` **cannot add cost
|
|
304
|
+
`enrichSpan` **cannot add cost**. The SDK passes it only
|
|
295
305
|
`{ spanType, operationId, callId, runtimeContext }` (no usage, no model), and its
|
|
296
306
|
own attributes win over custom keys. To get `gen_ai.usage.cost.usd` on the model
|
|
297
307
|
span, use `autotelTelemetry()` (it owns span creation). Either way,
|
|
@@ -301,8 +311,8 @@ shows there regardless of which integration emitted them.
|
|
|
301
311
|
#### Local devtools, one line
|
|
302
312
|
|
|
303
313
|
Point an OTLP exporter at a running `autotel-devtools` receiver and you get a
|
|
304
|
-
live GenAI run view
|
|
305
|
-
"Explain run" walkthrough
|
|
314
|
+
live GenAI run view. Cost, token breakdown, tool timeline, and a narrated
|
|
315
|
+
"Explain run" walkthrough. That works in production too (unlike
|
|
306
316
|
`@ai-sdk/devtools`, which is dev-only):
|
|
307
317
|
|
|
308
318
|
```ts
|
|
@@ -329,14 +339,22 @@ const observe = createGenAiObserver({
|
|
|
329
339
|
});
|
|
330
340
|
|
|
331
341
|
observe({ type: 'agent.start', id: 'a1', agent: { name: 'planner' } });
|
|
332
|
-
observe({
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
342
|
+
observe({
|
|
343
|
+
type: 'chat.start',
|
|
344
|
+
id: 'c1',
|
|
345
|
+
parentId: 'a1',
|
|
346
|
+
request: { provider: 'openai', model: 'gpt-4o' },
|
|
347
|
+
});
|
|
348
|
+
observe({
|
|
349
|
+
type: 'chat.end',
|
|
350
|
+
id: 'c1',
|
|
351
|
+
response: { model: 'gpt-4o' },
|
|
352
|
+
usage: { inputTokens: 412, outputTokens: 87 },
|
|
353
|
+
});
|
|
336
354
|
observe({ type: 'agent.end', id: 'a1' }); // closes c1 too if it never ended
|
|
337
355
|
```
|
|
338
356
|
|
|
339
|
-
Token usage lands on leaf `chat` spans only
|
|
357
|
+
Token usage lands on leaf `chat` spans only. Aggregate `agent`/`workflow`
|
|
340
358
|
spans never carry `gen_ai.usage.*`, so summing usage across a trace counts each
|
|
341
359
|
call exactly once.
|
|
342
360
|
|
|
@@ -346,7 +364,7 @@ call exactly once.
|
|
|
346
364
|
import {
|
|
347
365
|
createGenAiObserver,
|
|
348
366
|
createLangChainObserver, // LangChain / LangGraph callback handler
|
|
349
|
-
observeAiSdkResult,
|
|
367
|
+
observeAiSdkResult, // Vercel AI SDK result walker
|
|
350
368
|
} from 'autotel-genai/observer';
|
|
351
369
|
|
|
352
370
|
const observe = createGenAiObserver();
|
package/dist/agent/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AgentToolCallOptions, A as delegateToAgent, B as AgentDecisionMetadata, C as defineAgentToolCall, D as withAgentToolCall, E as withAgentAction, F as AgentActionFactory, G as AgentIdentityRegistry, H as AgentHandler, I as AgentActionMetadata, J as AgentOutcome, K as AgentIdentityStatus, L as AgentActionOptions, M as flattenAgentAttributes, N as setAgentAttributes, O as DelegateToAgentInput, P as createAgentAuditMetadata, Q as AgentToolCallActionMetadata, R as AgentAiMetadata, S as defineAgentAction, T as recordPolicyDecision, U as AgentIdentity, V as AgentEventKind, W as AgentIdentityRecord, X as AgentSessionMetadata, Y as AgentSessionActionMetadata, Z as AgentSessionStatus, _ as ProvisionAgentIdentityInput, a as AgentPlanRiskVerdict, at as PrivacyProfile, b as createAgentIdentityRegistry, c as recordPlanRiskAssessment, ct as ToolCallMetadata, d as CreateSignedEventEnvelopeOptions, dt as canonicalizeForHash, et as AiLifecycleStage, f as createSignedEventEnvelope, ft as hashPayload, g as sanitizeAuditPayload, h as resolvePrivacyProfile, i as AgentPlanClassifierResult, it as PolicyMetadata, j as recordAgentHandoff, k as RecordAgentHandoffMetadata, l as runAgentPlanClassifier, lt as ToolStatus, m as PrivacyProfileInput, n as AgentPlanClassifier, nt as GovernanceMetadata, o as RecordPlanRiskAssessmentOptions, ot as PrivacyProfileName, p as verifyEventEnvelopeHash, pt as AGENT_AUDIT_SCHEMA_VERSION, q as AgentMetadataInput, r as AgentPlanClassifierInput, rt as PolicyDecision, s as heuristicPlanRiskClassifier, st as ScopedToolDefinition, t as AGENT_PLAN_RISK_ATTR, tt as DelegationContext, u as withScopedTool, ut as HashPayloadOptions, v as RevokeAgentIdentityInput, w as recordDecisionBasis, x as withAgentSession, y as RotateAgentIdentityInput, z as AgentAuditEventEnvelope } from "../index-
|
|
2
|
-
import { a as TokenUsage, i as ModelPricing } from "../cost-
|
|
1
|
+
import { $ as AgentToolCallOptions, A as delegateToAgent, B as AgentDecisionMetadata, C as defineAgentToolCall, D as withAgentToolCall, E as withAgentAction, F as AgentActionFactory, G as AgentIdentityRegistry, H as AgentHandler, I as AgentActionMetadata, J as AgentOutcome, K as AgentIdentityStatus, L as AgentActionOptions, M as flattenAgentAttributes, N as setAgentAttributes, O as DelegateToAgentInput, P as createAgentAuditMetadata, Q as AgentToolCallActionMetadata, R as AgentAiMetadata, S as defineAgentAction, T as recordPolicyDecision, U as AgentIdentity, V as AgentEventKind, W as AgentIdentityRecord, X as AgentSessionMetadata, Y as AgentSessionActionMetadata, Z as AgentSessionStatus, _ as ProvisionAgentIdentityInput, a as AgentPlanRiskVerdict, at as PrivacyProfile, b as createAgentIdentityRegistry, c as recordPlanRiskAssessment, ct as ToolCallMetadata, d as CreateSignedEventEnvelopeOptions, dt as canonicalizeForHash, et as AiLifecycleStage, f as createSignedEventEnvelope, ft as hashPayload, g as sanitizeAuditPayload, h as resolvePrivacyProfile, i as AgentPlanClassifierResult, it as PolicyMetadata, j as recordAgentHandoff, k as RecordAgentHandoffMetadata, l as runAgentPlanClassifier, lt as ToolStatus, m as PrivacyProfileInput, n as AgentPlanClassifier, nt as GovernanceMetadata, o as RecordPlanRiskAssessmentOptions, ot as PrivacyProfileName, p as verifyEventEnvelopeHash, pt as AGENT_AUDIT_SCHEMA_VERSION, q as AgentMetadataInput, r as AgentPlanClassifierInput, rt as PolicyDecision, s as heuristicPlanRiskClassifier, st as ScopedToolDefinition, t as AGENT_PLAN_RISK_ATTR, tt as DelegationContext, u as withScopedTool, ut as HashPayloadOptions, v as RevokeAgentIdentityInput, w as recordDecisionBasis, x as withAgentSession, y as RotateAgentIdentityInput, z as AgentAuditEventEnvelope } from "../index-BIj0iUEx.cjs";
|
|
2
|
+
import { a as TokenUsage, i as ModelPricing } from "../cost-C1FkUNG1.cjs";
|
|
3
3
|
import { C as recordPlanStep, D as agentContextFromSpan, E as AgentContext, S as recordMemoryAccess, T as tryRecordHumanApproval, _ as recordActionRiskClass, a as AgentInputProvenance, b as recordHumanApproval, c as AgentSecurityRecordOptions, d as RecordHumanApprovalInput, f as RecordInputProvenanceInput, g as deriveActionRiskClass, h as RecordRenderOutputInput, i as AgentConsentOutcome, l as RecordActiveScopesInput, m as RecordPlanStepInput, n as ActionRiskHints, o as AgentMemoryOperation, p as RecordMemoryAccessInput, r as AgentActionRiskClass, s as AgentOutputFormat, t as AGENT_SECURITY_ATTR, u as RecordControllerInput, v as recordActiveScopes, w as recordRenderOutput, x as recordInputProvenance, y as recordControllerId } from "../agent-security-BHdP6ZPG.cjs";
|
|
4
4
|
export { AGENT_AUDIT_SCHEMA_VERSION, AGENT_PLAN_RISK_ATTR, AGENT_SECURITY_ATTR, type ActionRiskHints, type AgentActionFactory, type AgentActionMetadata, type AgentActionOptions, type AgentActionRiskClass, type AgentAiMetadata, type AgentAuditEventEnvelope, 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 DelegateToAgentInput, type DelegationContext, type GovernanceMetadata, type HashPayloadOptions, type ModelPricing, type PolicyDecision, type PolicyMetadata, type PrivacyProfile, type PrivacyProfileInput, type PrivacyProfileName, type ProvisionAgentIdentityInput, type RecordActiveScopesInput, type RecordAgentHandoffMetadata, type RecordControllerInput, type RecordHumanApprovalInput, type RecordInputProvenanceInput, type RecordMemoryAccessInput, type RecordPlanRiskAssessmentOptions, type RecordPlanStepInput, type RecordRenderOutputInput, type RevokeAgentIdentityInput, type RotateAgentIdentityInput, type ScopedToolDefinition, type TokenUsage, type ToolCallMetadata, type ToolStatus, agentContextFromSpan, canonicalizeForHash, createAgentAuditMetadata, createAgentIdentityRegistry, createSignedEventEnvelope, defineAgentAction, defineAgentToolCall, delegateToAgent, deriveActionRiskClass, flattenAgentAttributes, hashPayload, heuristicPlanRiskClassifier, recordActionRiskClass, recordActiveScopes, recordAgentHandoff, recordControllerId, recordDecisionBasis, recordHumanApproval, recordInputProvenance, recordMemoryAccess, recordPlanRiskAssessment, recordPlanStep, recordPolicyDecision, recordRenderOutput, resolvePrivacyProfile, runAgentPlanClassifier, sanitizeAuditPayload, setAgentAttributes, tryRecordHumanApproval, verifyEventEnvelopeHash, withAgentAction, withAgentSession, withAgentToolCall, withScopedTool };
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AgentToolCallOptions, A as delegateToAgent, B as AgentDecisionMetadata, C as defineAgentToolCall, D as withAgentToolCall, E as withAgentAction, F as AgentActionFactory, G as AgentIdentityRegistry, H as AgentHandler, I as AgentActionMetadata, J as AgentOutcome, K as AgentIdentityStatus, L as AgentActionOptions, M as flattenAgentAttributes, N as setAgentAttributes, O as DelegateToAgentInput, P as createAgentAuditMetadata, Q as AgentToolCallActionMetadata, R as AgentAiMetadata, S as defineAgentAction, T as recordPolicyDecision, U as AgentIdentity, V as AgentEventKind, W as AgentIdentityRecord, X as AgentSessionMetadata, Y as AgentSessionActionMetadata, Z as AgentSessionStatus, _ as ProvisionAgentIdentityInput, a as AgentPlanRiskVerdict, at as PrivacyProfile, b as createAgentIdentityRegistry, c as recordPlanRiskAssessment, ct as ToolCallMetadata, d as CreateSignedEventEnvelopeOptions, dt as canonicalizeForHash, et as AiLifecycleStage, f as createSignedEventEnvelope, ft as hashPayload, g as sanitizeAuditPayload, h as resolvePrivacyProfile, i as AgentPlanClassifierResult, it as PolicyMetadata, j as recordAgentHandoff, k as RecordAgentHandoffMetadata, l as runAgentPlanClassifier, lt as ToolStatus, m as PrivacyProfileInput, n as AgentPlanClassifier, nt as GovernanceMetadata, o as RecordPlanRiskAssessmentOptions, ot as PrivacyProfileName, p as verifyEventEnvelopeHash, pt as AGENT_AUDIT_SCHEMA_VERSION, q as AgentMetadataInput, r as AgentPlanClassifierInput, rt as PolicyDecision, s as heuristicPlanRiskClassifier, st as ScopedToolDefinition, t as AGENT_PLAN_RISK_ATTR, tt as DelegationContext, u as withScopedTool, ut as HashPayloadOptions, v as RevokeAgentIdentityInput, w as recordDecisionBasis, x as withAgentSession, y as RotateAgentIdentityInput, z as AgentAuditEventEnvelope } from "../index-
|
|
2
|
-
import { a as TokenUsage, i as ModelPricing } from "../cost-
|
|
1
|
+
import { $ as AgentToolCallOptions, A as delegateToAgent, B as AgentDecisionMetadata, C as defineAgentToolCall, D as withAgentToolCall, E as withAgentAction, F as AgentActionFactory, G as AgentIdentityRegistry, H as AgentHandler, I as AgentActionMetadata, J as AgentOutcome, K as AgentIdentityStatus, L as AgentActionOptions, M as flattenAgentAttributes, N as setAgentAttributes, O as DelegateToAgentInput, P as createAgentAuditMetadata, Q as AgentToolCallActionMetadata, R as AgentAiMetadata, S as defineAgentAction, T as recordPolicyDecision, U as AgentIdentity, V as AgentEventKind, W as AgentIdentityRecord, X as AgentSessionMetadata, Y as AgentSessionActionMetadata, Z as AgentSessionStatus, _ as ProvisionAgentIdentityInput, a as AgentPlanRiskVerdict, at as PrivacyProfile, b as createAgentIdentityRegistry, c as recordPlanRiskAssessment, ct as ToolCallMetadata, d as CreateSignedEventEnvelopeOptions, dt as canonicalizeForHash, et as AiLifecycleStage, f as createSignedEventEnvelope, ft as hashPayload, g as sanitizeAuditPayload, h as resolvePrivacyProfile, i as AgentPlanClassifierResult, it as PolicyMetadata, j as recordAgentHandoff, k as RecordAgentHandoffMetadata, l as runAgentPlanClassifier, lt as ToolStatus, m as PrivacyProfileInput, n as AgentPlanClassifier, nt as GovernanceMetadata, o as RecordPlanRiskAssessmentOptions, ot as PrivacyProfileName, p as verifyEventEnvelopeHash, pt as AGENT_AUDIT_SCHEMA_VERSION, q as AgentMetadataInput, r as AgentPlanClassifierInput, rt as PolicyDecision, s as heuristicPlanRiskClassifier, st as ScopedToolDefinition, t as AGENT_PLAN_RISK_ATTR, tt as DelegationContext, u as withScopedTool, ut as HashPayloadOptions, v as RevokeAgentIdentityInput, w as recordDecisionBasis, x as withAgentSession, y as RotateAgentIdentityInput, z as AgentAuditEventEnvelope } from "../index-DLdEgWWh.js";
|
|
2
|
+
import { a as TokenUsage, i as ModelPricing } from "../cost-C1FkUNG1.js";
|
|
3
3
|
import { C as recordPlanStep, D as agentContextFromSpan, E as AgentContext, S as recordMemoryAccess, T as tryRecordHumanApproval, _ as recordActionRiskClass, a as AgentInputProvenance, b as recordHumanApproval, c as AgentSecurityRecordOptions, d as RecordHumanApprovalInput, f as RecordInputProvenanceInput, g as deriveActionRiskClass, h as RecordRenderOutputInput, i as AgentConsentOutcome, l as RecordActiveScopesInput, m as RecordPlanStepInput, n as ActionRiskHints, o as AgentMemoryOperation, p as RecordMemoryAccessInput, r as AgentActionRiskClass, s as AgentOutputFormat, t as AGENT_SECURITY_ATTR, u as RecordControllerInput, v as recordActiveScopes, w as recordRenderOutput, x as recordInputProvenance, y as recordControllerId } from "../agent-security-BHdP6ZPG.js";
|
|
4
4
|
export { AGENT_AUDIT_SCHEMA_VERSION, AGENT_PLAN_RISK_ATTR, AGENT_SECURITY_ATTR, type ActionRiskHints, type AgentActionFactory, type AgentActionMetadata, type AgentActionOptions, type AgentActionRiskClass, type AgentAiMetadata, type AgentAuditEventEnvelope, 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 DelegateToAgentInput, type DelegationContext, type GovernanceMetadata, type HashPayloadOptions, type ModelPricing, type PolicyDecision, type PolicyMetadata, type PrivacyProfile, type PrivacyProfileInput, type PrivacyProfileName, type ProvisionAgentIdentityInput, type RecordActiveScopesInput, type RecordAgentHandoffMetadata, type RecordControllerInput, type RecordHumanApprovalInput, type RecordInputProvenanceInput, type RecordMemoryAccessInput, type RecordPlanRiskAssessmentOptions, type RecordPlanStepInput, type RecordRenderOutputInput, type RevokeAgentIdentityInput, type RotateAgentIdentityInput, type ScopedToolDefinition, type TokenUsage, type ToolCallMetadata, type ToolStatus, agentContextFromSpan, canonicalizeForHash, createAgentAuditMetadata, createAgentIdentityRegistry, createSignedEventEnvelope, defineAgentAction, defineAgentToolCall, delegateToAgent, deriveActionRiskClass, flattenAgentAttributes, hashPayload, heuristicPlanRiskClassifier, recordActionRiskClass, recordActiveScopes, recordAgentHandoff, recordControllerId, recordDecisionBasis, recordHumanApproval, recordInputProvenance, recordMemoryAccess, recordPlanRiskAssessment, recordPlanStep, recordPolicyDecision, recordRenderOutput, resolvePrivacyProfile, runAgentPlanClassifier, sanitizeAuditPayload, setAgentAttributes, tryRecordHumanApproval, verifyEventEnvelopeHash, withAgentAction, withAgentSession, withAgentToolCall, withScopedTool };
|