kenaz 0.3.18 → 0.3.19
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/core/.claude/commands/agent-worker.md +1 -1
- package/core/.claude/commands/architect.md +1 -2
- package/core/.claude/commands/spec.md +1 -1
- package/core/.claude/commands//347/224/242/345/223/201.md +1 -1
- package/core/.claude/hooks/__tests__/task-1977-dedupe-guard.test.js +8 -8
- package/core/.claude/skills/architect_agent/SKILL.md +11 -92
- package/core/.claude/skills/assessment_agent/SKILL.md +0 -1
- package/core/.claude/skills/backend_engineer/SKILL.md +3 -6
- package/core/.claude/skills/code_reviewer/SKILL.md +1 -1
- package/core/.claude/skills/code_reviewer/patterns.yaml +1 -1
- package/core/.claude/skills/designer/SKILL.md +3 -6
- package/core/.claude/skills/dev_agent/SKILL.md +30 -491
- package/core/.claude/skills/developer/SKILL.md +3 -6
- package/core/.claude/skills/feature_agent/SKILL.md +3 -17
- package/core/.claude/skills/product_manager/SKILL.md +29 -1064
- package/core/.claude/skills/qa_engineer/SKILL.md +12 -17
- package/core/.claude/skills/spec_optimizer/SKILL.md +25 -275
- package/core/.claude/skills/sre_agent/SKILL.md +3 -6
- package/core/.collaboration/README.md +2 -3
- package/core/.collaboration/core/task-api.js +5 -138
- package/core/.collaboration/docs/CLI.md +0 -2
- package/core/.failure/INDEX.yaml +6 -40
- package/core/.failure/agent-execution/FAIL-013-search-cwd-drift-and-case-mismatch.yaml +1 -1
- package/core/.failure/tools/README.md +9 -227
- package/core/.formation/bifrost/launch.js +1 -6
- package/core/.formation/bifrost/launch.test.js +1 -1
- package/core/.formation/bifrost/shared/ansuz-boot-policy.js +3 -3
- package/core/.formation/bifrost/shared/ansuz-boot-policy.test.js +1 -2
- package/core/.formation/tools/__tests__/m1-hmap-convid.test.js +1 -124
- package/core/.formation/tools/dispatch.js +1 -1
- package/core/.formation/tools/loader.js +17 -140
- package/core/.formation/tools/post-complete.js +0 -31
- package/core/.rule/INDEX.yaml +0 -18
- package/core/.rule/general/agent-workflow.yaml +14 -164
- package/core/.rule/general/project-self-containment.yaml +8 -19
- package/core/.rule/general/rust-verify-target.yaml +6 -5
- package/core/.rule/general/synapse-code-intelligence.yaml +3 -3
- package/core/.specialist/Amelia/capability.yaml +12 -12
- package/core/.specialist/Amelia/workflow.yaml +2 -2
- package/core/.specialist/Ansuz/SYSTEM_DOC.md +20 -578
- package/core/.specialist/Ansuz/cognitive_principles.yaml +2 -3
- package/core/.specialist/Ansuz/concepts/boot_rules_summary.yaml +0 -1
- package/core/.specialist/Ansuz/concepts/deep_knowledge_pointers.yaml +1 -2
- package/core/.specialist/Ansuz/core.yaml +6 -108
- package/core/.specialist/Ansuz/guards/lesson_guards.yaml +0 -3
- package/core/.specialist/Ansuz/identity_contract.yaml +0 -1
- package/core/.specialist/Ansuz/knowledge.yaml +0 -4
- package/core/.specialist/Ansuz/rule.yaml +0 -1
- package/core/.specialist/Ansuz/tools/handoff-session-identity.test.js +6 -150
- package/core/.specialist/tests/runtime-discovery/README.md +1 -1
- package/core/.specialist/tools/__tests__/task-2374-usage-counter.test.js +1 -12
- package/core/.specialist/tools/prompt-files.test.js +1 -0
- package/core/.specialist/tools/task-bridge.js +1 -66
- package/core/.system/README.md +11 -552
- package/core/.system/collaboration/README.md +10 -174
- package/core/CLAUDE.md +1 -6
- package/core/KENAZ_CORE_VERSION +1 -1
- package/core/dev/scripts/js-yaml-resolution.test.js +1 -1
- package/core/dev/scripts/run-rust-tests.js +9 -45
- package/core/dev/scripts/rust-verify-worktree.js +4 -4
- package/core/dev/scripts/verify-target-dir.js +6 -6
- package/core/plugins/kenaz/INVENTORY.md +8 -8
- package/core/plugins/kenaz/commands/architect.md +1 -2
- package/core/plugins/kenaz/commands/spec.md +1 -1
- package/core/plugins/kenaz/commands//347/224/242/345/223/201.md +1 -1
- package/core/plugins/kenaz/guidance.md +1 -1
- package/core/plugins/kenaz/scripts/sync.js +1 -1
- package/core/plugins/kenaz/skills/architect_agent/SKILL.md +11 -92
- package/core/plugins/kenaz/skills/assessment_agent/SKILL.md +0 -1
- package/core/plugins/kenaz/skills/backend_engineer/SKILL.md +3 -6
- package/core/plugins/kenaz/skills/code_reviewer/SKILL.md +1 -1
- package/core/plugins/kenaz/skills/code_reviewer/patterns.yaml +1 -1
- package/core/plugins/kenaz/skills/designer/SKILL.md +3 -6
- package/core/plugins/kenaz/skills/dev_agent/SKILL.md +30 -491
- package/core/plugins/kenaz/skills/developer/SKILL.md +3 -6
- package/core/plugins/kenaz/skills/feature_agent/SKILL.md +3 -17
- package/core/plugins/kenaz/skills/product_manager/SKILL.md +29 -1064
- package/core/plugins/kenaz/skills/qa_engineer/SKILL.md +12 -17
- package/core/plugins/kenaz/skills/spec_optimizer/SKILL.md +25 -275
- package/core/plugins/kenaz/skills/sre_agent/SKILL.md +3 -6
- package/package.json +6 -6
- package/core/.claude/commands/archive.md +0 -24
- package/core/.claude/commands/init.md +0 -112
- package/core/.claude/commands/legacy_dev.md +0 -18
- package/core/.claude/commands/product-review.md +0 -131
- package/core/.claude/commands/strategy.md +0 -141
- package/core/.claude/commands/sunny.md +0 -1
- package/core/.claude/commands//347/224/242/345/223/201/346/252/242/350/246/226.md +0 -129
- package/core/.claude/commands//351/200/262/345/272/246.md +0 -15
- package/core/.claude/hooks/__tests__/substrate.test.js +0 -122
- package/core/.claude/hooks/_substrate-paths.js +0 -95
- package/core/.claude/hooks/context-check.js +0 -51
- package/core/.claude/hooks/fatigue-check.js +0 -52
- package/core/.claude/hooks/handoff-snapshot-on-commit.js +0 -154
- package/core/.claude/hooks/handoff-snapshot-on-question.js +0 -158
- package/core/.claude/hooks/handoff-staleness.js +0 -197
- package/core/.claude/hooks/jev-thalamus-context.js +0 -17
- package/core/.claude/hooks/jev-thalamus-context.test.js +0 -41
- package/core/.claude/hooks/lease-release.js +0 -119
- package/core/.claude/hooks/lease-touch.js +0 -96
- package/core/.claude/hooks/reflex-feedback.js +0 -5
- package/core/.claude/hooks/session-init.ps1 +0 -49
- package/core/.claude/hooks/sound-event.js +0 -70
- package/core/.claude/hooks/sound-event.sh +0 -37
- package/core/.claude/hooks/stream-delta.js +0 -169
- package/core/.claude/no-hooks.settings.json +0 -3
- package/core/.claude/skills/legacy_dev/SKILL.md +0 -202
- package/core/.claude/skills/sunny/SKILL.md +0 -74
- package/core/.collaboration/cli/commands/assign.js +0 -39
- package/core/.collaboration/cli/commands/claim.js +0 -33
- package/core/.collaboration/cli/commands/complete.js +0 -44
- package/core/.collaboration/cli/commands/create.js +0 -110
- package/core/.collaboration/cli/commands/get.js +0 -83
- package/core/.collaboration/cli/commands/index.js +0 -52
- package/core/.collaboration/cli/commands/list.js +0 -51
- package/core/.collaboration/cli/commands/lock.js +0 -45
- package/core/.collaboration/cli/commands/rebuild.js +0 -39
- package/core/.collaboration/cli/commands/search.js +0 -61
- package/core/.collaboration/cli/commands/stats.js +0 -61
- package/core/.collaboration/cli/commands/transfer.js +0 -41
- package/core/.collaboration/cli/commands/unlock.js +0 -48
- package/core/.collaboration/cli/formatters/help-formatter.js +0 -70
- package/core/.collaboration/cli/formatters/index.js +0 -7
- package/core/.collaboration/cli/task-cli.js +0 -46
- package/core/.collaboration/cli/utils/arg-parser.js +0 -74
- package/core/.collaboration/cli/utils/git-user.js +0 -25
- package/core/.collaboration/cli/utils/index.js +0 -9
- package/core/.collaboration/cli/utils/output.js +0 -10
- package/core/.collaboration/config/default.yaml +0 -189
- package/core/.collaboration/core/conflict-resolver.js +0 -461
- package/core/.collaboration/core/conflict-resolver.test.js +0 -389
- package/core/.collaboration/core/migrate-legacy.js +0 -260
- package/core/.collaboration/docs/API.md +0 -787
- package/core/.collaboration/docs/ARCHITECTURE.md +0 -596
- package/core/.collaboration/docs/FAQ.md +0 -695
- package/core/.collaboration/docs/MIGRATION.md +0 -804
- package/core/.collaboration/docs/examples/README.md +0 -320
- package/core/.collaboration/docs/examples/advanced-queries.js +0 -261
- package/core/.collaboration/docs/examples/basic-usage.js +0 -184
- package/core/.collaboration/docs/examples/team-workflow.js +0 -352
- package/core/.failure/agent-execution/FAIL-001-agent-no-output.yaml +0 -391
- package/core/.failure/agent-execution/FAIL-007-pm-lead-wrong-team-invocation.yaml +0 -0
- package/core/.failure/agent-execution/FAIL-010-phase0-poem-format-skipped.yaml +0 -28
- package/core/.failure/agent-execution/FAIL-010-skipping-cognitive-checkpoint-after-verification.yaml +0 -59
- package/core/.failure/agent-execution/FAIL-012-grep-shortcut-during-investigation.yaml +0 -85
- package/core/.failure/architecture/FAIL-006-python-version-compatibility.yaml +0 -445
- package/core/.failure/pipeline/FAIL-003-queue-pollution.yaml +0 -335
- package/core/.failure/pipeline/README.md +0 -95
- package/core/.failure/retired/FAIL-009-skipping-synapse-pulse-before-code-change.yaml +0 -49
- package/core/.failure/tools/USAGE_GUIDE.md +0 -323
- package/core/.failure/tools/check_failures.ps1 +0 -387
- package/core/.failure/tools/log_failure.ps1 +0 -474
- package/core/.formation/.episode-input.json +0 -10
- package/core/.formation/.merge-lock +0 -1
- package/core/.formation/lead.yaml +0 -118
- package/core/.formation/legacy.bak/designer.yaml +0 -57
- package/core/.formation/legacy.bak/pm.yaml +0 -57
- package/core/.formation/legacy.bak/qa.yaml +0 -57
- package/core/.formation/legacy.bak/review.yaml +0 -62
- package/core/.formation/legacy.bak/scheduler.yaml +0 -129
- package/core/.formation/legacy.bak/sre.yaml +0 -57
- package/core/.formation/role-map.yaml +0 -274
- package/core/.formation/roles/_shared/modules/code_review.yaml +0 -98
- package/core/.formation/roles/_shared/modules/security.yaml +0 -103
- package/core/.formation/roles/_shared/modules/testing.yaml +0 -14
- package/core/.formation/roles/backend/role.yaml +0 -93
- package/core/.formation/roles/code_reviewer/role.yaml +0 -102
- package/core/.formation/roles/database_optimizer/role.yaml +0 -107
- package/core/.formation/roles/designer/role.yaml +0 -66
- package/core/.formation/roles/developer/role.yaml +0 -75
- package/core/.formation/roles/frontend/role.yaml +0 -134
- package/core/.formation/roles/incident_response/role.yaml +0 -89
- package/core/.formation/roles/qa/role.yaml +0 -89
- package/core/.formation/roles/security/role.yaml +0 -87
- package/core/.formation/roles/sre/role.yaml +0 -66
- package/core/.formation/skills/coordinator.yaml +0 -52
- package/core/.formation/solo/diagnosis.yaml +0 -78
- package/core/.formation/solo/strategy.yaml +0 -121
- package/core/.formation/tests/hello.txt +0 -2
- package/core/.formation/tools/coordinator.js +0 -350
- package/core/.formation/tools/jev-correction.js +0 -214
- package/core/.formation/tools/jev-correction.test.js +0 -178
- package/core/.formation/tools/log-reader.js +0 -232
- package/core/.formation/tools/revert-daemon-state.js +0 -162
- package/core/.formation/tools/test-drift.js +0 -148
- package/core/.formation/unit/heimdall.yaml +0 -96
- package/core/.formation/unit/plan.yaml +0 -67
- package/core/.formation/unit/think.yaml +0 -58
- package/core/.kenaz/MUNINN_SNAPSHOT9_EPISODE.json +0 -32
- package/core/.kenaz/MUNINN_SNAPSHOT9_RUNE.json +0 -23
- package/core/.kenaz/MUNINN_SNAPSHOT9_SUMMARY.md +0 -89
- package/core/.kenaz/ash_TASK_1428-20260507.json +0 -14
- package/core/.kenaz/muninn_episode_write.ps1 +0 -17
- package/core/.kenaz/muninn_snapshot11_rune_candidates.md +0 -63
- package/core/.kenaz/muninn_snapshot1_rune_candidates.md +0 -49
- package/core/.kenaz/runes_TASK_1428.json +0 -57
- package/core/.kenaz/tmp_heimdall_proposal_8d3e392.json +0 -13
- package/core/.kenaz/tmp_props.json +0 -1
- package/core/.kenaz/tmp_sounddrop_t1_prompt.txt +0 -371
- package/core/.rule/MECHANIZED.md +0 -61
- package/core/.rule/general/cortex-memory-recall.yaml +0 -446
- package/core/.rule/general/pipeline.yaml +0 -246
- package/core/.rule/general/sunny-access-control.yaml +0 -60
- package/core/.rule/general/system-invariants.yaml +0 -231
- package/core/.rule/pipeline/PPL-002-completed-task-archival.yaml +0 -528
- package/core/.rule/pipeline/auto-update.yaml +0 -282
- package/core/.rule/pipeline/task-execution.yaml +0 -365
- package/core/.specialist/Ansuz/concepts/phase_protocol.yaml +0 -65
- package/core/.specialist/Ansuz/experiments/boot_ablation_replay.js +0 -197
- package/core/.specialist/Ansuz/tools/bootstrap-anchors.js +0 -289
- package/core/.specialist/Ansuz/workflow.yaml +0 -1225
- package/core/.specialist/experiments/rg_benchmark.js +0 -523
- package/core/.specialist/experiments/rg_benchmark_results.json +0 -27
- package/core/.specialist/tools/jev-optional-context.js +0 -107
- package/core/.specialist/tools/jev-optional-context.test.js +0 -152
- package/core/.specialist/tools/memory-action-log.js +0 -839
- package/core/.specialist/tools/phase-gate.js +0 -3534
- package/core/.specialist/tools/phase-gate.test.js +0 -85
- package/core/.specialist/tools/precompute-runner.js +0 -444
- package/core/.specialist/tools/rule-engine.js +0 -621
- package/core/.specialist/tools/task-bridge-jev.test.js +0 -170
- package/core/.synapse/memory-shared.json.sync +0 -1
- package/core/.system/agent-skills/README.md +0 -724
- package/core/.system/cli-tools/README.md +0 -724
- package/core/.system/cortex/MODULES.md +0 -1046
- package/core/.system/dashboard/FRONTEND.md +0 -812
- package/core/.system/dashboard/README.md +0 -737
- package/core/.system/failure/README.md +0 -723
- package/core/.system/formation/LEGACY_SKILLS.md +0 -974
- package/core/.system/formation/POST_COMPLETE.md +0 -602
- package/core/.system/formation/README.md +0 -1094
- package/core/.system/formation/TOOLS_REFERENCE.md +0 -1145
- package/core/.system/kenaz/README.md +0 -787
- package/core/.system/memory/README.md +0 -719
- package/core/.system/pipeline/README.md +0 -712
- package/core/.system/rule/README.md +0 -794
- package/core/.system/sunny/README.md +0 -476
- package/core/.system/sunny/RULES.json +0 -89
- package/core/.system/sunny/knowledge/INDEX.md +0 -37
- package/core/.system/sunny/knowledge/agent-teams-api.md +0 -0
- package/core/.system/sunny/knowledge/ansuz-specialist.md +0 -500
- package/core/.system/sunny/knowledge/claude-cli-spawn.md +0 -177
- package/core/.system/sunny/knowledge/collaboration-api.md +0 -925
- package/core/.system/sunny/teammates/README.md +0 -107
- package/core/.system/sunny/teammates/how_to_use.yaml +0 -101
- package/core/.system/sunny/teammates/tools/headless/launcher.js +0 -318
- package/core/.system/sunny/teammates/tools/powershell/launcher.js +0 -241
- package/core/.system/sunny/teammates/tools/powershell/start.bat +0 -50
- package/core/.system/sunny/teammates/tools/utils/env.js +0 -96
- package/core/.system/sunny/teammates/tools/utils/format-output.js +0 -329
- package/core/.system/sunny/tools.json +0 -101
- package/core/dev/scripts/cleanup-queue.js +0 -184
- package/core/dev/scripts/cleanup_queue.js +0 -86
- package/core/dev/scripts/legacy/README.md +0 -39
- package/core/dev/scripts/legacy/dev_agent_scheduler.ps1.bak +0 -536
- package/core/dev/scripts/legacy/multi_agent_scheduler.ps1.bak +0 -1978
- package/core/dev/scripts/matrix/CLI_README.md +0 -214
- package/core/dev/scripts/matrix/README.md +0 -310
- package/core/dev/scripts/matrix/package-lock.json +0 -4266
- package/core/dev/scripts/matrix/package.json +0 -55
- package/core/dev/scripts/matrix/src/abbreviations.ts +0 -295
- package/core/dev/scripts/matrix/src/cli/commands/convert.ts +0 -211
- package/core/dev/scripts/matrix/src/cli/commands/create.ts +0 -95
- package/core/dev/scripts/matrix/src/cli/commands/delete.ts +0 -102
- package/core/dev/scripts/matrix/src/cli/commands/list-tags.ts.wip +0 -140
- package/core/dev/scripts/matrix/src/cli/commands/manage-tags.ts.wip +0 -173
- package/core/dev/scripts/matrix/src/cli/commands/query.ts +0 -261
- package/core/dev/scripts/matrix/src/cli/commands/read.ts +0 -77
- package/core/dev/scripts/matrix/src/cli/commands/stats.ts.wip +0 -168
- package/core/dev/scripts/matrix/src/cli/commands/tokens.ts.wip +0 -126
- package/core/dev/scripts/matrix/src/cli/commands/update.ts +0 -147
- package/core/dev/scripts/matrix/src/cli/commands/validate.ts +0 -275
- package/core/dev/scripts/matrix/src/cli/index.ts +0 -350
- package/core/dev/scripts/matrix/src/cli/utils/file-handler.ts +0 -72
- package/core/dev/scripts/matrix/src/cli/utils/logger.ts +0 -65
- package/core/dev/scripts/matrix/src/index.ts +0 -62
- package/core/dev/scripts/matrix/src/indexer/tag-indexer.ts +0 -165
- package/core/dev/scripts/matrix/src/parser.ts +0 -281
- package/core/dev/scripts/matrix/src/serializer.ts +0 -151
- package/core/dev/scripts/matrix/src/validator.ts +0 -301
- package/core/dev/scripts/matrix/tests/abbreviations.test.ts +0 -122
- package/core/dev/scripts/matrix/tests/cli.test.ts +0 -177
- package/core/dev/scripts/matrix/tests/convert.test.ts +0 -143
- package/core/dev/scripts/matrix/tests/parser.test.ts +0 -203
- package/core/dev/scripts/matrix/tests/query.test.ts +0 -85
- package/core/dev/scripts/matrix/tests/serializer.test.ts +0 -197
- package/core/dev/scripts/matrix/tests/validate.test.ts +0 -141
- package/core/dev/scripts/matrix/tests/validator.test.ts +0 -167
- package/core/dev/scripts/matrix/tsconfig.json +0 -20
- package/core/dev/scripts/matrix/types/index.d.ts +0 -111
- package/core/dev/scripts/matrix/types/index.d.ts.map +0 -1
- package/core/dev/scripts/matrix/types/index.js +0 -8
- package/core/dev/scripts/matrix/types/index.js.map +0 -1
- package/core/dev/scripts/matrix/types/index.ts +0 -124
- package/core/dev/scripts/memory-usage-report.js +0 -152
- package/core/dev/scripts/probe/ansuz-scaffold-ablation.js +0 -579
- package/core/dev/scripts/probe/ansuz-scaffold-ablation.test.js +0 -244
- package/core/dev/scripts/probe/hook-latency-probe.js +0 -315
- package/core/dev/scripts/probe/hook-latency-probe.test.js +0 -105
- package/core/dev/scripts/probe/prediction-signal-auc.js +0 -483
- package/core/dev/scripts/probe/prediction-signal-auc.test.js +0 -200
- package/core/dev/scripts/test-pty-ws-tunnel.js +0 -229
- package/core/dev/scripts/validate_pipeline.js +0 -197
- package/core/dev/spikes/task2145-evidence-20261004/backend-log-excerpt.txt +0 -56
- package/core/dev/spikes/task2145-evidence-20261004/graph.shadow +0 -0
- package/core/dev/spikes/task2145-evidence-20261004/graph.wal +0 -0
- package/core/dev/spikes/task2145-evidence-20261004/graph_corrupt_suspect.marker +0 -1
- package/core/plugins/kenaz/commands/strategy.md +0 -141
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
# FAIL-006: Python 3.14 依赖兼容性问题
|
|
2
|
-
|
|
3
|
-
_meta:
|
|
4
|
-
id: "FAIL-006"
|
|
5
|
-
category: "architecture"
|
|
6
|
-
severity: "high"
|
|
7
|
-
date: "2026-02-07"
|
|
8
|
-
related_tasks: []
|
|
9
|
-
related_commits: ["b99f741"]
|
|
10
|
-
components:
|
|
11
|
-
- "dashboard/srv/app/cortex_service.py"
|
|
12
|
-
- "kenaz-cortex/"
|
|
13
|
-
tags:
|
|
14
|
-
- "python"
|
|
15
|
-
- "dependencies"
|
|
16
|
-
- "chromadb"
|
|
17
|
-
- "pydantic"
|
|
18
|
-
|
|
19
|
-
## 失败描述
|
|
20
|
-
|
|
21
|
-
**问题**:Cortex Service 启动失败,无法导入 ChromaDB 模块。
|
|
22
|
-
|
|
23
|
-
**预期行为**:
|
|
24
|
-
```bash
|
|
25
|
-
cd dashboard/srv/app
|
|
26
|
-
python cortex_service.py
|
|
27
|
-
# 应该成功启动 FastAPI 服务在 http://localhost:8000
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
**实际结果**:
|
|
31
|
-
```
|
|
32
|
-
pydantic.v1.errors.ConfigError: unable to infer type for attribute "chroma_server_nofile"
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**完整错误信息**:
|
|
36
|
-
```python
|
|
37
|
-
Traceback (most recent call last):
|
|
38
|
-
File "dashboard/srv/app/cortex_service.py", line 29, in <module>
|
|
39
|
-
from cortex.api.search import CortexSearch
|
|
40
|
-
File "kenaz-cortex/src/cortex/vectordb/chroma.py", line 19, in <module>
|
|
41
|
-
import chromadb
|
|
42
|
-
File ".../chromadb/config.py", line 120, in <module>
|
|
43
|
-
class Settings(BaseSettings): # Pydantic V1
|
|
44
|
-
...
|
|
45
|
-
pydantic.v1.errors.ConfigError: unable to infer type for attribute "chroma_server_nofile"
|
|
46
|
-
|
|
47
|
-
Warning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## 根本原因
|
|
51
|
-
|
|
52
|
-
### 技术分析
|
|
53
|
-
|
|
54
|
-
1. **Python 版本太新**:
|
|
55
|
-
- 当前环境:Python 3.14.2 (2025 年底发布)
|
|
56
|
-
- Pydantic V1 最高支持:Python 3.13
|
|
57
|
-
|
|
58
|
-
2. **依赖链问题**:
|
|
59
|
-
```
|
|
60
|
-
Cortex Service
|
|
61
|
-
↓ 导入
|
|
62
|
-
kenaz-cortex
|
|
63
|
-
↓ 导入
|
|
64
|
-
ChromaDB
|
|
65
|
-
↓ 依赖
|
|
66
|
-
Pydantic V1 (pydantic.v1)
|
|
67
|
-
↓ 不支持
|
|
68
|
-
Python 3.14
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
3. **Pydantic 迁移状态**:
|
|
72
|
-
- Pydantic V2 已支持 Python 3.14
|
|
73
|
-
- ChromaDB 尚未迁移到 Pydantic V2
|
|
74
|
-
- ChromaDB 仍在使用 `pydantic.v1` 兼容层
|
|
75
|
-
|
|
76
|
-
### 为什么会发生
|
|
77
|
-
|
|
78
|
-
- Python 3.14 引入了新的内部 API 变化
|
|
79
|
-
- Pydantic V1 的 Rust 扩展 (pyo3) 不支持 Python 3.14
|
|
80
|
-
- ChromaDB 作为第三方库,更新较慢
|
|
81
|
-
|
|
82
|
-
## 影响范围
|
|
83
|
-
|
|
84
|
-
### 受影响的模块
|
|
85
|
-
- ✅ **Cortex Service** (dashboard/srv/app/cortex_service.py) - 无法启动
|
|
86
|
-
- ✅ **kenaz-cortex** - 所有依赖 ChromaDB 的功能
|
|
87
|
-
- ✅ **Dashboard 集成测试** - 无法测试 Backend API
|
|
88
|
-
- ❌ **Dashboard 前端** - 不受影响(Next.js,独立运行)
|
|
89
|
-
|
|
90
|
-
### 受影响的功能
|
|
91
|
-
- Agent 使用追踪 API (无法启动服务)
|
|
92
|
-
- 文件索引 API (无法启动服务)
|
|
93
|
-
- 语义搜索 API (无法启动服务)
|
|
94
|
-
- Context 构建 API (无法启动服务)
|
|
95
|
-
|
|
96
|
-
### 潜在的连锁反应
|
|
97
|
-
- 所有依赖 Cortex Service 的集成测试失败
|
|
98
|
-
- 生产环境部署需要确保 Python 版本 <= 3.13
|
|
99
|
-
- CI/CD Pipeline 需要锁定 Python 版本
|
|
100
|
-
|
|
101
|
-
## 重现步骤
|
|
102
|
-
|
|
103
|
-
1. **环境准备**:
|
|
104
|
-
```bash
|
|
105
|
-
python --version # 输出: Python 3.14.2
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
2. **安装依赖**:
|
|
109
|
-
```bash
|
|
110
|
-
cd dashboard/srv
|
|
111
|
-
pip install -r app/requirements.txt
|
|
112
|
-
# FastAPI, Uvicorn 安装成功
|
|
113
|
-
# Pydantic 安装成功 (V2)
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
3. **安装 kenaz-cortex**:
|
|
117
|
-
```bash
|
|
118
|
-
cd ../../kenaz-cortex
|
|
119
|
-
pip install -e .
|
|
120
|
-
# ChromaDB 及其依赖安装成功
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
4. **启动服务**:
|
|
124
|
-
```bash
|
|
125
|
-
cd ../dashboard/srv/app
|
|
126
|
-
python cortex_service.py
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
5. **观察到的错误**:
|
|
130
|
-
```
|
|
131
|
-
pydantic.v1.errors.ConfigError: unable to infer type for attribute "chroma_server_nofile"
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## 解决方案
|
|
135
|
-
|
|
136
|
-
### 方案 1:降级 Python 到 3.13(推荐)✅
|
|
137
|
-
|
|
138
|
-
**优点**:
|
|
139
|
-
- 最简单、最直接
|
|
140
|
-
- 完全兼容现有依赖
|
|
141
|
-
- 无需修改代码
|
|
142
|
-
|
|
143
|
-
**步骤**:
|
|
144
|
-
|
|
145
|
-
#### Windows
|
|
146
|
-
```bash
|
|
147
|
-
# 1. 安装 Python 3.13
|
|
148
|
-
winget install Python.Python.3.13
|
|
149
|
-
|
|
150
|
-
# 2. 验证安装
|
|
151
|
-
py -3.13 --version # 应输出: Python 3.13.x
|
|
152
|
-
|
|
153
|
-
# 3. 重新安装依赖
|
|
154
|
-
py -3.13 -m pip install -r dashboard/srv/app/requirements.txt
|
|
155
|
-
cd kenaz-cortex
|
|
156
|
-
py -3.13 -m pip install -e .
|
|
157
|
-
|
|
158
|
-
# 4. 启动服务
|
|
159
|
-
py -3.13 dashboard/srv/app/cortex_service.py
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
#### Linux/macOS
|
|
163
|
-
```bash
|
|
164
|
-
# 使用 pyenv 管理 Python 版本
|
|
165
|
-
pyenv install 3.13.0
|
|
166
|
-
pyenv local 3.13.0
|
|
167
|
-
|
|
168
|
-
# 重新安装依赖
|
|
169
|
-
pip install -r dashboard/srv/app/requirements.txt
|
|
170
|
-
cd kenaz-cortex && pip install -e .
|
|
171
|
-
|
|
172
|
-
# 启动服务
|
|
173
|
-
python dashboard/srv/app/cortex_service.py
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### 方案 2:使用 Docker 隔离环境(生产推荐)🐳
|
|
177
|
-
|
|
178
|
-
**优点**:
|
|
179
|
-
- 环境隔离,避免版本冲突
|
|
180
|
-
- 可复现的构建
|
|
181
|
-
- 适合生产部署
|
|
182
|
-
|
|
183
|
-
**步骤**:
|
|
184
|
-
|
|
185
|
-
创建 `dashboard/srv/Dockerfile`:
|
|
186
|
-
```dockerfile
|
|
187
|
-
FROM python:3.13-slim
|
|
188
|
-
|
|
189
|
-
WORKDIR /app
|
|
190
|
-
|
|
191
|
-
# 安装系统依赖
|
|
192
|
-
RUN apt-get update && apt-get install -y git
|
|
193
|
-
|
|
194
|
-
# 复制依赖文件
|
|
195
|
-
COPY app/requirements.txt .
|
|
196
|
-
RUN pip install --no-cache-dir -r requirements.txt
|
|
197
|
-
|
|
198
|
-
# 安装 kenaz-cortex
|
|
199
|
-
COPY ../../kenaz-cortex /kenaz-cortex
|
|
200
|
-
RUN pip install -e /kenaz-cortex
|
|
201
|
-
|
|
202
|
-
# 复制应用代码
|
|
203
|
-
COPY app/ ./app/
|
|
204
|
-
|
|
205
|
-
EXPOSE 8000
|
|
206
|
-
|
|
207
|
-
CMD ["python", "app/cortex_service.py"]
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
创建 `dashboard/srv/docker-compose.yml`:
|
|
211
|
-
```yaml
|
|
212
|
-
version: '3.8'
|
|
213
|
-
|
|
214
|
-
services:
|
|
215
|
-
cortex-service:
|
|
216
|
-
build: .
|
|
217
|
-
ports:
|
|
218
|
-
- "8000:8000"
|
|
219
|
-
volumes:
|
|
220
|
-
- ../../kenaz-cortex:/kenaz-cortex:ro
|
|
221
|
-
- ./app:/app/app:ro
|
|
222
|
-
environment:
|
|
223
|
-
- LOG_LEVEL=info
|
|
224
|
-
restart: unless-stopped
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
启动:
|
|
228
|
-
```bash
|
|
229
|
-
cd dashboard/srv
|
|
230
|
-
docker-compose up -d
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
### 方案 3:虚拟环境(开发推荐)📦
|
|
234
|
-
|
|
235
|
-
**优点**:
|
|
236
|
-
- 不影响系统 Python
|
|
237
|
-
- 可以并行多个版本
|
|
238
|
-
|
|
239
|
-
**步骤**:
|
|
240
|
-
|
|
241
|
-
#### Windows
|
|
242
|
-
```bash
|
|
243
|
-
# 1. 创建虚拟环境(使用 Python 3.13)
|
|
244
|
-
py -3.13 -m venv venv-cortex
|
|
245
|
-
|
|
246
|
-
# 2. 激活虚拟环境
|
|
247
|
-
.\venv-cortex\Scripts\activate
|
|
248
|
-
|
|
249
|
-
# 3. 安装依赖
|
|
250
|
-
pip install -r dashboard/srv/app/requirements.txt
|
|
251
|
-
cd kenaz-cortex && pip install -e .
|
|
252
|
-
|
|
253
|
-
# 4. 启动服务
|
|
254
|
-
python dashboard/srv/app/cortex_service.py
|
|
255
|
-
|
|
256
|
-
# 5. 退出虚拟环境
|
|
257
|
-
deactivate
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
#### Linux/macOS
|
|
261
|
-
```bash
|
|
262
|
-
# 1. 创建虚拟环境
|
|
263
|
-
python3.13 -m venv venv-cortex
|
|
264
|
-
|
|
265
|
-
# 2. 激活虚拟环境
|
|
266
|
-
source venv-cortex/bin/activate
|
|
267
|
-
|
|
268
|
-
# 3. 安装依赖
|
|
269
|
-
pip install -r dashboard/srv/app/requirements.txt
|
|
270
|
-
cd kenaz-cortex && pip install -e .
|
|
271
|
-
|
|
272
|
-
# 4. 启动服务
|
|
273
|
-
python dashboard/srv/app/cortex_service.py
|
|
274
|
-
|
|
275
|
-
# 5. 退出虚拟环境
|
|
276
|
-
deactivate
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
### 方案 4:等待 ChromaDB 更新(不推荐)⏳
|
|
280
|
-
|
|
281
|
-
**说明**:等待 ChromaDB 完全迁移到 Pydantic V2 并支持 Python 3.14。
|
|
282
|
-
|
|
283
|
-
**时间线**:未知(可能需要数月)
|
|
284
|
-
|
|
285
|
-
**不推荐原因**:阻塞开发进度
|
|
286
|
-
|
|
287
|
-
## 预防措施
|
|
288
|
-
|
|
289
|
-
### 检查清单(开发环境设置)
|
|
290
|
-
|
|
291
|
-
- [ ] **检查 Python 版本**
|
|
292
|
-
```bash
|
|
293
|
-
python --version
|
|
294
|
-
# 应该是 3.13.x 或更早
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
- [ ] **锁定 Python 版本(项目级别)**
|
|
298
|
-
- 创建 `.python-version` 文件:
|
|
299
|
-
```
|
|
300
|
-
3.13
|
|
301
|
-
```
|
|
302
|
-
- 或使用 `pyproject.toml`:
|
|
303
|
-
```toml
|
|
304
|
-
[tool.poetry.dependencies]
|
|
305
|
-
python = ">=3.10,<3.14"
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
- [ ] **文档化 Python 版本要求**
|
|
309
|
-
- 在 `README.md` 中明确说明
|
|
310
|
-
- 在 `dashboard/srv/README.md` 中添加环境要求
|
|
311
|
-
|
|
312
|
-
- [ ] **CI/CD 锁定 Python 版本**
|
|
313
|
-
- GitHub Actions:
|
|
314
|
-
```yaml
|
|
315
|
-
- uses: actions/setup-python@v4
|
|
316
|
-
with:
|
|
317
|
-
python-version: '3.13'
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
### 规则建议
|
|
321
|
-
|
|
322
|
-
如果此失败模式重复出现,建议建立 `.rule/` 规则:
|
|
323
|
-
|
|
324
|
-
- **规则 ID**: `ARCH-001`
|
|
325
|
-
- **规则标题**: "Python 版本兼容性约束"
|
|
326
|
-
- **规则描述**: |
|
|
327
|
-
所有 Python 依赖必须在项目开始时锁定版本范围。
|
|
328
|
-
使用 pyproject.toml 或 .python-version 明确指定支持的 Python 版本。
|
|
329
|
-
CI/CD 必须使用与生产环境一致的 Python 版本。
|
|
330
|
-
- **严重程度**: `must`
|
|
331
|
-
|
|
332
|
-
## 教训与启示
|
|
333
|
-
|
|
334
|
-
### 1. 依赖管理的重要性
|
|
335
|
-
|
|
336
|
-
**教训**:新 Python 版本并不总是向后兼容第三方库。
|
|
337
|
-
|
|
338
|
-
**启示**:
|
|
339
|
-
- 在生产项目中,应该使用 LTS(Long Term Support)版本
|
|
340
|
-
- Python 3.13 是当前稳定版本,3.14 仍处于早期阶段
|
|
341
|
-
- 第三方库(如 ChromaDB)的更新滞后于 Python 新版本
|
|
342
|
-
|
|
343
|
-
### 2. 版本锁定的必要性
|
|
344
|
-
|
|
345
|
-
**教训**:未锁定 Python 版本导致环境不一致。
|
|
346
|
-
|
|
347
|
-
**启示**:
|
|
348
|
-
- 使用 `.python-version` 或 `pyproject.toml` 锁定版本
|
|
349
|
-
- 在 `README.md` 中明确环境要求
|
|
350
|
-
- CI/CD 必须使用固定版本
|
|
351
|
-
|
|
352
|
-
### 3. 测试环境与生产环境一致性
|
|
353
|
-
|
|
354
|
-
**教训**:开发环境使用最新 Python 可能导致生产问题。
|
|
355
|
-
|
|
356
|
-
**启示**:
|
|
357
|
-
- 开发、测试、生产环境应使用相同的 Python 版本
|
|
358
|
-
- 使用 Docker 确保环境一致性
|
|
359
|
-
- 定期检查依赖的兼容性
|
|
360
|
-
|
|
361
|
-
### 4. 依赖链的复杂性
|
|
362
|
-
|
|
363
|
-
**教训**:一个深层依赖(Pydantic V1)的限制影响整个服务。
|
|
364
|
-
|
|
365
|
-
**启示**:
|
|
366
|
-
- 选择依赖时考虑其维护状态和更新速度
|
|
367
|
-
- 关注依赖的依赖(transitive dependencies)
|
|
368
|
-
- 考虑使用更活跃维护的替代方案
|
|
369
|
-
|
|
370
|
-
### 5. 渐进式升级策略
|
|
371
|
-
|
|
372
|
-
**教训**:盲目升级到最新版本可能带来意外问题。
|
|
373
|
-
|
|
374
|
-
**启示**:
|
|
375
|
-
- 遵循 "不要在星期五升级" 原则
|
|
376
|
-
- 使用 N-1 版本策略(使用倒数第二个稳定版本)
|
|
377
|
-
- 升级前在隔离环境测试
|
|
378
|
-
|
|
379
|
-
## 验证修复
|
|
380
|
-
|
|
381
|
-
### 验证步骤
|
|
382
|
-
|
|
383
|
-
1. **确认 Python 版本**:
|
|
384
|
-
```bash
|
|
385
|
-
python --version
|
|
386
|
-
# 应输出: Python 3.13.x
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
2. **重新安装依赖**:
|
|
390
|
-
```bash
|
|
391
|
-
pip install -r dashboard/srv/app/requirements.txt
|
|
392
|
-
cd kenaz-cortex && pip install -e .
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
3. **启动 Cortex Service**:
|
|
396
|
-
```bash
|
|
397
|
-
python dashboard/srv/app/cortex_service.py
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
4. **验证服务运行**:
|
|
401
|
-
```bash
|
|
402
|
-
curl http://localhost:8000/
|
|
403
|
-
# 应返回: {"service": "Kenaz Cortex Service", "version": "2.0.0", "status": "running"}
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
5. **测试 API 端点**:
|
|
407
|
-
```bash
|
|
408
|
-
# 测试 Agent 使用记录
|
|
409
|
-
curl "http://localhost:8000/api/usage/agents?project_path=/path/to/project&limit=5"
|
|
410
|
-
|
|
411
|
-
# 测试文件索引
|
|
412
|
-
curl -X POST "http://localhost:8000/api/index/file?project_path=/path/to/project" \
|
|
413
|
-
-H "Content-Type: application/json" \
|
|
414
|
-
-d '{"file_path": "test.py"}'
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
### 成功标准
|
|
418
|
-
|
|
419
|
-
- ✅ Cortex Service 启动无错误
|
|
420
|
-
- ✅ 健康检查端点返回正确 JSON
|
|
421
|
-
- ✅ 所有新增 API 端点响应正常
|
|
422
|
-
- ✅ ChromaDB 可以正常导入和使用
|
|
423
|
-
|
|
424
|
-
## 相关链接
|
|
425
|
-
|
|
426
|
-
### 官方文档
|
|
427
|
-
- [Python 3.14 Release Notes](https://docs.python.org/3.14/whatsnew/3.14.html)
|
|
428
|
-
- [Pydantic V2 Migration Guide](https://docs.pydantic.dev/latest/migration/)
|
|
429
|
-
- [ChromaDB Documentation](https://docs.trychroma.com/)
|
|
430
|
-
|
|
431
|
-
### Issue Tracker
|
|
432
|
-
- [ChromaDB Pydantic V2 Migration](https://github.com/chroma-core/chroma/issues)
|
|
433
|
-
- [Pydantic Python 3.14 Support](https://github.com/pydantic/pydantic/issues)
|
|
434
|
-
|
|
435
|
-
### 类似问题
|
|
436
|
-
- FAIL-001: Agent 执行无输出问题
|
|
437
|
-
- FAIL-005: 背景 Agent 无写入权限
|
|
438
|
-
|
|
439
|
-
## 元数据
|
|
440
|
-
|
|
441
|
-
**创建日期**: 2026-02-07
|
|
442
|
-
**最后更新**: 2026-02-07
|
|
443
|
-
**状态**: Resolved (使用方案 1: 降级 Python)
|
|
444
|
-
**影响**: 10 个文件(Cortex Service + kenaz-cortex)
|
|
445
|
-
**修复时间**: ~15 分钟(安装 Python 3.13 + 重装依赖)
|