cognitive-modules 0.5.1__py3-none-any.whl → 0.6.0__py3-none-any.whl
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.
- cognitive/migrate.py +9 -3
- cognitive/runner.py +520 -4
- cognitive_modules-0.6.0.dist-info/METADATA +615 -0
- {cognitive_modules-0.5.1.dist-info → cognitive_modules-0.6.0.dist-info}/RECORD +8 -8
- cognitive_modules-0.5.1.dist-info/METADATA +0 -445
- {cognitive_modules-0.5.1.dist-info → cognitive_modules-0.6.0.dist-info}/WHEEL +0 -0
- {cognitive_modules-0.5.1.dist-info → cognitive_modules-0.6.0.dist-info}/entry_points.txt +0 -0
- {cognitive_modules-0.5.1.dist-info → cognitive_modules-0.6.0.dist-info}/licenses/LICENSE +0 -0
- {cognitive_modules-0.5.1.dist-info → cognitive_modules-0.6.0.dist-info}/top_level.txt +0 -0
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: cognitive-modules
|
|
3
|
-
Version: 0.5.1
|
|
4
|
-
Summary: Structured LLM task runner with schema validation, confidence scoring, and subagent orchestration
|
|
5
|
-
Author: ziel-io
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/ziel-io/cognitive-modules
|
|
8
|
-
Project-URL: Documentation, https://github.com/ziel-io/cognitive-modules#readme
|
|
9
|
-
Project-URL: Repository, https://github.com/ziel-io/cognitive-modules
|
|
10
|
-
Project-URL: Issues, https://github.com/ziel-io/cognitive-modules/issues
|
|
11
|
-
Keywords: llm,cognitive,modules,ai,cli,schema,validation,prompt,agent,subagent
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Operating System :: OS Independent
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
-
Requires-Python: >=3.9
|
|
24
|
-
Description-Content-Type: text/markdown
|
|
25
|
-
License-File: LICENSE
|
|
26
|
-
Requires-Dist: jsonschema>=4.17.0
|
|
27
|
-
Requires-Dist: pyyaml>=6.0
|
|
28
|
-
Requires-Dist: typer>=0.9.0
|
|
29
|
-
Requires-Dist: rich>=13.0.0
|
|
30
|
-
Provides-Extra: openai
|
|
31
|
-
Requires-Dist: openai>=1.0.0; extra == "openai"
|
|
32
|
-
Provides-Extra: anthropic
|
|
33
|
-
Requires-Dist: anthropic>=0.18.0; extra == "anthropic"
|
|
34
|
-
Provides-Extra: ollama
|
|
35
|
-
Requires-Dist: requests>=2.28.0; extra == "ollama"
|
|
36
|
-
Provides-Extra: minimax
|
|
37
|
-
Requires-Dist: openai>=1.0.0; extra == "minimax"
|
|
38
|
-
Provides-Extra: all
|
|
39
|
-
Requires-Dist: openai>=1.0.0; extra == "all"
|
|
40
|
-
Requires-Dist: anthropic>=0.18.0; extra == "all"
|
|
41
|
-
Requires-Dist: requests>=2.28.0; extra == "all"
|
|
42
|
-
Provides-Extra: server
|
|
43
|
-
Requires-Dist: fastapi>=0.109.0; extra == "server"
|
|
44
|
-
Requires-Dist: uvicorn[standard]>=0.27.0; extra == "server"
|
|
45
|
-
Requires-Dist: pydantic>=2.0.0; extra == "server"
|
|
46
|
-
Provides-Extra: mcp
|
|
47
|
-
Requires-Dist: mcp>=1.0.0; extra == "mcp"
|
|
48
|
-
Provides-Extra: dev
|
|
49
|
-
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
50
|
-
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
51
|
-
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
52
|
-
Requires-Dist: twine>=4.0.0; extra == "dev"
|
|
53
|
-
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
54
|
-
Provides-Extra: docs
|
|
55
|
-
Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
|
|
56
|
-
Requires-Dist: pymdown-extensions>=10.0.0; extra == "docs"
|
|
57
|
-
Dynamic: license-file
|
|
58
|
-
|
|
59
|
-
# Cognitive Modules
|
|
60
|
-
|
|
61
|
-
[](https://github.com/ziel-io/cognitive-modules/actions/workflows/ci.yml)
|
|
62
|
-
[](https://pypi.org/project/cognitive-modules/)
|
|
63
|
-
[](https://www.python.org/downloads/)
|
|
64
|
-
[](https://opensource.org/licenses/MIT)
|
|
65
|
-
|
|
66
|
-
> 可验证的结构化 AI 任务规范
|
|
67
|
-
|
|
68
|
-
Cognitive Modules 是一种 AI 任务定义规范,专为需要**强约束、可验证、可审计**的生成任务设计。
|
|
69
|
-
|
|
70
|
-
## v2.2 新特性
|
|
71
|
-
|
|
72
|
-
| 特性 | 说明 |
|
|
73
|
-
|------|------|
|
|
74
|
-
| **Control/Data 分离** | `meta` 控制面 + `data` 数据面,中间件无需解析业务 |
|
|
75
|
-
| **模块分级 (Tier)** | `exec` / `decision` / `exploration` 不同严格度 |
|
|
76
|
-
| **可回收溢出** | `extensions.insights` 保留 LLM 的额外洞察 |
|
|
77
|
-
| **可扩展 Enum** | 允许自定义类型,不牺牲类型安全 |
|
|
78
|
-
| **Repair Pass** | 自动修复格式问题,降低验证失败率 |
|
|
79
|
-
|
|
80
|
-
## 特性
|
|
81
|
-
|
|
82
|
-
- **强类型契约** - JSON Schema 双向验证输入输出
|
|
83
|
-
- **可解释输出** - 强制输出 `confidence` + `rationale`
|
|
84
|
-
- **Control/Data 分离** - `meta.explain` 快速路由 + `data.rationale` 详细审计
|
|
85
|
-
- **模块分级** - exec / decision / exploration 不同约束等级
|
|
86
|
-
- **子代理编排** - `@call:module` 支持模块间调用
|
|
87
|
-
- **参数传递** - `$ARGUMENTS` 运行时替换
|
|
88
|
-
- **多 LLM 支持** - OpenAI / Anthropic / MiniMax / Ollama
|
|
89
|
-
- **公共注册表** - `cogn install registry:module-name`
|
|
90
|
-
|
|
91
|
-
## 安装
|
|
92
|
-
|
|
93
|
-
### Python (pip)
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
pip install cognitive-modules
|
|
97
|
-
|
|
98
|
-
# 带 LLM 支持
|
|
99
|
-
pip install cognitive-modules[openai] # OpenAI
|
|
100
|
-
pip install cognitive-modules[anthropic] # Claude
|
|
101
|
-
pip install cognitive-modules[all] # 全部
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Node.js (npm)
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
# 全局安装
|
|
108
|
-
npm install -g cogn
|
|
109
|
-
|
|
110
|
-
# 或 npx 零安装使用(推荐)
|
|
111
|
-
npx cogn --help
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
| 平台 | 包名 | 命令 |
|
|
115
|
-
|------|------|------|
|
|
116
|
-
| pip | `cognitive-modules` | `cogn` |
|
|
117
|
-
| npm | `cognitive-modules-cli` | `cog` |
|
|
118
|
-
|
|
119
|
-
## 快速开始
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
# 配置 LLM
|
|
123
|
-
export LLM_PROVIDER=openai
|
|
124
|
-
export OPENAI_API_KEY=sk-xxx
|
|
125
|
-
|
|
126
|
-
# 运行代码审查
|
|
127
|
-
cogn run code-reviewer --args "def login(u,p): return db.query(f'SELECT * FROM users WHERE name={u}')" --pretty
|
|
128
|
-
|
|
129
|
-
# 运行任务排序
|
|
130
|
-
cogn run task-prioritizer --args "修复bug(紧急), 写文档, 优化性能" --pretty
|
|
131
|
-
|
|
132
|
-
# 运行 API 设计
|
|
133
|
-
cogn run api-designer --args "用户系统 CRUD API" --pretty
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## v2.2 响应格式
|
|
137
|
-
|
|
138
|
-
所有模块现在返回统一的 v2.2 envelope 格式:
|
|
139
|
-
|
|
140
|
-
```json
|
|
141
|
-
{
|
|
142
|
-
"ok": true,
|
|
143
|
-
"meta": {
|
|
144
|
-
"confidence": 0.92,
|
|
145
|
-
"risk": "low",
|
|
146
|
-
"explain": "简短摘要,用于快速路由决策(≤280字符)"
|
|
147
|
-
},
|
|
148
|
-
"data": {
|
|
149
|
-
"...业务字段...",
|
|
150
|
-
"rationale": "详细推理过程,用于审计和人工审核",
|
|
151
|
-
"extensions": {
|
|
152
|
-
"insights": [
|
|
153
|
-
{
|
|
154
|
-
"text": "额外洞察",
|
|
155
|
-
"suggested_mapping": "建议添加到 schema 的字段"
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Control vs Data Plane
|
|
164
|
-
|
|
165
|
-
| 层 | 字段 | 用途 |
|
|
166
|
-
|---|------|------|
|
|
167
|
-
| **Control Plane** | `meta.confidence` | 路由/降级决策 |
|
|
168
|
-
| **Control Plane** | `meta.risk` | 人工审核触发 |
|
|
169
|
-
| **Control Plane** | `meta.explain` | 日志/卡片 UI |
|
|
170
|
-
| **Data Plane** | `data.rationale` | 详细审计 |
|
|
171
|
-
| **Data Plane** | `data.extensions` | 可回收洞察 |
|
|
172
|
-
|
|
173
|
-
## 核心特性
|
|
174
|
-
|
|
175
|
-
| 特性 | 说明 |
|
|
176
|
-
|------|------|
|
|
177
|
-
| **JSON Schema 验证** | 输入输出双向校验 |
|
|
178
|
-
| **置信度** | 每个输出必须包含 0-1 的 confidence |
|
|
179
|
-
| **推理过程** | `meta.explain` (简短) + `data.rationale` (详细) |
|
|
180
|
-
| **模块分级** | `tier: exec \| decision \| exploration` |
|
|
181
|
-
| **风险聚合** | `meta.risk = max(changes[*].risk)` |
|
|
182
|
-
| **参数传递** | `$ARGUMENTS` 运行时替换 |
|
|
183
|
-
| **子代理** | `@call:module` 支持模块间调用 |
|
|
184
|
-
| **验证工具** | `cogn validate` / `cogn validate --v22` |
|
|
185
|
-
|
|
186
|
-
## 集成方式
|
|
187
|
-
|
|
188
|
-
| 方式 | 命令 | 适用场景 |
|
|
189
|
-
|------|------|----------|
|
|
190
|
-
| CLI | `cogn run` | 命令行 |
|
|
191
|
-
| HTTP API | `cogn serve` | n8n、Coze、Dify |
|
|
192
|
-
| MCP Server | `cogn mcp` | Claude、Cursor |
|
|
193
|
-
|
|
194
|
-
## CLI 命令
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
# 模块管理
|
|
198
|
-
cogn list # 列出已安装模块
|
|
199
|
-
cogn info <module> # 查看模块详情
|
|
200
|
-
cogn validate <module> # 验证模块结构
|
|
201
|
-
cogn validate <module> --v22 # 验证 v2.2 格式
|
|
202
|
-
|
|
203
|
-
# 运行模块
|
|
204
|
-
cogn run <module> input.json -o output.json --pretty
|
|
205
|
-
cogn run <module> --args "需求描述" --pretty
|
|
206
|
-
cogn run <module> --args "需求" --subagent # 启用子代理
|
|
207
|
-
|
|
208
|
-
# 创建模块
|
|
209
|
-
cogn init <name> -d "描述"
|
|
210
|
-
cogn init <name> --format v22 # 创建 v2.2 格式模块
|
|
211
|
-
|
|
212
|
-
# 迁移模块
|
|
213
|
-
cogn migrate <module> # 将 v1/v2.1 模块迁移到 v2.2
|
|
214
|
-
|
|
215
|
-
# 从 GitHub 安装(推荐)
|
|
216
|
-
cogn add ziel-io/cognitive-modules -m code-simplifier
|
|
217
|
-
cogn add org/repo -m module-name --tag v1.0.0 # 安装指定版本
|
|
218
|
-
cogn remove <module> # 删除模块
|
|
219
|
-
|
|
220
|
-
# 版本管理
|
|
221
|
-
cogn update <module> # 更新到最新版本
|
|
222
|
-
cogn update <module> --tag v2.0.0 # 更新到指定版本
|
|
223
|
-
cogn versions <url> # 查看可用版本
|
|
224
|
-
|
|
225
|
-
# 其他安装方式
|
|
226
|
-
cogn install github:user/repo/path
|
|
227
|
-
cogn install registry:module-name
|
|
228
|
-
cogn uninstall <module>
|
|
229
|
-
|
|
230
|
-
# 注册表
|
|
231
|
-
cogn registry # 查看公共模块
|
|
232
|
-
cogn search <query> # 搜索模块
|
|
233
|
-
|
|
234
|
-
# 环境检查
|
|
235
|
-
cogn doctor
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
## 内置模块
|
|
239
|
-
|
|
240
|
-
| 模块 | Tier | 功能 | 示例 |
|
|
241
|
-
|------|------|------|------|
|
|
242
|
-
| `code-reviewer` | decision | 代码审查 | `cogn run code-reviewer --args "你的代码"` |
|
|
243
|
-
| `code-simplifier` | decision | 代码简化 | `cogn run code-simplifier --args "复杂代码"` |
|
|
244
|
-
| `task-prioritizer` | decision | 任务优先级排序 | `cogn run task-prioritizer --args "任务1,任务2"` |
|
|
245
|
-
| `api-designer` | decision | REST API 设计 | `cogn run api-designer --args "订单系统"` |
|
|
246
|
-
| `ui-spec-generator` | exploration | UI 规范生成 | `cogn run ui-spec-generator --args "电商首页"` |
|
|
247
|
-
| `product-analyzer` | exploration | 产品分析(子代理) | `cogn run product-analyzer --args "健康产品" -s` |
|
|
248
|
-
|
|
249
|
-
## 模块格式
|
|
250
|
-
|
|
251
|
-
### v2.2 格式(推荐)
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
my-module/
|
|
255
|
-
├── module.yaml # 机器可读 manifest(含 tier/overflow/enums)
|
|
256
|
-
├── prompt.md # 人类可读 prompt
|
|
257
|
-
├── schema.json # meta + input + data + error schemas
|
|
258
|
-
└── tests/ # 黄金测试用例
|
|
259
|
-
├── case1.input.json
|
|
260
|
-
└── case1.expected.json
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
### module.yaml (v2.2)
|
|
264
|
-
|
|
265
|
-
```yaml
|
|
266
|
-
name: my-module
|
|
267
|
-
version: 2.2.0
|
|
268
|
-
responsibility: 一句话描述
|
|
269
|
-
|
|
270
|
-
tier: decision # exec | decision | exploration
|
|
271
|
-
schema_strictness: medium # high | medium | low
|
|
272
|
-
|
|
273
|
-
excludes:
|
|
274
|
-
- 不做的事情
|
|
275
|
-
|
|
276
|
-
policies:
|
|
277
|
-
network: deny
|
|
278
|
-
filesystem_write: deny
|
|
279
|
-
side_effects: deny
|
|
280
|
-
|
|
281
|
-
overflow:
|
|
282
|
-
enabled: true
|
|
283
|
-
recoverable: true
|
|
284
|
-
max_items: 5
|
|
285
|
-
require_suggested_mapping: true
|
|
286
|
-
|
|
287
|
-
enums:
|
|
288
|
-
strategy: extensible # strict | extensible
|
|
289
|
-
|
|
290
|
-
failure:
|
|
291
|
-
contract: error_union
|
|
292
|
-
partial_allowed: true
|
|
293
|
-
|
|
294
|
-
compat:
|
|
295
|
-
accepts_v21_payload: true
|
|
296
|
-
runtime_auto_wrap: true
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
### v1 格式(仍支持)
|
|
300
|
-
|
|
301
|
-
```
|
|
302
|
-
my-module/
|
|
303
|
-
├── MODULE.md # 元数据 + 指令
|
|
304
|
-
├── schema.json # 输入输出 Schema
|
|
305
|
-
└── examples/
|
|
306
|
-
├── input.json
|
|
307
|
-
└── output.json
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
## Tier 说明
|
|
311
|
-
|
|
312
|
-
| Tier | 用途 | Schema 严格度 | Overflow |
|
|
313
|
-
|------|------|---------------|----------|
|
|
314
|
-
| `exec` | 自动执行(patch、指令生成) | high | 关闭 |
|
|
315
|
-
| `decision` | 判断/评估/分类 | medium | 开启 |
|
|
316
|
-
| `exploration` | 探索/调研/灵感 | low | 开启 |
|
|
317
|
-
|
|
318
|
-
## 在 AI 工具中使用
|
|
319
|
-
|
|
320
|
-
### Cursor / Codex CLI
|
|
321
|
-
|
|
322
|
-
在项目根目录创建 `AGENTS.md`:
|
|
323
|
-
|
|
324
|
-
```markdown
|
|
325
|
-
## 代码审查
|
|
326
|
-
|
|
327
|
-
当需要审查代码时:
|
|
328
|
-
1. 读取 `~/.cognitive/modules/code-reviewer/MODULE.md`
|
|
329
|
-
2. 按 schema.json 格式输出
|
|
330
|
-
3. 包含 meta.explain + data.rationale
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
### 直接对话
|
|
334
|
-
|
|
335
|
-
```
|
|
336
|
-
读取 ~/.cognitive/modules/code-reviewer/MODULE.md,
|
|
337
|
-
审查这段代码:def login(u,p): ...
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
## 配置 LLM
|
|
341
|
-
|
|
342
|
-
```bash
|
|
343
|
-
# OpenAI
|
|
344
|
-
export LLM_PROVIDER=openai
|
|
345
|
-
export OPENAI_API_KEY=sk-xxx
|
|
346
|
-
|
|
347
|
-
# Anthropic Claude
|
|
348
|
-
export LLM_PROVIDER=anthropic
|
|
349
|
-
export ANTHROPIC_API_KEY=sk-ant-xxx
|
|
350
|
-
|
|
351
|
-
# MiniMax
|
|
352
|
-
export LLM_PROVIDER=minimax
|
|
353
|
-
export MINIMAX_API_KEY=sk-xxx
|
|
354
|
-
|
|
355
|
-
# Ollama(本地)
|
|
356
|
-
export LLM_PROVIDER=ollama
|
|
357
|
-
|
|
358
|
-
# 检查配置
|
|
359
|
-
cogn doctor
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
## 迁移到 v2.2
|
|
363
|
-
|
|
364
|
-
从 v1 或 v2.1 模块迁移到 v2.2:
|
|
365
|
-
|
|
366
|
-
```bash
|
|
367
|
-
# 自动迁移单个模块
|
|
368
|
-
cogn migrate code-reviewer
|
|
369
|
-
|
|
370
|
-
# 迁移所有模块
|
|
371
|
-
cogn migrate --all
|
|
372
|
-
|
|
373
|
-
# 验证迁移结果
|
|
374
|
-
cogn validate code-reviewer --v22
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
手动迁移步骤:
|
|
378
|
-
1. 创建 `module.yaml`(添加 tier/overflow/enums)
|
|
379
|
-
2. 更新 `schema.json`(添加 meta schema)
|
|
380
|
-
3. 创建/更新 `prompt.md`(说明 v2.2 envelope 格式)
|
|
381
|
-
4. 保留 `MODULE.md`(向后兼容)
|
|
382
|
-
|
|
383
|
-
## 开发
|
|
384
|
-
|
|
385
|
-
```bash
|
|
386
|
-
# 克隆
|
|
387
|
-
git clone https://github.com/ziel-io/cognitive-modules.git
|
|
388
|
-
cd cognitive-modules
|
|
389
|
-
|
|
390
|
-
# 安装开发依赖
|
|
391
|
-
pip install -e ".[dev]"
|
|
392
|
-
|
|
393
|
-
# 运行测试
|
|
394
|
-
pytest tests/ -v
|
|
395
|
-
|
|
396
|
-
# 创建新模块(v2.2 格式)
|
|
397
|
-
cogn init my-module -d "模块描述" --format v22
|
|
398
|
-
cogn validate my-module --v22
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
## 项目结构
|
|
402
|
-
|
|
403
|
-
```
|
|
404
|
-
cognitive-modules/
|
|
405
|
-
├── src/cognitive/ # Python CLI 源码
|
|
406
|
-
│ ├── cli.py # 命令入口
|
|
407
|
-
│ ├── loader.py # 模块加载(支持 v0/v1/v2.2)
|
|
408
|
-
│ ├── runner.py # 模块执行(v2.2 envelope)
|
|
409
|
-
│ ├── validator.py # 模块验证(含 v2.2 验证)
|
|
410
|
-
│ ├── migrate.py # v2.2 迁移工具
|
|
411
|
-
│ ├── subagent.py # 子代理编排
|
|
412
|
-
│ ├── registry.py # 模块安装
|
|
413
|
-
│ ├── templates.py # 模块模板
|
|
414
|
-
│ └── providers/ # LLM 后端
|
|
415
|
-
├── packages/
|
|
416
|
-
│ └── cli-node/ # Node.js CLI (npm: cognitive-modules-cli)
|
|
417
|
-
│ ├── src/ # TypeScript 源码
|
|
418
|
-
│ └── package.json
|
|
419
|
-
├── cognitive/modules/ # 内置模块(全部 v2.2)
|
|
420
|
-
├── coze-plugin/ # Coze 集成插件
|
|
421
|
-
├── tests/ # 单元测试
|
|
422
|
-
├── SPEC.md # v0.1 规范(历史)
|
|
423
|
-
├── SPEC-v2.2.md # v2.2 规范(最新)
|
|
424
|
-
├── INTEGRATION.md # 集成指南
|
|
425
|
-
└── cognitive-registry.json # 公共注册表
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
## 多平台支持
|
|
429
|
-
|
|
430
|
-
| 平台 | 包名 | 命令 | 安装 |
|
|
431
|
-
|------|------|------|------|
|
|
432
|
-
| Python | `cognitive-modules` | `cogn` | `pip install cognitive-modules` |
|
|
433
|
-
| Node.js | `cogn` | `cog` | `npm install -g cogn` 或 `npx cogn` |
|
|
434
|
-
|
|
435
|
-
两个版本共享相同的模块格式和 v2.2 规范。
|
|
436
|
-
|
|
437
|
-
## 文档
|
|
438
|
-
|
|
439
|
-
- [SPEC-v2.2.md](SPEC-v2.2.md) - v2.2 完整规范(Control/Data 分离、Tier、Overflow)
|
|
440
|
-
- [SPEC.md](SPEC.md) - v0.1 规范(含上下文哲学)
|
|
441
|
-
- [INTEGRATION.md](INTEGRATION.md) - Agent 工具集成指南
|
|
442
|
-
|
|
443
|
-
## License
|
|
444
|
-
|
|
445
|
-
MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|