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

@nooldey/artifact-store

v0.84.5

Published

Business-agnostic artifact storage contracts for Career Agent

Readme

@nooldey/artifact-store

结构化事实与提案版本存储与控制面契约及实现

@nooldey/artifact-store 是 Career Agent 架构中的核心存储与事实控制层,提供针对求职案例(Application Case)、结构化事实(Artifacts)、变更提案(Proposals)及其生命周期确认状态的持久化、版本管理与事务审计支持。

特性

  • 生命周期控制:严格管理事实提案由 pending(待定)-> confirmed(已确认)-> committed(已提交生效)的状态流转。
  • 多种存储后端:
    • SqliteArtifactStore:基于 SQLite 的本地生产持久化存储,支持完整事务与高效查询。
    • FileArtifactStore:基于文件的追加式事务日志存储,支持断点崩溃恢复与快照审计。
    • InMemoryArtifactStore:纯内存实现,适合轻量管道、自动化测试与单次执行。
  • 安全路径隔离:内置 createPathPolicy,防止跨目录路径穿越与越权读写。
  • 版本与血缘追踪:不可变版本快照,具备完整的版本衍生血缘树(Lineage Graph)。

安装

npm install @nooldey/artifact-store

核心接口与使用示例

import { SqliteArtifactStore } from "@nooldey/artifact-store";

const store = new SqliteArtifactStore({
  dbPath: ".career-agent/career.db",
});

// 初始化数据表与索引
await store.init();

// 创建或切换求职案例
await store.createCase({
  caseId: "fe-engineer-2026",
  title: "前端资深开发求职案例",
  candidateName: "Alex",
});

// 提交事实提案
const result = await store.commitProposal({
  caseId: "fe-engineer-2026",
  proposal: {
    id: "prop-resume-draft-1",
    schemaRef: "career/[email protected]",
    summary: "更新项目经验亮点",
    data: {
      highlights: ["重构核心构建系统,提升打包速度 40%"],
    },
    status: "confirmed",
  },
});

console.log("Proposal committed:", result.version);

模块结构

  • SqliteArtifactStore: SQLite 存储引擎实现
  • FileArtifactStore: 文件事务日志引擎实现
  • InMemoryArtifactStore: 内存存储实现
  • createPathPolicy: 路径访问安全策略校验
  • contracts.ts: 全量 TypeScript 类型声明(ArtifactEnvelope, ArtifactProposal, ApplicationCase 等)

许可证

MIT