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

@logan-jun/cd1-rag-chat

v0.4.1

Published

CD1 Agent - RAG 검색 챗봇 모듈 (iframe 격리, Vue 2.7).

Readme

@logan-jun/cd1-rag-chat

폐쇄망 호스트에 iframe 으로 임베드하는 BDP Agent (RAG 챗봇) UI 모듈.

cd1-agent 의 /agents/hdsp_rag/chat/stream SSE 엔드포인트를 호출해 답변을 스트리밍합니다. 현 버전은 mockup 모드 (백엔드 없이도 동작) 입니다.

패키지 내용

| 파일 | 용도 | |---|---| | dist/index.html, dist/assets/* | iframe 으로 로드되는 빌드된 정적 자산 | | host-integration/RemoteModule.vue | 호스트(Vue 2.7)에서 iframe + postMessage(토큰/높이) 처리하는 래퍼 컴포넌트 (선택) |

라우트/메뉴 정의는 호스트 코드에서 직접 합니다.

호스트 통합

1) 정적 자산 배포

dist/* 를 호스트 정적 서버 경로에 풀어둡니다. 권장 경로: /embedded/rag-chat/.

scripts/sync-modules.cjs (이미 셋업된 자동 동기화 스크립트) 사용 시 npm install + npm run build 만 하면 자동으로 node_modules/@logan-jun/cd1-rag-chat/dist/*public/embedded/rag-chat/ 복사됩니다.

2) 라우트 (호스트에서 직접 작성)

// router/index.ts
const routes: RouteConfig[] = [
  // ...
  {
    path: '/agents',
    component: () => import('@/components/Layout/default/Default.vue'),
    children: [
      {
        path: '/agents/rag-chat',
        name: 'agents-rag-chat',
        component: () => import('@/views/embedded/BdpAgent.vue'),
      },
    ],
  },
]

3) iframe 페이지 컴포넌트 (호스트에서 직접 작성)

옵션 A (가장 단순) — 토큰 전달 불필요한 경우:

<!-- src/views/embedded/BdpAgent.vue -->
<template>
  <iframe
    src="/embedded/rag-chat/index.html"
    style="width: 100%; height: calc(100vh - 64px); border: 0; display: block;"
  />
</template>

옵션 B — 토큰 전달/높이 동기화 등이 필요한 경우, 패키지의 RemoteModule.vue 활용:

<template>
  <RemoteModule
    src="/embedded/rag-chat/index.html"
    :token="$store.state.auth.token"
    :base-url="apiBase"
    @request-token="$store.dispatch('auth/refresh')"
  />
</template>

<script lang="ts">
import RemoteModule from '@logan-jun/cd1-rag-chat/host-integration/RemoteModule.vue'
// ...
</script>

4) 메뉴 (호스트에서 직접 작성)

<v-list-item :to="{ name: 'agents-rag-chat' }">
  <v-list-item-icon><v-icon>mdi-message-text</v-icon></v-list-item-icon>
  <v-list-item-content>
    <v-list-item-title>BDP Agent</v-list-item-title>
  </v-list-item-content>
</v-list-item>

업데이트 흐름

# .tgz 교체 + dep 한 줄만 수정
mv ~/Downloads/cd1-rag-chat-X.Y.Z.tgz vendor/
# package.json 의 "file:./vendor/..." 경로 새 버전으로
npm install && npm run build

호스트의 router/메뉴 코드는 그대로. 자산 경로(/embedded/rag-chat/)만 유지되면 됨.