Repository navigation
Expand file tree
/
Copy patharchitecture.json
More file actions
259 lines (259 loc) · 6.29 KB
/
Copy patharchitecture.json
File metadata and controls
259 lines (259 loc) · 6.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
{
"modules": [
{
"id": "kimi-agent",
"name": "Kimi Agent (Rust engine)",
"source": "packages/kimi-agent/src",
"layer": "engine",
"deps": [],
"_depsNote": "Empty on purpose. This module used to declare kosong, minidb and protocol, but all three are TypeScript packages the Rust crate cannot import — Cargo.toml and src/**/*.rs reference none of them. The fiction also produced a phantom kimi-agent <-> kosong cycle once kosong's real (manifest-declared) edge on the engine was recorded. The engine's workspace relationships are all inbound: node-sdk, kimi-code and kosong depend on it.",
"apis": [
{
"protocol": "rpc",
"path": "execute_tool",
"description": "Execute a native tool call"
},
{
"protocol": "rpc",
"path": "generate",
"description": "Run LLM generation"
},
{
"protocol": "stdio",
"path": "acp",
"description": "ACP stdio protocol server"
}
],
"fingerprint": "84c1a3a69fec4656"
},
{
"id": "node-sdk",
"name": "Node SDK",
"source": "packages/node-sdk/src",
"layer": "sdk",
"deps": [
"kimi-agent",
"protocol",
"kaos",
"kosong",
"oauth",
"i18n-runtime"
],
"apis": [
{
"protocol": "npm",
"path": "@moonshot-ai/kimi-code-sdk",
"description": "Public SDK package"
}
],
"fingerprint": "bc8d900a1d9ebb79"
},
{
"id": "kimi-code",
"name": "CLI / TUI app",
"source": "apps/kimi-code/src",
"layer": "app",
"deps": [
"node-sdk",
"i18n-catalog",
"i18n-runtime",
"i18n-shared",
"oauth",
"telemetry",
"minidb",
"pi-tui",
"vis-server",
"kimi-agent"
],
"apis": [
{
"protocol": "cli",
"path": "main",
"description": "CLI entry point"
},
{
"protocol": "tui",
"path": "kimi-tui",
"description": "Terminal UI"
}
],
"fingerprint": "55272b4d4b0ab5e4"
},
{
"id": "kosong",
"name": "Kosong (LLM abstraction)",
"source": "packages/kosong/src",
"layer": "engine",
"deps": [
"i18n-runtime",
"kimi-agent"
],
"fingerprint": "e63139d6edb8b15f"
},
{
"id": "minidb",
"name": "MiniDB (embedded store)",
"source": "packages/minidb/src",
"layer": "engine",
"deps": [],
"fingerprint": "b47949f1af0cda9e"
},
{
"id": "protocol",
"name": "Protocol schemas",
"source": "packages/protocol/src",
"layer": "engine",
"deps": [
"transcript"
],
"fingerprint": "0c70d64afa76ca9e"
},
{
"id": "transcript",
"name": "Transcript rendering",
"source": "packages/transcript/src",
"layer": "engine",
"deps": [],
"fingerprint": "409cdc68189eeb2c"
},
{
"id": "kaos",
"name": "Kaos (execution env)",
"source": "packages/kaos/src",
"layer": "engine",
"deps": [],
"fingerprint": "41fdcd1d183c68b6"
},
{
"id": "oauth",
"name": "OAuth utilities",
"source": "packages/oauth/src",
"layer": "engine",
"deps": [
"kosong"
],
"fingerprint": "373e1a08705790b3"
},
{
"id": "i18n-catalog",
"name": "Locale catalog",
"source": "packages/i18n-catalog/src",
"layer": "shared",
"deps": [],
"fingerprint": "c0d4f75c944e72be"
},
{
"id": "i18n-runtime",
"name": "i18n runtime",
"source": "packages/i18n-runtime/src",
"layer": "shared",
"deps": [
"i18n-catalog",
"i18n-shared"
],
"fingerprint": "f3624b846424fa5d"
},
{
"id": "i18n-shared",
"name": "i18n shared",
"source": "packages/i18n-shared/src",
"layer": "shared",
"deps": [],
"fingerprint": "6e83f9e183f04819"
},
{
"id": "telemetry",
"name": "Telemetry",
"source": "packages/telemetry/src",
"layer": "shared",
"deps": [],
"fingerprint": "d0faf8d28e83f9c1"
},
{
"id": "pi-tui",
"name": "pi-tui (TUI framework)",
"source": "packages/pi-tui/src",
"layer": "shared",
"deps": [],
"fingerprint": "7cf5d72dfa631f32"
},
{
"id": "vis-server",
"name": "Vis server",
"source": "apps/vis/server/src",
"layer": "app",
"deps": [
"kosong",
"protocol"
],
"fingerprint": "198438615ef736bb"
},
{
"id": "vscode",
"name": "VS Code extension",
"source": "apps/vscode/src",
"layer": "app",
"deps": [
"node-sdk",
"oauth",
"telemetry",
"i18n-shared"
],
"fingerprint": "ecb40ce5b15d6298"
},
{
"id": "kimi-inspect",
"name": "Kimi inspector",
"source": "apps/kimi-inspect/src",
"layer": "app",
"deps": [
"transcript",
"i18n-shared"
],
"fingerprint": "242013f58d89f2c9"
}
],
"rules": {
"layerOrder": [
"app",
"sdk",
"engine",
"shared"
],
"forbid": [
{
"from": "engine",
"to": "app",
"reason": "engine 不依赖 app"
},
{
"from": "engine",
"to": "sdk",
"reason": "engine 不依赖 sdk"
},
{
"from": "shared",
"to": "app",
"reason": "shared 不依赖 app"
},
{
"from": "shared",
"to": "sdk",
"reason": "shared 不依赖 sdk"
},
{
"from": "shared",
"to": "engine",
"reason": "shared 不依赖 engine"
}
],
"acyclic": true
},
"exemptions": [
{
"from": "i18n-runtime",
"to": "kimi-agent",
"reason": "i18n-runtime 只在 try/catch 内 require napi 原生模块(packages/i18n-runtime/src/i18n.ts:69)拿更快的翻译路径,并有纯 JS 兜底(translatePure 走 flatMessages 扁平表,可用 KIMI_I18N_FORCE_JS 强制);浏览器与单文件打包下原生模块不存在,因此这是运行期可选的软依赖,不应记为构建期硬依赖。"
}
]
}