dsh-blue/blue--packages-api ↗★ 21

@dsh-blue/blue-api

Blue插件的跨平台UI服务接口 适合开发Blue终端UI插件、需要注册面板、状态和弹窗服务的开发者。

包名
@dsh-blue/blue-api
兼容性
待验证
Cordis 依赖范围
^4.0.2
版本
0.2.0-alpha.1
许可证
MIT
最近更新
2026年9月28日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

@dsh-blue/blue-api

English | 中文

Renderer-neutral contracts and direct Cordis UI services for Blue 0.2.0-alpha.1.

Loading the package registers:

  • ctx.bluePanes
  • ctx.blueStatus
  • ctx.blueOverlays
  • ctx.blueEditorExtensions

Each registration belongs to the calling Cordis Fiber and disappears when that Fiber unloads. Definitions use BlueUiNode data; core owns validation and terminal rendering.

The full pane/overlay node union includes renderer-neutral document nodes for Markdown or Mermaid source and structured chart nodes for line, point, bar, sparkline, and heatmap data. These leaves are intentionally absent from the narrower status, notification, editor-extension, and BlueView contracts.

import type { Context } from '@deepseek-ai/cordis'
import type {} from '@dsh-blue/blue-api'

export const inject = ['bluePanes']

export function apply(ctx: Context): void {
  ctx.bluePanes.register({
    id: 'acme.summary',
    placement: 'right',
    render: () => ({ kind: 'text', content: 'ready' }),
  })
}

This package does not wrap dsh services. Plugins use ctx.commands, ctx.sessionProjections, ctx.tools, and other Harness services directly. There is no Blue manifest, capability host, adapter, or compatibility facade.