open-index/open-npm huggingface dataset:
npm package: @flowcore/sdk-nextjs-backend
Description: A Flowcore SDK for facilitating application development using Next.js
Latest version: 1.2.1

# Flowcore SDK - NextJS Backend

A Flowcore SDK for facilitating application development using Next.js

## Installation

Install with npm:

```bash
npm install @flowcore/sdk-nextjs-backend
```

or yarn:

```bash
yarn add @flowcore/sdk-nextjs-backend
```

## Usage

This package exports several modules that facilitate application development using Next.js:

1. **Contracts**: These are TypeScript interfaces and types that are used throughout the package.

2. **Flowcore**: This includes several utility classes and functions such as `EventTransformer` for transforming events, `Filehook` for file hook operations, `RedisQueue` for Redis queue operations, `WaitForPredicate` for waiting for a certain condition to be met, and `Webhook` for webhook operations.

3. **Utils**: This includes utility functions such as `throwSafeError`.

To use this package in your project, first install it as shown above. Then, you can import the required modules in your code:

```typescript
import { SomeModule } from '@flowcore/sdk-nextjs-backend';
```

Please note that `SomeModule` is a placeholder for the actual exported modules from the package. You would replace `SomeModule` with the actual module you want to import.

## Development

```bash
yarn install
```

or with npm:

```bash
npm install
```
npm package: @flowcore/sdk-oidc-client
Description: A Flowcore SDK module that provides open id connect provider functionality, for use with the Flowcore platform.

Latest version: 1.3.1

# Flowcore SDK Module - Open ID Connect Provider

A Flowcore SDK module that provides open id connect provider functionality, for use with the Flowcore platform.

## Installation

install with npm:

```bash
npm install @flowcore/sdk-oidc-client
```

or yarn:

```bash
yarn add @flowcore/sdk-oidc-client
```

## Usage

Create a new instance of the OIDC client:

```typescript
import { OidcClient } from '@flowcore/sdk-oidc-client';

const client = new OidcClient("your client id", "your client secret", "well known endpoint");
```

### Get Token

Get a token from the OIDC provider, this will fetch the token from the provider and cache it for future use:

```typescript
const tokenSet = await client.getToken();
```

> Note: The token will be automatically refreshed when it expires, the client will handle this for you. It will also resolve the url for the token endpoint from the well known endpoint.
> The token will be returned as a string.
> This client throws an error if the token cannot be retrieved.

### Force Refresh Token

To force a refresh of the token ignoring the cached version, you can pass `true` to the `getToken` method:

```typescript
const tokenSet = await client.getToken(true);
```

### Decode Token

The library also provides a method to decode the token:

```typescript
const decodedToken = OidcClient.DecodeToken(token);
```

> Note: Then decoded token returns the token as an typed object based on the `TokenInfo` interface, exported from this library.
> To extend the token info, you can extend the `TokenInfo` interface and pass it as a generic to the `DecodeToken` method.
>
> ```typescript
> interface CustomTokenInfo extends TokenInfo {
>  customField: string;
> }
> 
> const decodedToken = OidcClient.DecodeToken<CustomTokenInfo>(token);
> ```

###  Custom OIDC Scope

To override the default scope, you can pass the scope to the `options` object in the constructor:

```typescript
const client = new OidcClient("your client id", "your client secret", "well known endpoint", { scope: "custom scope" });
```

### Token expiration buffer

To set a buffer for the token expiration, you can pass the buffer in seconds to the `options` object in the constructor:

```typescript
const client = new OidcClient("your client id", "your client secret", "well known endpoint", { expirationBuffer: 60 });
```

> NB! The buffer is in seconds, and the default is 20 seconds. If you set the buffer to more than the token expiration time, it will be refreshed every time you call `getToken`.

## Development

```bash
yarn install
```

or with npm:

```bash
npm install
```
npm package: @flowcore/testing-microservice
Description: Testing library for facilitating tests for the @flowcore/microservice modules
Latest version: 1.1.0

