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

@pcn-js/data360

v0.1.2

Published

PCN preset for Data360 get_data: ClaimsProvider + extractor for claim_id/OBS_VALUE/REF_AREA/TIME_PERIOD.

Downloads

84

Readme

@pcn-js/data360

PCN preset for Data360 get_data: a preconfigured ClaimsProvider and extractor for tool results that use claim_id, OBS_VALUE, REF_AREA, and TIME_PERIOD.

Data360 is a special application of PCN; this package keeps Data360-specific wiring in one place so apps using the Data360 API can drop in verification with minimal setup.

Install

pnpm add @pcn/core @pcn-js/ui @pcn-js/data360 react

Usage

  1. Wrap your app (or chat) in Data360ClaimsProvider.
  2. Ingest session claims so the manager is populated on load: use IngestSessionData360 with messages and optional initialMessages (from server).
  3. When rendering a data360_get_data tool result, wrap it in IngestToolOutput (from @pcn-js/ui) with toolName={DATA360_GET_DATA_TOOL}.
  4. Use ClaimMark and streamdownClaimComponents from @pcn-js/ui to render verified/pending marks.
import {
  Data360ClaimsProvider,
  DATA360_GET_DATA_TOOL,
  IngestSessionData360,
} from "@pcn-js/data360";
import { IngestToolOutput, streamdownClaimComponents } from "@pcn-js/ui";
import { Streamdown } from "streamdown";

function App() {
  return (
    <Data360ClaimsProvider>
      <Chat />
    </Data360ClaimsProvider>
  );
}

// In your chat view: ingest all data360_get_data outputs from the session
// (use initialMessages so the manager is populated on first paint when history is loaded)
<IngestSessionData360 messages={messages} initialMessages={initialMessages} />

// When rendering a data360_get_data tool result:
<IngestToolOutput toolName={DATA360_GET_DATA_TOOL} output={toolPart.output}>
  <GetData output={toolPart.output} />
</IngestToolOutput>

IngestSessionData360 expects messages with parts (e.g. AI SDK / data-thinking). It handles top-level tool parts and parts wrapped in { type: "data-thinking", data: toolPart }. For custom message shapes, use extractData360Outputs(messages) and call manager.ingest(DATA360_GET_DATA_TOOL, output) yourself.

API

  • Data360ClaimsProvidertoolName? (default "data360_get_data"), extractorOptions?, children
  • DATA360_GET_DATA_TOOL"data360_get_data" (use with IngestToolOutput so the tool name stays in sync)
  • IngestSessionData360messages, initialMessages?; ingests all data360 get_data outputs from the session into the manager
  • extractData360Outputs(messages) – returns unknown[] of get_data outputs from messages (for custom ingestion)
  • MessageWithParts – type { parts?: Array<Record<string, unknown>> } for message shape

For ClaimsProvider, ClaimMark, IngestToolOutput, and streamdownClaimComponents, see @pcn-js/ui.