open-index/open-npm huggingface dataset:
npm package: @marckrenn/pi-sub-status
Description: Compact status-line client for pi subscription usage
Latest version: 1.5.0

# sub-status

Compact status-line client for [pi-coding-agent](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent).

`sub-status` is a small passive companion to `sub-core`: it renders current quota usage via `ctx.ui.setStatus(...)`, without widget UI, commands, or settings UI in v1.

On startup it follows the same bootstrap pattern as `sub-bar`, requests the current `sub-core` state, and then listens for `sub-core:ready` / `sub-core:update-current` to keep the compact line up to date. It stays deliberately quiet: no placeholder text when state is unavailable, and the status clears entirely when no usable usage snapshot exists.

## Installation

Install via the pi package manager:

```bash
pi install npm:@marckrenn/pi-sub-status
```

Use `-l` to install into project settings instead of global:

```bash
pi install -l npm:@marckrenn/pi-sub-status
```

`sub-status` follows the same package metadata/bootstrap pattern as `sub-bar`: it depends on `sub-core`, declares the same extra extension paths in package metadata, and probes/auto-loads `sub-core` at runtime for resilience.

## Relationship to the other packages

- `sub-core` is the shared source of truth for provider detection, fetching, cache/state, and events.
- `sub-bar` is the rich widget UI and remains the default visual package.
- `sub-status` is an optional compact client for status-line-friendly and RPC-friendly hosts.

Installing `sub-status` alongside `sub-bar` is expected to be supported: `sub-bar` owns the rich widget, while `sub-status` owns a compact status line.

## Current v1 scope

- Shows windows only
- Shows the first two windows only
- Prefers reset descriptions when available, otherwise falls back to window labels
- Shows percentages for each window
- Appends compact stale / incident suffix text when relevant
- Updates from `sub-core` startup/current-state events
- Clears the status entirely when no usable current state exists

## Not in v1

- Commands
- Settings UI
- `setWidget`
- `ctx.ui.custom(...)`
- Provider/model labels in the compact line
- Hybrid label + reset output in the compact line

## Development

```bash
npm run check -w @marckrenn/pi-sub-status
npm run test -w @marckrenn/pi-sub-status
```
npm package: @marcm/deep-equal
Description: Deep comparison of objects and arrays
Author: Marcus Mathiassen
Latest version: 2.0.0

# @marcm/deep-equal

*Mighty* fast deep equals (~837 bytes gzipped)

## Install
```bash
npm install @marcm/deep-equal
```
```bash
yarn add @marcm/deep-equal
```

## Supports 
- ``Object``
- ``Array``
- ``TypedArray``
- ``RegExp``
- ``Promise``
- ``Date``
- ``NaN``
- ``Set``
- ``Map``

