npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@torknetwork/admin-console

v1.0.0

Published

Tork Admin Console - Embeddable React UI for AI governance configuration

Readme

@torknetwork/admin-console

Embeddable React admin console for the Tork AI Agent Governance Platform. Provides a complete UI for managing HITL configurations, tool registries, agent permissions, governance policies, PII detection rules, approval workflows, and audit logs.

Installation

npm install @torknetwork/admin-console
# or
yarn add @torknetwork/admin-console
# or
pnpm add @torknetwork/admin-console

Quick Start

import { TorkAdminConsole } from '@torknetwork/admin-console';

function App() {
  return (
    <TorkAdminConsole
      apiKey="your-tork-api-key"
      baseUrl="https://api.tork.network"
      reviewerId="[email protected]"
      theme="dark"
    />
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | apiKey | string | required | Your Tork API key | | baseUrl | string | https://api.tork.network | Tork Admin API base URL | | reviewerId | string | admin | ID used when approving/rejecting requests | | theme | 'dark' \| 'light' | dark | UI theme | | className | string | '' | Additional CSS classes |

Features

Dashboard

  • Real-time governance metrics and statistics
  • Activity trends visualization with charts
  • Quick overview of pending approvals and blocked actions

HITL Configuration

  • Configure Human-in-the-Loop settings
  • Set approval timeouts and escalation rules
  • Configure fatigue detection parameters
  • Manage velocity thresholds for slicing attack detection

Tool Registry

  • Register and manage AI agent tools
  • Configure rate limits per tool
  • Block sensitive tools from agent access
  • Define tool allowlists

Agent Registry

  • Register AI agents with unique identifiers
  • Assign permissions and frameworks
  • Enable/disable agents

Governance Policies

  • Create YAML-based governance policies
  • Set policy priorities for conflict resolution
  • Enable/disable policies without deletion

PII Detection Rules

  • Configure PII type detection (email, phone, SSN, credit cards, etc.)
  • Set actions per PII type (redact, block, warn, log)
  • Enable/disable detection rules

Approval Queue

  • View pending Human-in-the-Loop approvals
  • Approve or reject with required reasoning
  • Filter by status (pending, approved, rejected)
  • Expiration tracking

Audit Logs

  • Searchable audit trail of all governance actions
  • Filter by agent, action type, and date
  • Export logs to CSV
  • Expandable details view

Advanced Usage

Custom Layouts

Import individual tab components for custom layouts:

import {
  DashboardTab,
  HITLConfigTab,
  ToolsTab,
  AgentsTab,
  PoliciesTab,
  PIIRulesTab,
  ApprovalsTab,
  AuditLogsTab,
  createTorkAPI,
} from '@torknetwork/admin-console';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

const queryClient = new QueryClient();

function CustomDashboard() {
  const api = createTorkAPI('https://api.tork.network', 'your-api-key');

  return (
    <QueryClientProvider client={queryClient}>
      <div className="grid grid-cols-2 gap-4">
        <DashboardTab api={api} />
        <ApprovalsTab api={api} reviewerId="admin" />
      </div>
    </QueryClientProvider>
  );
}

Direct API Access

Use the API hook directly for custom integrations:

import { createTorkAPI } from '@torknetwork/admin-console';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

const queryClient = new QueryClient();

function CustomComponent() {
  const api = createTorkAPI('https://api.tork.network', 'your-api-key');
  const { data: stats, isLoading } = api.useDashboardStats();

  if (isLoading) return <div>Loading...</div>;

  return (
    <div>
      <p>Total Tools: {stats?.total_tools}</p>
      <p>Pending Approvals: {stats?.pending_approvals}</p>
    </div>
  );
}

function App() {
  return (
    <QueryClientProvider client={queryClient}>
      <CustomComponent />
    </QueryClientProvider>
  );
}

Styling

The console uses Tailwind CSS classes. For the styles to work correctly, ensure your project includes Tailwind CSS or the necessary styles.

With Tailwind CSS

Add the admin-console to your Tailwind content paths:

// tailwind.config.js
module.exports = {
  content: [
    './src/**/*.{js,ts,jsx,tsx}',
    './node_modules/@torknetwork/admin-console/**/*.{js,ts,jsx,tsx}',
  ],
  // ...
};

Without Tailwind CSS

Import the pre-built CSS file:

import '@torknetwork/admin-console/dist/styles.css';
import { TorkAdminConsole } from '@torknetwork/admin-console';

TypeScript

Full TypeScript support is included. Import types as needed:

import type {
  TorkAdminConsoleProps,
  UseTorkAPI,
  HITLConfig,
  Tool,
  Agent,
  Policy,
  PIIRule,
  Approval,
  AuditLog,
  DashboardStats,
} from '@torknetwork/admin-console';

Requirements

  • React 18+
  • @tanstack/react-query 5+
  • Tailwind CSS (recommended) or import pre-built styles

Related Packages

  • tork - Python SDK for Tork governance
  • @torknetwork/mcp-server - MCP server for Claude Desktop integration

Links

License

MIT License - Copyright (c) 2025 Tork Network