Skip to content

Commit ad251d4

Browse files
committed
docs: 0.3.0 README + publish the JS watcher as @tracer-llm/watch
npm scope is @tracer-llm; the JS observability watcher ships as @tracer-llm/watch. README npm badge, JS quickstart, docs, and changelog reference the published name. tracer-llm 0.3.0 (PyPI) and the tracer cloud CLI are documented for the release.
1 parent 0c36427 commit ad251d4

7 files changed

Lines changed: 29 additions & 12 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ versioning.
1111
accumulate and auto-optimize once there are enough. Captures the full request
1212
and response on the OpenTelemetry GenAI (`gen_ai.*`) schema, with pluggable
1313
sinks (local file, Tracer Cloud, OTLP, or several at once).
14-
- `@tracer/watch`: a zero-dependency JavaScript/TypeScript mirror of the watch
14+
- `@tracer-llm/watch`: a zero-dependency JavaScript/TypeScript mirror of the watch
1515
decorator (async-context aware), so JS pipelines get the same one-line
1616
observability as Python.
1717
- `tracer cloud`: a full command-line interface for Tracer Cloud, at parity with

‎README.md‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[![Downloads](https://static.pepy.tech/badge/tracer-llm)](https://pepy.tech/project/tracer-llm)
99
[![Downloads](https://static.pepy.tech/badge/tracer-llm/month)](https://pepy.tech/project/tracer-llm)
1010
[![Python](https://img.shields.io/pypi/pyversions/tracer-llm)](https://pypi.org/project/tracer-llm/)
11+
[![npm](https://img.shields.io/npm/v/@tracer-llm/watch?label=%40tracer-llm%2Fwatch&color=cb3837&logo=npm)](https://www.npmjs.com/package/@tracer-llm/watch)
1112
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
1213
[![CI](https://img.shields.io/badge/CI-passing-brightgreen)](https://github.com/adrida/tracer/actions)
1314
[![Website](https://img.shields.io/badge/website-tracerml.ai-blue)](https://tracerml.ai)
@@ -95,7 +96,22 @@ The same watched spans map 1:1 to `TraceRecord`, so once you have traffic you ca
9596

9697
## Using from JavaScript / Node.js
9798

98-
TRACER works with JS pipelines without any Python in your application code. The pattern: log traces from JS → fit offline with the CLI → run `tracer serve` as a sidecar → call it via `fetch`.
99+
**Watch your JS LLM calls (free observability):** [`@tracer-llm/watch`](https://www.npmjs.com/package/@tracer-llm/watch) mirrors the Python decorator with zero dependencies, recording every call as an OpenTelemetry GenAI span (local by default, or streamed free to Tracer Cloud).
100+
101+
```bash
102+
npm install @tracer-llm/watch
103+
```
104+
105+
```js
106+
import { watch } from "@tracer-llm/watch";
107+
108+
const w = watch("support_classifier", { system: "provider-x", model: "model-x" });
109+
110+
// Wrap the function that calls your model; the return value is auto-captured.
111+
const classify = w(async (ticket) => callYourLLM(ticket));
112+
```
113+
114+
Full guide: [docs/javascript.md](docs/javascript.md). To route (not just observe) from JS, log traces, fit offline with the CLI, run `tracer serve` as a sidecar, and call it via `fetch`:
99115

100116
```js
101117
// 1. Log every LLM classification
@@ -188,6 +204,7 @@ X = tracer.embed(texts) # default: all-MiniLM-L6-v2 (384-dim)
188204
| `tracer update new_traces.jsonl` | Refit with new traces |
189205
| `tracer report-html` | Open the HTML report |
190206
| `tracer serve .tracer --port 8000` | HTTP prediction server |
207+
| `tracer cloud login` | Drive Tracer Cloud from the terminal: create, train, route, test, and watch tracers, at parity with the dashboard ([docs](docs/cloud.md)) |
191208

192209
`tracer scan` is the fast, conservative first look (similarity grouping plus exact held-out bounds, no training). It needs about 1,000 traces and works best around 5,000; below 1,000 it asks you to collect more, or pass `--force` for a best-effort floor. Embeddings are computed locally by default (sentence-transformers), or point it at your own embedding service with `--embed-url`. `tracer fit` then trains the real router and certifies more of the same traffic. The HTML report includes an interactive 3D map of your embedding space with a verdict/label colour toggle. See the [CLI reference](docs/cli.md) for every flag.
193210

‎docs/watch.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ Pass a custom `sink=` to `watch()` to fully control export.
106106

107107
## JavaScript / TypeScript
108108

109-
The same watcher ships for JS/TS as `@tracer/watch` (zero dependencies, same
109+
The same watcher ships for JS/TS as `@tracer-llm/watch` (zero dependencies, same
110110
capture, same free Tracer Cloud streaming):
111111

112112
```ts
113-
import { watch } from "@tracer/watch";
113+
import { watch } from "@tracer-llm/watch";
114114

115115
const w = watch("support-router"); // local by default; cloud with one key
116116

@@ -133,7 +133,7 @@ await w.span({ input, userId: "u_42" }, async (s) => {
133133
```
134134

135135
Set `TRACER_CLOUD_KEY` (or `watch(name, { cloudKey })`) to stream to Tracer
136-
Cloud. See the `@tracer/watch` package README for details.
136+
Cloud. See the `@tracer-llm/watch` package README for details.
137137

138138
## From watched traffic to a router
139139

‎js/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @tracer/watch
1+
# @tracer-llm/watch
22

33
Local-first, OpenTelemetry-aligned LLM trace recording for JavaScript / TypeScript.
44

@@ -17,13 +17,13 @@ are appended to `./.tracer/watch/<name>.jsonl`.
1717
## Install
1818

1919
```sh
20-
npm install @tracer/watch
20+
npm install @tracer-llm/watch
2121
```
2222

2323
## Usage
2424

2525
```ts
26-
import { watch } from "@tracer/watch";
26+
import { watch } from "@tracer-llm/watch";
2727

2828
const w = watch("support_classifier", { system: "provider-x", model: "model-x" });
2929
```

‎js/package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@tracer/watch",
2+
"name": "@tracer-llm/watch",
33
"version": "0.1.0",
44
"description": "Local-first, OpenTelemetry-GenAI-aligned LLM trace recording. Watch any model call with a wrapper, a decorator, or an async span. Zero runtime dependencies.",
55
"type": "module",

‎js/test/watch.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Tests for @tracer/watch: spans, OTel mapping, response extraction (both
2+
* Tests for @tracer-llm/watch: spans, OTel mapping, response extraction (both
33
* shapes), key-prefix routing, cloud-sink prod-safety + batching/flush, nested
44
* spans, the wrapper/decorator/span forms. All hermetic: no network, temp dirs,
55
* fetch is mocked.

0 commit comments

Comments
 (0)