跳到主内容

dsh-typert-protocol/packages/typert/protocol官方

175.3kStar19.0kFork0Issue752Watching

提供Remote服务装饰器、调用描述符、编码器和协议映射等编译器无关的声明,供业务包、Typert工件、Host Gateway和Client API共享使用

机审证据3/5方法论数据来源安装命令持续维护DSH 版本风险扫描
机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科

ⓘ 此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

命令web profile
$ dsh plugin --profile web add npm:@deepseek-ai/dsh-typert-protocol

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/typert/protocol:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

English | 中文

Compiler-independent declarations shared by business packages, generated Typert artifacts, the Host Gateway, and Client API. This package owns the Remote Service base, decorators, explicit binding fallback, merge-extensible protocol maps, invocation descriptors, codecs, and provider contracts; it does not run TypeScript analysis or register a concrete Cordis service.

Remote declarations

  • @Remote marks a public instance method for direct invocation on its registered Cordis Service.
  • @RemoteScope(key) marks a method whose receiver is selected from a merge-declared scoped Context kind.
  • TypertRemoteService binds the Cordis key passed to super(ctx, serviceKey, options?) to the same default wire namespace.
  • bindTypertRemote(this, serviceKey, options?) provides the same visible, frozen binding for a Service that cannot inherit from TypertRemoteService.
  • remoteMethods(service) returns a detached declaration-order snapshot used by the Gateway's SRC fallback.

A Host method opts into cooperative cancellation by declaring signal: AbortSignal as its final parameter. InvocationDescriptor.cancellation records that reserved injection point; the signal never becomes a JSON parameter or lookup field. SRC recognizes the final parameter name, while strict generation also verifies the global AbortSignal type.

Decorator initializers retain markers in a module-private WeakMap keyed by the Service prototype. They do not add constructor symbols, prototype properties, parameter metadata, or runtime reflection fields. A TypertRemoteService exposes the same public readonly typertRemote binding that the explicit helper returns.

Typert protocol

Business packages extend TypertLookupMap and TypertContextMap to associate Host objects or scoped Contexts with their wire identities. Generated artifacts extend TypertRemoteMap, TypertRemoteScopeMap, and TypertRemoteNamespaceMap so Client imports expose only selected Remote methods. InvocationDescriptor is the shared runtime form consumed by the registry, Gateway, and Client Remote.

The Host assembly extends TypertRemoteEventSelection with the Host events it forwards to consumers, which narrows the ctx.remote.$on key face; TypertForwardableEvent states the shapes a one-way delivery can carry at all, excluding Scope-bound and answered events. TypertClientRemote carries both roles of that surface: consumers subscribe through $on, and the Client half owning the host frame sink hands frames over through $dispatch.

Lookup and Context packages own both sides of their contract: declaration merging supplies the static association, while runtime providers register identity resolution with ctx.typert. A lookup or Host Context provider supplies the stable declaration and default resolver, while Host composition may separately configure a synchronous or asynchronous resolver; policy rejections may use TypertLookupFailure to carry a failure value owned by the boundary adapter. Strict codecs carry generated schemas; src-json codecs identify the weaker source-launch path.

Model Experience

None, as this protocol package declares application reflection and registers nothing model-facing.

KV Cache effect

No direct effect.

Known Limitations and Deferred Work

  • Decorator markers contain only the method name and direct or Context invocation mode. Parameter, result, lookup, and schema reflection require the Typert build pipeline.
  • Remote decorators accept only public, non-static instance methods with string names. SRC execution cannot represent overloaded, destructured, defaulted, or rest-parameter signatures.

查看使用指南 →

该插件的安装步骤、关键要点、FAQ 与兼容性说明(基于已收录字段派生)。

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/typert/protocol)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录