open-index/open-npm huggingface dataset:
npm package: @nur-portal/nestjs-prom
Description: Prometheus module for NestJS
Author: Dmitry Teslitsky
Latest version: 1.0.0-rc7

# Prometheus client for NestJS

## Installation

```bash
npm install @nur-portal/nestjs-prom prom-client
```

## Usage

```typescript
import { Module } from "@nestjs/common";
import { PrometheusModule } from "@nur-portal/nestjs-prom";

@Module({
  imports: [PrometheusModule.register()],
})
export class AppModule {}
```

## License

MIT licensed
npm package: @nur_djedd/mapbox-gl-worldview
Description: Apply a worldview + Palestine label + hide disputed borders on any Mapbox GL JS map
Author: djedi
Latest version: 1.0.4
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# mapbox-gl-worldview

One-liner to apply a worldview + Palestine label + hide disputed borders on any Mapbox GL JS map.

## Install

```bash
npm install @nur_djedd/mapbox-gl-worldview
```

## Usage

```typescript
import mapboxgl from "mapbox-gl";
import { applyWorldview } from "@nur_djedd/mapbox-gl-worldview";

const map = new mapboxgl.Map({ ... });

map.on("load", () => applyWorldview(map));
```

That's it. By default it applies the **Morocco (MA)** worldview.

## Options

```typescript
map.on("load", () =>
  applyWorldview(map, {
    worldview: "MA",                  // ISO-3166 worldview code. Default: "MA"
    hideDisputed: true,               // Hide disputed border layers. Default: true
    palestineLabel: true,             // Replace "Israel" label with "Palestine". Default: true
    palestineLabelColor: "#ACBCD2",   // Palestine label color. Default: "#ACBCD2"
    hideWesternSahara: true,          // Hide "Western Sahara" label. Default: true
  })
);
```

## What it does

| Feature | Description |
|---|---|
| **Worldview** | Filters admin/boundary/country layers to match the given worldview (`MA` by default). Works with both Mapbox Standard style (v3 API) and legacy styles. |
| **Disputed borders** | Sets `visibility: none` on any layer whose id contains `disputed`. |
| **Palestine label** | Filters out the `Israel` entry from `country-label`, adds a custom `Palestine` symbol layer at `[35.2, 31.95]` with zoom-dependent opacity (appears/disappears like other country labels). |
| **Western Sahara** | Filters `Western Sahara` out of `country-label`. |

## Compatibility

- Mapbox GL JS **v2** and **v3**
- Works with all map styles: `standard`, `satellite-v9`, `streets-v12`, `navigation-night-v1`, etc.
- Zero runtime dependencies — only peer dep is `mapbox-gl >= 2.0.0`

## License

MIT
npm package: @nura-js/client
Description: Interact with the Nura AI intent surface from any UI or agent client
Latest version: 0.2.0

# @nura-js/client

Interact with the Nura AI intent surface from any UI or automation client.

## Installation

```bash
pnpm add @nura-js/client
```

## Usage Example

```ts
import { AiClient, UiDispatcher } from '@nura-js/client'

const client = new AiClient('https://api.example.com/ai')
const dispatcher = new UiDispatcher()

dispatcher.register('ui.open', (_, hint) => openModal(hint?.target))

const { id } = await client.createIntent({
  type: 'orders.create',
  payload: { id: 'o-88' }
})
await client.approveIntent(id)
dispatcher.dispatch(await client.getIntentResult(id))
```

See [`@nura-js/intents`](../../docs/modules/intents.md) and [`@nura-js/transport-http`](../../docs/modules/transport-http.md) for server-side integration.
npm package: @nura-js/core
Description: Core primitives for building AI-friendly interfaces with Nura.js
Author: Nura Dev Team
Latest version: 0.2.0

# @nura-js/core

Core runtime and linguistic utilities for Nura.js agent ↔ UI integrations.

## Installation

```bash
pnpm add @nura-js/core
```

## Usage Example

