@x-otto/plugin 0.1.0-alpha.0 → 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # @otto/plugin
1
+ # @x-otto/plugin
2
2
 
3
3
  > Plugin 清单(`otto-plugin.json`)的解析、目录发现、贡献词表、信任模型与作者 SDK——RFC-044 插件体系的「只读不执行」地基层。
4
4
 
5
- `@otto/plugin` 是 otto 插件系统的协议层与契约层。一个插件 = 一个目录 + 一份 `otto-plugin.json`,其目录下用 `skills/`、`agents/`、`commands/`、`.mcp.json` 等子目录贡献能力(由消费方 `@otto/coding` 的各轴 loader 消费)。
5
+ `@x-otto/plugin` 是 otto 插件系统的协议层与契约层。一个插件 = 一个目录 + 一份 `otto-plugin.json`,其目录下用 `skills/`、`agents/`、`commands/`、`.mcp.json` 等子目录贡献能力(由消费方 `@x-otto/coding` 的各轴 loader 消费)。
6
6
 
7
7
  ## 核心功能
8
8
 
@@ -20,22 +20,22 @@
20
20
  ## 安装
21
21
 
22
22
  ```bash
23
- pnpm add @otto/plugin
23
+ pnpm add @x-otto/plugin
24
24
  ```
25
25
 
26
26
  ## 用法
27
27
 
28
28
  ```ts
29
29
  // 发现已安装插件
30
- import { discoverPlugins } from '@otto/plugin'
30
+ import { discoverPlugins } from '@x-otto/plugin'
31
31
  const plugins = discoverPlugins({ cwd, homedir, disabled: ['plugin-x'] })
32
32
 
33
33
  // 解析单一 manifest
34
- import { parsePluginManifest } from '@otto/plugin'
34
+ import { parsePluginManifest } from '@x-otto/plugin'
35
35
  const manifest = parsePluginManifest(content, path) // null on fail
36
36
 
37
37
  // 作者定义插件
38
- import { definePlugin } from '@otto/plugin'
38
+ import { definePlugin } from '@x-otto/plugin'
39
39
  export default definePlugin((ctx) => ({
40
40
  hooks: {
41
41
  preToolUse: (ctx) => ctx.toolName === 'write' ? { decision: 'deny' } : { decision: 'allow' },
@@ -80,11 +80,11 @@ tests/ # 测试文件
80
80
 
81
81
  ## 依赖
82
82
 
83
- - Internal: `@otto/env`, `@otto/interchange`, `@otto/provider`, `@otto/shared`
83
+ - Internal: `@x-otto/env`, `@x-otto/interchange`, `@x-otto/provider`, `@x-otto/shared`
84
84
  - External: `zod`, `semver`
85
85
 
86
86
  ## 相关
87
87
 
88
88
  - [Architecture](./ARCHITECTURE.md)
89
89
  - RFC-044 插件体系(D2 manifest/发现;R4 fail-closed、R6 source key、R7 层源覆盖)
90
- - `@otto/extension`(re-export 本包 SDK 作为 extension 作者统一入口)
90
+ - `@x-otto/extension`(re-export 本包 SDK 作为 extension 作者统一入口)