architecture-policy.yaml 110 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341
  1. version: 1
  2. # 存量模块先标记为 legacy;新模块或完成迁移的模块设置 managed: true。
  3. modules:
  4. # windows-runtime-host:由 architecture:adopt 登记
  5. - id: windows-runtime-host
  6. roots:
  7. - packages/services/src/windows-runtime-host
  8. managed: true
  9. requires: []
  10. publicEntrypoints:
  11. - packages/services/src/windows-runtime-host/index.ts
  12. - packages/services/src/windows-runtime-host/contract.ts
  13. layers:
  14. adapters: .
  15. owner: runtime
  16. - id: session-control
  17. roots: [packages/session-control/src, packages/session-control/vitest.config.ts]
  18. managed: true
  19. requires: []
  20. publicEntrypoints:
  21. - packages/session-control/src/contract.ts
  22. - packages/session-control/src/application/cli/index.ts
  23. - packages/session-control/src/application/app/index.ts
  24. - packages/session-control/src/testing/index.ts
  25. layers: {contract: contract, domain: domain, app: application}
  26. owner: conversation
  27. - id: app-control-protocol
  28. roots: [packages/shared/src/app-control]
  29. managed: true
  30. requires: [session-control]
  31. publicEntrypoints:
  32. - packages/shared/src/app-control/index.ts
  33. - packages/shared/src/app-control/contract.ts
  34. layers: {contract: .}
  35. owner: conversation
  36. - id: app-control
  37. roots: [packages/services/src/app-control]
  38. managed: true
  39. requires: [session-control, shared, services, session, project, project-storage, provider, remote-projects]
  40. publicEntrypoints:
  41. - packages/services/src/app-control/index.ts
  42. - packages/services/src/app-control/contract.ts
  43. - packages/services/src/app-control/discovery-directory.ts
  44. layers: {adapters: .}
  45. owner: conversation
  46. - id: cli-session-control-tools
  47. roots: [apps/zcode-cli/packages/core/src/tool/session-control]
  48. managed: true
  49. requires: [session-control, zcode-cli]
  50. publicEntrypoints:
  51. - apps/zcode-cli/packages/core/src/tool/session-control/contract.ts
  52. - apps/zcode-cli/packages/core/src/tool/session-control/index.ts
  53. layers: {app: .}
  54. owner: agent
  55. - id: cli-session-control-bootstrap
  56. roots: [apps/zcode-cli/packages/bootstrap/src/session-control]
  57. managed: true
  58. requires: [session-control, app-control-protocol, shared, zcode-cli, cli-session-control-tools]
  59. publicEntrypoints:
  60. - apps/zcode-cli/packages/bootstrap/src/session-control/contract.ts
  61. - apps/zcode-cli/packages/bootstrap/src/session-control/index.ts
  62. layers: {adapters: .}
  63. owner: agent
  64. - id: cli-session-control-runtime
  65. roots:
  66. - apps/zcode-cli/packages/bootstrap/src/cli-session-control
  67. - apps/zcode-cli/packages/bootstrap/tests/cli-session-control/vitest.config.ts
  68. managed: true
  69. requires: [session-control, zcode-cli, cli-active-transcript]
  70. publicEntrypoints:
  71. - apps/zcode-cli/packages/bootstrap/src/cli-session-control/contract.ts
  72. - apps/zcode-cli/packages/bootstrap/src/cli-session-control/index.ts
  73. layers: {adapters: .}
  74. owner: agent
  75. - id: cli-active-transcript
  76. roots: [apps/zcode-cli/packages/bootstrap/src/active-transcript]
  77. managed: true
  78. requires: [shared, zcode-cli]
  79. publicEntrypoints:
  80. - apps/zcode-cli/packages/bootstrap/src/active-transcript/index.ts
  81. - apps/zcode-cli/packages/bootstrap/src/active-transcript/contract.ts
  82. layers: {adapters: .}
  83. owner: conversation
  84. - id: cli-session-fork-commit
  85. roots: [apps/zcode-cli/packages/core/src/runtime/session-fork-commit]
  86. managed: true
  87. requires: [shared, zcode-cli]
  88. publicEntrypoints:
  89. - apps/zcode-cli/packages/core/src/runtime/session-fork-commit/index.ts
  90. - apps/zcode-cli/packages/core/src/runtime/session-fork-commit/contract.ts
  91. layers: {app: .}
  92. owner: conversation
  93. - id: cli-conversation-materialization
  94. roots: [apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/materialization]
  95. managed: true
  96. requires: [shared, zcode-cli]
  97. publicEntrypoints:
  98. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/materialization/index.ts
  99. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/materialization/contract.ts
  100. layers: {adapters: .}
  101. owner: conversation
  102. - id: app-control-navigation
  103. roots: [packages/desktop/src/app-control-navigation]
  104. managed: true
  105. requires: [app-control, shared, desktop, services]
  106. publicEntrypoints:
  107. - packages/desktop/src/app-control-navigation/contract.ts
  108. - packages/desktop/src/app-control-navigation/index.ts
  109. - packages/desktop/src/app-control-navigation/host.ts
  110. - packages/desktop/src/app-control-navigation/main.ts
  111. - packages/desktop/src/app-control-navigation/renderer.ts
  112. layers: {adapters: .}
  113. owner: conversation
  114. - id: rpc
  115. roots: [packages/rpc/src]
  116. managed: false
  117. - id: shared
  118. roots: [packages/shared/src]
  119. managed: false
  120. - id: provider
  121. roots: [packages/provider/src]
  122. managed: false
  123. - id: provider-node
  124. roots: [packages/provider-node/src]
  125. managed: false
  126. - id: services
  127. roots: [packages/services/src]
  128. managed: false
  129. - id: session
  130. roots: [packages/services/src/session]
  131. managed: false
  132. requires: [shared]
  133. publicEntrypoints:
  134. - packages/services/src/session/contract.ts
  135. - packages/services/src/session/taskIndexRepo.ts
  136. - packages/services/src/session/automationRepo.ts
  137. - packages/services/src/session/offPeakTaskRepo.ts
  138. - packages/services/src/session/tasksDatabase/migrations.ts
  139. - packages/services/src/session/tasksDatabase/prepared.ts
  140. owner: conversation
  141. - id: storage
  142. roots: [packages/services/src/storage]
  143. managed: true
  144. requires: [shared, rpc, services]
  145. publicEntrypoints: [packages/services/src/storage/contract.ts]
  146. layers: {domain: domain, app: app, adapters: adapters}
  147. layerOrder: [domain, app, adapters]
  148. owner: desktop-settings
  149. - id: client
  150. roots: [packages/client/src]
  151. managed: false
  152. - id: server
  153. roots: [packages/server/src]
  154. managed: false
  155. - id: zcode-server-cli
  156. roots: [packages/zcode-server-cli/src]
  157. managed: false
  158. - id: ui
  159. roots: [packages/ui/src]
  160. managed: false
  161. - id: web
  162. roots: [packages/web/src]
  163. managed: false
  164. - id: desktop
  165. roots: [packages/desktop/src]
  166. managed: false
  167. - id: formal-proof
  168. roots: [packages/formal-proof/src]
  169. managed: false
  170. - id: stream-animate
  171. roots: [packages/stream-animate/src]
  172. managed: false
  173. - id: e2e-report
  174. roots: [packages/e2e-report/src]
  175. managed: false
  176. # design-runtime:内置浏览器设计模式注入页面的运行时(docs/browser-use/2026-11-03-browser-design-mode-spec.md)
  177. - id: design-runtime
  178. roots: [packages/design-runtime/src]
  179. managed: true
  180. requires: []
  181. publicEntrypoints:
  182. - packages/design-runtime/src/index.ts
  183. - packages/design-runtime/src/contract.ts
  184. layers: {app: "."}
  185. owner: browser
  186. - id: zcode-cli
  187. roots: [apps/zcode-cli]
  188. managed: false
  189. # sqlite-migrations:由 architecture:adopt 登记
  190. # Agent runtime 退出诊断:desktop 稳定性上报与 Host 退出提示共用的纯函数判定。
  191. - id: agent-crash-diagnostic
  192. roots: [packages/shared/src/agent-crash-diagnostic]
  193. managed: true
  194. requires: []
  195. publicEntrypoints:
  196. - packages/shared/src/agent-crash-diagnostic/index.ts
  197. - packages/shared/src/agent-crash-diagnostic/contract.ts
  198. layers: {app: "."}
  199. owner: desktop
  200. - id: conversation-telemetry-engine
  201. roots: [packages/shared/src/conversation-telemetry]
  202. managed: true
  203. requires: [shared]
  204. publicEntrypoints:
  205. - packages/shared/src/conversation-telemetry/index.ts
  206. - packages/shared/src/conversation-telemetry/contract.ts
  207. - packages/shared/src/conversation-telemetry/messageTelemetry.ts
  208. - packages/shared/src/conversation-telemetry/providerTelemetryIdentity.ts
  209. - packages/shared/src/conversation-telemetry/remoteTelemetryEvent.ts
  210. layers: {app: "."}
  211. owner: conversation
  212. - id: conversation-telemetry-service
  213. roots: [packages/services/src/conversation-telemetry]
  214. managed: true
  215. requires: [shared, services, rpc, conversation-telemetry-engine]
  216. publicEntrypoints:
  217. - packages/services/src/conversation-telemetry/remoteConversationTelemetry.ts
  218. - packages/services/src/conversation-telemetry/contract.ts
  219. layers: {app: "."}
  220. owner: conversation
  221. - id: sqlite-migrations
  222. roots:
  223. - packages/shared/src/sqlite-migrations
  224. managed: true
  225. requires: []
  226. publicEntrypoints:
  227. - packages/shared/src/sqlite-migrations/index.ts
  228. - packages/shared/src/sqlite-migrations/contract.ts
  229. layers:
  230. adapters: .
  231. owner: persistence
  232. # project-storage:由 architecture:adopt 登记
  233. - id: project-storage
  234. roots:
  235. - packages/services/src/project-storage
  236. - packages/services/src/session/tasksDatabase
  237. managed: true
  238. requires:
  239. - shared
  240. - sqlite-migrations
  241. - services
  242. - session
  243. - task-groups
  244. publicEntrypoints:
  245. - packages/services/src/session/tasksDatabase/migrations.ts
  246. - packages/services/src/session/tasksDatabase/prepared.ts
  247. - packages/services/src/project-storage/index.ts
  248. - packages/services/src/project-storage/contract.ts
  249. - packages/services/src/project-storage/startup.ts
  250. - packages/services/src/project-storage/startup-entry.ts
  251. layers:
  252. adapters: .
  253. owner: conversation
  254. # project:由 architecture:adopt 登记
  255. - id: project
  256. roots:
  257. - packages/services/src/project
  258. managed: true
  259. requires: [project-storage, services, shared]
  260. publicEntrypoints:
  261. - packages/services/src/project/index.ts
  262. - packages/services/src/project/contract.ts
  263. layers:
  264. adapters: .
  265. owner: conversation
  266. # task-facts:由 architecture:adopt 登记
  267. - id: task-facts
  268. roots:
  269. - packages/services/src/task-facts
  270. managed: true
  271. requires: [shared]
  272. publicEntrypoints:
  273. - packages/services/src/task-facts/index.ts
  274. - packages/services/src/task-facts/contract.ts
  275. - packages/services/src/task-facts/repairSubagentTaskIndex.ts
  276. layers:
  277. app: .
  278. owner: conversation
  279. # project-sidebar:由 architecture:adopt 登记
  280. - id: project-sidebar
  281. roots:
  282. - packages/ui/src/project-sidebar
  283. managed: true
  284. requires:
  285. - resource-manager
  286. - services
  287. - shared
  288. - ui
  289. - conversation-workspace-target
  290. - web-remote-control-ui
  291. - remote-connection-flow
  292. - data-sync
  293. - managed-worktree-ui
  294. # 分组会话行复用同一张悬停卡片(docs/ui/task-row-hover-details.md)。
  295. - task-row-hover
  296. # 主导航挂 nav.primary 插槽组件(docs/plugins/extension-host.md §16.4)。
  297. - extension-slots
  298. publicEntrypoints:
  299. - packages/ui/src/project-sidebar/index.tsx
  300. - packages/ui/src/project-sidebar/contract.ts
  301. - packages/ui/src/project-sidebar/remote-project-connection.ts
  302. - packages/ui/src/project-sidebar/useSavedWorkflowProjectOptions.ts
  303. - packages/ui/src/project-sidebar/RemoteProjectMenu.tsx
  304. - packages/ui/src/project-sidebar/WorkspaceDragOverlay.tsx
  305. - packages/ui/src/project-sidebar/useRemoteProjectConnectionPresentation.ts
  306. - packages/ui/src/project-sidebar/OfflineRemoteProjectRows.tsx
  307. - packages/ui/src/project-sidebar/RemoteConversationDisconnected.tsx
  308. layers:
  309. contract: contract.ts
  310. ui: .
  311. owner: conversation
  312. # remote-projects:由 architecture:adopt 登记
  313. - id: remote-projects
  314. roots:
  315. - packages/services/src/remote-projects
  316. managed: true
  317. requires: [services, shared, project-storage]
  318. publicEntrypoints:
  319. - packages/services/src/remote-projects/index.ts
  320. - packages/services/src/remote-projects/contract.ts
  321. layers:
  322. adapters: .
  323. owner: conversation
  324. # startup-storage:由 architecture:adopt 登记
  325. - id: startup-storage
  326. roots:
  327. - packages/services/src/startup-storage
  328. managed: true
  329. requires:
  330. - sqlite-migrations
  331. publicEntrypoints:
  332. - packages/services/src/startup-storage/index.ts
  333. - packages/services/src/startup-storage/contract.ts
  334. layers:
  335. adapters: .
  336. owner: persistence
  337. # workspace-config-catalog:由 architecture:adopt 登记
  338. - id: workspace-config-catalog
  339. roots:
  340. - packages/ui/src/workspace-config-catalog
  341. managed: true
  342. requires: [services, shared, ui]
  343. publicEntrypoints:
  344. - packages/ui/src/workspace-config-catalog/index.ts
  345. - packages/ui/src/workspace-config-catalog/contract.ts
  346. layers:
  347. contract: contract.ts
  348. app: catalog.ts
  349. ui: .
  350. owner: configuration
  351. # project-catalog:由 architecture:adopt 登记
  352. - id: project-catalog
  353. roots:
  354. - packages/services/src/project-catalog
  355. managed: true
  356. requires: [project, remote-projects]
  357. publicEntrypoints:
  358. - packages/services/src/project-catalog/index.ts
  359. - packages/services/src/project-catalog/contract.ts
  360. layers:
  361. contract: contract.ts
  362. domain: selection-id.ts
  363. app: .
  364. owner: conversation
  365. # bot-project-runtime:由 architecture:adopt 登记
  366. - id: bot-project-runtime
  367. roots:
  368. - packages/services/src/bot-project-runtime
  369. managed: true
  370. requires: [services, shared, remote-projects]
  371. publicEntrypoints:
  372. - packages/services/src/bot-project-runtime/index.ts
  373. - packages/services/src/bot-project-runtime/contract.ts
  374. layers:
  375. contract: contract.ts
  376. app: .
  377. owner: conversation
  378. # project-workspace-navigation:由 architecture:adopt 登记
  379. - id: project-workspace-navigation
  380. roots:
  381. - packages/services/src/project-workspace-navigation
  382. managed: true
  383. requires: [project, project-catalog, remote-projects, shared]
  384. publicEntrypoints:
  385. - packages/services/src/project-workspace-navigation/index.ts
  386. - packages/services/src/project-workspace-navigation/contract.ts
  387. layers:
  388. contract: contract.ts
  389. app: .
  390. owner: conversation
  391. # conversation-workspace-target:由 architecture:adopt 登记
  392. - id: conversation-workspace-target
  393. roots:
  394. - packages/ui/src/conversation-workspace-target
  395. managed: true
  396. requires: [shared, ui]
  397. publicEntrypoints:
  398. - packages/ui/src/conversation-workspace-target/index.ts
  399. - packages/ui/src/conversation-workspace-target/contract.ts
  400. - packages/ui/src/conversation-workspace-target/purpose.ts
  401. - packages/ui/src/conversation-workspace-target/sourceIdentity.ts
  402. - packages/ui/src/conversation-workspace-target/workbenchTarget.ts
  403. - packages/ui/src/conversation-workspace-target/usePluginCreator.ts
  404. - packages/ui/src/conversation-workspace-target/PluginAddMenu.tsx
  405. layers:
  406. contract: contract.ts
  407. app: .
  408. owner: conversation
  409. - id: gen-ui-protocol
  410. roots: [packages/shared/src/gen-ui]
  411. managed: true
  412. requires: []
  413. publicEntrypoints: [packages/shared/src/gen-ui/index.ts, packages/shared/src/gen-ui/contract.ts]
  414. layers: {domain: "."}
  415. owner: conversation
  416. - id: gen-ui-service
  417. roots: [packages/services/src/gen-ui]
  418. managed: true
  419. requires: [services, shared, rpc, gen-ui-protocol, mcp-apps-protocol]
  420. publicEntrypoints: [packages/services/src/gen-ui/index.ts, packages/services/src/gen-ui/contract.ts, packages/services/src/gen-ui/node.ts]
  421. layers: {domain: domain, app: app, adapters: adapters}
  422. layerOrder: [domain, app, adapters]
  423. owner: conversation
  424. - id: gen-ui
  425. roots: [packages/ui/src/gen-ui]
  426. managed: true
  427. requires: [ui, services, gen-ui-service, gen-ui-protocol, mcp-apps-protocol, plugin-ui]
  428. publicEntrypoints: [packages/ui/src/gen-ui/index.ts, packages/ui/src/gen-ui/contract.ts, packages/ui/src/gen-ui/host.ts]
  429. layers: {domain: domain, app: app, adapters: adapters, ui: components}
  430. layerOrder: [domain, app, adapters, ui]
  431. owner: conversation
  432. # 插件 UI(MCP Apps 沙箱):模块边界见各模块 CONTRACT.md。
  433. - id: mcp-apps-protocol
  434. roots: [packages/shared/src/mcp-apps]
  435. managed: true
  436. requires: []
  437. publicEntrypoints: [packages/shared/src/mcp-apps/index.ts, packages/shared/src/mcp-apps/contract.ts, packages/shared/src/mcp-apps/hostContract.ts]
  438. layers:
  439. domain: "."
  440. owner: plugin
  441. - id: mcp-ui
  442. roots:
  443. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/mcp-ui
  444. - apps/zcode-cli/packages/core/src/runtime/methods/sample-model.ts
  445. managed: true
  446. requires: [zcode-cli, shared, mcp-apps-protocol]
  447. publicEntrypoints: [apps/zcode-cli/packages/bootstrap/src/zcode-protocol/mcp-ui/index.ts, apps/zcode-cli/packages/bootstrap/src/zcode-protocol/mcp-ui/contract.ts, apps/zcode-cli/packages/core/src/runtime/methods/sample-model.ts]
  448. layers:
  449. app: "."
  450. owner: plugin
  451. - id: plugin-ui-bridge
  452. roots: [packages/services/src/plugin-ui-bridge]
  453. managed: true
  454. requires: [services, shared, mcp-apps-protocol]
  455. publicEntrypoints: [packages/services/src/plugin-ui-bridge/index.ts, packages/services/src/plugin-ui-bridge/contract.ts, packages/services/src/plugin-ui-bridge/appToolsContract.ts, packages/services/src/plugin-ui-bridge/samplingContract.ts]
  456. layers:
  457. app: "."
  458. owner: plugin
  459. - id: plugin-sandbox
  460. roots:
  461. - packages/desktop/src/main/pluginSandbox
  462. - packages/desktop/src/host/pluginSandbox
  463. - packages/desktop/src/preload/pluginSandbox
  464. - packages/desktop/src/renderer/src/plugin-sandbox
  465. managed: true
  466. requires: [desktop, shared, mcp-apps-protocol, gen-ui-protocol]
  467. publicEntrypoints:
  468. [
  469. packages/desktop/src/host/pluginSandbox/index.ts,
  470. packages/desktop/src/host/pluginSandbox/contract.ts,
  471. packages/desktop/src/preload/pluginSandbox/hostBridge.ts,
  472. packages/desktop/src/main/pluginSandbox/index.ts,
  473. packages/desktop/src/main/pluginSandbox/contract.ts,
  474. # 页面兼容接口由宿主及其契约测试维护。
  475. packages/desktop/src/renderer/src/plugin-sandbox/aliasRuntime.ts,
  476. packages/desktop/src/renderer/src/plugin-sandbox/aliasApi.ts
  477. ]
  478. layers:
  479. adapters: "."
  480. owner: plugin
  481. - id: plugin-ui
  482. roots: [packages/ui/src/plugin-ui]
  483. managed: true
  484. requires: [ui, shared, services, mcp-apps-protocol, plugin-ui-bridge, plugin-sandbox]
  485. publicEntrypoints: [packages/ui/src/plugin-ui/index.ts, packages/ui/src/plugin-ui/contract.ts, packages/ui/src/plugin-ui/hostPrimitives.ts]
  486. layers:
  487. domain: domain
  488. app: app
  489. adapters: adapters
  490. ui: components
  491. layerOrder: [domain, app, adapters, ui]
  492. owner: plugin
  493. # remote-connection-flow:由 architecture:adopt 登记
  494. - id: remote-connection-flow
  495. roots:
  496. - packages/ui/src/remote-connection-flow
  497. managed: true
  498. requires:
  499. - shared
  500. - ui
  501. publicEntrypoints:
  502. - packages/ui/src/remote-connection-flow/index.ts
  503. - packages/ui/src/remote-connection-flow/contract.ts
  504. - packages/ui/src/remote-connection-flow/ui/RemoteConnectionProgress.tsx
  505. layers:
  506. app: .
  507. ui: ui
  508. layerOrder: [app, ui]
  509. owner: remote
  510. # project-workflow:由 architecture:adopt 登记
  511. - id: project-workflow
  512. roots:
  513. - packages/ui/src/project-workflow
  514. managed: true
  515. requires:
  516. - shared
  517. - ui
  518. - project-sidebar
  519. publicEntrypoints:
  520. - packages/ui/src/project-workflow/contract.ts
  521. - packages/ui/src/project-workflow/useWorkflowRunSave.ts
  522. - packages/ui/src/project-workflow/WorkflowRunSaveControls.tsx
  523. - packages/ui/src/project-workflow/WorkflowRunPaneSaveSlots.tsx
  524. layers:
  525. app: .
  526. owner: conversation
  527. # host-database-startup:由 architecture:adopt 登记
  528. - id: host-database-startup
  529. roots:
  530. - packages/desktop/src/host/database-startup
  531. managed: true
  532. requires:
  533. - project-storage
  534. - shared
  535. - desktop
  536. publicEntrypoints:
  537. - packages/desktop/src/host/database-startup/contract.ts
  538. - packages/desktop/src/host/database-startup/tasksStorageWorker.ts
  539. - packages/desktop/src/host/database-startup/hostDatabaseStartup.ts
  540. - packages/desktop/src/host/database-startup/storagePreparationProcesses.ts
  541. layers:
  542. adapters: .
  543. owner: persistence
  544. # cli-subagent-config:由 architecture:adopt 登记
  545. - id: cli-subagent-config
  546. roots:
  547. - apps/zcode-cli/packages/bootstrap/src/runtime-subagents
  548. - apps/zcode-cli/packages/bootstrap/tests/runtime-subagents
  549. managed: true
  550. requires:
  551. - shared
  552. publicEntrypoints:
  553. - apps/zcode-cli/packages/bootstrap/src/runtime-subagents/index.ts
  554. - apps/zcode-cli/packages/bootstrap/src/runtime-subagents/contract.ts
  555. layers:
  556. domain: .
  557. owner: agent
  558. # cli-session-execution:由 architecture:adopt 登记
  559. - id: cli-session-execution
  560. roots:
  561. - apps/zcode-cli/packages/bootstrap/src/session-execution
  562. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/interaction-response-race.ts
  563. - apps/zcode-cli/packages/bootstrap/tests/session-execution
  564. - apps/zcode-cli/packages/core/src/runtime/permission-full-access.ts
  565. - apps/zcode-cli/packages/adapters/src/storage/session-store/repositories/permission-full-access.ts
  566. - apps/zcode-cli/packages/contracts/src/interfaces/permission-full-access.ts
  567. - apps/zcode-cli/packages/core/tests/permission-full-access.test.ts
  568. - apps/zcode-cli/packages/bootstrap/tests/draft-permission-full-access.test.ts
  569. managed: true
  570. requires:
  571. - shared
  572. - zcode-cli
  573. publicEntrypoints:
  574. - apps/zcode-cli/packages/bootstrap/src/session-execution/index.ts
  575. - apps/zcode-cli/packages/bootstrap/src/session-execution/contract.ts
  576. - apps/zcode-cli/packages/core/src/runtime/permission-full-access.ts
  577. layers:
  578. app: .
  579. owner: conversation
  580. # web-remote-relay:由 architecture:adopt 登记
  581. - id: web-remote-relay
  582. roots:
  583. - packages/shared/src/web-remote-relay
  584. managed: true
  585. requires: []
  586. publicEntrypoints:
  587. - packages/shared/src/web-remote-relay/index.ts
  588. - packages/shared/src/web-remote-relay/contract.ts
  589. layers:
  590. contract: contract.ts
  591. domain: domain
  592. adapters: .
  593. owner: remote
  594. layerOrder:
  595. - contract
  596. - domain
  597. - app
  598. - adapters
  599. - ui
  600. # desktop-web-remote-relay:由 architecture:adopt 登记
  601. - id: desktop-web-remote-relay
  602. roots:
  603. - packages/desktop/src/main/web-remote-relay
  604. managed: true
  605. requires:
  606. - client
  607. - desktop
  608. - shared
  609. - web-remote-relay
  610. publicEntrypoints:
  611. - packages/desktop/src/main/web-remote-relay/index.ts
  612. - packages/desktop/src/main/web-remote-relay/contract.ts
  613. layers:
  614. contract: contract.ts
  615. adapters: .
  616. owner: remote
  617. layerOrder:
  618. - contract
  619. - domain
  620. - app
  621. - adapters
  622. - ui
  623. # mobile-ui:由 architecture:adopt 登记
  624. - id: mobile-ui
  625. roots:
  626. - packages/ui/src/components/mobile-ui
  627. managed: true
  628. requires:
  629. - ui
  630. publicEntrypoints:
  631. - packages/ui/src/components/mobile-ui/index.ts
  632. - packages/ui/src/components/mobile-ui/contract.ts
  633. - packages/ui/src/components/mobile-ui/DevicePlatformIcon.tsx
  634. - packages/ui/src/components/mobile-ui/ZCodeAppLogo.tsx
  635. - packages/ui/src/components/mobile-ui/bottom-sheet.tsx
  636. layers:
  637. contract: contract.ts
  638. ui: .
  639. owner: remote
  640. layerOrder:
  641. - contract
  642. - domain
  643. - app
  644. - adapters
  645. - ui
  646. # web-remote-control-ui:由 architecture:adopt 登记
  647. - id: web-remote-control-ui
  648. roots:
  649. - packages/ui/src/web-remote-control
  650. managed: true
  651. requires:
  652. - mobile-ui
  653. - services
  654. - shared
  655. - ui
  656. publicEntrypoints:
  657. - packages/ui/src/web-remote-control/index.ts
  658. - packages/ui/src/web-remote-control/contract.ts
  659. - packages/ui/src/web-remote-control/WebRemoteControlDeviceHeader.tsx
  660. - packages/ui/src/web-remote-control/app/useWebRemoteControlAuthSync.ts
  661. layers:
  662. contract: contract.ts
  663. domain: domain
  664. app: app
  665. ui: .
  666. owner: remote
  667. layerOrder:
  668. - contract
  669. - domain
  670. - app
  671. - adapters
  672. - ui
  673. # web-remote-control:由 architecture:adopt 登记
  674. - id: web-remote-control
  675. roots:
  676. - packages/web/src/web-remote-control
  677. managed: true
  678. requires:
  679. - client
  680. - mobile-ui
  681. - shared
  682. - ui
  683. - web
  684. - web-auth
  685. - web-remote-relay
  686. publicEntrypoints:
  687. - packages/web/src/web-remote-control/index.ts
  688. - packages/web/src/web-remote-control/contract.ts
  689. - packages/web/src/web-remote-control/views.ts
  690. - packages/web/src/web-remote-control/adapters/webRemoteControlThemeSeed.ts
  691. layers:
  692. contract: contracts
  693. domain: domain
  694. app: app
  695. adapters: adapters
  696. ui: ui
  697. owner: remote
  698. layerOrder:
  699. - contract
  700. - domain
  701. - app
  702. - adapters
  703. - ui
  704. # 保留既有源码位置;精确登记源文件,不扩大到整个 CLI 或 handlers 目录。
  705. - id: cli-arguments
  706. roots:
  707. - apps/zcode-cli/packages/cli/src/argument-parsing
  708. - apps/zcode-cli/packages/cli/src/arguments.ts
  709. - apps/zcode-cli/packages/cli/tests/argument-parsing
  710. managed: true
  711. requires: []
  712. publicEntrypoints:
  713. - apps/zcode-cli/packages/cli/src/arguments.ts
  714. - apps/zcode-cli/packages/cli/src/argument-parsing/contract.ts
  715. layers: {adapters: .}
  716. owner: agent
  717. - id: workflow-tool-entrypoints
  718. roots:
  719. - apps/zcode-cli/packages/core/src/tool/workflow-entrypoints
  720. - apps/zcode-cli/packages/core/src/tool/handlers/amend-workflow.ts
  721. - apps/zcode-cli/packages/core/src/tool/handlers/list-models.ts
  722. - apps/zcode-cli/packages/core/src/tool/handlers/fill-workflow-hole.ts
  723. - apps/zcode-cli/packages/core/tests/workflow-entrypoints
  724. managed: true
  725. requires: [zcode-cli]
  726. publicEntrypoints:
  727. - apps/zcode-cli/packages/core/src/tool/handlers/amend-workflow.ts
  728. - apps/zcode-cli/packages/core/src/tool/handlers/list-models.ts
  729. - apps/zcode-cli/packages/core/src/tool/handlers/fill-workflow-hole.ts
  730. - apps/zcode-cli/packages/core/src/tool/workflow-entrypoints/contract.ts
  731. layers: {app: .}
  732. owner: agent
  733. - id: tool-result-settlement
  734. roots:
  735. - apps/zcode-cli/packages/core/src/runtime/tool-result-settlement
  736. - apps/zcode-cli/packages/core/src/runtime/methods/tool-result-settlement.ts
  737. - apps/zcode-cli/packages/core/tests/tool-result-settlement
  738. managed: true
  739. requires: [zcode-cli, session-features]
  740. publicEntrypoints:
  741. - apps/zcode-cli/packages/core/src/runtime/methods/tool-result-settlement.ts
  742. - apps/zcode-cli/packages/core/src/runtime/tool-result-settlement/contract.ts
  743. layers: {app: .}
  744. owner: agent
  745. # remote-input-prediction:手机远控输入预测(v4 线格式、Host 侧开关、CLI 只读查询)。
  746. # 规格:docs/web-remote-control/mobile-input-prediction.md。
  747. - id: remote-input-prediction
  748. roots:
  749. - packages/shared/src/zcode-protocol-v4/input-prediction
  750. - packages/services/src/zcode-agent/inputPredictionSwitch.ts
  751. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/input-prediction-handler.ts
  752. - apps/zcode-cli/packages/core/src/runtime/methods/input-prediction-sidecar.ts
  753. managed: true
  754. requires: [shared, zcode-cli]
  755. publicEntrypoints:
  756. - packages/shared/src/zcode-protocol-v4/input-prediction/contract.ts
  757. - packages/services/src/zcode-agent/inputPredictionSwitch.ts
  758. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/input-prediction-handler.ts
  759. - apps/zcode-cli/packages/core/src/runtime/methods/input-prediction-sidecar.ts
  760. layers: {app: .}
  761. owner: remote
  762. # context-composition:context 组成(扩展进程 P1):v4 线格式、CLI 分类/预演/修订号/协议处理、App 侧查询与通知。
  763. # 规格:apps/zcode-cli/docs/design/v2/model/context-composition.md。
  764. - id: context-composition
  765. roots:
  766. - packages/shared/src/zcode-protocol-v4/context-composition
  767. - apps/zcode-cli/packages/core/src/runtime/context-composition
  768. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/context-composition
  769. - packages/services/src/zcode-agent/contextCompositionClient.ts
  770. - apps/zcode-cli/packages/core/tests/context-composition
  771. - apps/zcode-cli/packages/bootstrap/tests/context-composition
  772. managed: true
  773. requires: [rpc, services, shared, tool-discovery, zcode-cli]
  774. publicEntrypoints:
  775. - packages/shared/src/zcode-protocol-v4/context-composition/contract.ts
  776. - apps/zcode-cli/packages/core/src/runtime/context-composition/index.ts
  777. # runtime 内部的变更点直接引用 state.ts:经 index 会形成 context-refresh → query → preview → context-refresh 的环。
  778. - apps/zcode-cli/packages/core/src/runtime/context-composition/state.ts
  779. - apps/zcode-cli/packages/core/src/runtime/context-composition/query.ts
  780. - apps/zcode-cli/packages/core/src/runtime/context-composition/classifier.ts
  781. - apps/zcode-cli/packages/core/src/runtime/context-composition/items.ts
  782. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/context-composition/index.ts
  783. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/context-composition/tracker.ts
  784. - packages/services/src/zcode-agent/contextCompositionClient.ts
  785. layers: {app: .}
  786. owner: agent
  787. # plugin-host-queries:扩展进程 P2 的插件宿主查询——敏感选项私有存储、plugins/readUserOptions、
  788. # plugins/mentionItems 的线格式、CLI 实现与 App 侧客户端。规格:apps/zcode-cli/docs/design/v2/plugin-compat.md
  789. # 「Sensitive Option Storage」「Composer Mention Items」。
  790. - id: plugin-host-queries
  791. roots:
  792. - packages/shared/src/zcode-protocol/plugin-host-queries
  793. - apps/zcode-cli/packages/adapters/src/config/plugin-secrets.adapter.ts
  794. - apps/zcode-cli/packages/bootstrap/src/plugin-secrets.ts
  795. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-user-options.ts
  796. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-mention-items.ts
  797. - packages/services/src/zcode-agent/pluginHostQueriesClient.ts
  798. managed: true
  799. requires: [services, shared, zcode-cli]
  800. publicEntrypoints:
  801. - packages/shared/src/zcode-protocol/plugin-host-queries/contract.ts
  802. - apps/zcode-cli/packages/adapters/src/config/plugin-secrets.adapter.ts
  803. - apps/zcode-cli/packages/bootstrap/src/plugin-secrets.ts
  804. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-user-options.ts
  805. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-mention-items.ts
  806. - packages/services/src/zcode-agent/pluginHostQueriesClient.ts
  807. layers: {app: .}
  808. owner: plugin
  809. # remote-resident-rows-range:rowsRange 只读热会话(residency="resident-only")的 Host 侧执行端能力确认,
  810. # 供手机任务列表预加载;旧 CLI 不认识该参数时 Host 直接拒绝,不触发冷恢复。
  811. - id: remote-resident-rows-range
  812. roots:
  813. - packages/services/src/zcode-agent/resident-rows-range
  814. managed: true
  815. requires: [shared, services]
  816. publicEntrypoints:
  817. - packages/services/src/zcode-agent/resident-rows-range/contract.ts
  818. layers: {app: .}
  819. owner: remote
  820. # 官方市场工具只在接到支持卡片的输入时开放,目录排序和安装由 CLI 所有。
  821. - id: agent-plugin-discovery
  822. roots:
  823. - apps/zcode-cli/packages/bootstrap/src/plugin-discovery
  824. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-discovery-port.ts
  825. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-install-interaction.ts
  826. - apps/zcode-cli/packages/contracts/src/interfaces/plugin-discovery.port.ts
  827. - apps/zcode-cli/packages/contracts/src/tools/plugin-discovery.ts
  828. - apps/zcode-cli/packages/core/src/tool/handlers/plugin-discovery.ts
  829. managed: true
  830. requires: [shared, zcode-cli, plugin-install-interaction]
  831. publicEntrypoints:
  832. - apps/zcode-cli/packages/bootstrap/src/plugin-discovery/contract.ts
  833. - apps/zcode-cli/packages/bootstrap/src/plugin-discovery/subscription.ts
  834. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-discovery-port.ts
  835. - apps/zcode-cli/packages/contracts/src/interfaces/plugin-discovery.port.ts
  836. - apps/zcode-cli/packages/contracts/src/tools/plugin-discovery.ts
  837. - apps/zcode-cli/packages/core/src/tool/handlers/plugin-discovery.ts
  838. layers: {app: .}
  839. owner: plugin
  840. # 卡片只投影协议载荷并提交选择;不拥有安装或重载状态。
  841. - id: plugin-install-interaction
  842. roots:
  843. - packages/shared/src/plugin-discovery
  844. - packages/shared/src/plugin-store-visibility.ts
  845. - packages/shared/src/zcode-protocol-v4/pluginInstall.ts
  846. - packages/ui/src/v4/PluginInstallCard.tsx
  847. - packages/ui/src/settings/PluginAutoRecommendationSetting.tsx
  848. managed: true
  849. requires: [shared, ui]
  850. publicEntrypoints:
  851. - packages/shared/src/plugin-discovery/contract.ts
  852. - packages/shared/src/plugin-store-visibility.ts
  853. - packages/shared/src/zcode-protocol-v4/pluginInstall.ts
  854. - packages/ui/src/v4/PluginInstallCard.tsx
  855. - packages/ui/src/settings/PluginAutoRecommendationSetting.tsx
  856. layers: {app: .}
  857. owner: plugin
  858. - id: tool-discovery
  859. roots:
  860. - apps/zcode-cli/packages/core/src/tool/search
  861. - apps/zcode-cli/packages/core/src/tool/handlers/tool-search.ts
  862. - apps/zcode-cli/packages/core/src/tool/handlers/deferred-tool-call.ts
  863. - apps/zcode-cli/packages/contracts/src/tools/tool-search.ts
  864. - apps/zcode-cli/packages/core/tests/tool-discovery
  865. managed: true
  866. requires: [zcode-cli]
  867. publicEntrypoints:
  868. - apps/zcode-cli/packages/core/src/tool/search/contract.ts
  869. - apps/zcode-cli/packages/core/src/tool/search/exposure.ts
  870. - apps/zcode-cli/packages/core/src/tool/search/history.ts
  871. - apps/zcode-cli/packages/core/src/tool/search/search.ts
  872. - apps/zcode-cli/packages/core/src/tool/search/description.ts
  873. - apps/zcode-cli/packages/core/src/tool/search/local-projection.ts
  874. - apps/zcode-cli/packages/core/src/tool/handlers/tool-search.ts
  875. - apps/zcode-cli/packages/core/src/tool/handlers/deferred-tool-call.ts
  876. - apps/zcode-cli/packages/contracts/src/tools/tool-search.ts
  877. layers: {app: .}
  878. owner: agent
  879. # node-repl-call-ledger:node_repl 结果里可信事实的唯一来源(apps/zcode-cli/docs/design/v2/tool/20-node-repl-call-ledger.md)
  880. - id: node-repl-call-ledger
  881. roots:
  882. - apps/zcode-cli/packages/node-repl-host/src/call-ledger
  883. - apps/zcode-cli/packages/node-repl-host/test/call-ledger
  884. managed: true
  885. requires: [zcode-cli]
  886. publicEntrypoints:
  887. - apps/zcode-cli/packages/node-repl-host/src/call-ledger/contract.ts
  888. layers: {adapters: .}
  889. owner: agent
  890. - id: session-features
  891. roots:
  892. - apps/zcode-cli/packages/core/src/runtime/session-features
  893. - apps/zcode-cli/packages/core/tests/session-features
  894. managed: true
  895. requires: [zcode-cli]
  896. publicEntrypoints:
  897. - apps/zcode-cli/packages/core/src/runtime/session-features/contract.ts
  898. layers: {app: .}
  899. owner: agent
  900. - id: provider-tool-rounds
  901. roots:
  902. - apps/zcode-cli/packages/core/src/runtime/provider-tool-rounds
  903. - apps/zcode-cli/packages/core/tests/provider-tool-rounds
  904. managed: true
  905. requires: [zcode-cli]
  906. publicEntrypoints:
  907. - apps/zcode-cli/packages/core/src/runtime/provider-tool-rounds/contract.ts
  908. layers: {app: .}
  909. owner: agent
  910. - id: provider-builtin-tool-compat
  911. roots:
  912. - apps/zcode-cli/packages/adapters/src/model/provider-builtin-tool-compat
  913. - apps/zcode-cli/packages/adapters/tests/provider-builtin-tool-compat
  914. managed: true
  915. requires: []
  916. publicEntrypoints:
  917. - apps/zcode-cli/packages/adapters/src/model/provider-builtin-tool-compat/contract.ts
  918. layers: {adapters: .}
  919. owner: agent
  920. - id: conversation-quote-context
  921. roots:
  922. - apps/zcode-cli/packages/core/src/runtime/conversation-quote-context
  923. - apps/zcode-cli/packages/core/src/runtime/helpers/conversation-quotes.ts
  924. - apps/zcode-cli/packages/core/tests/conversation-quote-context
  925. managed: true
  926. requires: [zcode-cli]
  927. publicEntrypoints:
  928. - apps/zcode-cli/packages/core/src/runtime/conversation-quote-context/contract.ts
  929. - apps/zcode-cli/packages/core/src/runtime/helpers/conversation-quotes.ts
  930. layers: {domain: .}
  931. owner: agent
  932. - id: tool-search-comparison
  933. roots:
  934. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison-contract
  935. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison.ts
  936. - apps/zcode-cli/tools/prompt-trajectory/tests/tool-search-comparison
  937. managed: true
  938. requires: [zcode-cli]
  939. publicEntrypoints:
  940. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison-contract/contract.ts
  941. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison.ts
  942. layers: {domain: .}
  943. owner: agent
  944. - id: window-topic-resource-relay
  945. roots:
  946. - packages/desktop/src/host/topic-resource-relay
  947. - packages/desktop/src/host/windowTopicResourceRelay.ts
  948. - packages/desktop/test/topic-resource-relay
  949. managed: true
  950. requires: [services, shared]
  951. publicEntrypoints:
  952. - packages/desktop/src/host/topic-resource-relay/contract.ts
  953. - packages/desktop/src/host/windowTopicResourceRelay.ts
  954. layers: {adapters: .}
  955. owner: desktop
  956. - id: channel-reply-tool
  957. roots:
  958. - apps/zcode-cli/packages/core/src/tool/channel-reply
  959. - apps/zcode-cli/packages/core/src/tool/handlers/reply-to-channel.ts
  960. - apps/zcode-cli/packages/core/tests/channel-reply
  961. managed: true
  962. requires: [shared, zcode-cli]
  963. publicEntrypoints:
  964. - apps/zcode-cli/packages/core/src/tool/handlers/reply-to-channel.ts
  965. - apps/zcode-cli/packages/core/src/tool/channel-reply/contract.ts
  966. layers: {app: .}
  967. owner: agent
  968. # topic-resource-tool:ReadSessionContext(topic, attachment) 拆出的话题资源工具(会话工具设计 0.8)。
  969. - id: topic-resource-tool
  970. roots:
  971. - apps/zcode-cli/packages/core/src/tool/topic-resource
  972. - apps/zcode-cli/packages/core/src/tool/handlers/read-topic-resource.ts
  973. managed: true
  974. requires: [shared, zcode-cli]
  975. publicEntrypoints:
  976. - apps/zcode-cli/packages/core/src/tool/handlers/read-topic-resource.ts
  977. - apps/zcode-cli/packages/core/src/tool/topic-resource/contract.ts
  978. layers: {app: .}
  979. owner: agent
  980. # bot-topic-history-attachment:登记既有话题历史附件构造,提示改指向 ReadTopicResource 时纳管。
  981. - id: bot-topic-history-attachment
  982. roots:
  983. - packages/services/src/bots/topic-history-attachment
  984. - packages/services/src/bots/topicHistoryAttachment.ts
  985. managed: true
  986. requires: [shared]
  987. publicEntrypoints:
  988. - packages/services/src/bots/topicHistoryAttachment.ts
  989. - packages/services/src/bots/topic-history-attachment/contract.ts
  990. layers: {app: .}
  991. owner: conversation
  992. # composer-toolbar-layout:登记既有 DOM 布局入口,不改调用路径。
  993. - id: composer-toolbar-layout
  994. roots:
  995. - packages/ui/src/composer-toolbar-layout
  996. - packages/ui/src/prompt-editor/useComposerToolbarFit.ts
  997. - packages/ui/test/composer-toolbar-layout
  998. managed: true
  999. requires: []
  1000. publicEntrypoints:
  1001. - packages/ui/src/prompt-editor/useComposerToolbarFit.ts
  1002. - packages/ui/src/composer-toolbar-layout/contract.ts
  1003. layers: {ui: .}
  1004. owner: conversation
  1005. # task-groups:由 architecture:adopt 登记
  1006. - id: task-groups
  1007. roots:
  1008. - packages/services/src/task-groups
  1009. managed: true
  1010. requires:
  1011. - services
  1012. - session
  1013. - shared
  1014. publicEntrypoints:
  1015. - packages/services/src/task-groups/index.ts
  1016. - packages/services/src/task-groups/contract.ts
  1017. - packages/services/src/task-groups/migration-v6.ts
  1018. layers:
  1019. adapters: .
  1020. owner: conversation
  1021. # window-project-directory:由 architecture:adopt 登记
  1022. - id: window-project-directory
  1023. roots:
  1024. - packages/services/src/window-project-directory
  1025. managed: true
  1026. requires:
  1027. - project
  1028. - remote-projects
  1029. - rpc
  1030. - services
  1031. - shared
  1032. publicEntrypoints:
  1033. - packages/services/src/window-project-directory/index.ts
  1034. - packages/services/src/window-project-directory/contract.ts
  1035. layers:
  1036. adapters: .
  1037. owner: conversation
  1038. # conversation-share-interaction:由 architecture:adopt 登记
  1039. - id: conversation-share-interaction
  1040. roots:
  1041. - packages/ui/src/conversation-share-interaction
  1042. managed: true
  1043. requires:
  1044. - services
  1045. - shared
  1046. - ui
  1047. publicEntrypoints:
  1048. - packages/ui/src/conversation-share-interaction/index.ts
  1049. - packages/ui/src/conversation-share-interaction/contract.ts
  1050. - packages/ui/src/conversation-share-interaction/ConversationSharePopover.tsx
  1051. - packages/ui/src/conversation-share-interaction/ConversationShareExpiryPicker.tsx
  1052. - packages/ui/src/conversation-share-interaction/ConversationSharePreflightStatus.tsx
  1053. - packages/ui/src/conversation-share-interaction/conversationSharePopoverActions.ts
  1054. - packages/ui/src/conversation-share-interaction/conversationSharePreflightRequest.ts
  1055. - packages/ui/src/conversation-share-interaction/conversationSharePreflightResponse.ts
  1056. - packages/ui/src/conversation-share-interaction/SettingsShareManagement.tsx
  1057. layers:
  1058. contract: contract.ts
  1059. ui: .
  1060. owner: conversation
  1061. # workspace-plugin-preview:由 architecture:adopt 登记
  1062. - id: workspace-plugin-preview
  1063. roots:
  1064. - packages/ui/src/workspace-plugin-preview
  1065. managed: true
  1066. requires:
  1067. - shared
  1068. - ui
  1069. publicEntrypoints:
  1070. - packages/ui/src/workspace-plugin-preview/index.ts
  1071. - packages/ui/src/workspace-plugin-preview/contract.ts
  1072. layers:
  1073. ui: .
  1074. owner: plugin
  1075. # office-runtime:内置文档插件查看面板的共享运行时,由 architecture:adopt 登记
  1076. - id: office-runtime
  1077. roots:
  1078. - apps/zcode-cli/packages/office-runtime
  1079. managed: true
  1080. requires: []
  1081. publicEntrypoints:
  1082. - apps/zcode-cli/packages/office-runtime/index.ts
  1083. - apps/zcode-cli/packages/office-runtime/contract.ts
  1084. layers:
  1085. app: .
  1086. owner: plugin
  1087. # embedded-browser-permission:由 architecture:adopt 登记
  1088. - id: embedded-browser-permission
  1089. roots:
  1090. - packages/desktop/src/main/embedded-browser-permission-contract
  1091. - packages/desktop/src/main/embeddedBrowserPermissionPolicy.ts
  1092. managed: true
  1093. requires:
  1094. - desktop
  1095. - shared
  1096. publicEntrypoints:
  1097. - packages/desktop/src/main/embeddedBrowserPermissionPolicy.ts
  1098. - packages/desktop/src/main/embedded-browser-permission-contract/contract.ts
  1099. layers:
  1100. adapters: .
  1101. owner: desktop
  1102. # marketing-touch-controller:由 architecture:adopt 登记
  1103. - id: marketing-touch-controller
  1104. roots:
  1105. - packages/ui/src/marketing-touch-contract
  1106. - packages/ui/src/components/marketing-touch/marketingTouchController.ts
  1107. managed: true
  1108. requires:
  1109. - services
  1110. - shared
  1111. - ui
  1112. publicEntrypoints:
  1113. - packages/ui/src/components/marketing-touch/marketingTouchController.ts
  1114. - packages/ui/src/marketing-touch-contract/contract.ts
  1115. layers:
  1116. app: .
  1117. owner: desktop
  1118. # data-sync-service:数据同步分类服务形状与本机设备同步状态(docs/remote/data-sync.md)
  1119. - id: data-sync-service
  1120. roots:
  1121. - packages/services/src/data-sync
  1122. managed: true
  1123. requires:
  1124. - services
  1125. - shared
  1126. publicEntrypoints:
  1127. - packages/services/src/data-sync/index.ts
  1128. - packages/services/src/data-sync/contract.ts
  1129. - packages/services/src/data-sync/node.ts
  1130. layers:
  1131. app: .
  1132. owner: remote
  1133. # voice-input-service:Composer 语音输入的本机 Host ASR 连接(docs/chat/composer-voice-input.md)
  1134. - id: voice-input-service
  1135. roots:
  1136. - packages/services/src/voice-input
  1137. managed: true
  1138. requires:
  1139. - services
  1140. - shared
  1141. - rpc
  1142. publicEntrypoints:
  1143. - packages/services/src/voice-input/index.ts
  1144. - packages/services/src/voice-input/contract.ts
  1145. - packages/services/src/voice-input/node.ts
  1146. layers:
  1147. adapters: .
  1148. owner: desktop
  1149. # provider-provisioning-status:数据同步页模型提供商读取 / 重试 Main 协调器的 Provisioning lane(R3 §8.3.6)
  1150. - id: provider-provisioning-status
  1151. roots:
  1152. - packages/services/src/provider-provisioning-status
  1153. managed: true
  1154. requires:
  1155. - services
  1156. - shared
  1157. publicEntrypoints:
  1158. - packages/services/src/provider-provisioning-status/index.ts
  1159. - packages/services/src/provider-provisioning-status/contract.ts
  1160. - packages/services/src/provider-provisioning-status/node.ts
  1161. layers:
  1162. app: .
  1163. owner: remote
  1164. # data-sync:设置页「数据同步」与同步弹窗(docs/remote/data-sync.md)
  1165. - id: data-sync
  1166. roots:
  1167. - packages/ui/src/data-sync
  1168. managed: true
  1169. requires:
  1170. - services
  1171. - shared
  1172. - ui
  1173. - conversation-workspace-target
  1174. publicEntrypoints:
  1175. - packages/ui/src/data-sync/index.ts
  1176. - packages/ui/src/data-sync/contract.ts
  1177. layers:
  1178. contract: contract.ts
  1179. domain: domain
  1180. app: app
  1181. ui: .
  1182. layerOrder: [contract, domain, app, ui]
  1183. owner: remote
  1184. # voice-input:Composer 语音输入按钮、状态机与麦克风采集(docs/chat/composer-voice-input.md)
  1185. - id: voice-input
  1186. roots:
  1187. - packages/ui/src/voice-input
  1188. managed: true
  1189. requires:
  1190. - services
  1191. - shared
  1192. - ui
  1193. publicEntrypoints:
  1194. - packages/ui/src/voice-input/index.ts
  1195. - packages/ui/src/voice-input/contract.ts
  1196. layers:
  1197. contract: contract.ts
  1198. domain: domain
  1199. adapters: adapters
  1200. ui: .
  1201. layerOrder: [contract, domain, adapters, ui]
  1202. owner: desktop
  1203. # settings-scope:设置页 Scope 菜单按设备分组(docs/remote/data-sync.md「Scope 菜单按设备分组」)
  1204. - id: settings-scope
  1205. roots:
  1206. - packages/ui/src/settings-scope
  1207. managed: true
  1208. requires:
  1209. - services
  1210. - shared
  1211. - ui
  1212. - conversation-workspace-target
  1213. - workspace-config-catalog
  1214. publicEntrypoints:
  1215. - packages/ui/src/settings-scope/index.ts
  1216. - packages/ui/src/settings-scope/contract.ts
  1217. layers:
  1218. contract: contract.ts
  1219. domain: domain
  1220. app: app
  1221. ui: .
  1222. layerOrder: [contract, domain, app, ui]
  1223. owner: remote
  1224. # side-pane-full-view:由 architecture:adopt 登记
  1225. - id: side-pane-full-view
  1226. roots:
  1227. - packages/ui/src/side-pane-full-view
  1228. managed: true
  1229. requires:
  1230. - shared
  1231. - ui
  1232. publicEntrypoints:
  1233. - packages/ui/src/side-pane-full-view/index.ts
  1234. - packages/ui/src/side-pane-full-view/contract.ts
  1235. layers:
  1236. ui: .
  1237. owner: conversation
  1238. # 发行策略使用独立目录;修改后的文件由本模块承担边界检查。
  1239. - id: request-security-edition
  1240. roots: [packages/shared/src/request-security-edition]
  1241. managed: true
  1242. requires: [shared]
  1243. publicEntrypoints:
  1244. - packages/shared/src/request-security-edition/index.ts
  1245. - packages/shared/src/request-security-edition/policy.ts
  1246. - packages/shared/src/request-security-edition/verification-policy.ts
  1247. - packages/shared/src/request-security-edition/contract.ts
  1248. layers: {adapters: .}
  1249. owner: request-security
  1250. # local-ttft-contract:由 architecture:adopt 登记
  1251. - id: local-ttft-contract
  1252. roots:
  1253. - packages/shared/src/local-ttft
  1254. managed: true
  1255. requires: []
  1256. publicEntrypoints:
  1257. - packages/shared/src/local-ttft/contract.ts
  1258. layers:
  1259. contract: .
  1260. # local-ttft-renderer:由 architecture:adopt 登记
  1261. - id: local-ttft-renderer
  1262. roots:
  1263. - packages/ui/src/v4/telemetry/local-ttft
  1264. managed: true
  1265. requires:
  1266. - shared
  1267. - ui
  1268. publicEntrypoints:
  1269. - packages/ui/src/v4/telemetry/local-ttft/contract.ts
  1270. layers:
  1271. ui: .
  1272. # local-ttft-desktop:由 architecture:adopt 登记
  1273. - id: local-ttft-desktop
  1274. roots:
  1275. - packages/desktop/src/renderer/src/local-ttft
  1276. managed: true
  1277. requires:
  1278. - shared
  1279. - ui
  1280. publicEntrypoints:
  1281. - packages/desktop/src/renderer/src/local-ttft/contract.ts
  1282. layers:
  1283. ui: .
  1284. # local-ttft-cli:由 architecture:adopt 登记
  1285. - id: local-ttft-cli
  1286. roots:
  1287. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/local-ttft
  1288. managed: true
  1289. requires:
  1290. - shared
  1291. - zcode-cli
  1292. publicEntrypoints:
  1293. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/local-ttft/contract.ts
  1294. layers:
  1295. adapters: .
  1296. # cli-official-command-endpoint:由 architecture:adopt 登记
  1297. - id: cli-official-command-endpoint
  1298. roots:
  1299. - apps/zcode-cli/packages/bootstrap/src/official-command-endpoint
  1300. - apps/zcode-cli/packages/bootstrap/tests/official-command-endpoint
  1301. managed: true
  1302. requires:
  1303. - shared
  1304. - zcode-cli
  1305. publicEntrypoints:
  1306. - apps/zcode-cli/packages/bootstrap/src/official-command-endpoint/index.ts
  1307. - apps/zcode-cli/packages/bootstrap/src/official-command-endpoint/contract.ts
  1308. layers:
  1309. adapters: .
  1310. owner: identity
  1311. # zcode-site-panel:zcode-site 插件自带的 Sites 面板(MCP server + 页面),由 architecture:adopt 登记
  1312. - id: zcode-site-panel
  1313. roots:
  1314. - apps/zcode-cli/packages/zcode-site-plugin/src
  1315. managed: true
  1316. requires:
  1317. - shared
  1318. publicEntrypoints:
  1319. - apps/zcode-cli/packages/zcode-site-plugin/src/index.ts
  1320. - apps/zcode-cli/packages/zcode-site-plugin/src/contract.ts
  1321. layers:
  1322. app: .
  1323. owner: plugin
  1324. # file-open-apps:由 architecture:adopt 登记
  1325. - id: file-open-apps
  1326. roots:
  1327. - packages/desktop/src/main/file-open-apps
  1328. managed: true
  1329. requires: [shared]
  1330. publicEntrypoints:
  1331. - packages/desktop/src/main/file-open-apps/index.ts
  1332. - packages/desktop/src/main/file-open-apps/contract.ts
  1333. layers:
  1334. adapters: .
  1335. owner: desktop
  1336. # ui-file-menu:由 architecture:adopt 登记
  1337. - id: ui-file-menu
  1338. roots:
  1339. - packages/ui/src/file-menu
  1340. managed: true
  1341. requires:
  1342. - shared
  1343. - ui
  1344. publicEntrypoints:
  1345. - packages/ui/src/file-menu/index.ts
  1346. - packages/ui/src/file-menu/contract.ts
  1347. layers:
  1348. ui: .
  1349. owner: file-preview
  1350. # web-platform:由 architecture:adopt 登记
  1351. - id: web-platform
  1352. roots:
  1353. - packages/web/src/platform
  1354. managed: true
  1355. requires:
  1356. - shared
  1357. - ui
  1358. - web
  1359. publicEntrypoints:
  1360. - packages/web/src/platform/index.ts
  1361. - packages/web/src/platform/contract.ts
  1362. layers:
  1363. adapters: .
  1364. owner: web
  1365. # image-preview-editor:由 architecture:adopt 登记
  1366. - id: image-preview-editor
  1367. roots:
  1368. - packages/ui/src/image-preview-editor
  1369. - packages/ui/src/hooks/useImageFilePreview.ts
  1370. - packages/ui/src/lib/copyPreviewImage.ts
  1371. - packages/ui/src/lib/imagePreviewDownload.ts
  1372. - packages/ui/src/v4/ConversationImageFileMention.tsx
  1373. managed: true
  1374. requires: [ui, shared, ui-file-menu]
  1375. publicEntrypoints:
  1376. - packages/ui/src/image-preview-editor/index.ts
  1377. - packages/ui/src/image-preview-editor/contract.ts
  1378. - packages/ui/src/hooks/useImageFilePreview.ts
  1379. - packages/ui/src/lib/copyPreviewImage.ts
  1380. - packages/ui/src/lib/imagePreviewDownload.ts
  1381. - packages/ui/src/v4/ConversationImageFileMention.tsx
  1382. layers:
  1383. ui: .
  1384. owner: conversation
  1385. # 用户消息正文组合;保留现有 v4 入口,以精确 root 登记展示层归属。
  1386. - id: conversation-user-input-presentation
  1387. roots:
  1388. - packages/ui/src/conversation-user-input-presentation
  1389. - packages/ui/src/v4/ConversationUserInputBubble.tsx
  1390. managed: true
  1391. requires: [ui, shared, image-preview-editor]
  1392. publicEntrypoints:
  1393. - packages/ui/src/conversation-user-input-presentation/contract.ts
  1394. - packages/ui/src/v4/ConversationUserInputBubble.tsx
  1395. layers:
  1396. ui: .
  1397. owner: conversation
  1398. # protocol-session-data:由 architecture:adopt 登记
  1399. - id: protocol-session-data
  1400. roots:
  1401. - packages/shared/src/zcode-protocol-v4/session-data
  1402. managed: true
  1403. requires: []
  1404. publicEntrypoints:
  1405. - packages/shared/src/zcode-protocol-v4/session-data/index.ts
  1406. - packages/shared/src/zcode-protocol-v4/session-data/contract.ts
  1407. layers:
  1408. domain: .
  1409. # cli-session-data-files:由 architecture:adopt 登记
  1410. - id: cli-session-data-files
  1411. roots:
  1412. - apps/zcode-cli/packages/adapters/src/storage/session-data-files
  1413. managed: true
  1414. requires: []
  1415. publicEntrypoints:
  1416. - apps/zcode-cli/packages/adapters/src/storage/session-data-files/index.ts
  1417. - apps/zcode-cli/packages/adapters/src/storage/session-data-files/contract.ts
  1418. layers:
  1419. adapters: .
  1420. # cli-session-data:由 architecture:adopt 登记
  1421. - id: cli-session-data
  1422. roots:
  1423. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/session-data
  1424. managed: true
  1425. requires:
  1426. - shared
  1427. - zcode-cli
  1428. publicEntrypoints:
  1429. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/session-data/index.ts
  1430. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/session-data/contract.ts
  1431. layers:
  1432. app: .
  1433. - id: cli-plugin-startup-budget
  1434. roots:
  1435. - apps/zcode-cli/packages/bootstrap/src/plugin-startup-budget
  1436. managed: true
  1437. requires: [zcode-cli]
  1438. publicEntrypoints:
  1439. - apps/zcode-cli/packages/bootstrap/src/plugin-startup-budget/index.ts
  1440. - apps/zcode-cli/packages/bootstrap/src/plugin-startup-budget/contract.ts
  1441. layers:
  1442. app: .
  1443. owner: plugin
  1444. - id: provider-regression
  1445. roots: [apps/zcode-cli/tools/provider-regression]
  1446. managed: true
  1447. requires: [zcode-cli, provider, provider-node, shared]
  1448. publicEntrypoints:
  1449. - apps/zcode-cli/tools/provider-regression/index.ts
  1450. - apps/zcode-cli/tools/provider-regression/contract.ts
  1451. layers: {adapters: .}
  1452. owner: agent
  1453. # session-lifecycle:由 architecture:adopt 登记
  1454. - id: session-lifecycle
  1455. roots:
  1456. - apps/zcode-cli/packages/bootstrap/src/session-lifecycle
  1457. - apps/zcode-cli/packages/bootstrap/tests/session-lifecycle
  1458. managed: true
  1459. requires: [shared]
  1460. publicEntrypoints:
  1461. - apps/zcode-cli/packages/bootstrap/src/session-lifecycle/index.ts
  1462. - apps/zcode-cli/packages/bootstrap/src/session-lifecycle/contract.ts
  1463. layers:
  1464. app: .
  1465. owner: agent-runtime
  1466. # workspace-mcp-trust:由 architecture:adopt 登记
  1467. - id: workspace-mcp-trust
  1468. roots:
  1469. - apps/zcode-cli/packages/bootstrap/src/workspace-mcp-trust
  1470. managed: true
  1471. requires: [zcode-cli, shared]
  1472. publicEntrypoints:
  1473. - apps/zcode-cli/packages/bootstrap/src/workspace-mcp-trust/index.ts
  1474. - apps/zcode-cli/packages/bootstrap/src/workspace-mcp-trust/contract.ts
  1475. layers:
  1476. adapters: .
  1477. owner: cli
  1478. # composer-edit-mode:由 architecture:adopt 登记
  1479. - id: composer-edit-mode
  1480. roots:
  1481. - packages/ui/src/composer-edit-mode
  1482. managed: true
  1483. requires: [shared, ui]
  1484. publicEntrypoints:
  1485. - packages/ui/src/composer-edit-mode/index.ts
  1486. - packages/ui/src/composer-edit-mode/contract.ts
  1487. layers:
  1488. contract: contract.ts
  1489. ui: .
  1490. owner: conversation
  1491. # desktop-microphone-access:由 architecture:adopt 登记
  1492. - id: desktop-microphone-access
  1493. roots:
  1494. - packages/desktop/src/main/microphone-access
  1495. managed: true
  1496. requires:
  1497. - shared
  1498. publicEntrypoints:
  1499. - packages/desktop/src/main/microphone-access/index.ts
  1500. - packages/desktop/src/main/microphone-access/contract.ts
  1501. layers:
  1502. adapters: .
  1503. owner: desktop
  1504. # web-share-manage:由 architecture:adopt 登记
  1505. - id: web-share-manage
  1506. roots:
  1507. - packages/web/src/share-manage
  1508. managed: true
  1509. requires:
  1510. - shared
  1511. - ui
  1512. - web
  1513. - web-auth
  1514. publicEntrypoints:
  1515. - packages/web/src/share-manage/index.ts
  1516. - packages/web/src/share-manage/contract.ts
  1517. - packages/web/src/share-manage/mockConversationShareManageClient.ts
  1518. layers:
  1519. ui: .
  1520. owner: conversation
  1521. # managed-worktree-shared:由 architecture:adopt 登记
  1522. - id: managed-worktree-shared
  1523. roots:
  1524. - packages/shared/src/managed-worktree
  1525. managed: true
  1526. requires: []
  1527. publicEntrypoints:
  1528. - packages/shared/src/managed-worktree/index.ts
  1529. - packages/shared/src/managed-worktree/contract.ts
  1530. layers:
  1531. app: .
  1532. owner: desktop
  1533. # managed-worktree-repo:由 architecture:adopt 登记
  1534. - id: managed-worktree-repo
  1535. roots:
  1536. - packages/services/src/git/managed-worktree
  1537. managed: true
  1538. requires:
  1539. - managed-worktree-shared
  1540. - services
  1541. - shared
  1542. publicEntrypoints:
  1543. - packages/services/src/git/managed-worktree/index.ts
  1544. - packages/services/src/git/managed-worktree/contract.ts
  1545. layers:
  1546. adapters: .
  1547. owner: desktop
  1548. # managed-worktree-tasks:由 architecture:adopt 登记
  1549. - id: managed-worktree-tasks
  1550. roots:
  1551. - packages/services/src/managed-worktree-tasks
  1552. managed: true
  1553. requires:
  1554. - managed-worktree-repo
  1555. - managed-worktree-shared
  1556. - project-storage
  1557. - rpc
  1558. - services
  1559. - shared
  1560. publicEntrypoints:
  1561. - packages/services/src/managed-worktree-tasks/index.ts
  1562. - packages/services/src/managed-worktree-tasks/contract.ts
  1563. layers:
  1564. app: .
  1565. owner: desktop
  1566. # managed-worktree-ui:由 architecture:adopt 登记
  1567. - id: managed-worktree-ui
  1568. roots:
  1569. - packages/ui/src/managed-worktrees
  1570. managed: true
  1571. requires:
  1572. - services
  1573. - shared
  1574. - ui
  1575. - conversation-user-input-presentation
  1576. publicEntrypoints:
  1577. - packages/ui/src/managed-worktrees/index.ts
  1578. - packages/ui/src/managed-worktrees/contract.ts
  1579. layers:
  1580. contract: contract.ts
  1581. ui: .
  1582. owner: desktop
  1583. - id: session-tool-presentation
  1584. roots: [packages/ui/src/ToolCallBlocks/session]
  1585. managed: true
  1586. requires: [ui]
  1587. publicEntrypoints: [packages/ui/src/ToolCallBlocks/session/contract.ts]
  1588. layers: {ui: "."}
  1589. owner: conversation
  1590. # extension-host-protocol:扩展进程三方共用的纯 schema、类型与纯函数(docs/plugins/extension-host.md §4)。
  1591. - id: extension-host-protocol
  1592. roots:
  1593. - packages/shared/src/extension-host
  1594. managed: true
  1595. # 能力表引用 context 组成的线格式与模型选择 schema(docs/plugins/extension-host.md §7.2、§9);
  1596. # composer.mention 的候选项与 CLI plugins/mentionItems 共用一份 schema(§16.6);
  1597. # 会话能力的入参与返回直接用 session-control 的端口 schema(§17.3)。
  1598. requires: [context-composition, plugin-host-queries, session-control, shared]
  1599. publicEntrypoints:
  1600. - packages/shared/src/extension-host/index.ts
  1601. - packages/shared/src/extension-host/contract.ts
  1602. layers:
  1603. domain: .
  1604. owner: plugin
  1605. # extensions-service:Window Host 的扩展门面与能力网关(docs/plugins/extension-host.md §3.5)。
  1606. - id: extensions-service
  1607. roots:
  1608. - packages/services/src/extensions
  1609. managed: true
  1610. requires:
  1611. - extension-host-protocol
  1612. # 扩展视图复用 MCP App 的沙箱句柄与 HTML 挑选(§8)。
  1613. - mcp-apps-protocol
  1614. - plugin-ui-bridge
  1615. # settings 能力用 Window Host 进程内的 plugins/readUserOptions 读取器(§16.7)。
  1616. - plugin-host-queries
  1617. # 会话能力以客户端类调用方调 AppControlService.bindClient(§17.2),错误按 session-control 码映射。
  1618. - app-control
  1619. - session-control
  1620. # 插件项目(§17.4):只经 IProjectService 的 readProjects / saveProject,不碰项目库。
  1621. - project
  1622. - rpc
  1623. - services
  1624. - shared
  1625. publicEntrypoints:
  1626. - packages/services/src/extensions/index.ts
  1627. - packages/services/src/extensions/contract.ts
  1628. - packages/services/src/extensions/node.ts
  1629. layers:
  1630. app: .
  1631. owner: plugin
  1632. # extension-host:全 App 唯一的扩展进程与 Main 侧监管器(docs/plugins/extension-host.md §12.1)。
  1633. - id: extension-host
  1634. roots:
  1635. - packages/desktop/src/extension-host
  1636. - packages/desktop/src/main/extensionHostSupervisor.ts
  1637. managed: true
  1638. requires:
  1639. - extension-host-protocol
  1640. # 扩展视图的进程内 MCP Client 宣告 MCP Apps 能力、页面资源 mimeType(§8)。
  1641. - mcp-apps-protocol
  1642. - rpc
  1643. - desktop
  1644. publicEntrypoints:
  1645. - packages/desktop/src/extension-host/index.ts
  1646. - packages/desktop/src/extension-host/contract.ts
  1647. - packages/desktop/src/main/extensionHostSupervisor.ts
  1648. layers:
  1649. adapters: .
  1650. owner: plugin
  1651. # extension-slots:Renderer 的贡献表快照、插槽组件(docs/plugins/extension-host.md §6)。
  1652. - id: extension-slots
  1653. roots:
  1654. - packages/ui/src/extension-slots
  1655. managed: true
  1656. requires:
  1657. - extension-host-protocol
  1658. # 扩展视图页面复用 MCP App 的沙箱句柄、握手常量与页面原语(docs/plugins/extension-host.md §8)。
  1659. - mcp-apps-protocol
  1660. - plugin-ui
  1661. - services
  1662. - shared
  1663. - ui
  1664. publicEntrypoints:
  1665. - packages/ui/src/extension-slots/index.ts
  1666. - packages/ui/src/extension-slots/contract.ts
  1667. layers:
  1668. domain: domain
  1669. app: app
  1670. adapters: adapters
  1671. ui: components
  1672. layerOrder: [domain, app, adapters, ui]
  1673. owner: plugin
  1674. # 内置浏览器本地 HTML 的受控文件读取边界。
  1675. - id: browser-local-preview
  1676. roots:
  1677. - packages/desktop/src/main/browser-local-preview
  1678. managed: true
  1679. requires: [shared]
  1680. publicEntrypoints:
  1681. - packages/desktop/src/main/browser-local-preview/index.ts
  1682. - packages/desktop/src/main/browser-local-preview/contract.ts
  1683. layers:
  1684. adapters: .
  1685. owner: desktop
  1686. # plugin-api:插件作者用的类型包 @zcode-dev/plugin-api(docs/plugins/extension-host.md §17.9)。
  1687. # 只转出 extension-host-protocol 与 v4 协议(shared)的类型;四个子入口都是公开入口。
  1688. # tsup.config.ts 与 scripts/ 产出仓库外用的 dist 声明。
  1689. - id: plugin-api
  1690. roots:
  1691. - packages/plugin-api/src
  1692. - packages/plugin-api/scripts
  1693. - packages/plugin-api/tsup.config.ts
  1694. managed: true
  1695. requires:
  1696. - extension-host-protocol
  1697. - shared
  1698. publicEntrypoints:
  1699. - packages/plugin-api/src/contract.ts
  1700. - packages/plugin-api/src/manifest.ts
  1701. - packages/plugin-api/src/sessions.ts
  1702. - packages/plugin-api/src/protocol-v4.ts
  1703. layers:
  1704. contract: .
  1705. owner: plugin
  1706. # 选区批注输入浮层;调用方是 v4 选区浮层,引用数据仍归 ui lib。
  1707. - id: selection-comment
  1708. roots:
  1709. - packages/ui/src/selection-comment
  1710. managed: true
  1711. requires:
  1712. - ui
  1713. publicEntrypoints:
  1714. - packages/ui/src/selection-comment/index.ts
  1715. - packages/ui/src/selection-comment/contract.ts
  1716. layers:
  1717. ui: .
  1718. owner: conversation
  1719. - id: web-auth
  1720. roots:
  1721. - packages/web/src/auth
  1722. managed: true
  1723. requires:
  1724. - mobile-ui
  1725. - shared
  1726. - ui
  1727. publicEntrypoints:
  1728. - packages/web/src/auth/index.ts
  1729. - packages/web/src/auth/contract.ts
  1730. layers:
  1731. app: .
  1732. owner: identity
  1733. - id: credential-security
  1734. roots:
  1735. - packages/shared/src/credential-security
  1736. managed: true
  1737. requires: [shared]
  1738. publicEntrypoints:
  1739. - packages/shared/src/credential-security/module.ts
  1740. - packages/shared/src/credential-security/contract.ts
  1741. layers:
  1742. adapters: .
  1743. owner: authentication
  1744. - id: resource-manager
  1745. roots:
  1746. - packages/ui/src/resource-manager
  1747. - packages/services/src/process/processResourceSampler.ts
  1748. managed: true
  1749. requires: [shared, ui]
  1750. publicEntrypoints:
  1751. - packages/ui/src/resource-manager/ResourceManagerApp.tsx
  1752. - packages/ui/src/resource-manager/contract.ts
  1753. - packages/ui/src/resource-manager/resourceUsageView.ts
  1754. - packages/services/src/process/processResourceSampler.ts
  1755. layers:
  1756. contract: contract.ts
  1757. adapters: ../../../services/src/process/processResourceSampler.ts
  1758. ui: .
  1759. layerOrder: [contract, adapters, ui]
  1760. owner: desktop
  1761. # settings-search:由 architecture:adopt 登记
  1762. - id: settings-search
  1763. roots:
  1764. - packages/ui/src/settings-search
  1765. managed: true
  1766. requires:
  1767. - ui
  1768. publicEntrypoints:
  1769. - packages/ui/src/settings-search/index.ts
  1770. - packages/ui/src/settings-search/contract.ts
  1771. layers:
  1772. ui: .
  1773. owner: settings
  1774. # task-row-hover:会话行悬停卡片(docs/ui/task-row-hover-details.md)
  1775. - id: task-row-hover
  1776. roots:
  1777. - packages/ui/src/task-row-hover
  1778. managed: true
  1779. requires:
  1780. - managed-worktree-ui
  1781. - shared
  1782. - ui
  1783. publicEntrypoints:
  1784. - packages/ui/src/task-row-hover/index.ts
  1785. - packages/ui/src/task-row-hover/contract.ts
  1786. layers:
  1787. ui: .
  1788. owner: conversation
  1789. global:
  1790. # 临时时间戳(2026-09-10):unmanaged-new-file 只约束此日期之后首次入库的文件。
  1791. # 基于领先 staging 很多的分支开工时,merge-base 之前的"新增"文件不应被追溯。
  1792. newFilesEnforcedSince: "2026-09-10"
  1793. acceptedUpstreamCommits: []
  1794. maxFileLines: 800
  1795. maxContractLines: 300
  1796. maxPublicMethods: 12
  1797. forbidCycles: true
  1798. forbidDeepImports: true
  1799. managedOnly: true
  1800. acceptedUpstreamSnapshot: scripts/architecture/upstream-snapshot.json
  1801. exceptions:
  1802. - id: region-copy-suggested-prompts-edit
  1803. rule: unmanaged-new-file
  1804. paths: [packages/ui/src/v4/featureSuggestedPrompts.ts]
  1805. reason: 上游 f3fcc23e04 已引入的模式推荐提示词仅替换「国内」为「中国」一处区域称谓;本次不接管整个 ui 未受管模块。
  1806. - id: removed-tool-grouping-action-catalog
  1807. rule: unmanaged-new-file
  1808. paths: [packages/ui/src/lib/userActionTraceCatalog.ts]
  1809. reason: 上游已有埋点目录仅删除已移除分组选项的三个事件声明;本次不接管整个 UI lib 目录。
  1810. - id: assistant-block-order-tool-part-order-edit
  1811. rule: unmanaged-new-file
  1812. paths: [apps/zcode-cli/packages/core/src/agent/tool-part-order.ts]
  1813. reason: 已准入的工具 part 选择只增加 blockIndex 排序(apps/zcode-cli/docs/design/v2/model/assistant-block-order.md),declarationIndex 与物理顺序兜底不变;接管整个 core 包不在本次范围内。
  1814. - id: assistant-block-order-prompt-trajectory-continuity-edit
  1815. rule: unmanaged-new-file
  1816. paths: [apps/zcode-cli/tools/prompt-trajectory/src/message-continuity.ts]
  1817. reason: 已准入的调试工具比较回复前折叠多个文字块,适配每个文字块单独回放(apps/zcode-cli/docs/design/v2/model/assistant-block-order.md);只读比较逻辑,不改变模块边界。
  1818. - id: session-features-attribution-header-edit
  1819. rule: unmanaged-new-file
  1820. paths: [apps/zcode-cli/packages/adapters/src/model/runner-attribution.ts]
  1821. reason: 已准入的归因头构造器只追加 x-zcode-session-features(docs/design/v2/model/session-features-header.md);它仍是全部归因头的唯一写入点,签名与模块边界不变,接管整个 adapters 包不在本次范围内。
  1822. - id: session-features-workflow-command-pattern-edit
  1823. rule: unmanaged-new-file
  1824. paths: [apps/zcode-cli/packages/core/src/runtime/methods/dynamic-workflow-activation.ts]
  1825. reason: 已准入的动态工作流激活只导出既有 `/workflow` 历史判据常量,供 session-features 的历史推导复用同一判据;激活行为、owner 与模块边界不变。
  1826. - id: node-repl-call-ledger-cua-bridge-edit
  1827. rule: unmanaged-new-file
  1828. paths: [apps/zcode-cli/packages/node-repl-host/src/cua-bridge.ts]
  1829. reason: 已准入的 node_repl CUA bridge 只删去 Worker 侧的会话信息构造与目标应用身份记录,二者移到主线程 CUA broker(apps/zcode-cli/docs/design/v2/tool/20-node-repl-call-ledger.md);subagent 拒绝与对模型的行为不变,接管整个 node-repl-host 包不在本次范围内。
  1830. - id: node-repl-call-ledger-cua-broker-edit
  1831. rule: unmanaged-new-file
  1832. paths: [apps/zcode-cli/packages/node-repl-host/src/cua-broker.ts]
  1833. reason: 已准入的 node_repl CUA broker 改为只认 node-repl-call-ledger 签发的本次调用 token,按账本条目构造会话信息并把目标应用身份记进账本(20-node-repl-call-ledger.md「CUA broker」);MR !3207 再在 token 校验之后把会话能力标签用的 computerUse 记进账本(docs/design/v2/model/session-features-header.md);runtime 调用与响应格式不变。
  1834. - id: node-repl-call-ledger-result-edit
  1835. rule: unmanaged-new-file
  1836. paths: [apps/zcode-cli/packages/node-repl-host/src/result.ts]
  1837. reason: 已准入的 node_repl 结果组装改为只从账本 facts 取可信 key,忽略 Worker 结果消息里的同名字段(20-node-repl-call-ledger.md「结果组装」);MR !3207 按同样处置追加 zcode/nodeReplBrowserUse、zcode/nodeReplComputerUse 两个 key(docs/design/v2/model/session-features-header.md);结果内容与其他 meta 处置不变。
  1838. - id: offpeak-expiration-codes-existing-edit
  1839. rule: unmanaged-new-file
  1840. paths: [apps/zcode-cli/packages/core/src/runtime/off-peak/model-binding.ts]
  1841. reason: 已准入的闲时请求包装器仅复用共享错误码判断,补齐 3106 运行超时的既有生命周期通知;不改变 owner、控制协议或模块边界,不扩展为整个 CLI runtime 目录接管。
  1842. - id: multi-cursor-badge-title-passthrough-edit
  1843. rule: unmanaged-new-file
  1844. paths:
  1845. - apps/zcode-cli/packages/node-repl-host/src/cua-broker.ts
  1846. reason: 已准入的 node_repl CUA broker 仅增透传可选 actionTitle 字段(node_repl cell title → badge 文字,docs/cua/producer/multi-session-cursor-overlay-spec.md §4.8)——cua-broker 按 ledger meta 构建的 requestContext 注入、parseContext 白名单补字段;签名、broker 形态与模块边界不变,不接管 zcode-cli 目录。
  1847. - id: conversation-share-manage-scope-passthrough-edit
  1848. rule: unmanaged-new-file
  1849. paths: [packages/services/src/conversation-share/conversationShareConnectionScope.ts]
  1850. reason: 已准入的分享 attachment 作用域包装只追加设置页分享管理的四个方法(docs/conversation-share-v1.md「设置页分享管理」):桌面分支原样透传,手机远控分支拒绝;不改变 R3 受信连接、发布/导入作用域与模块边界,接管整个 services/conversation-share 目录(含既有超长文件)不在本次范围内。
  1851. - id: conversation-selection-comment-quote-schema-edit
  1852. rule: unmanaged-new-file
  1853. paths: [packages/shared/src/conversationSelection.ts]
  1854. reason: 已准入的对话引用 schema 只追加可选 comment 与 agent 字段(选区批注,docs/ui/conversation-selection-side-chat.md「选区批注」);仍是 conversationQuotes 的唯一 schema,长度上限与模块边界不变,接管整个 shared 包不在本次范围内。
  1855. - id: conversation-selection-comment-model-guidance-edit
  1856. rule: unmanaged-new-file
  1857. paths: [apps/zcode-cli/packages/core/src/runtime/helpers/conversation-quotes.ts]
  1858. reason: 已准入的引用模型材料拼装只在引用带批注时追加一句说明(docs/ui/conversation-selection-side-chat.md「选区批注」);仍是 withConversationQuotes 的唯一实现,canonical 正文与 Bot 投递边界不变,接管整个 core 包不在本次范围内。
  1859. - id: side-pane-full-view-shortcut-command-edit
  1860. rule: unmanaged-new-file
  1861. paths: [packages/shared/src/shortcutCommands.ts]
  1862. reason: 已准入的快捷键命令表只追加一条 toggleSidePaneFullView 命令(Side Pane 完整视图,docs/ui/side-pane-full-view.md);命令表仍是唯一数据源,签名与模块边界不变,接管整个 shared 包不在本次范围内。
  1863. - id: browser-session-recent-visits-ui
  1864. rule: unmanaged-new-file
  1865. paths:
  1866. - packages/ui/src/store/browserRecentVisitsStore.ts
  1867. reason: Session 最近访问仅为 renderer 内存态展示数据,复用既有 UI store 与浏览器 owner,不改变 UI 模块边界或跨层契约。
  1868. - id: zcode-site-deploy-runtime-template
  1869. rule: unmanaged-new-file
  1870. paths: [apps/zcode-cli/packages/zcode-site-plugin/skills/site-deploy/templates/static-server.mjs]
  1871. reason: site-deploy 技能复制进用户部署包的静态站服务器模板,只在 Sites runner 的容器里由 start.sh 执行;仓库代码不 import 它,也不属于任何运行时模块。同目录的 start.sh 模板是 shell,不受本规则约束。
  1872. - id: opensource-cua-test-project-config
  1873. rule: unmanaged-new-file
  1874. paths: [packages/zcode-cua/vitest.config.ts]
  1875. reason: 该文件只装配测试项目,开源占位版本用于保持根单测入口可运行;不包含 producer 运行逻辑,不为同目录实现文件开放例外。
  1876. - id: project-location-cache-recovery-existing-edit
  1877. rule: unmanaged-new-file
  1878. paths:
  1879. - packages/shared/src/project-access-token.ts
  1880. - packages/shared/src/project-access-token-client.ts
  1881. - packages/services/src/model-provider/accountProjectTokenClient.ts
  1882. - packages/services/src/credential/credentialService.ts
  1883. reason: 已有项目 Token 与凭据存储增加派生缓存的局部恢复端口,并把换证请求失败按固定类别分码(ZCT-2111046389485834240);已确认的 PAT 签发临时故障仅在原 pending 内重试一次,不扩展到 Key 创建或 OAuth;保持原有 owner 和共享文件锁,不接管全目录。
  1884. - id: plugin-agent-permission-mode-restrict-only-existing-edit
  1885. rule: unmanaged-new-file
  1886. paths:
  1887. - packages/shared/src/subagent-profile.ts
  1888. - packages/shared/src/subagent-profile-parser.ts
  1889. reason: 已准入的存量文件为插件 agent 的 permissionMode 只能收紧(ZP-20261028-13)增加进程内 profile 标记字段并更新注释;跨进程 schema 与解析行为不变,接管 shared 目录不在本次范围内。
  1890. - id: test-ids-subpath-import-unmanaged-edit
  1891. rule: unmanaged-new-file
  1892. paths:
  1893. - packages/ui/src/browser-use/EmbeddedBrowserPermissionPrompts.tsx
  1894. - packages/ui/src/hooks/useStartPlanRecommendation.ts
  1895. - packages/ui/src/settings/DynamicWorkflowModeSetting.tsx
  1896. reason: 已准入的存量文件只把 TID 导入从 @zcode/shared 根入口改为 @zcode/shared/test-ids 子路径(根入口不再导出 test-ids,以收窄受影响单测范围);行为与模块边界不变,接管 ui 目录不在本次范围内。
  1897. - id: settings-personalization-section-new-file
  1898. rule: unmanaged-new-file
  1899. paths: [packages/ui/src/settings/PersonalizationSection.tsx]
  1900. reason: 个性化设置分区组件只编排 ISettingService 的 getUserInstructions/saveUserInstructions 与既有设置页 UI 原语(spec:docs/ui/settings-personalization.md);读写唯一事实源在服务层,不新增平行状态,接管整个 ui 目录不在本次范围内。
  1901. - id: settings-personalization-size-constant-new-file
  1902. rule: unmanaged-new-file
  1903. paths: [packages/shared/src/userInstructions.ts]
  1904. reason: 用户自定义指令字节上限共享常量(与 CLI 读取截断对齐,spec:docs/ui/settings-personalization.md),服务层校验与 UI 计数共用同一数值;仅两个常量导出,接管整个 shared 目录不在本次范围内。
  1905. - id: remote-workspace-admission-deadline-existing-edit
  1906. rule: unmanaged-new-file
  1907. paths: [packages/desktop/src/host/remoteWorkspacePreparation.ts]
  1908. reason: 已准入的远程项目目录 admission 只增加 30 秒截止时间和可重试的无响应错误码(3.16.2 远端回归 R8,docs/remote/project-first-remote-navigation-spec.md §2.4);owner、调用方与模块边界不变,接管 desktop host 目录不在本次修复范围内。
  1909. - id: gen-ui-existing-capability-check
  1910. rule: unmanaged-new-file
  1911. paths: [packages/services/src/zcode-agent/independentPlanSupport.ts]
  1912. reason: 在已存在的 CLI 能力查询入口补充 GenUI 上下文能力检查,防止旧 CLI 静默丢弃状态;保持既有 services/agent 边界,不扩展本次修复为整个 zcode-agent 模块接管。
  1913. - id: connection-log-secret-token-unmanaged-edit
  1914. rule: unmanaged-new-file
  1915. paths: [packages/shared/src/source-server/connectionLog.ts]
  1916. reason: 已存在的连接日志过滤函数只把已知秘密从子串替换改为完整 token 匹配,修复短密码反推泄露;签名与模块边界不变,接管整个 shared 包不在本次修复范围内。
  1917. - id: connection-errors-econnreset-unmanaged-edit
  1918. rule: unmanaged-new-file
  1919. paths: [packages/shared/src/source-server/connectionErrors.ts]
  1920. reason: 已存在的连接错误归一化码表补一项 ECONNRESET → remote-host-unreachable,修复在线断连恢复失败被误报为预检失败;签名与模块边界不变,接管整个 shared 包不在本次修复范围内。
  1921. - id: remote-authentication-unsupported-presentation-unmanaged-edit
  1922. rule: unmanaged-new-file
  1923. paths: [packages/ui/src/lib/remoteConnectionPresentationErrors.ts]
  1924. reason: 已存在的远程连接错误展示映射为新增公开码 remote-authentication-unsupported 补一项标题与“查看详情”操作,修复 SSH 二次验证失败被提示为检查密码;签名与模块边界不变,接管 ui 目录不在本次修复范围内。
  1925. - id: source-server-operation-log-level-unmanaged-edit
  1926. rule: unmanaged-new-file
  1927. paths: [packages/desktop/src/host/sourceServerOperationLogs.ts]
  1928. reason: 已有连接日志封装透传 TransportContext 已定义的 level,使低版本 glibc 提示保留 warn;Host 仍是唯一日志 owner,签名与模块边界不变,接管整个 desktop 包不在本次范围内。
  1929. - id: client-config-public-field-unmanaged-edit
  1930. rule: unmanaged-new-file
  1931. paths: [packages/shared/src/clientConfig.ts]
  1932. reason: Existing upstream public config parser gains one validated recommendation field; ownership and module boundaries remain unchanged, and adopting the shared package is outside this change.
  1933. - id: highspeed-transcript-owner-existing-edit
  1934. rule: unmanaged-new-file
  1935. paths: [packages/ui/src/highspeed/highspeedTurnHydration.ts]
  1936. reason: 该文件已存在于集成基线;本次仅在既有 transcript 水合映射中保留稳定匿名 ownerKey,不新增模块、IO 或状态 owner。账号归属校验仍由 Host 执行,UI store 继续拥有临时查询占位。接管整个 UI 目录不在此变更范围,行为和验收见 docs/highspeed/highspeed-card-spec.md。
  1937. - id: client-config-optional-authorization-existing-readers
  1938. rule: unmanaged-new-file
  1939. paths:
  1940. - packages/services/src/client-config/clientConfigService.ts
  1941. - packages/provider-node/src/zcode-builtin-download.ts
  1942. reason: 现有配置读取器新增宿主注入的可选 JWT,并隔离身份缓存和 CDN 请求头;不新增源码文件或改变服务与下载器的 owner,整包架构接管不属于本次请求头修复。
  1943. - id: highspeed-fallback-snapshot-unmanaged-edit
  1944. rule: unmanaged-new-file
  1945. paths: [apps/zcode-cli/packages/core/src/runtime/methods/turn-execution-fallback.ts]
  1946. reason: 合并已存在于 staging 的加速卡回退模块,仅将可变 Session 读取替换为本轮固定候选;保持现有 Core 模块边界,不在同步分支时机械拆分整个 runtime。
  1947. - id: session-owned-workflow-shutdown-existing-files
  1948. rule: unmanaged-new-file
  1949. paths:
  1950. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-run-submit.ts
  1951. - apps/zcode-cli/packages/bootstrap/src/app/workflow-driver-quiescence.ts
  1952. reason: 两个文件已存在于集成基线;本次在既有 bootstrap owner 内补启动关闭互斥和 actor 清理等待,不新增模块或跨层依赖。整个 bootstrap/app 的接管另行治理,生命周期公开模块边界保持不变。
  1953. - id: workflow-quota-auto-resume-unmanaged-file
  1954. rule: unmanaged-new-file
  1955. paths: [apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-quota-resume.ts]
  1956. reason: 额度停止的 run 到点自动续跑,是 run service 旁的一个宿主模块(只读 journal 行、订阅结算、经注入的 resume 续跑);与同目录的 run service 文件同属未受管的 zcode-cli bootstrap,接管该目录需要单独的模块边界整理。
  1957. - id: mcp-node-fallback-unmanaged-file
  1958. rule: unmanaged-new-file
  1959. paths:
  1960. - apps/zcode-cli/packages/adapters/src/mcp/node-fallback.ts
  1961. - apps/zcode-cli/packages/bootstrap/src/app/mcp-node-fallback.ts
  1962. reason: 桌面 Electron Node 下 stdio MCP 的 node/npm/npx 回退(apps/zcode-cli/docs/design/v2/mcp-node-fallback.md)。adapters 文件只负责 shim 目录与子进程 env 合并,经 CreateMcpAdapterOptions.nodeFallback 注入;bootstrap 文件只判定 Electron 并给出随包 npm 候选目录。两者同属未受管的 zcode-cli,接管 adapters/mcp 或 bootstrap/app 需要单独的模块边界整理。
  1963. - id: workflow-unrecognized-code-cap-unmanaged-edit
  1964. rule: unmanaged-new-file
  1965. paths: [apps/zcode-cli/packages/adapters/src/model/workflow-model-failure-policy.ts]
  1966. reason: 已准入的 workflow 模型错误策略表只增加一行(分类器不认识的业务码在同一次请求里连续出现 10 次时停 run)、一个连续计数入参与两个计数纯函数;runner 与 driver 读同一函数的约束与模块边界不变,接管 adapters/model 目录不在本次范围内。
  1967. - id: plugin-async-discovery-existing-callers
  1968. rule: unmanaged-new-file
  1969. paths:
  1970. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-ui-surfaces.ts
  1971. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/runtime-cleanup.ts
  1972. - apps/zcode-cli/packages/cli/src/plugins-command-shared.ts
  1973. - apps/zcode-cli/packages/cli/src/plugins-marketplace-command.ts
  1974. - apps/zcode-cli/packages/cli/src/tui-prompt-handler-queries.ts
  1975. reason: 已有插件发现调用方迁移为 await;runtime-cleanup 在原进程关闭编排中释放注入的准备 owner,没有新增文件。对应契约见 docs/workspace-capability-discovery-cache.md,不为此次异步化与预热接管整个 CLI 或协议目录。
  1976. - id: automation-self-pause-turn-visibility-existing-edit
  1977. rule: unmanaged-new-file
  1978. paths: [apps/zcode-cli/packages/core/src/runtime/methods/turn-tool-visibility.ts]
  1979. reason: 已有 turn 工具可见性 owner 仅增加当前 automation 自暂停的反向可见性规则;不新增跨模块依赖或 owner,接管整个 zcode-cli runtime 超出本次缺陷修复范围。
  1980. - id: compact-bundle-reminder-builder-unmanaged-edit
  1981. rule: unmanaged-new-file
  1982. paths: [apps/zcode-cli/packages/core/src/runtime/methods/runtime-reminder-persistence.ts]
  1983. reason: 已入库的隐藏提醒落盘函数拆出只构建记录的函数,供 compaction 把公告、summary 与附件交给同一个 store 事务;记录不再写 tools 字段,中断标记按普通 user 文本取正文;Core 模块边界不变,接管整个 runtime 目录不在本次范围内。
  1984. - id: tool-search-schema-key-order-unmanaged-edit
  1985. rule: unmanaged-new-file
  1986. paths: [apps/zcode-cli/packages/contracts/src/tools/tool-search.ts]
  1987. reason: 已入库的 ToolSearch 输入 schema 改走统一的 toToolJsonSchema,使 key 顺序与其他工具一致,$schema 随之从 draft-07 改为 2020-12;contracts 模块边界不变,接管整个 tools 目录不在本次范围内。
  1988. - id: tool-search-removal-reason-unmanaged-edit
  1989. rule: unmanaged-new-file
  1990. paths:
  1991. - apps/zcode-cli/packages/adapters/src/model/tool-search.ts
  1992. - apps/zcode-cli/packages/core/src/tool/search/exposure.ts
  1993. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison.ts
  1994. reason: 已入库的 ToolSearch 能力解析、公告渲染与离线轨迹识别按删除原因分段,并由 adapter 声明 Anthropic 协议的提醒折叠能力;增量事实、持久化与模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  1995. - id: interrupt-marker-unmanaged-new-file
  1996. rule: unmanaged-new-file
  1997. paths: [apps/zcode-cli/packages/core/src/runtime/methods/interrupt-marker.ts]
  1998. reason: 停止轮次后给模型的中断标记放在 runtime/methods 的独立小文件,避免继续增大已超行数的 turn.ts;复用隐藏提醒的落盘函数(persistRuntimeReminderMessage)与历史提交,Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  1999. - id: instruction-files-delta-unmanaged-new-file
  2000. rule: unmanaged-new-file
  2001. paths: [apps/zcode-cli/packages/core/src/context/sections/instruction-files.ts]
  2002. reason: 指令文件与 MEMORY.md 索引的按文件渲染、hash 与增量文案放在 context/sections 的独立小文件,完整公告与增量公告共用(apps/zcode-cli/docs/design/v2/loop/meta-user-context.md);只被同包的 request-user-context 与 context-refresh 引用,Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  2003. - id: prompt-snapshot-unmanaged-new-file
  2004. rule: unmanaged-new-file
  2005. paths: [apps/zcode-cli/packages/core/src/runtime/helpers/prompt-snapshot.ts]
  2006. reason: 主会话已发 system 的快照读写放在 runtime/helpers 的独立小文件(apps/zcode-cli/docs/design/v2/loop/prompt-snapshot.md);数据存在现有 session_entry(类型 runtime/prompt_snapshot),不改表,只被同包的 turn-loop、resume、compact-active、session-fork 与 rebuildContextPrefix 引用,Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  2007. - id: gen-ui-output-fork-session-unmanaged-edit
  2008. rule: unmanaged-new-file
  2009. paths: [apps/zcode-cli/packages/core/src/runtime/helpers/gen-ui-output.ts]
  2010. reason: 已入库的 Gen UI 输出目录解析加一个可选 session id 参数,fork 时取子会话自己的目录写入环境更新(docs/specs/gen-ui-output-directory.md);默认仍取当前会话,调用方与 Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  2011. - id: off-peak-takeover-context-prefix-unmanaged-edit
  2012. rule: unmanaged-new-file
  2013. paths: [apps/zcode-cli/packages/core/src/runtime/off-peak/turn.ts]
  2014. reason: 已入库的闲时接管函数换成用户模型后,按新模型重建 Context Prefix,与 guide 换模型共用 rebuildContextPrefix;接管时机、归属与 Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  2015. - id: turn-work-segment-comment-unmanaged-edit
  2016. rule: unmanaged-new-file
  2017. paths: [packages/ui/src/v4/conversationTurnRenderUnitTypes.ts]
  2018. reason: 已入库的渲染单元类型只更新 workSegments 字段注释,使其与同一 drain 边界的 guide 共用一段的行为一致;类型与 ui 模块边界不变,接管整个 v4 目录不在本次范围内。
  2019. - id: shortcut-settings-existing-ui-edit
  2020. rule: unmanaged-new-file
  2021. paths:
  2022. - packages/ui/src/components/ui/kbd.tsx
  2023. - packages/ui/src/settings/ShortcutSearchBar.tsx
  2024. - packages/ui/src/settings/ShortcutSettingsSection.tsx
  2025. reason: Existing upstream shortcut components and keycap primitive edited for shared controls, responsive layout and save admission; adopting the entire settings directory requires a separate boundary refactor.
  2026. - id: sidebar-workflow-tooltip-existing-ui-edit
  2027. rule: unmanaged-new-file
  2028. paths: [packages/ui/src/components/workflow-run-line/WorkflowRunRail.tsx]
  2029. reason: Existing upstream workflow rail edited only to adapt native titles within the sidebar tooltip scope; workflow ownership and imports remain unchanged except for the shared UI tooltip adapter.
  2030. - id: onboarding-existing-module-edit
  2031. rule: unmanaged-new-file
  2032. paths:
  2033. - packages/services/src/onboarding/
  2034. - packages/ui/src/onboarding/
  2035. reason: onboarding 目录(记录持久化服务与触发 hook)是已合入 staging 的存量功能模块,本轮修复在其既有边界内收紧老用户判定与兜底;模块 adopt 登记需单独的边界梳理,不在本缺陷修复内展开。
  2036. - id: settings-search-existing-row-edit
  2037. rule: unmanaged-new-file
  2038. paths: [packages/ui/src/settings/ProactiveSuggestionsSetting.tsx]
  2039. reason: 已有的主动任务推荐设置行只增加 SettingsRow 的稳定定位 id,不改变引导记录读写和模块依赖;搜索实现独立登记在 settings-search 模块,不把现有引导设置迁入搜索模块。
  2040. - id: remote-connection-flow-existing-size
  2041. rule: max-file-lines
  2042. paths: [packages/ui/src/remote-connection-flow/index.ts]
  2043. reason: Preserve the existing single hook owner and closure; module adoption must not mechanically split state to satisfy line counts.
  2044. - id: gen-ui-tweak-runtime-size
  2045. rule: max-file-lines
  2046. paths: [packages/desktop/src/renderer/src/plugin-sandbox/genUiTweakRuntime.js]
  2047. reason: Keep parameter binding and registration lifecycle together; runtime-manifest.json and tests verify file integrity.
  2048. - id: gen-ui-tweak-runtime-lint
  2049. rule: disable-count
  2050. paths: [packages/desktop/src/renderer/src/plugin-sandbox/genUiTweakRuntime.js]
  2051. reason: Allow the control-character validation regex and the single-file parameter-control runtime.
  2052. - id: workflow-amend-provider-boundary-unmanaged-edit
  2053. rule: unmanaged-new-file
  2054. paths:
  2055. - apps/zcode-cli/packages/contracts/src/tools/amend-workflow.ts
  2056. - apps/zcode-cli/packages/core/src/tool/handlers/amend-workflow-resolve.ts
  2057. reason: Admitted upstream files edited only to make an own-run AmendWorkflow that brings in a new provider ask the user; adopting the zcode-cli contracts and core handlers needs a separate module boundary refactor.
  2058. - id: remote-device-list-unmanaged-new-files
  2059. rule: unmanaged-new-file
  2060. paths:
  2061. - packages/ui/src/settings/SourceServerDeviceRow.tsx
  2062. - packages/ui/src/settings/sourceServerDeviceList.ts
  2063. - packages/ui/src/lib/remoteConnectionPresentation.ts
  2064. reason: Settings remote device list (RDUX-13) splits the presentational row and pure ordering/search helpers out of the existing SourceServerManagementPanel, and removes the now-unused settings navigation status aggregate from the admitted presentation model; adopting packages/ui/src/settings or packages/ui/src/lib needs a separate module boundary refactor (same pattern as settings-machine-unmanaged-edit).
  2065. - id: workflow-share-unmanaged-new-files
  2066. rule: unmanaged-new-file
  2067. paths:
  2068. - packages/services/src/conversation-share/conversationShareInlineImages.ts
  2069. - packages/services/src/conversation-share/conversationShareWorkflowSnapshot.ts
  2070. - packages/shared/src/conversation-share-content.ts
  2071. - packages/shared/src/conversation-share-tool-presentation.ts
  2072. - packages/ui/src/v4/ConversationShareContent.tsx
  2073. - packages/ui/src/v4/ConversationShareWorkflow.tsx
  2074. - packages/ui/src/v4/conversationShareItems.ts
  2075. - packages/ui/src/ToolCallBlocks/ToolPresentation.tsx
  2076. - packages/ui/src/ToolCallBlocks/presentationCapabilities.tsx
  2077. - packages/ui/src/ToolCallBlocks/renderers/list-models.tsx
  2078. - packages/ui/src/ToolCallBlocks/renderers/list-saved-workflows-presentation.tsx
  2079. - packages/ui/src/ToolCallBlocks/renderers/web-fetch.tsx
  2080. - packages/ui/src/hooks/useToolPresentationHostCapabilities.ts
  2081. - packages/ui/src/chat-input-toolbar/thoughtLevelLabels.ts
  2082. - packages/ui/src/components/workflow-timeline/subagent-model-label.ts
  2083. - packages/desktop/src/main/fileApplications.ts
  2084. reason: Feature-branch files admitted path-exact; adopting conversation-share, tool presentation or renderer directories needs a separate module boundary refactor (same pattern as settings-machine-unmanaged-edit).
  2085. # 既有 workflow 摘要 renderer 的展示调整;仅登记这两个文件,不放开整个 renderer 目录。
  2086. - id: workflow-summary-row-existing-ui-edit
  2087. rule: unmanaged-new-file
  2088. paths:
  2089. - packages/ui/src/ToolCallBlocks/renderers/workflow-draft-row.tsx
  2090. - packages/ui/src/ToolCallBlocks/renderers/workflow-fill-row.tsx
  2091. reason: Existing workflow row renderers edited only to replace decorative summary dots with layout spacing; adopting the renderer directory requires a separate module boundary refactor. Other architecture rules remain enforced.
  2092. - id: workflow-notifications-unmanaged-files
  2093. rule: unmanaged-new-file
  2094. paths:
  2095. - apps/zcode-cli/packages/core/src/runtime-task/workflow-blocked-reminder.ts
  2096. - apps/zcode-cli/packages/core/src/runtime/methods/dynamic-workflow-blocked-reminder.ts
  2097. - apps/zcode-cli/packages/core/src/runtime-task/workflow-notification-copy.ts
  2098. - apps/zcode-cli/packages/core/src/runtime/methods/dynamic-workflow-run-hole-notification.ts
  2099. - apps/zcode-cli/packages/core/src/tool/handlers/model-reference.ts
  2100. - packages/shared/src/test-ids-workflow.ts
  2101. reason: Workflow reminder, notification and model reference files reached staging without the MR architecture gate running; adopting the zcode-cli core and shared test ids needs a separate module boundary refactor.
  2102. - id: composer-toolbar-unmanaged-files
  2103. rule: unmanaged-new-file
  2104. paths:
  2105. - packages/ui/src/ControlShortcutBadge.tsx
  2106. - packages/ui/src/chat-input-toolbar/ComposerEffortHeading.tsx
  2107. - packages/ui/src/chat-input-toolbar/ComposerModelMenu.tsx
  2108. - packages/ui/src/chat-input-toolbar/ComposerProviderMenu.tsx
  2109. - packages/ui/src/chat-input-toolbar/ComposerTriggerTransition.tsx
  2110. - packages/ui/src/hooks/useComposerConnectionSwitch.ts
  2111. - packages/ui/src/lib/composerPlanGroups.ts
  2112. - packages/ui/src/lib/providerFamilyConnectionTransition.ts
  2113. - packages/ui/src/prompt-editor/useComposerToolbarFit.ts
  2114. reason: Composer model, provider and toolbar files reached staging without the MR architecture gate running; adopting the packages/ui composer toolbar needs a separate module boundary refactor.
  2115. - id: provider-endpoint-routing-unmanaged-edit
  2116. rule: unmanaged-new-file
  2117. paths:
  2118. - apps/zcode-cli/packages/adapters/src/model/endpoint-routing-edition/index.ts
  2119. - apps/zcode-cli/packages/adapters/src/model/provider-endpoint-routing-options.ts
  2120. reason: Existing upstream routing assembly files gain the endpoint origin and injected JWT reader; adopting the full CLI model adapter directory needs a separate module boundary refactor.
  2121. - id: workflow-mode-user-choice-unmanaged-edit
  2122. rule: unmanaged-new-file
  2123. paths:
  2124. - packages/shared/src/dynamic-workflow-feature.ts
  2125. - packages/ui/src/settings/DynamicWorkflowModeSetting.tsx
  2126. - packages/ui/src/store/dynamicWorkflowAvailabilityStore.ts
  2127. - packages/ui/src/hooks/useDynamicWorkflowAvailability.ts
  2128. reason: Admitted upstream files edited only to let the user's dynamic workflow mode choice always win, keep the settings row visible, and describe that the snapshot reload no longer waits for CLI answers; adopting packages/shared/src and packages/ui/src needs a separate module boundary refactor.
  2129. - id: workflow-source-error-hint-unmanaged-edit
  2130. rule: unmanaged-new-file
  2131. paths:
  2132. - apps/zcode-cli/packages/contracts/src/tools/fill-workflow-hole.ts
  2133. reason: Admitted upstream file edited only to rename the constant its comment refers to (CREATE_WORKFLOW_SOURCE_ERROR split into conflict and missing messages); adopting apps/zcode-cli needs a separate module boundary refactor.
  2134. - id: workflow-analyzer-complexity-unmanaged-edit
  2135. rule: unmanaged-new-file
  2136. paths:
  2137. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-bindings.ts
  2138. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-calls.ts
  2139. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-functions.ts
  2140. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-loops.ts
  2141. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-settle.ts
  2142. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-state.ts
  2143. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-strands.ts
  2144. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-types.ts
  2145. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/flow-strands.ts
  2146. reason: Admitted upstream analyzer files edited only to stop the workflow analysis from growing much faster than the script (callback bindings, loop regions, join control, flow strands); adopting apps/zcode-cli/packages/dynamic-workflow needs a separate module boundary refactor that first breaks its 24 internal import cycles.
  2147. - id: off-peak-model-descriptor-unmanaged-edit
  2148. rule: unmanaged-new-file
  2149. paths: [apps/zcode-cli/packages/core/src/runtime/off-peak/model-binding.ts]
  2150. reason: 已入库的闲时 Model 包装改用 contracts 的 modelDescriptorOf 复制全部数据字段,修复逐字段手抄漏掉 requestCapabilities;包装行为与 Core 模块边界不变,接管整个 runtime 目录不在本次范围内。
  2151. - id: workflow-draft-read-state-per-path-unmanaged-edit
  2152. rule: unmanaged-new-file
  2153. paths: [apps/zcode-cli/packages/core/src/tool/handlers/workflow-draft-read-state.ts]
  2154. reason: 已入库的工作流草稿读状态登记改走 setReadFileStateEntry,跟随读状态改为每个路径一条;草稿流程与 Core 模块边界不变,接管整个 tool 目录不在本次范围内。
  2155. - id: workflow-skill-gate-compact-read-state-comment-unmanaged-edit
  2156. rule: unmanaged-new-file
  2157. paths: [apps/zcode-cli/packages/core/src/tool/handlers/workflow-skill-gate.ts]
  2158. reason: 已入库的工作流技能门只更新一句注释,跟随 compaction 后读取状态改为只留补回的文件;门的判据、代码与 Core 模块边界不变,接管整个 tool 目录不在本次范围内。
  2159. - id: conversation-telemetry-existing-state-machine-size
  2160. rule: max-file-lines
  2161. paths:
  2162. - packages/shared/src/conversation-telemetry/conversationTelemetryEngine.ts
  2163. - packages/shared/src/conversation-telemetry/messageTelemetry.ts
  2164. reason: Relocate the existing renderer state machine and builders unchanged so desktop and execution share token/step semantics; retain one lifecycle owner instead of splitting state to meet line counts.
  2165. - id: conversation-telemetry-existing-state-machine-lint
  2166. rule: disable-count
  2167. paths:
  2168. - packages/shared/src/conversation-telemetry/conversationTelemetryEngine.ts
  2169. - packages/shared/src/conversation-telemetry/messageTelemetry.ts
  2170. reason: Preserve the two original file-length annotations while relocating the existing implementation.
  2171. - id: host-service-telemetry-existing-file
  2172. rule: unmanaged-new-file
  2173. paths: [packages/desktop/src/host/hostServiceResourceTelemetry.ts]
  2174. reason: Existing main-branch registration point gains a Host-only event and capability gate; adopting the whole Host runtime is outside this telemetry change.
  2175. - id: browser-device-presets-export-unmanaged-new-files
  2176. rule: unmanaged-new-file
  2177. paths:
  2178. - packages/ui/src/browser-use/browserPageExport.ts
  2179. - packages/ui/src/browser-use/useBrowserPageExport.ts
  2180. - packages/desktop/src/main/desktopCaptureBrowserGuestPage.ts
  2181. reason: Browser pane export (docs/browser-use/2026-10-16-browser-device-presets-and-export-spec.md) colocates with the existing unmanaged browser-use view and toolbar it extends, and its main-side PNG capture sits next to the existing unmanaged desktopPrintToPdf handler it mirrors; adopting packages/ui/src/browser-use and packages/desktop/src/main as managed modules needs a separate boundary refactor of the embedded browser.
  2182. - id: browser-element-screenshot-unmanaged-new-files
  2183. rule: unmanaged-new-file
  2184. paths: [packages/ui/src/browser-use/browserElementScreenshot.ts]
  2185. reason: Element picker screenshots (docs/browser-use/2026-11-03-browser-element-screenshot-and-live-reload-spec.md) reuse the unmanaged browser-use main-side capture; the helper sits next to the existing unmanaged browser view, and the composer side reuses plugin-ui's public useContextImageAttachments; adopting packages/ui/src/browser-use as a managed module needs a separate boundary refactor.
  2186. - id: browser-file-live-reload-unmanaged-new-files
  2187. rule: unmanaged-new-file
  2188. paths: [packages/ui/src/browser-use/useBrowserFileLiveReload.ts]
  2189. reason: Browser file:// live reload (docs/browser-use/2026-11-03-browser-element-screenshot-and-live-reload-spec.md) mirrors the unmanaged usePptxFileWatch pattern and is wired only into the existing unmanaged UnifiedBrowserView; adopting packages/ui/src/browser-use as a managed module needs a separate boundary refactor of the embedded browser.
  2190. - id: browser-design-mode-unmanaged-new-files
  2191. rule: unmanaged-new-file
  2192. paths:
  2193. - packages/ui/src/browser-use/BrowserDesignInspector.tsx
  2194. - packages/ui/src/browser-use/BrowserDesignFields.tsx
  2195. - packages/ui/src/browser-use/browserDesignProperties.ts
  2196. - packages/ui/src/browser-use/BrowserDesignToolbar.tsx
  2197. - packages/ui/src/browser-use/useBrowserDesignMode.ts
  2198. - packages/ui/src/browser-use/useBrowserDesignRuntime.ts
  2199. - packages/ui/src/browser-use/useBrowserDesignSourceWriter.ts
  2200. - packages/ui/src/v4/composer/ElementMentionSyncPlugin.tsx
  2201. reason: Browser design mode (docs/browser-use/2026-11-03-browser-design-mode-spec.md) adds the thin host layer next to the existing unmanaged UnifiedBrowserView it extends; page logic lives in the managed design-runtime package. Adopting packages/ui/src/browser-use as a managed module needs a separate boundary refactor of the embedded browser.
  2202. - id: browser-design-preload-bridge-unmanaged-new-file
  2203. rule: unmanaged-new-file
  2204. paths: [packages/desktop/src/preload/embeddedBrowserDesignBridge.ts]
  2205. reason: The design runtime's page-to-host forwarder (docs/browser-use/2026-11-03-browser-design-mode-spec.md) is installed by the existing unmanaged embedded browser guest preload next to its embeddedBrowserWheel forwarder and reuses the same sendToHost channel registry; adopting packages/desktop/src/preload as a managed module needs a separate boundary refactor.
  2206. - id: file-tree-html-click-browser-unmanaged-new-file
  2207. rule: unmanaged-new-file
  2208. paths: [packages/ui/src/settings/FileTreeHtmlOpenSetting.tsx]
  2209. reason: The opt-in "open HTML in the built-in browser on click" switch (docs/browser-use/2026-11-03-browser-element-screenshot-and-live-reload-spec.md) is a self-contained settings row rendered by the existing unmanaged BrowserSettingsSection, following the ProactiveSuggestionsSetting pattern; adopting packages/ui/src/settings needs a separate module boundary refactor.
  2210. - id: request-verification-config-recovery-presentation
  2211. rule: unmanaged-new-file
  2212. paths:
  2213. - packages/ui/src/request-security-edition/errors.ts
  2214. reason: 在现有官方版本安全校验展示入口补充配置读取失败的分类与本地化,不改变状态 owner 或模块边界;公共 errors.ts 入口及其开源占位实现承接同一契约,沿用本条精确路径准入;接管整个 UI 安全校验目录不属于本次网络恢复修复。
  2215. - id: node-repl-no-progress-hint-unmanaged-edit
  2216. rule: unmanaged-new-file
  2217. paths:
  2218. - apps/zcode-cli/packages/node-repl-host/src/no-progress-guard.ts
  2219. - apps/zcode-cli/packages/node-repl-host/src/tool-contract.ts
  2220. reason: Admitted upstream node_repl host gains a self-contained no-progress hint file and a serverInfo version bump; adopting the whole node-repl-host package needs a separate module boundary refactor.
  2221. - id: zcode-cua-unmanaged-new-files
  2222. rule: unmanaged-new-file
  2223. paths:
  2224. - packages/zcode-cua/src/**
  2225. reason: The whole zcode-cua producer package (broker, native adapters, tools) entered the repo after the gate timestamp as pre-existing code moved from a separate repository; adopting its internal layers needs a dedicated CONTRACT pass (it has known internal cycles by design), not a mechanical split in this branch.
  2226. - id: ui-more-locales-new-files
  2227. rule: unmanaged-new-file
  2228. paths:
  2229. - packages/shared/src/locale.ts
  2230. - packages/desktop/src/main/desktopApplicationLocaleBootstrap.ts
  2231. - packages/ui/src/i18n/localeMessages.ts
  2232. - packages/ui/src/i18n/locales/ja-JP.ts
  2233. - packages/ui/src/i18n/locales/ko-KR.ts
  2234. - packages/ui/src/i18n/locales/ru-RU.ts
  2235. reason: 新增日/俄/韩界面语言(docs/i18n/ui-locales.md)。locale.ts 是语言解析与回退的唯一事实源;Main 冷启动只读 setting.json 取界面语言;localeMessages 只装配各语言文案表;三份文案表与 en-US/zh-CN 同构,单文件远超 800 行上限,登记 managed 模块也须另加行数例外。接管整个 ui/shared/desktop 目录不在本次范围内。
  2236. - id: visualize-plugin-icon-existing-edit
  2237. rule: unmanaged-new-file
  2238. paths: [packages/ui/src/lib/pluginIconSource.ts]
  2239. reason: 已准入的存量图标解析文件仅增加 Visualize 官方身份与本地 PNG 的映射(docs/builtin-plugin-icons.md);不改变解析函数、受信任图片规则、状态归属或模块边界,不为其他 UI 文件开放例外。
  2240. - id: ui-loader-circle-existing-edit
  2241. rule: unmanaged-new-file
  2242. paths:
  2243. - packages/ui/src/DeleteAllArchivedTasksButton.tsx
  2244. - packages/ui/src/components/workflow-timeline/WorkflowRoll.tsx
  2245. - packages/ui/src/components/workflow-timeline/WorkflowRosterParts.tsx
  2246. - packages/ui/src/v4/BotTopicPreparation.tsx
  2247. reason: 已准入的四个存量 UI 文件仅统一 Lucide 图标为 LoaderCircle(docs/design/loading-icons.md),不新增文件、不改变状态 owner、公共契约或模块依赖;本次不接管其所在业务模块。
  2248. - id: ui-more-locales-existing-edit
  2249. rule: unmanaged-new-file
  2250. paths:
  2251. - packages/desktop/src/host/hostSessionCreateTelemetry.ts
  2252. - packages/services/src/marketing-touch/marketingTouch.ts
  2253. - packages/services/src/marketing-touch/marketingTouchService.ts
  2254. - packages/shared/src/marketingTouch.ts
  2255. - packages/ui/src/app-shell/WorkflowRunHoleParts.tsx
  2256. - packages/ui/src/app-shell/WorkflowRunProvenance.tsx
  2257. - packages/ui/src/components/marketing-touch/MarketingDialogs.tsx
  2258. - packages/ui/src/components/marketing-touch/MarketingTouchProvider.tsx
  2259. - packages/ui/src/components/workflow-timeline/WorkflowSettingsChangeRow.tsx
  2260. - packages/ui/src/components/workflow-timeline/WorkflowTimelineFills.tsx
  2261. reason: 已准入的存量文件只把中英二选一的 locale 类型放宽为全部界面语言(X-Client-Language 带真实界面语言,投放内容仍按中英渲染),会话创建遥测接收 Host 界面语言,时间格式化传入界面语言;owner、签名形态与模块边界不变,接管 marketing-touch/workflow-timeline 目录不在本次范围内。
  2262. - id: dwf-held-elsewhere-and-leftovers-existing-edit
  2263. rule: unmanaged-new-file
  2264. paths:
  2265. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-run-fill.ts
  2266. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-run-roster-phases.ts
  2267. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-run-roster.ts
  2268. - apps/zcode-cli/packages/core/src/tool/handlers/amend-workflow-source.ts
  2269. - apps/zcode-cli/packages/core/src/tool/handlers/fill-workflow-hole-resolve.ts
  2270. - apps/zcode-cli/packages/core/src/tool/handlers/get-workflow-run-format-roster.ts
  2271. - apps/zcode-cli/packages/core/src/tool/handlers/get-workflow-run-summary.ts
  2272. reason: Existing dynamic-workflow files only gain the refusal for a run held by another process and accurate wording for unfinished steps (docs/dynamic-workflow/launch.md); no new file, owner or module boundary changes.
  2273. - id: dwf-websearch-budget
  2274. rule: unmanaged-new-file
  2275. paths:
  2276. - apps/zcode-cli/packages/bootstrap/src/app/workflow-driver-types.ts
  2277. - apps/zcode-cli/packages/bootstrap/src/app/workflow-driver-web-search-budget.ts
  2278. - apps/zcode-cli/packages/contracts/src/interfaces/workflow-web-search-budget.port.ts
  2279. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/actor-budgets.ts
  2280. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/actor-models.ts
  2281. - apps/zcode-cli/packages/dynamic-workflow/src/engine/persona.ts
  2282. reason: The per-task WebSearch limit for workflow subagents (docs/dynamic-workflow/authoring.md, "A subagent's search budget") adds three small files beside the workflow driver, the contracts interfaces and the compiler's persona check, and edits three existing ones; it follows the existing escalation path and changes no owner or module boundary.
  2283. - id: design-plugin-third-party-resources
  2284. rule: unmanaged-new-file
  2285. paths:
  2286. - apps/zcode-cli/packages/design-plugin/skills/design/design-resources/**
  2287. reason: 内置 design 插件随包的第三方设计资源(骨架里的 deck-stage.js、schema.ts 等示例资产),按上游字节保留并登记在 third-party/copied-components.json;它们只作为技能读取或复制给用户的模板,不被任何产品代码 import,不构成产品模块。
  2288. - id: agent-runtime-exit-banner
  2289. rule: unmanaged-new-file
  2290. paths: [packages/ui/src/v4/AgentRuntimeExitBanner.tsx]
  2291. reason: 后台 runtime 意外退出时会话底部的说明横幅与订阅 hook(docs/ui/agent-runtime-exit-notice.md),与 PendingCommandRecoveryBanner 同级;只读 services 的 onAgentRuntimeExited,不持有会话状态,不接管整个 ui 未受管模块。
  2292. - id: background-subagent-stall-notice
  2293. rule: unmanaged-new-file
  2294. paths:
  2295. - apps/zcode-cli/packages/core/src/subagent/background-stall.ts
  2296. - apps/zcode-cli/packages/core/src/runtime/methods/subagent-stall-reminder.ts
  2297. - apps/zcode-cli/packages/core/src/tool/handlers/task-output-projection.ts
  2298. reason: 后台 Agent 无进展提醒(apps/zcode-cli/docs/design/v2/tool/07-subagent.md「后台 Agent 无进展提醒」)新增纯逻辑停滞钟与 runtime 接线两个小文件,与既有 workflow 空闲提醒钟同构;task-output-projection 只为运行中的 local_agent 加 activity 投影。进展事实仍归 RuntimeTaskRegistry,投递复用后台通知队列,不改变模块边界。
  2299. - id: previous-runtime-subagent-leftovers-observation
  2300. rule: unmanaged-new-file
  2301. paths: [apps/zcode-cli/packages/bootstrap/src/app/subagent-observation.ts]
  2302. reason: TUI 的子代理观察与 V4 冷恢复共用 projectSessionSubagents;只多传本进程启动时间,使上一代 runtime 崩溃遗留的 child 不再显示为 running(apps/zcode-cli/docs/design/v2/tool/07-subagent.md「上一代 runtime 遗留的 Agent」)。不改变模块边界。
  2303. - id: total-tokens-reminder
  2304. rule: unmanaged-new-file
  2305. paths:
  2306. - apps/zcode-cli/packages/core/src/context/total-tokens.ts
  2307. - apps/zcode-cli/packages/core/src/runtime/helpers/total-tokens-budget.ts
  2308. - apps/zcode-cli/packages/core/src/runtime/helpers/provider-entry-origins.ts
  2309. reason: token 预算提醒(apps/zcode-cli/docs/design/v2/loop/meta-user-context.md「Total-tokens reminder」)新增两个小文件:预算行文本与计数器纯函数;已准入的 provider-entry-origins 只追加真实用户 prompt 的判定,复用既有来源判据。提醒走现有 system-reminder 来源与投影,不新增 owner、协议或模块边界,接管整个 zcode-cli 不在本次范围内。
  2310. - id: startup-failure-export-logs
  2311. rule: unmanaged-new-file
  2312. paths:
  2313. - packages/ui/src/root/GlobalDatabaseStartupLoading.tsx
  2314. reason: 启动失败页在现有复制诊断/重试/退出旁增加导出日志按钮(docs/desktop/database-migration-startup-gate-plan.md)。只扩展既有失败页交互,不新增文件、不改变启动状态 owner 或模块边界;接管 packages/ui/src/root 不在本次范围内。