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
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ All notable changes to Krillswitch are documented in this file.

### Added

- Publish the core and React SDKs in lockstep from protected `sdk-vX.Y.Z` tags
through retained, integrity-checked tarballs and npm trusted publishing.
- Published `@openclaw/krillswitch-core` and
`@openclaw/krillswitch-react` v0.0.1 in lockstep from the protected
`sdk-v0.0.1` tag through retained, integrity-checked tarballs and npm trusted
publishing.

## [v0.5.0] - 2026-07-30

Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ curl -s -X POST http://localhost:8799/v1/eval \
{"flags":{"souls":{"value":true,"variationId":"var_souls_on","reason":{"kind":"default"}}}}
```

## SDK installation

```sh
npm install @openclaw/krillswitch-core
npm install @openclaw/krillswitch-react
```

Both packages publish in lockstep. Use the core package for framework-neutral
evaluation and shared contracts, or the React package for typed hooks, SSR, and
hydration support.

Toggle the flag in local D1 and the next response flips:

```sh
Expand Down Expand Up @@ -97,6 +108,7 @@ version declared in the root `package.json`. The core and React SDKs use
lockstep `sdk-vX.Y.Z` tags and publish through npm trusted publishing. Their
`prepack` scripts compile ESM and TypeScript declarations;
`pnpm verify:sdk-packages` checks the exact tarballs before publication.
The current SDK release is `0.0.1`.

## Security

Expand Down
8 changes: 5 additions & 3 deletions docs/core-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ description: Use the pure TypeScript evaluator and shared flag contracts without

`@openclaw/krillswitch-core` contains the wire types, flag model, rollout hash, and pure `evaluateFlag` function. It performs no I/O and has no framework dependency.

This page documents the prepared package contract. The package has not been
published to npm yet; use the workspace or a verified packed tarball for
pre-release testing.
## Install

```sh
npm install @openclaw/krillswitch-core
```

## Evaluate one flag

Expand Down
8 changes: 5 additions & 3 deletions docs/react-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ description: Evaluate typed flags for SSR, hydrate without a variant flash, then

# React SDK

This page documents the prepared package contract. The package has not been
published to npm yet; use the workspace or a verified packed tarball for
pre-release testing.
## Install

```sh
npm install @openclaw/krillswitch-react
```

## Declare a manifest

Expand Down
5 changes: 3 additions & 2 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Pure TypeScript feature-flag evaluation and shared wire contracts for
[Krill Switch](https://krillswitch.com).

Registry publication is pending. Until the package is minted, test it from the
workspace or a verified packed tarball.
```sh
npm install @openclaw/krillswitch-core
```

```ts
import { evaluateFlag, type FlagConfig } from "@openclaw/krillswitch-core";
Expand Down
5 changes: 3 additions & 2 deletions packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Typed React feature flags for [Krill Switch](https://krillswitch.com), including
server evaluation and hydration bootstrap without a variant flash.

Registry publication is pending. Until the package is minted, test it from the
workspace or a verified packed tarball.
```sh
npm install @openclaw/krillswitch-react
```

```tsx
// flags.tsx
Expand Down
Loading