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

@originaiagent/feedback

v0.1.3

Published

origin「これじゃない」フィードバック 共通部品(言語レベルの単一ソース SoT)。contract(endpoint/verdict/validator)+ submit client + NotThisButton。各ツールが install して1行で載せる。

Readme

@originaiagent/feedback

origin ツール群の〔これじゃない〕フィードバックを 言語レベルの単一ソース(SoT) で提供する共通パッケージ。 「AI結果への これじゃない」送信の endpoint / payload / verdict / 入力検証を1箇所で定義し、コピペ横展開の ドリフト(=バグ源)を構造的に排除する。SoT = origin-ai。設計: docs/not-this-feedback-loop-design.md。

インストール(consumer = 各ツール)

各ツール repo に .npmrc(設定1回):

@originaiagent:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}

NPM_TOKEN は GitHub Packages read 権限の PAT を CI / Vercel / Cloud Run の build env に設定。

npm install @originaiagent/feedback

パッケージは compiled JS + .d.ts(dist/)を配布する。Turbopack / webpack / Vite / Node ESM いずれもそのまま解決でき、 consumer 側の transpilePackages 設定は不要。

使い方(import 1行)

3 サブパスに分離(server / client の混在を構造的に禁止):

// 契約(純粋・依存ゼロ。server / client 両方から安全)
import { EMBED_FEEDBACK_PATH, isValidRunId, normalizeReason } from "@originaiagent/feedback";

// UI ボタン("use client"。inline style で自己完結=Tailwind 非依存)
import { NotThisButton } from "@originaiagent/feedback/button";

// 送信クライアント(server-only。鍵注入は呼出側)
import { createEmbedFeedbackSubmit } from "@originaiagent/feedback/server";

server(Server Action / BFF)

const submit = createEmbedFeedbackSubmit({
  baseUrl: process.env.ORIGIN_AI_BASE_URL!,      // https://origin-ai-five.vercel.app
  authHeaders: { "X-Embed-Key": process.env.EMBED_CLIENT_KEY! }, // ブラウザ非露出
});
const r = await submit({ run_id, verdict: "not_this", reason }); // → { ok, error? }

UI(1行)

<NotThisButton runId={result?.runId} submit={submitViaServerAction} />
  • runId が null/undefined の時は 描画しない(AI結果が無い所に死にボタンを置かない)。
  • submit は tool の Server Action(内部で上記 server helper を呼ぶ)を渡す。鍵は UI に出さない。

認可(BOLA)

  • run_id = ai_embed_runs.id。origin-ai submit_embed_feedback RPC が source_tool 所有 を検証。
  • source_tool は X-Embed-Key(sha256)から導出。body から自己申告できない。

export 面

| subpath | 中身 | 環境 | | --- | --- | --- | | . / ./contract | endpoint / verdict / validator / 型 | 純粋(server・client・非React 可) | | ./server | createEmbedFeedbackSubmit | server-only(runtime guard) | | ./button | NotThisButton | client(React peer, inline style) |

async 待機(polling)が要る画面は @originaiagent/async-wait を併用(consumer 側で合成。tool-template の 標準部品 EmbedAiResult 参照)。2 パッケージは独立(SoT 分裂を避ける)。