## Benchmark[^1] (from [fast-equals](https://github.com/planttheidea/fast-equals))
[^1]: showing benchmark 'overall averages'. Ran on an M1 Pro (macOS 12.4).
Run yourself by adding [@marcm/deep-equal](https://github.com/MarcusMathiassen/deep-equal) to the [fast-equals](https://github.com/planttheidea/fast-equals) benchmark

| Package | Ops / sec |
| :---        |    ---: |
| **@marcm/deep-equal**      | ``11,294.928`` |
| fast-equals            | ``7,317.215``  |
| deep-eql               | ``4,528.424``  |
| fast-equals (circular) | ``2,966.189``  |
| fast-deep-equal        | ``2,841.046``  |
| react-fast-compare     | ``2,684.473``  |
| nano-equal             | ``1,150.366``  |
| underscore.isEqual     | ``1,107.566``  |
| lodash.isEqual         | ``673.473``    |
| assert.deepStrictEqual | ``30.697``     |
| deep-equal             | ``2.888``      |

Passes the full test suite of [fast-equals](https://github.com/planttheidea/fast-equals)

## Usage
```javascript
const { deepEqual } = require('@marcm/deep-equal')
// or
import { deepEqual } from '@marcm/deep-equal'
// Typed Arrays
deepEqual(new Float32Array([3, 4, 6]), new Float32Array([3, 4, 6])) // true
deepEqual(new Float32Array([3, 4, 6]), new Float32Array([3, 4])) // false
// Objects and array
deepEqual([{ a: 'a' }, { b: 'b' }], [{ a: 'a' }, { b: 'b' }]) // true
// Dates
deepEqual(new Date('2017-06-16T21:36:48.362Z'), new Date('2016-06-16T21:36:48.362Z')) // false
deepEqual(new Date('2017-06-16T21:36:48.362Z'), new Date('2017-06-16T21:36:48.362Z')) // true
npm package: @marcm/shallow-equal
Description: Shallow comparison of objects and arrays
Author: Marcus Mathiassen
Latest version: 1.0.4

# @marcm/shallow-equal

*Mighty* fast shallow equals (~524 bytes gzipped)

## Install
```bash
npm install @marcm/shallow-equal
```
```bash
yarn add @marcm/shallow-equal
```

## Supports 
- ``Object``
- ``Array``
- ``TypedArray``
- ``RegExp``
- ``Promise``
- ``Date``
- ``NaN``
- ``Set``
- ``Map``

## Benchmark[^1] (from [fast-equals](https://github.com/planttheidea/fast-equals))
[^1]: showing benchmark 'overall averages'. Ran on an M1 Pro (macOS 13.1).
Run yourself by adding [@marcm/shallow-equal](https://github.com/MarcusMathiassen/shallow-equal) to the [fast-equals](https://github.com/planttheidea/fast-equals) benchmark

| Package | Ops / sec |
| :---        |    ---: |
| **@marcm/shallow-equal**            | ``13,079.405`` |
| fast-equals (shallowEqual)          | ``8,437.492``  |
| shallow-equal (shallowEqualObjects) | ``6,777.645``  |
| shallowequal                        | ``6,335.283``  |
| fast-shallow-equal                  | ``5,659.316``  |

Passes the full test suite of [fast-equals](https://github.com/planttheidea/fast-equals)

## Usage
```javascript
const { shallowEqual } = require('@marcm/shallow-equal')
// or
import { shallowEqual } from '@marcm/shallow-equal'

// Typed Arrays
shallowEqual(new Float32Array([3, 4, 6]), new Float32Array([3, 4, 6])) // true
shallowEqual(new Float32Array([3, 4, 6]), new Float32Array([3, 4, 8])) // false
// Objects and array
shallowEqual({ a: 'a', b: 'b' }, { a: 'a', b: 'b' }) // true
shallowEqual([{ a: 'a' }, { b: 'b' }], [{ a: 'a' }, { b: 'b' }]) // false
// Dates
shallowEqual(new Date('2017-06-16T21:36:48.362Z'), new Date('2016-06-16T21:36:48.362Z')) // false
shallowEqual(new Date('2017-06-16T21:36:48.362Z'), new Date('2017-06-16T21:36:48.362Z')) // true
npm package: @marcm/store
Description: Fast, tiny, React store
Author: Marcus Mathiassen
Latest version: 1.0.7

# @marcm/store

fast react store (~354 bytes gzipped)

## Install
```bash
npm install @marcm/store
```
```bash
yarn add @marcm/store
```

## Usage
```javascript
const { createStore } = require('@marcm/store')
// or
import { createStore } from '@marcm/store'

// Create your store hook
const useDebugMode = store(false)
...
function DebugModeToggle() {
    const debugMode = useDebugMode()
    return <button onClick={e => useDebugMode.set(x => !x)}>{debugMode ? 'ON' : 'OFF'}</button>
}

// You can also get access to the `set` and `get` functions of the store
// by passing in a function
const useAudioController = createStore((set, get) => ({
    set,
    volume: 1,
    timer: null,
    isPlaying: false,
    play: () => {
        set({ isPlaying: true })
        if (get().timer) return
        get().timer = setInterval(() => {
            set({
                volume: get().volume + 1
            })
        }, 1000)
    },
    pause: () => {
        clearInterval(get().timer)
        set({ isPlaying: false, timer: null })
    }
}))

// Use it (will only rerun when `play` or `pause` changes)
const { play, pause } = useAudioController(({ play, pause }) => ({ play, pause }))

```