![Build](https://github.com/flowcore-io/library-testing-microservice-ts/actions/workflows/publish.yml/badge.svg)

# Testing Microservice

Testing library for facilitating tests for the @flowcore/microservice modules

## Installation

install with npm:

```bash
npm install --save-dev @jbiskur/nestjs-test-utilities @flowcore/testing-microservice
```

or yarn:

```bash
yarn add @jbiskur/nestjs-test-utilities @flowcore/testing-microservice -D
```

## Usage

to use the library you can use it with the `NestApplicationBuilder`

```typescript
import {LoggerModulePlugin} from "@flowcore/testing-microservice";

// .. when you initialize your test
app = await new NestApplicationBuilder()
  .withTestModule((testModule) => testModule.withModule(TestModule))
  .with(LoggerModulePlugin)
  .build();
```

## Development

```bash
yarn install
```

or with npm:

```bash
npm install
```
npm package: @flowcore/testing-nestjs-clerk-guard
Description: Testing library plugin for the @jbiskur/nestjs-test-utitlities package to facilitate easier testing with clerk guards
Latest version: 1.0.0

![Build](https://github.com/flowcore-io/library-testing-nestjs-clerk-guard-ts/actions/workflows/publish.yml/badge.svg)

# Testing NestJS Clerk Guard

A NestJS ClerkGuard plugin for
the [@jbiskur/nestjs-test-utilities](https://www.npmjs.com/package/@jbiskur/nestjs-test-utilities) testing library. To
facilitate mocking
successful
calls to protected routes during testing.

## Installation

install with npm:

```bash
npm install @flowcore/testing-nestjs-clerk-guard @flowcore/nestjs-clerk-guard
```

or yarn:

```bash
yarn add @flowcore/testing-nestjs-clerk-guard @flowcore/nestjs-clerk-guard
```

## Usage

To use the library with the `@jbiskur/nestjs-test-utilities` testing library, you need to invoke it using `with`:

```typescript
import {ClerkGuardModulePlugin} from '@flowcore/testing-nestjs-clerk-guard';

app = await new NestApplicationBuilder()
  .withTestModule((testModule) => testModule.withModule(TestModule))
  // ... other plugins
  .with(ClerkGuardModulePlugin)
  // ... other plugins
  .build();
```

It is possible to set the authenticated payload that will be returned by the `AuthGuard`:

```typescript
import {ClerkGuardModulePlugin} from '@flowcore/testing-nestjs-clerk-guard';

app = await new NestApplicationBuilder()
  .withTestModule((testModule) => testModule.withModule(TestModule))
  // ... other plugins
  .with(ClerkGuardModulePlugin, pluginBuilder => pluginBuilder.usingAuthenticatedPayload(validTokenPayload))
  .build();

```

## Development

  ```bash
yarn install
```

or with npm:

```bash
npm install
```
npm package: @flowcore/testing-nestjs-oidc-protect
Description: A NestJS OidcProtect plugin for the @jbiskur/nestjs-test-utilities testing library. To facilitate mocking successfull calls to protected routes during testing.
Latest version: 2.0.0

![Build](https://github.com/flowcore-io/library-testing-nestjs-oidc-protect-ts/actions/workflows/publish.yml/badge.svg)

# Testing Nestjs-oidc-protect

A NestJS OidcProtect plugin for
the [@jbiskur/nestjs-test-utilities](https://www.npmjs.com/package/@jbiskur/nestjs-test-utilities) testing library. To
facilitate mocking
successfull
calls to protected routes during testing.

## Installation

install with npm:

```bash
npm install @flowcore/testing-nestjs-oidc-protect @flowcore/nestjs-oidc-protect
```

or yarn:

```bash
yarn add @flowcore/testing-nestjs-oidc-protect @flowcore/nestjs-oidc-protect
```

## Usage

To use the library with the `@jbiskur/nestjs-test-utilities` testing library, you need to invoke it using `with`:

```typescript
import {OidcProtectModulePlugin} from '@flowcore/testing-nestjs-oidc-protect';

app = await new NestApplicationBuilder()
  .withTestModule((testModule) => testModule.withModule(TestModule))
  // ... other plugins
  .with(OidcProtectModulePlugin)
  // ... other plugins
  .build();
```

It is possible to set the authenticated payload that will be returned by the `AuthGuard`:

```typescript
import {OidcProtectModulePlugin} from '@flowcore/testing-nestjs-oidc-protect';

app = await new NestApplicationBuilder()
  .withTestModule((testModule) => testModule.withModule(TestModule))
  // ... other plugins
  .with(OidcProtectModulePlugin, pluginBuilder => pluginBuilder.usingAuthenticatedPayload(validTokenPayload))
  .build();

```

It is also possible to set the module to always act as if the user is unauthenticated:

```typescript
import {OidcProtectModulePlugin} from '@flowcore/testing-nestjs-oidc-protect';

app = await new NestApplicationBuilder()
  .withTestModule((testModule) => testModule.withModule(TestModule))
  // ... other plugins
  .with(OidcProtectModulePlugin, pluginBuilder => pluginBuilder.forceUnauthenticatedUser())
  .build();

```

## Development

  ```bash
yarn install
```

or with npm:

```bash
npm install
```
npm package: @flowcraft.systems/cli
Description: flowcraft CLI — instrument your AI coding sessions and surface ROI signals in seconds
Latest version: 0.1.6

# @flowcraft.systems/cli

Instrument your AI coding sessions and surface ROI signals in seconds.

```sh
npx @flowcraft.systems/cli init
```

## What it does

`flowcraft init` sets up telemetry for your AI coding tools (GitHub Copilot, Claude, and others) in the current repository:

- Writes `.flowcraft/config.yaml` pointing at your ingest endpoint
- Patches your AI tool instruction files to load the ROI calculator skill
- Installs `.github/skills/roi-calculator/SKILL.md`
- Adds `.flowcraft/` to `.gitignore`

## Requirements

- Node.js ≥ 22
- A [flowcraft](https://flowcraft.systems) account and API token
- A git repository

## Usage

```sh
# Interactive — prompts for token and endpoint
npx @flowcraft.systems/cli init

# Non-interactive
FLOWCRAFT_TOKEN=fc_pat_your_token npx @flowcraft.systems/cli init \
  --endpoint=https://ingest.flowcraft.systems \
  --tools=github-copilot
```

### Options

| Flag          | Description                                                                |
|---------------|----------------------------------------------------------------------------|
| `--endpoint`  | Ingest endpoint URL (default: `https://ingest.flowcraft.systems`)          |
| `--tools`     | Comma-separated list of tools to instrument (e.g. `github-copilot,claude`) |

### Environment variables

| Variable            | Description                                    |
|---------------------|------------------------------------------------|
| `FLOWCRAFT_TOKEN`   | Your flowcraft API token (`fc_pat_…`)          |

## Supported tools

- `github-copilot` — patches `.github/copilot-instructions.md`
- `claude` — patches `CLAUDE.md`
- `opencode` — patches `opencode.md`
- `antigravity` — patches `.antigravity/system-prompt.md`

## License

MIT — see [flowcraft.systems](https://flowcraft.systems) for terms of service.
npm package: @flowcraft.systems/sdk
Description: flowcraft file-watcher SDK — streams AI agent telemetry spans to your ingest endpoint
Latest version: 0.1.0

# @flowcraft.systems/sdk

File-watcher SDK for [flowcraft](https://flowcraft.systems) — streams AI agent telemetry spans to your ingest endpoint.

After running [`@flowcraft.systems/cli init`](https://www.npmjs.com/package/@flowcraft.systems/cli) in your workspace, start the watcher with:

```sh
npx @flowcraft.systems/sdk
```

The watcher reads `.flowcraft/config.yaml` for configuration (written by `flowcraft init`).

## Requirements

- Node.js ≥ 22
- `.flowcraft/config.yaml` in the current directory (created by `flowcraft init`)

## Usage

```sh
# Run from the root of any instrumented repository
npx @flowcraft.systems/sdk

# One-shot mode (process existing files and exit)
npx @flowcraft.systems/sdk --once
```

## What it does

Watches the file patterns defined in `.flowcraft/config.yaml`, converts matching markdown artefacts to OpenTelemetry spans, and posts them to your configured ingest endpoint with your PAT.

## Configuration

`.flowcraft/config.yaml` (created by `flowcraft init`):

```yaml
org_slug: "your-org"
api_key:  "fc_pat_..."
otlp_endpoint: "https://ingest.flowcraft.systems"

watch_patterns:
  - "docs/feature/**/*.md"
  - "docs/research/**/*.md"

roi_baselines:
  - agent_name: "default"
    manual_hours: 3.0
```

## Programmatic API

```ts
import { WatcherAdapter } from "@flowcraft/sdk";
```

See [flowcraft.systems](https://flowcraft.systems) for full documentation.

## License

MIT