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

@adep/types

v0.2.0

Published

AgentDeploy 用户 SDK 类型契约(纯类型包,零运行时代码,见任务单 CORE-006)

Readme

@adep/types — AgentDeploy 用户 SDK 类型契约

纯类型包:零运行时代码、无运行时依赖,只提供类型定义(任务单 CORE-006)。

@adep/types 定义 AgentDeploy 云函数侧统一的能力契约:函数上下文 ctxcloud 挂载点以及数据库 / 存储 / 请求 / 实时等能力接口。它是平台与函数代码之间的「SDK 契约层」——FN 域实现 Provider,ST / DB 域注册 Consumer,三方只依赖这里的类型,互不 import 内部实现。

npm install -D @adep/types
# 或
pnpm add -D @adep/types

包含哪些契约

| 模块 | 说明 | | ----------------- | ---------------------------------------------------------------------------------------- | | FunctionContext | 云函数处理函数上下文(ctx.params/query/body/headers/...) | | CloudContainer | cloud 挂载点容器:cloud.db() / cloud.storage() / cloud.fetch() / cloud.chain() | | CloudDb | 数据库能力:table() / query() / raw() 等 | | CloudStorage | 文件存储能力:put() / get() / list() / signURL() 等 | | CloudFetch | HTTP 请求能力:get() / post() 等 | | Harness | Web 组件(widget)在宿主中的挂载 / 卸载契约 |

用法

import type { FunctionContext, CloudContainer } from '@adep/types'

export default async function handler(ctx: FunctionContext) {
  const db = (ctx.cloud as CloudContainer).db()
  const row = await db.get('users', ctx.params.id)
  return { ok: true, row }
}

说明

  • 该包 sideEffects: false,可安全 tree-shake;类型测试用「import 后无值导出」钉死其纯类型属性。
  • 本包不负责运行时实现,运行时代码在 @adep/runtime