open-index/open-npm huggingface dataset:
npm package: @session-services/react-elements
Description: React components for [Session Services](https://session.services) ticketing.
Latest version: 0.1.20

# @session-services/react-elements

React components for [Session Services](https://session.services) ticketing.

## Installation

```bash
npm install @session-services/react-elements @session-services/web-elements @session-services/sdk
```

## Usage

```tsx
import { SessionsTicketing } from '@session-services/react-elements';

export default function TicketPage() {
  return (
    <SessionsTicketing
      tenantId="your-tenant-id"
      eventId="evt_123"
      returnUrl="https://yoursite.com/order/complete"
      theme="light"
    />
  );
}
```

## Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `tenantId` | `string` | Yes | — | Your Session Services tenant ID |
| `eventId` | `string` | Yes | — | Event ID to display tickets for |
| `apiUrl` | `string` | No | `https://api.session.services` | API endpoint URL |
| `locale` | `string` | No | `en-US` | Locale for formatting |
| `returnUrl` | `string` | No | — | URL to redirect after checkout |
| `theme` | `'light' \| 'dark' \| 'system'` | No | `system` | Color theme |
| `enableAnalytics` | `boolean` | No | `true` | Enable analytics tracking |
| `debugAnalytics` | `boolean` | No | `false` | Log analytics events to console |

## Events

Events are exposed as React props with `on*` prefix:

```tsx
<SessionsTicketing
  tenantId="..."
  eventId="..."
  onCartUpdate={(e) => {
    console.log('Cart:', e.detail); // OrderQuote
  }}
  onCheckoutInit={(e) => {
    const { checkoutUrl } = e.detail;
    window.location.href = checkoutUrl;
  }}
  onErrorOccurred={(e) => {
    console.error('Error:', e.detail.error);
  }}
/>
```

| Event | Detail Type | Description |
|-------|-------------|-------------|
| `onCartUpdate` | `OrderQuote` | Fired when cart contents change |
| `onCheckoutInit` | `{ orderId: string; checkoutUrl: string }` | Fired when checkout begins |
| `onErrorOccurred` | `{ error: string }` | Fired on errors |

## Theming

Pass CSS variables via the `style` prop:

```tsx
<SessionsTicketing
  tenantId="..."
  eventId="..."
  style={{
    '--card': '#fff',
    '--card-foreground': '#111827',
    '--border': '#e5e7eb',
    '--primary': '#ec4899',
    '--primary-foreground': '#ffffff',
    '--accent': '#f472b6',
    '--accent-foreground': '#0f172a',
    '--secondary': '#f3f4f6',
    '--secondary-foreground': '#1f2937',
    '--muted-foreground': '#6b7280',
    '--ring': '#f472b6',
  } as React.CSSProperties}
/>
```

## SSR

The component renders a custom element that works with React SSR frameworks like Next.js. No special configuration required.

## License

MIT
npm package: @session.js/bun-network
Description: Bun.sh network connector for @session.js/client
Author: Viktor Shchelochkov
Latest version: 1.0.15

# @session.js/bun-network

This network adapter for @session.js/client uses Bun.sh runtime to fetch Session nodes. It exports onRequest method that handles requests

**This package can't be used in browser.** If you want to use it on proxy server for your Session web client, try [@session.js/bun-network-remote](https://git.hloth.dev/session.js/bun-network-remote).

Usage:

```ts
import { BunNetwork } from '@session.js/bun-network'
new Session({ network: new BunNetwork() })
```

Usage with proxy:

```ts
import { BunNetwork } from '@session.js/bun-network'
new Session({ 
  network: new BunNetwork({
    proxy: {
      protocol: 'https',
      username: 'username', // optional
      password: 'password', // optional
      hostname: 'proxy.example.com',
      port: 8080,
    } // or pass string like https://username:password@proxy.example.com:8080
  }) 
})
```

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/bun-network-remote
Description: Bun.sh network connector wrapping arouund @session.js/bun-network
Author: Viktor Shchelochkov
Latest version: 1.0.10

# @session.js/bun-network-remote

This network adapter for @session.js/client uses Bun.sh runtime to fetch Session nodes. It is intended to be used in environments that should keep secret keys but can't connect to Session nodes, such as browsers. This network connector fetches serverside part of this package that validates request and passes it to onRequest method from @session.js/bun-network.

[Simple example of project that uses @session.js/bun-network-remote](https://git.hloth.dev/session.js/examples/tree/main/browser-simple)

Usage:

Client-side (where Session client runs):

```ts
import { Session } from '@session.js/client'
import { BunNetworkRemoteClient } from '@session.js/bun-network-remote'

new Session({ 
  network: new BunNetworkRemoteClient({ 
    proxy: 'https://my-proxy.example.org:12345/' 
    // this endpoint must be accessible in your environment
    // i.e. if you're building Session client in browser, make sure
    // that my-proxy.example.org has a valid SSL certificate, CORS and SSL settings
  })
})
```

Client-side part will send POST requests to this URL with FormData or JSON body.

Server-side (proxy server):

```ts
// Runtime must be Bun.sh
// Web server can be anything: Express, Fastify, Elysia, Bun's web server, etc...
// Validation is done internally and throws @session.js/error RuntimeValidation errors

import { Elysia } from 'elysia'
import { BunNetworkRemoteServer } from '@session.js/bun-network-remote'
const network = new BunNetworkRemoteServer()

new Elysia()
  .post('/', ({ body }) => network.onRequest(body))
  .listen(12345)
```

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/client
Description: Use Session Messenger programmatically. Includes TypeScript and tests.
Author: Viktor Shchelochkov
Latest version: 0.0.57

# Session.js

Session.js is JavaScript library for programmatic usage of [Session messenger by OXEN](https://getsession.org). Supports server and browser environment with built-in proxy network module. Shipped with TypeScript definitions. Tested with bun:test. It's aimed for [Bun](https://bun.sh) users — a modern runtime for JavaScript and alternative to Node.js. But it can also be used on most platforms and runtimes thanks to external modules system and platform-agnostic architecture with vanilla [noble](https://paulmillr.com/noble/) cryptography instead of WASM-compiled libsodium and bytebuffer.

Session.js allows you to create:
- Highly optimized Session bots (hundreds of bots in a single app)
- Custom Session clients (web-based and native with JS backend)
- Automation tools for Session

> [!IMPORTANT]
> I'm looking for a job! Interested in hiring me? Visit [cv.hloth.dev](https://cv.hloth.dev) to review my resume & CV.

## Features

- On-demand polling — you decide when to get new messages and whether instance should poll them (and poll settings like frequency) or work just for sending
- Per-instance storage and network settings — you can attach persistant storage to instance or use in-memory storage for throwaway one-time instances
- Session.js can be used in browser, keeping private keys on client-side and doing network requests on server-side. See this in action with [my full-featured Session Web client](https://git.hloth.dev/hloth/session-web)!

[Project roadmap](https://sessionjs.github.io/docs/#roadmap).

## Getting started

Visit documentation website for guide: [https://sessionjs.github.io/docs/](https://sessionjs.github.io/docs/)

## Acknowledgements

- Noble PRs by [li0ard](https://li0ard.rest)

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

PGP-signed list of my crypto wallets: [hloth.dev/donate-pgp-signed.txt](https://hloth.dev/donate-pgp-signed.txt) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate-pgp-signed.txt](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate-pgp-signed.txt)

## License

[MIT](./LICENSE)
npm package: @session.js/consts
Description: Session Desktop & Session.js constants
Author: Viktor Shchelochkov
Latest version: 1.0.4

# @session.js/consts

Session Desktop & Session.js constants

- `DURATION`
- `TTL_DEFAULT`
- `SWARM_POLLING_TIMEOUT`
- `PROTOCOLS`
- `CONVERSATION`
- `MAX_ATTACHMENT_FILESIZE_BYTES`
- `VALIDATION`
- `DEFAULT_RECENT_REACTS`
- `REACT_LIMIT`
- `MAX_USERNAME_BYTES`
- `FEATURE_RELEASE_TIMESTAMPS`

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/errors
Description: Session.js errors classes
Author: Viktor Shchelochkov
Latest version: 1.0.11

# @session.js/errors

Session.js error classes. This module can be used to check instance of thrown errors in Session.js. All errors extend from `SessionJsError` class which itself extends from generic Error class.

```ts
import { SessionRuntimeError, SessionJsError } from '@session.js/error'

try {
  // something throws
} catch(e) {
  if(e instanceof SessionRuntimeError) {
    console.error('Session.js runtime error handled')
  } else {
    if(e instanceof SessionJsError) {
      console.error('It\'s not Session.js runtime error... but at least we know it\'s Session\.js error')
    } else {
      console.error('No idea what is this error')
      throw e
    }
  }
}
```

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/file-keyval-storage
Description: Persistant file-based key-value storage adapter for @session.js/client
Author: Viktor Shchelochkov
Latest version: 1.0.4

# @session.js/file-keyval-storage

Simple persistant storage that stores everything in memory and periodically syncs it with locally stored file in key=value format. `filePath` is optional and defaults to `./storage.db` 

```ts
import { Session } from '@session.js/client'
import { FileKeyvalStorage } from '@session.js/file-keyval-storage'

new Session({ 
  storage: new FileKeyvalStorage({ 
    filePath: 'some-file-path.db' 
  })
})
```

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/keypair
Description: Session messenger & Session.js keypairs utilities.
Author: Viktor Shchelochkov
Latest version: 1.0.8

# @session.js/keypair

Session messenger & Session.js keypairs utilities.

## type SessionKeys

SessionKeys is two KeyPairs: x25519 (curve25519) and ed25519

```ts
type SessionKeys = {
  x25519: KeyPair
  ed25519: KeyPair
}
```

Session ID consists of x25519's public key prepended with `05`.

Ed25519 keypairs are used mainly for messages encryption.

## getKeysFromSeed

Converts seed hex to Session keys (x25519 & ed25519 keypairs):

```ts
import { getKeysFromSeed } from '@session.js/keypair'

const keys = getKeysFromSeed('39038c8988db02c1af44e8c847bd9713')
console.log(keys.x25519.publicKey) // => 0548054830367d369d94605247999a375dbd0a0f65fdec5de1535612bcb6d4de452c69
```

## generateSeedHex

Generates random seed and converts it to hex. Under the hood it uses CSPRNG from `@noble/curves`.

```ts
import { generateSeedHex } from '@session.js/keypair'

const seed = await generateSeedHex()
console.log(seed) // => 39038c8988db02c1af44e8c847bd9713
```

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/mnemonic
Description: Mnemonic/seed phrase utilities for Session messenger.
Author: Viktor Shchelochkov
Latest version: 1.0.6

# @session.js/mnemonic

Mnemonic/seed phrase utilities for Session messenger. Seed hex (and thus random mnemonic and random Session ID) can be generated using [@session.js/keypair](https://www.npmjs.com/package/@session.js/keypair).

## encode (seed hex -> phrase)

To encode mnemonic:

```ts
import { encode } from '@session.js/mnemonic'

encode('39038c8988db02c1af44e8c847bd9713') // => 'puffin luxury annoyed rustled memoir faxed smidgen puddle kiwi nylon utopia zinger kiwi'
```

## decode (phrase -> seed hex)

To decode mnemonic:

```ts
import { decode } from '@session.js/mnemonic'

decode('puffin luxury annoyed rustled memoir faxed smidgen puddle kiwi nylon utopia zinger kiwi') // => '39038c8988db02c1af44e8c847bd9713'
```

## Example: Generate random Session ID

Install [@session.js/keypair](https://www.npmjs.com/package/@session.js/keypair) to generate random seed hex.

> Hint: Session IDs are [x25519 aka Curve25519](https://en.wikipedia.org/wiki/Curve25519) public keys prepended with `05`

```ts
import { generateSeedHex, getKeysFromSeed } from '@session.js/keypair'
import { encode } from '@session.js/mnemonic'

const seedHex = generateSeedHex()
const keypair = getKeysFromSeed(seedHex)
const mnemonic = encode(seedHex)
const sessionID = keypair.x25519.publicKey

console.log('Generated session ID:', sessionID)
console.log('Mnemonic for it:', mnemonic)
```

## Dictionaries

By default, this package comes only with english dictionary. You can add your own mnemonic languages:

```ts
import { decode, mnemonicLanguages, addMnemonicLanguage } from '@session.js/mnemonic'

mnemonicLanguages.russian = addMnemonicLanguage({
  prefixLen: 3,
  words: [/* ... */]
})
decode('любовь любовь любовь любовь любовь любовь любовь любовь любовь любовь любовь любовь любовь', 'russian')
```

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/ons
Description: Resolve Session ONS names to Session IDs in Node.js/Bun/browser/edge
Author: Viktor Shchelochkov
Latest version: 1.1.2

# @session.js/ons

Resolve Session ONS names to Session IDs in Node.js/Bun/browser

```ts
import { resolve } from '@session.js/ons'

await resolve('keejef') // => 05d871fc80ca007eed9b2f4df72853e2a2d5465a92fcb1889fb5c84aa2833b3b40

await resolve('hloth', {
  daemon: 'http://public-eu.optf.ngo:22023'
}) // => 057aeb66e45660c3bdfb7c62706f6440226af43ec13f3b6f899c1dd4db1b8fce5b

await resolve('non-existing-but-valid-ons-name') // => null

await resolve('invalid ons name') // => throws `new Error('Invalid ONS name')`
```

- ✅ Supports both modern (blake2b) and legacy (argon2) formats of encrypted value
- ✅ Works in browser
- ✅ Works on server (Node.js & Bun)
- ✅ Works on edge (Cloudflare workers)
- ✅ Input validation
- ✅ TypeScript definitions
- ✅ Tested with bun:test

This library is isomorphic meaning it runs everywhere, in every environment where WASM is supported: browser, server, edge. This is possible thanks to [@noble/hashes](https://www.npmjs.com/package/@noble/hashes), [@noble/ciphers](https://www.npmjs.com/package/@noble/ciphers), [argon2-browser](https://www.npmjs.com/package/argon2-browser) which were implemented instead of libsodium dependency.

## Advanced use

Every function used in algorithm is exported, so you can modify resolving algorithm, for example, to control server fetch.

Under the hood, the `resolve` function:
1. Generates hash using `generateOnsHash` function
2. fetches public daemon using `fetch` function from globalThis
3. decrypts value with `decryptONSValue` function
   1. decryptONSValue function generates key with `generateKey` function
   2. splits encoded value to message+nonce using `splitEncryptedValue` function
   3. depending on whether it's legacy format or not, it uses either `decryptSecretboxWithKey` or `decryptXChachaWithKey`

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/scalars
Description: Utility JavaScript library with methods to work with elliptic curves scalars
Author: Viktor Shchelochkov
Latest version: 1.0.0

# @session.js/scalars

Utility JavaScript library with methods to work with elliptic curves scalars wrapped around [noble v2](https://www.npmjs.com/package/@noble/ciphers).

## Acknowledgements

Credit to [li0ard](https://li0ard.rest/) for implementing the scalar methods.

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/sogs
Description: A package that exports static methods to work with SOGS requests. These are utilities not tied to a specific Session instance (user).
Author: Viktor Shchelochkov
Latest version: 1.0.1

# @session.js/sogs

A package that exports static methods to work with SOGS requests. These are utilities not tied to a specific Session instance (user).

## decryptSogsMessageData

Use this method to decrypt message base64 blob to SignalService object.

Example:
```ts
decryptSogsMessageData('ChoKBkhlbGxvITi1v5/CwjKqBggKBk15IEJvdIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
/* ->
SignalService.Content {
  dataMessage: DataMessage {
    attachments: [],
    preview: [],
    body: "Hello!",
    timestamp: Long {
      low: 675798965,
      high: 404,
      unsigned: true
      <...>
    }
    profile: LokiProfile {
      displayName: "My Bot",
      profilePicture: "",
      <...>
    },
    <...>
  }
  <...>
}
*/
```

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @session.js/types
Description: Session Messenger messages schemas, TypeScript definitions and enums used by @session.js/client
Author: Viktor Shchelochkov
Latest version: 1.0.19

# @session.js/types

Session Messenger messages schemas, TypeScript definitions and enums used by @session.js/client

To build your own Storage adapter, use:

```ts
import type { Storage } from '@session.js/types'

export class MyInMemoryStorage implements Storage {
	storage: Map<string, string> = new Map()

	get(key: string) {
		return this.storage.get(key) ?? null
	}

	set(key: string, value: string) {
		this.storage.set(key, value)
	}

	delete(key: string) {
		this.storage.delete(key)
	}

	has(key: string) {
		return this.storage.has(key)
	}
}
```

To build your own Network connecter, use:

```ts
import type { Network } from '@session.js/types'
import { 
	RequestType, 
	type RequestGetSwarmsBody, 
	type RequestPollBody, 
	type RequestStoreBody, 
	type RequestUploadAttachment 
} from '@session.js/types/network/request'

export class MyNetwork implements Network {
	onRequest(type: RequestType, body: object): Promise<object> {
		switch(type) {
			case RequestType.Store:
				return // typeof ResponseStore

			case RequestType.GetSnodes:
				return // typeof ResponseGetSnodes

			case RequestType.GetSwarms:
				return // typeof ResponseGetSwarms

			case RequestType.Poll:
				return // typeof ResponsePoll

			case RequestType.UploadAttachment:
				return // typeof ResponseUploadAttachment

			default:
				throw new Error('Invalid request type')
		}
	}
}
```

## Made for Session.js

Use Session messenger programmatically with [Session.js](https://git.hloth.dev/session.js/client): Session bots, custom Session clients, and more.

## Donate

[hloth.dev/donate](https://hloth.dev/donate) · Tor: [hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate](http://hlothdevzkti6suoksy7lcy7hmpxnr3msu5waokzaslsi2mnx5ouu4qd.onion/donate)

## License

[MIT](./LICENSE)
npm package: @sessioniq/widget-vue
Description: SessionIQ Widget Vue
Author: SessionIQ
Latest version: 0.5.3

# SessionIQ Vue Widget (`@sessioniq/widget-vue`)

[![npm version](https://badge.fury.io/js/%40sessioniq%2Fwidget-vue.svg)](https://badge.fury.io/js/%40sessioniq%2Fwidget-vue)

## Overview

This package provides a pre-built Vue 3 component (`AgentWidget`) that acts as a user interface for interacting with the `@sessioniq/client-sdk`. It allows users to:

- Select an active analysis agent.
- Start and stop session recording.
- Trigger session analysis.
- View analysis status updates and results (including AI insights and suggestions) in a chat interface.
- Interact with the AI agent via chat messages after analysis is complete.

The widget handles communication with the SDK, including subscribing to real-time updates and sending commands like `startRecording`, `stopRecording`, `analyzeSession`, and `sendChatMessage`.

## Installation

```bash
# Using npm (or pnpm or yarn)
npm install @sessioniq/widget-vue @sessioniq/client-sdk
```

_Note: `@sessioniq/client-sdk` is a required **peer dependency**._

## Usage

```vue
<script setup>
import { ref, onMounted } from "vue";
import { SessionIQSdk } from "@sessioniq/client-sdk";
import { AgentWidget } from "@sessioniq/widget-vue";
const isInitialized = ref(false);
const sdk = new SessionIQSdk();

onMounted(async () => {
  await sdk.init({
    clientId: "YOUR_CLIENT_ID", // matches the clientId in the SessionIQ dashboard
    logLevel: "debug", // optional, default is 'info'
  });
  isInitialized.value = true;
});
</script>
<template>
  <div>
    <AgentWidget v-if="isInitialized" :sdk="sdk" />
  </div>
</template>
```

## Exports

This package exports:

- `AgentWidget`: The main Vue component.
- `useWidget`: A composable to control the widget's visibility programmatically.

## Component Props (`AgentWidget`)

- `sdk` (Required): An **initialized** instance of `SessionIQSdk` from `@sessioniq/client-sdk`.
- `position` (Optional, default: `'bottom-right'`): Controls the floating position of the widget button. Options: `'bottom-right'`, `'top-right'`, `'bottom-left'`, `'top-left'`, `'hidden'`.

## Composables

### `useWidget`

Provides functions to control the widget UI:

```typescript
import { useWidget } from "@sessioniq/widget-vue";

const { isWidgetOpen, toggleWidget, openWidget, closeWidget } = useWidget();

// Example usage:
// <button @click="openWidget">Open Support Widget</button>
// <p v-if="isWidgetOpen">Widget is currently open.</p>
```

- `isWidgetOpen`: A `Ref<boolean>` indicating if the widget panel is open.
- `toggleWidget()`: Toggles the widget panel's visibility.
- `openWidget()`: Opens the widget panel.
- `closeWidget()`: Closes the widget panel.

## License

MIT License - Copyright (c) 2025 SessionIQ
npm package: @sessionvision/install-wizard
Description: sessionvision install wizard — auto-detects your project and sets up analytics tracking
Author: sessionvision
Latest version: 0.2.26

# @sessionvision/install-wizard

Auto-detects your project and sets up sessionvision analytics tracking.

The wizard scans your project directory to identify your framework, package manager, and coding agent, then walks you through installing the sessionvision skills and CLI.

## Usage

Run this once in your project's root directory:

```bash
npx @sessionvision/install-wizard
```

## What it does

1. **Detects your stack** -- frontend framework (Next.js, React, Vue, Nuxt, static), backend (Rails, Django, Flask, Node), TypeScript usage, and package manager
2. **Detects your coding agent** -- Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, or Aider
3. **Flags existing analytics** -- warns if another analytics library is already present
4. **Installs skills** -- copies sessionvision skill files into your project for your coding agent to use
5. **Authenticates via OAuth** -- connects your project to sessionvision and installs the CLI
6. **Generates a setup prompt** -- gives you a prompt to copy and paste into your coding agent to finish the integration

## Options

| Flag | Description |
|------|-------------|
| `--install-dir <path>` | Target project directory (defaults to cwd) |
| `--debug` | Enable debug logging |

## Development

```bash
npm install
npm run build       # Build with tsup
npm run dev         # Build in watch mode
npm test            # Run tests (vitest)
npm run typecheck   # Type-check without emitting
npm run lint        # Lint src/ and tests/
```

Requires Node >= 18.