```ts
import {
  Nura,
  ContextManager,
  createRegistry,
  defineActionSpec,
  stripWake,
  detectLocale,
  parseNumeral,
  normalizeSynonyms,
} from '@nura-js/core';

const registry = createRegistry({
  actions: [
    defineActionSpec({
      name: 'open_orders',
      type: 'open',
      target: 'orders',
      phrases: {
        'es-CR': { canonical: ['abre órdenes'] },
      },
    }),
  ],
});

const nura = new Nura({ registry });
const context = new ContextManager({ locale: 'es-CR' });
context.set('customerId', 42);

const input = 'hey nura abre órdenes';
const withoutWake = stripWake(input, { wakeWords: ['hey nura'] });
const locale = detectLocale(withoutWake, ['es-CR', 'en-US']);
const amount = parseNumeral('quince', locale);
const normalized = normalizeSynonyms('árbol', locale);

await nura.act({
  type: 'open',
  target: 'orders',
  meta: { desc: `Abrir ${normalized} (${amount})` },
});
```

## Key APIs

- `Nura` orchestrates registered actions with permission hooks.
- `createRegistry` builds the registry of actions, entities, and connected agents.
- `ContextManager` keeps follow-up context and confirmation helpers.
- `stripWake` normalizes wake phrases.
- `detectLocale` identifies a locale using token heuristics.
- `parseNumeral` converts localized numerals to numbers.
- `normalizeSynonyms` harmonizes synonyms per locale dictionary.

## Type References

- `NAction` — executable action shape.
- `NRegistry` — registry definition including actions and agents.
- `NLocale` — BCP 47 locale identifier (`'es-CR'`, `'en-US'`).
- `NAgent` — plugin extension for the runtime.

## Additional Resources

- Repository: <https://github.com/nura-ia/nurajs>
- Issues: <https://github.com/nura-ia/nurajs/issues>
npm package: @nura-js/dom
Description: DOM indexing and scanning for Nura.js
Author: Nura Dev Team
Latest version: 0.1.1

# @nura-js/dom

DOM indexer utilities that locate Nura verbs, scopes, and metadata directly in the browser.

## Installation

```bash
pnpm add @nura-js/dom
```

## Usage Example

```ts
import { DOMIndexer, scanDOM } from '@nura-js/dom';

const indexer = new DOMIndexer({ autoScan: true });
const indexed = indexer.getAll();
console.log('Indexed elements', indexed.length);

const snapshot = scanDOM(document.body);
console.log(snapshot.stats.byScope.orders);
```

## Key APIs

- `DOMIndexer` observes the DOM and maintains a reactive index for `data-nu-*` attributes.
- `scanDOM(root?)` performs an ad-hoc scan and returns metrics grouped by scope and verb.
- `findElementsByScope(scope)` finds elements by scope name.
- `findElementsByVerb(verb)` returns elements bound to a specific verb.

## Type References

- `DOMIndexerOptions` — configuration for auto-scan and observers.
- `ScanResult` — output from `scanDOM` with stats and node collections.
- `NuraElement` — indexed element model compatible with `@nura-js/core`.

## Additional Resources

- Repository: <https://github.com/nura-ia/nurajs>
- Issues: <https://github.com/nura-ia/nurajs/issues>
npm package: @nura-js/intents
Description: Define, validate, and execute AI intents with approvals and JSON policies
Latest version: 0.2.0

# @nura-js/intents

Define, validate, and execute AI intents using Nura’s Intent → Approval → Execute (IAE) loop.

## Installation

```bash
pnpm add @nura-js/intents
```

## Quick Start

```ts
import { registerType, createIntent, getIntentResult } from '@nura-js/intents'

registerType({
  type: 'orders.create',
  schema: {
    type: 'object',
    required: ['id'],
    properties: { id: { type: 'string' } },
    additionalProperties: false,
  },
  mapper: payload => ({ type: 'ui.open', payload, uiHint: { target: 'orderForm' } })
})

const { id } = await createIntent({ type: 'orders.create', payload: { id: 'o-100' } })
const result = await getIntentResult(id)
```

## Policies

- `requiresApproval` to queue intents pending approval
- `allowTenants` and role-based gates
- `predicate(context)` for custom approvals

See the [module docs](../../docs/modules/intents.md) for the full API.
npm package: @nura-js/plugin-fuzzy
Description: Lightweight fuzzy matching utilities for Nura.js
Author: Nura Dev Team
Latest version: 0.1.1

# @nura-js/plugin-fuzzy

Fuzzy, phonetic, and token-based matching utilities shared by Nura.js and its voice tooling.

## Installation

```bash
pnpm add @nura-js/plugin-fuzzy
```

## Usage Example

