Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,18 @@ curl -X POST http://localhost:8000/v1/traces/batch \

## Python SDK

Registry installation (after the corresponding PyPI release is available):

```bash
pip install magic-lab-observer
pip install magic-lab-observer==0.1.1
```

Before the first PyPI release, install from a checkout:
For editable SDK development from a checkout:

```bash
python -m pip install "./sdk/python[openai,anthropic,langchain]"
```

See [First-time setup](docs/first-time-setup.md#3-instrument-an-application)
for current registry availability and package identities.
for package identities and integration examples.

```python
from llm_observatory import instrument, trace
Expand Down Expand Up @@ -271,13 +269,11 @@ tracer.addExporter(new OTLPExporter({ endpoint: "http://localhost:8000" }));

## CLI

Registry installation (after the corresponding PyPI release is available):

```bash
pip install magic-lab-observer-cli
pip install magic-lab-observer-cli==0.1.1
```

Before the first PyPI release, install from a checkout:
For editable CLI development from a checkout:

```bash
python -m pip install ./cli
Expand Down
25 changes: 15 additions & 10 deletions docs/first-time-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,22 @@ canonical package distribution names are:
| Python CLI | `magic-lab-observer-cli` | `llm-observatory` command |
| Python backend | `magic-lab-observer-backend` | `app` package and existing entry points |

The TypeScript SDK is available from npm:
The published SDKs and CLI are available from their registries:

```bash
npm install @magic-lab-studio/observer@0.1.1
python -m pip install magic-lab-observer==0.1.1
python -m pip install magic-lab-observer-cli==0.1.1
```

Until the Python distributions are published by Magic Lab Studio, install them
from the checked-out repository instead of installing similarly named
unscoped packages from a public registry:
Install the backend distribution separately when embedding or operating the
API outside the Compose quickstart:

```bash
python -m pip install magic-lab-observer-backend==0.1.1
```

Contributors can instead install editable packages from a checkout:

```bash
python -m pip install "./sdk/python[openai,anthropic,langchain]"
Expand All @@ -115,8 +122,8 @@ Do not use `pip install llm-observatory` or `npm install llm-observatory` as a
substitute: those unscoped registry names are not the distribution identity of
this repository.

The first canonical npm publication is Observer `0.1.1`. Python registry
availability is tracked separately; see [Package releases](releasing.md).
The first coordinated registry publication is Observer `0.1.1`; see
[Package releases](releasing.md).

For custom runtimes, direct HTTP is the smallest stable contract. Send completed
spans to `/v1/traces/batch`; use a consistent `trace_id` to connect model, tool,
Expand Down Expand Up @@ -155,14 +162,12 @@ PyPI does not support organization scopes, so the Python distributions use the
`@magic-lab-studio` scope. Publishing should use registry trusted publishing
from a protected GitHub environment rather than long-lived API tokens.

Before the first registry release, organization maintainers must:
Release maintainers must keep the trusted-publishing configuration aligned:

1. Create or verify the `magic-lab-studio` npm organization and grant the
release maintainers access.
2. Configure the three pending PyPI publishers for this repository.
2. Keep the three PyPI trusted publishers configured for this repository.
3. Configure PyPI and npm trusted publishing as described in
[Package releases](releasing.md).
4. Publish matching versions and verify installed package metadata and
provenance from clean environments.
5. Update this guide only after registry installation has been tested from a
clean environment.
6 changes: 3 additions & 3 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ The workflow checks that the tag and package versions match, builds packages in
jobs without publishing permission, and grants OIDC only to the publish jobs.
It never accepts arbitrary credentials or silently moves an existing tag.

The initial npm `0.1.1` package was published before this workflow. When
bootstrapping the three Python `0.1.1` projects, select `python`; do not attempt
to republish the existing npm version.
Observer `0.1.1` established all four registry projects. For later releases,
update every package to the same new version before selecting `all`; registries
do not permit republishing an existing version.