@ethisyscore/protocol

中文文档
0.77.1发布于 2026/10/25SEE LICENSE IN LICENSETypeScriptESM + CJS近 30 天下载 9996

Canonical protocol types for the EthisysCore plugin ecosystem (manifest, SDUI, bridge, capability, theme).

此软件包已被标记为弃用

This package has moved to the Ethisys Core package feed. In Ethisys Core, open the Developers page and follow the setup steps (cc login connects npm to the feed).

原始使用文档
文档目录5 节
  1. Scope (1.0.0)
  2. Install
  3. Scripts
  4. Layout
  5. Compatibility

@ethisyscore/protocol

Canonical TypeScript protocol types for the EthisysCore plugin ecosystem.

This package is the TypeScript companion to the .NET EthisysCore.Protocol NuGet package. It exposes the same wire-level contracts so that the host app, App Bridge, and any future TypeScript clients consume identical types.

Scope (1.0.0)

This release lands the foundation layer for the capability-first plugin runtime:

  • Plugin manifest — PluginManifest, RenderMode, and the optional PluginUi sub-shape (src/manifest.ts).
  • SDUI primitive vocabulary v1 — KNOWN_PRIMITIVES, recursive SduiNode schema (src/sdui/primitives.ts).
  • JsonLogic operator subset + reactive rule kinds — KNOWN_OPERATORS, KNOWN_RULE_KINDS, ReactiveRule (src/sdui/operators.ts).
  • Portal contributions + host slot taxonomy — PortalContribution, KNOWN_SLOTS, HostSlot (src/sdui/portal.ts).
  • Theme tokens — design-token shape consumed by the host renderer (src/theme/tokens.ts).
  • Capability claims — permission and capability-token types (src/capability/permissions.ts, src/capability/token.ts).
  • Bridge version constant — BRIDGE_VERSION (src/bridge/version.ts).

Future contracts (reference-data, DataStore, MCP, events, logging, notifications, transport, packaging, host-callback) are not yet in this package — they will be added additively as the consuming clients land.

Install

npm install @ethisyscore/protocol

Scripts

npm run build       # bundle ESM + CJS + d.ts via tsup
npm test            # run vitest in CI mode
npm run test:watch  # vitest in watch mode
npm run lint        # tsc --noEmit type check

Layout

  • src/index.ts — public barrel
  • src/manifest.ts — plugin manifest + render mode
  • src/sdui/ — SDUI primitives, operators, portal contributions
  • src/route-template.ts — {param} route-template syntax for Contract A surfaces (RFC 0019): scanSurfaceRoute, matchRoute, substituteRouteParameters, getRouteShape, requiredContractVersionForSurfaces
  • src/sdui/contract-a.ts — richer Contract A props (RFC 0020): per-primitive Zod schemas, closed lists, DATA_TABLE_QUERY_ARGUMENTS (the arguments a host sends a bound DataTable's tool, which returns a PagedResponse), requiredContractVersionForDocument (the minimum Plugin-UI Contract version a document needs, compared with isContractVersionSupported), isToolInNamespace (prefix + declared-tool membership), isPluginRelativeRoute, isContractAIcon (host icon tokens), CONTRACT_A_LIMITS, validateContractADocument
  • src/sdui/bindings.ts — the closed binding set $route.<param>, $row.<field> (RFC 0020), recognised only in a top-level tool args value and Field.defaultValue
  • src/theme/ — design tokens
  • src/capability/ — permissions and capability-token claims
  • src/bridge/ — bridge version constant
  • src/__tests__/ — vitest tests
  • dist/ — build output (gitignored)

Compatibility

Treat this package as a public compatibility boundary. Prefer additive changes; do not repurpose enum values; do not make breaking JSON shape changes without a coordinated release.

The vocabulary surfaces (SDUI primitives, JsonLogic operators, reactive rule kinds, host slot taxonomy) are gated by the RFC process documented in docs/rfcs/README.md. CI auto-rejects PRs that expand the vocabulary without an accepted RFC.

版本与发布记录

@ethisyscore/protocol 共发布 93 个版本,首次发布于 2026/05/20;过去 12 个月发布了 93 个版本。

版本发布日期距今
0.77.1latest2026/10/2520 天前
0.77.02026/10/2420 天前
0.76.02026/10/2321 天前
0.75.02026/10/2222 天前
0.74.02026/10/2124 天前
0.73.02026/10/2024 天前

关于 @ethisyscore/protocol 的常见问题

@ethisyscore/protocol 是什么?

Canonical protocol types for the EthisysCore plugin ecosystem (manifest, SDUI, bridge, capability, theme).注意:该包已被作者标记为弃用——This package has moved to the Ethisys Core package feed. In Ethisys Core, open the Developers page and follow the setup steps (cc login connects npm to the feed).

如何安装 @ethisyscore/protocol?

在项目目录运行 npm install @ethisyscore/protocol,或使用 pnpm add / yarn add / bun add。

@ethisyscore/protocol 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ethisyscore/protocol 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@ethisyscore/protocol 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ethisyscore/protocol 可以商用吗?

@ethisyscore/protocol 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@ethisyscore/protocol 的下载量有多少?

根据 npm 官方下载统计,@ethisyscore/protocol 在 2026/10/14 – 2026/11/12 这 30 天内被下载 9,996 次,日均约 333 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ethisyscore/protocol 还在维护吗?

最新版本 0.77.1 发布于 2026/10/25(20 天前);至今共发布 93 个版本,其中过去 12 个月发布了 93 个;首次发布于 2026/05/20。作者已将其标记为弃用,新项目建议寻找替代方案。