@cultured_computer/sight 0.3.4 → 0.3.5
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 +33 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
# Sight
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
the situation was, what your agent
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
The SDK is in beta. Interfaces and rollout order may change without notice;
|
|
26
|
-
the record format itself is versioned and stable.
|
|
3
|
+
Sight records what your production assistant is being. Not traces of what
|
|
4
|
+
the model produced: the interaction itself, captured as a coupled record.
|
|
5
|
+
Each turn holds what the situation was, what your agent did, how the user
|
|
6
|
+
responded, and what it led to. Both actors, one record. Behavior lives in
|
|
7
|
+
the coupling, not in the transcript: a reply only means something next to
|
|
8
|
+
what happened after it.
|
|
9
|
+
|
|
10
|
+
The record also carries an environment channel: tool outcomes, world
|
|
11
|
+
signals, stimulus events with their timing. Behavior reads against what
|
|
12
|
+
the world actually did, not just against text.
|
|
13
|
+
|
|
14
|
+
The SDK captures out of band; responses are never modified or delayed.
|
|
15
|
+
From the record, the dashboard shows the worst conversations first (opened
|
|
16
|
+
on the transcript), joins outcomes back to the conversation that caused
|
|
17
|
+
them even when they arrive days later, and computes behavioural
|
|
18
|
+
measurements on top: the situations your deployment handles, voice
|
|
19
|
+
consistency, uptake, breaks, return behaviour. Every interpreted number
|
|
20
|
+
stays preliminary until it agrees with your own labels on your own traffic.
|
|
21
|
+
|
|
22
|
+
The SDK is in beta. The record format is versioned and stable; the surfaces
|
|
23
|
+
around it are still moving.
|
|
27
24
|
|
|
28
25
|
## Install
|
|
29
26
|
|
|
@@ -51,6 +48,11 @@ Sight.startSession({
|
|
|
51
48
|
|
|
52
49
|
Notes:
|
|
53
50
|
|
|
51
|
+
- `apiKey` is a project ingest key. Create a project in the
|
|
52
|
+
[dashboard](https://sight.cultured.computer/dashboard) and copy its key
|
|
53
|
+
(shown once) into `SIGHT_API_KEY`. That is the only required setup — the
|
|
54
|
+
ingest endpoint defaults to production; override it with `endpoint` only for
|
|
55
|
+
self-hosting or staging.
|
|
54
56
|
- `init` runs once at startup. `deployment` identifies the configuration this
|
|
55
57
|
traffic belongs to; all measurement is per deployment.
|
|
56
58
|
- `externalId` keys the session (one conversation). `externalUserId` is a
|
|
@@ -93,8 +95,8 @@ await Sight.emitOutcomeEvent({
|
|
|
93
95
|
|
|
94
96
|
## Capture environment events
|
|
95
97
|
|
|
96
|
-
Deployments that run alongside a non-dialogue channel
|
|
97
|
-
game state stream, an editor buffer
|
|
98
|
+
Deployments that run alongside a non-dialogue channel (a stimulus feed, a
|
|
99
|
+
game state stream, an editor buffer) can record that channel's events
|
|
98
100
|
against the conversation:
|
|
99
101
|
|
|
100
102
|
```ts
|
|
@@ -107,14 +109,14 @@ await Sight.captureEnvironmentEvents(events, {
|
|
|
107
109
|
|
|
108
110
|
The envelope is generalized: `source_type` and `event` are free strings whose
|
|
109
111
|
meaning is defined per deployment. The instrument attaches events to turns by
|
|
110
|
-
time
|
|
111
|
-
when the event carries a `causeProvenance` turn reference
|
|
112
|
+
time (the next turn's state corner, plus the causing turn's outcome corner
|
|
113
|
+
when the event carries a `causeProvenance` turn reference) and never
|
|
112
114
|
interprets them.
|
|
113
115
|
|
|
114
116
|
## Capture spans
|
|
115
117
|
|
|
116
|
-
Deployments that keep their own sub-turn structure
|
|
117
|
-
steps, per-call model usage inside a single turn
|
|
118
|
+
Deployments that keep their own sub-turn structure (tool calls, retrieval
|
|
119
|
+
steps, per-call model usage inside a single turn) can ship it as spans:
|
|
118
120
|
|
|
119
121
|
```ts
|
|
120
122
|
await Sight.captureSpans(
|
|
@@ -137,7 +139,7 @@ await Sight.captureSpans(
|
|
|
137
139
|
A span lands on the turn you name, or on the session's latest turn at/under
|
|
138
140
|
its `startedAt` when `turnIndex` is omitted. Parent structure rides the
|
|
139
141
|
batch: give a span a caller-local `spanId` and reference it from a sibling's
|
|
140
|
-
`parentSpanId`. `attributes` are metadata only
|
|
142
|
+
`parentSpanId`. `attributes` are metadata only: tool names and argument
|
|
141
143
|
shapes, never free-text conversation content. `Sight.captureSpan(span)` is
|
|
142
144
|
the single-span form.
|
|
143
145
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cultured_computer/sight",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Know what your production AI is being, without writing evals. Records every turn and session in a standard trajectory format and computes behavioural measurements on top; capture is out of band, responses are never modified or delayed.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|