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

@taco_tsinghua/graphnode-sdk

v0.1.77

Published

GraphNode frontend SDK (cookie-based session)

Readme

GraphNode SDK for Frontend

TACO 4기 - GraphNode 서비스 프론트엔드 연동 SDK

@taco_tsinghua/graphnode-sdk는 GraphNode 백엔드 API를 타입 안전(Type-Safe)하게 사용할 수 있도록 제공되는 공식 클라이언트 라이브러리입니다.


📖 SDK 내부 구조 가이드 (Architecture)

SDK의 내부 설계 원리, 각 파일의 역할, 데이터 흐름에 대해 알고 싶다면 아래 문서를 참고하세요.


📦 설치 (Installation)

npm install @taco_tsinghua/graphnode-sdk

🚀 시작하기 (Getting Started)

1. 클라이언트 초기화

API 요청을 보내기 위해 GraphNodeClient를 초기화해야 합니다.

import { createGraphNodeClient } from '@taco_tsinghua/graphnode-sdk';

// baseUrl 비워두면, 자동적으로 BE Server 도메인으로 연결됨.
const client = createGraphNodeClient({
  baseUrl: 'https://api.your-service.com', // 백엔드 Base URL, 로컬 서버 테스트 원할 시 사용 가능
  // credentials: 'include' // (기본값) 쿠키 인증 활성화
});

📚 API 상세 레퍼런스 (API Reference)

각 모듈별 상세 사용법 및 예제 코드는 아래의 전용 문서 링크를 참고하세요.

🔐 1. 인증 & 사용자 (Auth & User)

🤖 2. AI 대화 (AI Chat)

💬 3. 대화 관리 (Conversations)

🕸️ 4. 그래프 관리 (Graph)

🧠 5. 그래프 AI (Graph AI)

📝 6. 노트 관리 (Notes)

🔄 7. 데이터 동기화 (Sync)

🔔 8. 기타 유틸리티 (Utils)

🔍 9. 글로벌 검색 (Global Search)


📘 타입 레퍼런스 (Type Reference)

SDK에서 export하는 모든 DTO, Enum, Interface의 목록과 설명입니다.


🔔 실시간 알림 이벤트 (Notification Events)

FE 개발자를 위한 빠른 참조. 상세 내용은 notification.md 참고.

GraphNode 백엔드는 그래프 생성, 대화 추가, Microscope 분석 등 오래 걸리는 비동기 작업이 완료되면 SSE(Server-Sent Events) 채널을 통해 알림을 Push합니다.

흐름 요약

FE → REST API 호출 (예: 그래프 생성 요청)
         ↓
서버 → SQS 발행 (TaskType) + 즉시 알림 Push (REQUESTED)
         ↓
AI Worker → 작업 처리
         ↓
서버 → 완료/실패 알림 Push (COMPLETED / FAILED)
         ↓
FE → 알림 수신 → UI 갱신

NotificationType 전체 목록

| 이벤트 값 | 발생 시점 | | --- | --- | | GRAPH_GENERATION_REQUESTED | 그래프 생성 요청 접수 | | GRAPH_GENERATION_REQUEST_FAILED | 요청 접수 실패 (SQS) | | GRAPH_GENERATION_COMPLETED | 그래프 생성 완료 | | GRAPH_GENERATION_FAILED | 그래프 생성 실패 (AI/DB) | | GRAPH_SUMMARY_REQUESTED | 요약 생성 요청 접수 | | GRAPH_SUMMARY_REQUEST_FAILED | 요약 요청 실패 | | GRAPH_SUMMARY_COMPLETED | 그래프 AI 요약 완료 | | GRAPH_SUMMARY_FAILED | 요약 생성 실패 | | ADD_CONVERSATION_REQUESTED | 대화 추가 요청 접수 | | ADD_CONVERSATION_REQUEST_FAILED | 대화 추가 요청 실패 | | ADD_CONVERSATION_COMPLETED | 새 대화 그래프 추가 완료 (+ nodeCount, edgeCount) | | ADD_CONVERSATION_FAILED | 대화 추가 실패 | | MICROSCOPE_INGEST_REQUESTED | Microscope 분석 요청 접수 | | MICROSCOPE_INGEST_REQUEST_FAILED | 분석 요청 실패 | | MICROSCOPE_DOCUMENT_COMPLETED | 단일 문서 분석 완료 (+ sourceId, chunksCount) | | MICROSCOPE_DOCUMENT_FAILED | 문서 분석 실패 | | MICROSCOPE_WORKSPACE_COMPLETED | 워크스페이스 전체 Ingest 완료 |

기본 사용 예제

import { NotificationType } from '@taco_tsinghua/graphnode-sdk';

const closeStream = client.notification.stream((event) => {
  switch (event.type) {
    case NotificationType.GRAPH_GENERATION_COMPLETED:
      await refreshGraphData();
      break;
    case NotificationType.GRAPH_GENERATION_FAILED:
      showErrorToast(event.payload.error);
      break;
    case NotificationType.ADD_CONVERSATION_COMPLETED:
      showToast(`${event.payload.nodeCount}개 노드 추가 완료`);
      break;
  }
});

// 컴포넌트 언마운트 시
onUnmount(() => closeStream());

📌 TaskType은 SDK 내부 서버간 관계를 이해하기 위한 참조용 타입입니다. FE에서 직접 사용할 일은 거의 없습니다.


🛠️ 개발 가이드 (Development Guide)


📄 라이선스 (License)

Copyright © 2026 TACO. All rights reserved.