open-index/open-npm huggingface dataset:
npm package: @naylence/core
Description: Naylence Core for TypeScript
Author: Naylence Dev
Latest version: 0.3.11

[![Join our Discord](https://img.shields.io/badge/Discord-Join%20Chat-blue?logo=discord)](https://discord.gg/nwZAeqdv7y)

# Naylence Fame Core

**Fame Core** is the low-level messaging backbone for the [Naylence](https://github.com/naylence) platform, providing the essential types, protocols, and interfaces for high-performance, addressable, and semantically routable message passing between AI agents and services.

> Part of the Naylence stack. See the full platform [here](https://github.com/naylence).

## Development & Publishing

This project uses npm for dependency management and GitHub Actions for automated testing and publishing.

### Local Development

```bash
# Install dependencies
npm install

# Run tests
npm test

# Run linting
npm run lint

# Build package
npm run build
```

#### Using local sibling dependencies during development

This project depends on `naylence-factory`. In development, you can point npm to a local checkout without changing `package.json`:

```bash
# Option A: temporary override using npm link
cd ../naylence-factory-ts
npm link
cd ../naylence-core-ts
npm link naylence-factoria

# Option B: direct path in package.json (temporary)
npm install ../naylence-factory-ts

# Option C: using file: protocol
npm install --save-dev file:../naylence-factory-ts
```

When committing, keep `package.json` referencing the normal package (not the local path). CI will install from npm registry via configured sources.

### Publishing

- **Automatic**: Create a GitHub release to automatically publish to npm
- **Manual**: Use the "Publish to npm" workflow dispatch to publish to npm test registry or npm
- **Local**: Use `npm publish --registry https://registry.npmjs.org/` for local testing
npm package: @naylence/create
Description: CLI to scaffold Naylence starter templates
Author: Naylence Dev
Latest version: 0.1.2

# naylence-create-ts

CLI to scaffold Naylence starter templates.

## Features

- **Interactive mode**: Select template and flavor via prompts
- **Non-interactive mode**: Specify template via flags
- **Local development**: Use local starters repo via `NAYLENCE_STARTERS_PATH`
- **GitHub fallback**: Fetch templates from GitHub when no local path

## Installation

```bash
# Global install (after publishing)
npm install -g naylence-create-ts

# Or use npx
npx naylence-create my-project
```

## Usage

```bash
# Interactive mode
naylence-create my-project

# Non-interactive mode
naylence-create my-project --template agent-on-sentinel --flavor ts

# List available templates
naylence-create --list

# With install
naylence-create my-project --template agent-on-sentinel --install
```

### Options

| Flag | Description |
|------|-------------|
| `-t, --template <id>` | Template ID (e.g., `agent-on-sentinel`) |
| `-f, --flavor <flavor>` | Template flavor (`ts`, `py`, `poly`). Default: `ts` |
| `-l, --list` | List available templates and exit |
| `--install` | Run package manager install after generation |
| `--no-install` | Skip install (default) |
| `--from-local` | Force reading from local starters path |
| `--from-github` | Force fetching from GitHub |
| `--ref <ref>` | Git ref for GitHub fetch (default: `main`) |
| `--starters-path <path>` | Path to local starters repo |

### Environment Variables

| Variable | Description |
|----------|-------------|
| `NAYLENCE_STARTERS_PATH` | Path to local starters repo (preferred for dev) |
| `NAYLENCE_STARTERS_GITHUB` | GitHub repo (default: `naylence/naylence-starters`) |
| `NAYLENCE_STARTERS_REF` | Default git ref for GitHub fetch |

## Development

### Setup

```bash
npm install
```

### Run from source

```bash
# List templates (using local starters)
NAYLENCE_STARTERS_PATH=../naylence-starters npm run dev -- --list

# Generate a project
NAYLENCE_STARTERS_PATH=../naylence-starters npm run dev -- ./my-project --template agent-on-sentinel
```

### Build

```bash
npm run build
```

### Run built CLI

```bash
npm run start -- --list
```

### Test

```bash
# Run unit tests
NAYLENCE_STARTERS_PATH=../naylence-starters npm test

# Run local generation test
./scripts/test-local.sh
```

## Project Structure

```
src/
├── cli.ts        # CLI entrypoint with commander
├── index.ts      # Public API exports
├── templates.ts  # Template discovery
├── generator.ts  # Project generation & placeholder substitution
├── github.ts     # GitHub tarball fetching
├── types.ts      # Shared types and constants
└── utils.ts      # Utility functions
tests/
└── generator.test.ts  # Unit tests
scripts/
└── test-local.sh      # Local testing script
```

## License

Apache-2.0
npm package: @naylence/factory
Description: Naylence resource factory and extension management framework for TypeScript
Author: Naylence Dev
Latest version: 0.1.6

# Naylence factory

**Naylence factory** is the resource factory and extension management framework for the [Naylence](https://github.com/naylence) ecosystem, implemented in TypeScript.
It provides a structured way to define, register, and instantiate resources (connectors, stores, clients, etc.) using schema-driven configuration, priority-based defaults, and plugin-style extension loading.

---

## Features

* 🏭 **Resource Factories** — Define factories that build typed resources from configs.
* 🔌 **Extension Management** — Discover and register implementations through lightweight plugins.
* ⚡ **Priority-based Defaults** — Automatically select the “best” default implementation.
* 🧩 **Composable Configs** — Type-safe configs with expression support (`${env:VAR:default}`).
* 🔒 **Policy-driven Evaluation** — Control how config expressions are handled: evaluate, literal, or error.
* 🔄 **Polymorphic Dispatch** — Automatically instantiate subclasses based on `type` fields.

---

## Installation

```bash
npm install @naylence/factory
```

Requires **Node.js 18+** or modern browsers with ES2022 support.

---
## License

Apache 2.0 © Naylence Dev
npm package: @naylence/react
Description: React integration for Naylence Fame Fabric
Author: Naylence Dev
Latest version: 0.1.7

# @naylence/react

React integration library for Naylence Fame Fabric.

## Installation

```bash
npm install @naylence/react react
```

## Usage

### FabricProvider

Wrap your React application with `FabricProvider` to manage a long-lived FameFabric instance:

```tsx
import { FabricProvider } from '@naylence/react';

function App() {
  return (
    <FabricProvider opts={{ /* fabric options */ }}>
      <YourApp />
    </FabricProvider>
  );
}
```

### useFabric Hook

Access the current fabric and its status:

```tsx
import { useFabric } from '@naylence/react';

function MyComponent() {
  const { fabric, status, error } = useFabric();

  if (status === 'connecting') {
    return <div>Connecting to fabric...</div>;
  }

  if (status === 'error') {
    return <div>Error: {String(error)}</div>;
  }

  if (status === 'ready' && fabric) {
    // Use fabric here
    return <div>Connected!</div>;
  }

  return <div>Idle</div>;
}
```

### useFabricEffect Hook

Run effects that depend on a ready fabric:

```tsx
import { useFabricEffect } from '@naylence/react';

function MyComponent() {
  useFabricEffect((fabric) => {
    // This only runs when fabric is ready
    console.log('Fabric is ready:', fabric);

    return () => {
      // Optional cleanup
      console.log('Cleaning up');
    };
  }, [/* dependencies */]);

  return <div>Component</div>;
}
```

### useRemoteAgent Hook

Access remote agents by address:

```tsx
import { useRemoteAgent } from '@naylence/react';

function MyComponent() {
  const agent = useRemoteAgent<MyAgentType>('my-agent@fame.fabric');

  if (!agent) {
    return <div>Agent not available</div>;
  }

  // Use agent methods
  return <div>Agent ready</div>;
}
```

## API

### `FabricProvider`

Props:
- `opts?: FabricOpts` - Optional configuration for `FameFabric.create()`
- `children: ReactNode` - Child components

### `useFabric()`

Returns: `FabricContextValue`
- `fabric: FameFabric | null` - The fabric instance (null if not ready)
- `status: FabricStatus` - Current status: `'idle' | 'connecting' | 'ready' | 'error'`
- `error: unknown` - Error if status is `'error'`

Throws: Error if used outside of `<FabricProvider>`

### `useFabricEffect(effect, deps?)`

Parameters:
- `effect: (fabric: FameFabric) => void | (() => void | Promise<void>)` - Effect function
- `deps?: DependencyList` - Optional dependency list

Runs the effect only when fabric status is `'ready'`.

### `useRemoteAgent<T>(address)`

Parameters:
- `address: string | FameAddress` - Address of the remote agent

Returns: `T | null` - The remote agent proxy, or null if fabric is not ready

## License

Apache-2.0
npm package: @naylence/vue
Description: Vue integration for Naylence Fame Fabric
Author: Naylence Dev
Latest version: 0.1.1

# @naylence/vue

Vue integration for Naylence Fame Fabric.

## Installation

```bash
npm install @naylence/vue vue
```

## Usage

Wrap your Vue app with `FabricProvider` to manage a long-lived `FameFabric` instance:

```vue
<template>
  <FabricProvider :opts="fabricOpts">
    <AppContent />
  </FabricProvider>
</template>

<script setup lang="ts">
import { FabricProvider } from '@naylence/vue';

const fabricOpts = {
  // Optional FameFabric.create() options
};
</script>
```

### useFabric

Access the current fabric and its status:

```ts
import { computed } from 'vue';
import { useFabric } from '@naylence/vue';

export function useFabricStatus() {
  const { fabric, status, error } = useFabric();

  return {
    isReady: computed(() => status.value === 'ready'),
    fabric,
    status,
    error,
  };
}
```

### useFabricEffect

Run logic only when the fabric is ready (with optional dependencies):

```ts
import { ref } from 'vue';
import { useFabricEffect } from '@naylence/vue';

const userId = ref<string | null>(null);

useFabricEffect(
  (fabric) => {
    console.log('Fabric ready', fabric);
    if (userId.value) {
      // Perform work that needs both fabric + userId
    }

    return () => {
      console.log('Cleanup when fabric changes or component unmounts');
    };
  },
  [userId]
);
```

### useRemoteAgent

Get a reactive remote agent proxy by address:

```ts
import { computed } from 'vue';
import { useRemoteAgent } from '@naylence/vue';

const agent = useRemoteAgent<MyAgent>('my-agent@fame.fabric');

const statusText = computed(() => {
  if (!agent.value) return 'Connecting...';
  return 'Agent ready';
});
```

## API

### `FabricProvider`

Props:
- `opts?: FabricOpts` - Optional configuration passed to `FameFabric.create()`.

### `useFabric()`

Returns refs:
- `fabric: Ref<FameFabric | null>`
- `status: Ref<'idle' | 'connecting' | 'ready' | 'error'>`
- `error: Ref<unknown>`

Throws if called outside of `<FabricProvider>`.

### `useFabricEffect(effect, deps?, options?)`

Parameters:
- `effect: (fabric: FameFabric) => void | (() => void | Promise<void>)` - Called when fabric is ready.
- `deps?: WatchSource[]` - Optional additional reactive dependencies to re-run the effect.
- `options?: WatchOptions` - Optional watch configuration.

Returns a stop handle for the watch.

### `useRemoteAgent<T>(address)`

Parameters:
- `address: string | FameAddress | Ref<string | FameAddress>` - Address of the remote agent.

Returns: `ComputedRef<AgentProxy<T> | null>` - The agent proxy (null until the fabric is ready).

## Scripts

- `npm run build` - Build the library with tsup.
- `npm test` - Run unit tests with Vitest.
- `npm run lint` - Lint source files.

## Examples

Vue sample apps live in `examples/`:
- `examples/hello` – two-node hello world with a simple echo agent
- `examples/hello-3node` – client → sentinel → agent chain
- `examples/rpc` – math RPC with streaming Fibonacci

To run one:
```bash
cd examples/<name>
npm install
npm run dev
```

## License

Apache-2.0