```ts
import { matchFuzzy, tokenizeAndScore, compareWakeWord } from '@nura-js/plugin-fuzzy';

const brands = ['Nura', 'Núria', 'Nero'];
const match = matchFuzzy('nura', brands, { locale: 'es' });

const tokens = tokenizeAndScore('abre el modo noche', ['modo noche', 'modo día']);

const wake = compareWakeWord('hey nura', {
  canonical: 'hey nura',
  aliases: ['hola nura'],
});
```

## Key APIs

- `matchFuzzy` scores candidates using the selected strategy and locale heuristics.
- `tokenizeAndScore` evaluates each token against candidate phrases.
- `compareWakeWord` checks wake-word candidates for hybrid phonetic similarity.
- `damerauLevenshteinSimilarity` exposes the raw edit-distance helper.

## Type References

- `FuzzyMatchOpts` — strategy, locale, and threshold options.
- `MatchResult` — output from `matchFuzzy` including the winning candidate.
- `TokenScore` — granular token scoring result used by `tokenizeAndScore`.
- `FuzzyStrategy` — supported strategies (`'hybrid'`, `'damerau'`, ...).

## Additional Resources

- Repository: <https://github.com/nura-ia/nurajs>
- Issues: <https://github.com/nura-ia/nurajs/issues>
npm package: @nura-js/plugin-voice
Description: Voice plugin for Nura.js command registry
Author: Nura Dev Team
Latest version: 1.0.0

# @nura-js/plugin-voice

Voice agent for Nura.js with wake-word comparison, locale detection, and intent scoring.

## Installation

```bash
pnpm add @nura-js/plugin-voice
```

## Usage Example

```ts
import { createRegistry, defineActionSpec } from '@nura-js/core';
import { voiceAgent } from '@nura-js/plugin-voice';

const registry = createRegistry({
  actions: [
    defineActionSpec({
      name: 'open_orders',
      type: 'open',
      target: 'orders',
      phrases: {
        'es-CR': { canonical: ['abre órdenes'], wake: ['hey nura'] },
      },
    }),
  ],
  agents: [voiceAgent({ wakeWords: ['hey nura'] })],
});

registry.agents.start('voice', {
  locale: 'es-CR',
  intents: registry.actions.intents(),
});
```

## Key APIs

- `voiceAgent` wires recognition, wake configuration, and event emission into a registry.
- `matchUtterance` scores intents based on phonetic and edit-distance comparisons.
- `compareWakeWord` compares phrases for wake-word confidence.
- `stripWake` and `detectLocale` are re-exported from `@nura-js/core` for convenience.

## Type References

- `NVoiceOptions` — configuration for the agent (wake words, thresholds, debug mode).
- `WakeWordInput` — normalized structure for wake-word checks.
- `NIntent` — registry intent ready for recognition.
- `IntentMatchResult` — detailed result from `matchUtterance` including scores and tokens.

## Additional Resources

- Repository: <https://github.com/nura-ia/nurajs>
- Issues: <https://github.com/nura-ia/nurajs/issues>
npm package: @nura-js/react
Description: React adapter for Nura.js
Author: Nura Dev Team
Latest version: 0.1.1

# @nura-js/react

Official React adapter for consuming the Nura.js runtime with declarative components and hooks.

## Installation

```bash
pnpm add @nura-js/react
```

## Usage Example

```tsx
import { createRegistry } from '@nura-js/core';
import { NuraProvider, useNuraAction } from '@nura-js/react';

const registry = createRegistry({
  // define actions and agents
});

export function App() {
  return (
    <NuraProvider registry={registry}>
      <OrdersButton />
    </NuraProvider>
  );
}

function OrdersButton() {
  const action = useNuraAction('open_orders');
  return (
    <button onClick={() => action?.run?.()} data-nu-act={JSON.stringify(action?.spec)}>
      Open orders
    </button>
  );
}
```

## Key APIs

- `NuraProvider` injects the registry into the React tree.
- `useNura` returns the `Nura` runtime and helpers.
- `useNuraAction` resolves actions by name and exposes execution helpers.
- `useNuraPermission` evaluates declarative permissions inside components.
- `NuraElement` renders helpers that sync `data-nu-*` attributes.

## Type References

- `NuraProviderProps` — provider configuration for registry and context.
- `UseNuraReturn` — runtime and registry values from `useNura`.
- `UseNuraActionOptions` — options for `useNuraAction` such as scope and arguments.
- `NuraElementProps` — props for the helper component exposing accessible attributes.

## Additional Resources

