@cultured_computer/sight 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,37 @@
1
1
  # Sight
2
2
 
3
- A capture and measurement API for production conversational AI. Add the SDK to
4
- your serving process; Sight records every turn and session in a standard
5
- trajectory format and computes behavioural measurements on top: the situations
6
- a deployment handles, voice consistency across turns, uptake, breaks, and
7
- return behaviour. Capture is out of band, responses are never modified or
8
- delayed.
3
+ Know what your production AI is being, without writing evals. Add the SDK to
4
+ your serving process and Sight records every conversation as it happens: what
5
+ the situation was, what your agent said, how the user took it, and how it
6
+ ended. On top of that record it computes behavioural measurements: the
7
+ situations your deployment handles, voice consistency across turns, uptake,
8
+ breaks, and whether users come back. Capture is out of band; responses are
9
+ never modified or delayed.
10
+
11
+ What that buys you, concretely:
12
+
13
+ - **See every conversation as a story, worst moment first.** Sessions triage
14
+ by badness (flagged, broke at turn N, abandoned) and open on the
15
+ transcript, so "what went wrong last night" is one click, not a query.
16
+ - **Know what happened after the reply.** Outcomes (resolved, escalated,
17
+ converted, refunded) attach to the conversation that caused them, even when
18
+ they arrive days later from your CRM webhook, and return behaviour is
19
+ computed per user. Most observability ends at the trace; the record here
20
+ ends at what it led to.
21
+ - **Know how much to trust each number.** Interpreted measurements start as
22
+ "preliminary" and earn a reliability grade only after they agree with your
23
+ own judgement on your own traffic. No number is ever dressed up: a card
24
+ shows its evidence before it shows a headline.
25
+ - **Ask your own questions.** Author custom rubrics in the dashboard (a
26
+ question plus answer chips); they join the same blind labeling queue and
27
+ earn trust the same way: against a second rater, never against the
28
+ instrument.
29
+
30
+ If your job is grading tasks against expected outputs in CI, an eval platform
31
+ (Braintrust and its class) is built for that loop and does it well. Sight is
32
+ built for the other loop: zero eval authoring, capture as the product, and
33
+ answers to the questions evals cannot reach — what your deployment is being
34
+ in production, and what users do next.
9
35
 
10
36
  The SDK is in beta. Interfaces and rollout order may change without notice;
11
37
  the record format itself is versioned and stable.
@@ -96,6 +122,36 @@ time — the next turn's state corner, plus the causing turn's outcome corner
96
122
  when the event carries a `causeProvenance` turn reference — and never
97
123
  interprets them.
98
124
 
125
+ ## Capture spans
126
+
127
+ Deployments that keep their own sub-turn structure — tool calls, retrieval
128
+ steps, per-call model usage inside a single turn — can ship it as spans:
129
+
130
+ ```ts
131
+ await Sight.captureSpans(
132
+ [
133
+ {
134
+ deploymentSlug: 'my-agent',
135
+ sessionExternalId: sessionId,
136
+ turnIndex: 3,
137
+ spanType: 'tool_call',
138
+ name: 'lookup_order',
139
+ startedAt: '2026-07-22T00:00:01.200Z',
140
+ durationMs: 180,
141
+ attributes: { toolName: 'lookup_order', argKeys: ['orderId'] },
142
+ },
143
+ ],
144
+ { clock_source: 'my-agent-clock', skew_bound_ms: 25, rule_version: 'v1' },
145
+ )
146
+ ```
147
+
148
+ A span lands on the turn you name, or on the session's latest turn at/under
149
+ its `startedAt` when `turnIndex` is omitted. Parent structure rides the
150
+ batch: give a span a caller-local `spanId` and reference it from a sibling's
151
+ `parentSpanId`. `attributes` are metadata only — tool names and argument
152
+ shapes, never free-text conversation content. `Sight.captureSpan(span)` is
153
+ the single-span form.
154
+
99
155
  ## Scope
100
156
 
101
157
  Sight is a measurement system: it reports what a deployment did. It does not