- Repository: <https://github.com/nura-ia/nurajs>
- Issues: <https://github.com/nura-ia/nurajs/issues>
npm package: @nura-js/svelte
Description: Svelte adapter for Nura.js
Author: Nura Dev Team
Latest version: 0.1.1

# @nura-js/svelte

Official Svelte adapter that initializes Nura.js with stores, actions, and DOM-aware components.

## Installation

```bash
pnpm add @nura-js/svelte
```

## Usage Example

```svelte
<script lang="ts">
  import { initNura, NuraProvider, nuraAction } from '@nura-js/svelte';
  import { defineActionSpec } from '@nura-js/core';

  const { registry } = initNura({
    actions: [
      defineActionSpec({ name: 'open_orders', type: 'open', target: 'orders' }),
    ],
  });
</script>

<NuraProvider {registry}>
  <button use:nuraAction={{ name: 'open_orders' }} data-nu-scope="orders">
    Open orders
  </button>
</NuraProvider>
```

## Key APIs

- `initNura` creates the registry and shares context across the Svelte tree.
- `NuraProvider` exposes context and `data-nu-*` helpers.
- `nura` syncs interaction telemetry via a generic action.
- `nuraAction` registers intents and executes actions from elements.
- `createNuraStore` builds derived stores for runtime helpers and permissions.

## Type References

- `NuraContext` — shared context with registry and DOM indexer.
- `NuraActionParams` — parameters for the `nura` action (scope, metadata, etc.).
- `UseNuraReturn` — helper result for accessing the runtime in scripts.
- `UseNuraActionOptions` — configuration for retrieving reactive actions.

## Additional Resources

- Repository: <https://github.com/nura-ia/nurajs>
- Issues: <https://github.com/nura-ia/nurajs/issues>
npm package: @nura-js/transport-http
Description: Expose Nura intents over a hardened HTTP router with rate limiting and idempotency
Latest version: 0.2.0

# @nura-js/transport-http

Expose the Nura intent service over hardened HTTP endpoints with JSON-only enforcement, idempotency, and rate limiting.

## Installation

```bash
pnpm add @nura-js/transport-http
```

## Usage Example

```ts
import express from 'express'
import { registerType } from '@nura-js/intents'
import { buildRouter } from '@nura-js/transport-http'

registerType({
  type: 'orders.create',
  schema: { type: 'object', required: ['id'], properties: { id: { type: 'string' } } }
})

const app = express()
app.use(buildRouter({
  cors: { origins: ['https://yourapp.com'] },
  limits: { body: '64kb' },
  rateLimit: { windowMs: 60_000, max: 60 }
}))
```

See the [module docs](../../docs/modules/transport-http.md) for endpoint details.
npm package: @nura-js/vue
Description: Vue adapter for Nura.js
Author: Nura Dev Team
Latest version: 0.1.1

# @nura-js/vue

Official Vue 3 adapter that exposes directives and provide/inject helpers for the Nura.js runtime.

## Installation

```bash
pnpm add @nura-js/vue
```

## Usage Example

```ts
import { createApp } from 'vue';
import { Nura, createRegistry, defineActionSpec } from '@nura-js/core';
import { withVue } from '@nura-js/vue';
import App from './App.vue';

const registry = createRegistry({
  actions: [defineActionSpec({ name: 'open_orders', type: 'open', target: 'orders' })],
});

const nura = new Nura({ registry });

createApp(App)
  .use(withVue(nura))
  .mount('#app');
```

```vue
<template>
  <button v-nu-act="action" v-nu-listen="'open'" data-nu-scope="orders">
    Open orders
  </button>
</template>

<script setup lang="ts">
import { inject } from 'vue';
import { NURA_KEY } from '@nura-js/vue';

const nura = inject(NURA_KEY);
const action = nura?.registry.actions.find('open_orders');
</script>
```

## Key APIs

- `withVue` registers `v-nu-*` directives and exposes the runtime via provide/inject.
- `NURA_KEY` is the injection key for retrieving the `Nura` instance.
- `nu-act` serializes actions into `data-nu-act` attributes and handles click events.
- `nu-listen` marks scopes and listening priorities in the DOM.

## Type References

- `GuardBinding` — configuration for the permission guard directive.
- `InjectionKey<Nura>` — type of the `NURA_KEY` injection token.
- `NuActElement` — extended element that manages action metadata.

## Additional Resources

- Repository: <https://github.com/nura-ia/nurajs>
- Issues: <https://github.com/nura-ia/nurajs/issues>