architecture-policy.yaml 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490
  1. version: 1
  2. # 存量模块先标记为 legacy;新模块或完成迁移的模块设置 managed: true。
  3. modules:
  4. - id: rpc
  5. roots: [packages/rpc/src]
  6. managed: false
  7. - id: shared
  8. roots: [packages/shared/src]
  9. managed: false
  10. - id: provider
  11. roots: [packages/provider/src]
  12. managed: false
  13. - id: provider-node
  14. roots: [packages/provider-node/src]
  15. managed: false
  16. - id: services
  17. roots: [packages/services/src]
  18. managed: false
  19. - id: session
  20. roots: [packages/services/src/session]
  21. managed: false
  22. requires: [shared]
  23. publicEntrypoints:
  24. - packages/services/src/session/contract.ts
  25. - packages/services/src/session/taskIndexRepo.ts
  26. - packages/services/src/session/automationRepo.ts
  27. - packages/services/src/session/offPeakTaskRepo.ts
  28. - packages/services/src/session/tasksDatabase/migrations.ts
  29. - packages/services/src/session/tasksDatabase/prepared.ts
  30. owner: conversation
  31. - id: storage
  32. roots: [packages/services/src/storage]
  33. managed: true
  34. requires: [shared, rpc, services]
  35. publicEntrypoints: [packages/services/src/storage/contract.ts]
  36. layers: {domain: domain, app: app, adapters: adapters}
  37. layerOrder: [domain, app, adapters]
  38. owner: desktop-settings
  39. - id: client
  40. roots: [packages/client/src]
  41. managed: false
  42. - id: server
  43. roots: [packages/server/src]
  44. managed: false
  45. - id: zcode-server-cli
  46. roots: [packages/zcode-server-cli/src]
  47. managed: false
  48. - id: ui
  49. roots: [packages/ui/src]
  50. managed: false
  51. - id: web
  52. roots: [packages/web/src]
  53. managed: false
  54. - id: desktop
  55. roots: [packages/desktop/src]
  56. managed: false
  57. - id: formal-proof
  58. roots: [packages/formal-proof/src]
  59. managed: false
  60. - id: stream-animate
  61. roots: [packages/stream-animate/src]
  62. managed: false
  63. - id: e2e-report
  64. roots: [packages/e2e-report/src]
  65. managed: false
  66. - id: zcode-cli
  67. roots: [apps/zcode-cli]
  68. managed: false
  69. # sqlite-migrations:由 architecture:adopt 登记
  70. - id: conversation-telemetry-engine
  71. roots: [packages/shared/src/conversation-telemetry]
  72. managed: true
  73. requires: [shared]
  74. publicEntrypoints:
  75. - packages/shared/src/conversation-telemetry/index.ts
  76. - packages/shared/src/conversation-telemetry/contract.ts
  77. - packages/shared/src/conversation-telemetry/messageTelemetry.ts
  78. - packages/shared/src/conversation-telemetry/providerTelemetryIdentity.ts
  79. - packages/shared/src/conversation-telemetry/remoteTelemetryEvent.ts
  80. layers: {app: "."}
  81. owner: conversation
  82. - id: conversation-telemetry-service
  83. roots: [packages/services/src/conversation-telemetry]
  84. managed: true
  85. requires: [shared, services, rpc, conversation-telemetry-engine]
  86. publicEntrypoints:
  87. - packages/services/src/conversation-telemetry/remoteConversationTelemetry.ts
  88. - packages/services/src/conversation-telemetry/contract.ts
  89. layers: {app: "."}
  90. owner: conversation
  91. - id: sqlite-migrations
  92. roots:
  93. - packages/shared/src/sqlite-migrations
  94. managed: true
  95. requires: []
  96. publicEntrypoints:
  97. - packages/shared/src/sqlite-migrations/index.ts
  98. - packages/shared/src/sqlite-migrations/contract.ts
  99. layers:
  100. adapters: .
  101. owner: persistence
  102. # project-storage:由 architecture:adopt 登记
  103. - id: project-storage
  104. roots:
  105. - packages/services/src/project-storage
  106. managed: true
  107. requires:
  108. - shared
  109. - sqlite-migrations
  110. - services
  111. - session
  112. publicEntrypoints:
  113. - packages/services/src/project-storage/index.ts
  114. - packages/services/src/project-storage/contract.ts
  115. - packages/services/src/project-storage/startup.ts
  116. - packages/services/src/project-storage/startup-entry.ts
  117. layers:
  118. adapters: .
  119. owner: conversation
  120. # project:由 architecture:adopt 登记
  121. - id: project
  122. roots:
  123. - packages/services/src/project
  124. managed: true
  125. requires: [project-storage, services, shared]
  126. publicEntrypoints:
  127. - packages/services/src/project/index.ts
  128. - packages/services/src/project/contract.ts
  129. layers:
  130. adapters: .
  131. owner: conversation
  132. # task-facts:由 architecture:adopt 登记
  133. - id: task-facts
  134. roots:
  135. - packages/services/src/task-facts
  136. managed: true
  137. requires: [shared]
  138. publicEntrypoints:
  139. - packages/services/src/task-facts/index.ts
  140. - packages/services/src/task-facts/contract.ts
  141. - packages/services/src/task-facts/repairSubagentTaskIndex.ts
  142. layers:
  143. app: .
  144. owner: conversation
  145. # project-sidebar:由 architecture:adopt 登记
  146. - id: project-sidebar
  147. roots:
  148. - packages/ui/src/project-sidebar
  149. managed: true
  150. requires:
  151. - services
  152. - shared
  153. - ui
  154. - conversation-workspace-target
  155. - web-remote-control-ui
  156. - remote-connection-flow
  157. - data-sync
  158. publicEntrypoints:
  159. - packages/ui/src/project-sidebar/index.tsx
  160. - packages/ui/src/project-sidebar/contract.ts
  161. - packages/ui/src/project-sidebar/remote-project-connection.ts
  162. - packages/ui/src/project-sidebar/useSavedWorkflowProjectOptions.ts
  163. - packages/ui/src/project-sidebar/RemoteProjectMenu.tsx
  164. - packages/ui/src/project-sidebar/WorkspaceDragOverlay.tsx
  165. - packages/ui/src/project-sidebar/useRemoteProjectConnectionPresentation.ts
  166. - packages/ui/src/project-sidebar/OfflineRemoteProjectRows.tsx
  167. - packages/ui/src/project-sidebar/RemoteConversationDisconnected.tsx
  168. layers:
  169. contract: contract.ts
  170. ui: .
  171. owner: conversation
  172. # remote-projects:由 architecture:adopt 登记
  173. - id: remote-projects
  174. roots:
  175. - packages/services/src/remote-projects
  176. managed: true
  177. requires: [services, shared, project-storage]
  178. publicEntrypoints:
  179. - packages/services/src/remote-projects/index.ts
  180. - packages/services/src/remote-projects/contract.ts
  181. layers:
  182. adapters: .
  183. owner: conversation
  184. # startup-storage:由 architecture:adopt 登记
  185. - id: startup-storage
  186. roots:
  187. - packages/services/src/startup-storage
  188. managed: true
  189. requires:
  190. - sqlite-migrations
  191. publicEntrypoints:
  192. - packages/services/src/startup-storage/index.ts
  193. - packages/services/src/startup-storage/contract.ts
  194. layers:
  195. adapters: .
  196. owner: persistence
  197. # workspace-config-catalog:由 architecture:adopt 登记
  198. - id: workspace-config-catalog
  199. roots:
  200. - packages/ui/src/workspace-config-catalog
  201. managed: true
  202. requires: [services, shared, ui]
  203. publicEntrypoints:
  204. - packages/ui/src/workspace-config-catalog/index.ts
  205. - packages/ui/src/workspace-config-catalog/contract.ts
  206. layers:
  207. contract: contract.ts
  208. app: catalog.ts
  209. ui: .
  210. owner: configuration
  211. # project-catalog:由 architecture:adopt 登记
  212. - id: project-catalog
  213. roots:
  214. - packages/services/src/project-catalog
  215. managed: true
  216. requires: [project, remote-projects]
  217. publicEntrypoints:
  218. - packages/services/src/project-catalog/index.ts
  219. - packages/services/src/project-catalog/contract.ts
  220. layers:
  221. contract: contract.ts
  222. domain: selection-id.ts
  223. app: .
  224. owner: conversation
  225. # bot-project-runtime:由 architecture:adopt 登记
  226. - id: bot-project-runtime
  227. roots:
  228. - packages/services/src/bot-project-runtime
  229. managed: true
  230. requires: [services, shared, remote-projects]
  231. publicEntrypoints:
  232. - packages/services/src/bot-project-runtime/index.ts
  233. - packages/services/src/bot-project-runtime/contract.ts
  234. layers:
  235. contract: contract.ts
  236. app: .
  237. owner: conversation
  238. # project-workspace-navigation:由 architecture:adopt 登记
  239. - id: project-workspace-navigation
  240. roots:
  241. - packages/services/src/project-workspace-navigation
  242. managed: true
  243. requires: [project, project-catalog, remote-projects, shared]
  244. publicEntrypoints:
  245. - packages/services/src/project-workspace-navigation/index.ts
  246. - packages/services/src/project-workspace-navigation/contract.ts
  247. layers:
  248. contract: contract.ts
  249. app: .
  250. owner: conversation
  251. # conversation-workspace-target:由 architecture:adopt 登记
  252. - id: conversation-workspace-target
  253. roots:
  254. - packages/ui/src/conversation-workspace-target
  255. managed: true
  256. requires: [shared, ui]
  257. publicEntrypoints:
  258. - packages/ui/src/conversation-workspace-target/index.ts
  259. - packages/ui/src/conversation-workspace-target/contract.ts
  260. - packages/ui/src/conversation-workspace-target/purpose.ts
  261. - packages/ui/src/conversation-workspace-target/sourceIdentity.ts
  262. - packages/ui/src/conversation-workspace-target/workbenchTarget.ts
  263. - packages/ui/src/conversation-workspace-target/usePluginCreator.ts
  264. - packages/ui/src/conversation-workspace-target/PluginAddMenu.tsx
  265. layers:
  266. contract: contract.ts
  267. app: .
  268. owner: conversation
  269. - id: gen-ui-protocol
  270. roots: [packages/shared/src/gen-ui]
  271. managed: true
  272. requires: []
  273. publicEntrypoints: [packages/shared/src/gen-ui/index.ts, packages/shared/src/gen-ui/contract.ts]
  274. layers: {domain: "."}
  275. owner: conversation
  276. - id: gen-ui-service
  277. roots: [packages/services/src/gen-ui]
  278. managed: true
  279. requires: [services, shared, rpc, gen-ui-protocol, mcp-apps-protocol]
  280. publicEntrypoints: [packages/services/src/gen-ui/index.ts, packages/services/src/gen-ui/contract.ts, packages/services/src/gen-ui/node.ts]
  281. layers: {domain: domain, app: app, adapters: adapters}
  282. layerOrder: [domain, app, adapters]
  283. owner: conversation
  284. - id: gen-ui
  285. roots: [packages/ui/src/gen-ui]
  286. managed: true
  287. requires: [ui, services, gen-ui-service, gen-ui-protocol, mcp-apps-protocol, plugin-ui]
  288. publicEntrypoints: [packages/ui/src/gen-ui/index.ts, packages/ui/src/gen-ui/contract.ts, packages/ui/src/gen-ui/host.ts]
  289. layers: {domain: domain, app: app, adapters: adapters, ui: components}
  290. layerOrder: [domain, app, adapters, ui]
  291. owner: conversation
  292. # 插件 UI(MCP Apps 沙箱):模块边界见各模块 CONTRACT.md。
  293. - id: mcp-apps-protocol
  294. roots: [packages/shared/src/mcp-apps]
  295. managed: true
  296. requires: []
  297. publicEntrypoints: [packages/shared/src/mcp-apps/index.ts, packages/shared/src/mcp-apps/contract.ts, packages/shared/src/mcp-apps/hostContract.ts]
  298. layers:
  299. domain: "."
  300. owner: plugin
  301. - id: mcp-ui
  302. roots: [apps/zcode-cli/packages/bootstrap/src/zcode-protocol/mcp-ui]
  303. managed: true
  304. requires: [zcode-cli, shared, mcp-apps-protocol]
  305. 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]
  306. layers:
  307. app: "."
  308. owner: plugin
  309. - id: plugin-ui-bridge
  310. roots: [packages/services/src/plugin-ui-bridge]
  311. managed: true
  312. requires: [services, shared, mcp-apps-protocol]
  313. 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]
  314. layers:
  315. app: "."
  316. owner: plugin
  317. - id: plugin-sandbox
  318. roots:
  319. - packages/desktop/src/main/pluginSandbox
  320. - packages/desktop/src/host/pluginSandbox
  321. - packages/desktop/src/preload/pluginSandbox
  322. - packages/desktop/src/renderer/src/plugin-sandbox
  323. managed: true
  324. requires: [desktop, shared, mcp-apps-protocol, gen-ui-protocol]
  325. publicEntrypoints:
  326. [
  327. packages/desktop/src/host/pluginSandbox/index.ts,
  328. packages/desktop/src/host/pluginSandbox/contract.ts,
  329. packages/desktop/src/preload/pluginSandbox/hostBridge.ts,
  330. packages/desktop/src/main/pluginSandbox/index.ts,
  331. packages/desktop/src/main/pluginSandbox/contract.ts,
  332. # 页面兼容接口由宿主及其契约测试维护。
  333. packages/desktop/src/renderer/src/plugin-sandbox/aliasRuntime.ts,
  334. packages/desktop/src/renderer/src/plugin-sandbox/aliasApi.ts
  335. ]
  336. layers:
  337. adapters: "."
  338. owner: plugin
  339. - id: plugin-ui
  340. roots: [packages/ui/src/plugin-ui]
  341. managed: true
  342. requires: [ui, shared, services, mcp-apps-protocol, plugin-ui-bridge, plugin-sandbox]
  343. publicEntrypoints: [packages/ui/src/plugin-ui/index.ts, packages/ui/src/plugin-ui/contract.ts, packages/ui/src/plugin-ui/hostPrimitives.ts]
  344. layers:
  345. domain: domain
  346. app: app
  347. adapters: adapters
  348. ui: components
  349. layerOrder: [domain, app, adapters, ui]
  350. owner: plugin
  351. # remote-connection-flow:由 architecture:adopt 登记
  352. - id: remote-connection-flow
  353. roots:
  354. - packages/ui/src/remote-connection-flow
  355. managed: true
  356. requires:
  357. - shared
  358. - ui
  359. publicEntrypoints:
  360. - packages/ui/src/remote-connection-flow/index.ts
  361. - packages/ui/src/remote-connection-flow/contract.ts
  362. - packages/ui/src/remote-connection-flow/ui/RemoteConnectionProgress.tsx
  363. layers:
  364. app: .
  365. ui: ui
  366. layerOrder: [app, ui]
  367. owner: remote
  368. # project-workflow:由 architecture:adopt 登记
  369. - id: project-workflow
  370. roots:
  371. - packages/ui/src/project-workflow
  372. managed: true
  373. requires:
  374. - shared
  375. - ui
  376. - project-sidebar
  377. publicEntrypoints:
  378. - packages/ui/src/project-workflow/contract.ts
  379. - packages/ui/src/project-workflow/useWorkflowRunSave.ts
  380. - packages/ui/src/project-workflow/WorkflowRunSaveControls.tsx
  381. - packages/ui/src/project-workflow/WorkflowRunPaneSaveSlots.tsx
  382. layers:
  383. app: .
  384. owner: conversation
  385. # host-database-startup:由 architecture:adopt 登记
  386. - id: host-database-startup
  387. roots:
  388. - packages/desktop/src/host/database-startup
  389. managed: true
  390. requires:
  391. - project-storage
  392. - shared
  393. - desktop
  394. publicEntrypoints:
  395. - packages/desktop/src/host/database-startup/contract.ts
  396. - packages/desktop/src/host/database-startup/tasksStorageWorker.ts
  397. - packages/desktop/src/host/database-startup/hostDatabaseStartup.ts
  398. - packages/desktop/src/host/database-startup/storagePreparationProcesses.ts
  399. layers:
  400. adapters: .
  401. owner: persistence
  402. # cli-subagent-config:由 architecture:adopt 登记
  403. - id: cli-subagent-config
  404. roots:
  405. - apps/zcode-cli/packages/bootstrap/src/runtime-subagents
  406. - apps/zcode-cli/packages/bootstrap/tests/runtime-subagents
  407. managed: true
  408. requires:
  409. - shared
  410. publicEntrypoints:
  411. - apps/zcode-cli/packages/bootstrap/src/runtime-subagents/index.ts
  412. - apps/zcode-cli/packages/bootstrap/src/runtime-subagents/contract.ts
  413. layers:
  414. domain: .
  415. owner: agent
  416. # cli-session-execution:由 architecture:adopt 登记
  417. - id: cli-session-execution
  418. roots:
  419. - apps/zcode-cli/packages/bootstrap/src/session-execution
  420. - apps/zcode-cli/packages/bootstrap/tests/session-execution
  421. managed: true
  422. requires:
  423. - shared
  424. - zcode-cli
  425. publicEntrypoints:
  426. - apps/zcode-cli/packages/bootstrap/src/session-execution/index.ts
  427. - apps/zcode-cli/packages/bootstrap/src/session-execution/contract.ts
  428. layers:
  429. app: .
  430. owner: conversation
  431. # web-remote-relay:由 architecture:adopt 登记
  432. - id: web-remote-relay
  433. roots:
  434. - packages/shared/src/web-remote-relay
  435. managed: true
  436. requires: []
  437. publicEntrypoints:
  438. - packages/shared/src/web-remote-relay/index.ts
  439. - packages/shared/src/web-remote-relay/contract.ts
  440. layers:
  441. contract: contract.ts
  442. domain: domain
  443. adapters: .
  444. owner: remote
  445. layerOrder:
  446. - contract
  447. - domain
  448. - app
  449. - adapters
  450. - ui
  451. # desktop-web-remote-relay:由 architecture:adopt 登记
  452. - id: desktop-web-remote-relay
  453. roots:
  454. - packages/desktop/src/main/web-remote-relay
  455. managed: true
  456. requires:
  457. - client
  458. - desktop
  459. - shared
  460. - web-remote-relay
  461. publicEntrypoints:
  462. - packages/desktop/src/main/web-remote-relay/index.ts
  463. - packages/desktop/src/main/web-remote-relay/contract.ts
  464. layers:
  465. contract: contract.ts
  466. adapters: .
  467. owner: remote
  468. layerOrder:
  469. - contract
  470. - domain
  471. - app
  472. - adapters
  473. - ui
  474. # mobile-ui:由 architecture:adopt 登记
  475. - id: mobile-ui
  476. roots:
  477. - packages/ui/src/components/mobile-ui
  478. managed: true
  479. requires:
  480. - ui
  481. publicEntrypoints:
  482. - packages/ui/src/components/mobile-ui/index.ts
  483. - packages/ui/src/components/mobile-ui/contract.ts
  484. - packages/ui/src/components/mobile-ui/DevicePlatformIcon.tsx
  485. - packages/ui/src/components/mobile-ui/ZCodeAppLogo.tsx
  486. - packages/ui/src/components/mobile-ui/bottom-sheet.tsx
  487. layers:
  488. contract: contract.ts
  489. ui: .
  490. owner: remote
  491. layerOrder:
  492. - contract
  493. - domain
  494. - app
  495. - adapters
  496. - ui
  497. # web-remote-control-ui:由 architecture:adopt 登记
  498. - id: web-remote-control-ui
  499. roots:
  500. - packages/ui/src/web-remote-control
  501. managed: true
  502. requires:
  503. - mobile-ui
  504. - services
  505. - shared
  506. - ui
  507. publicEntrypoints:
  508. - packages/ui/src/web-remote-control/index.ts
  509. - packages/ui/src/web-remote-control/contract.ts
  510. - packages/ui/src/web-remote-control/WebRemoteControlDeviceHeader.tsx
  511. - packages/ui/src/web-remote-control/app/useWebRemoteControlAuthSync.ts
  512. layers:
  513. contract: contract.ts
  514. domain: domain
  515. app: app
  516. ui: .
  517. owner: remote
  518. layerOrder:
  519. - contract
  520. - domain
  521. - app
  522. - adapters
  523. - ui
  524. # web-remote-control:由 architecture:adopt 登记
  525. - id: web-remote-control
  526. roots:
  527. - packages/web/src/web-remote-control
  528. managed: true
  529. requires:
  530. - client
  531. - mobile-ui
  532. - shared
  533. - ui
  534. - web
  535. - web-remote-relay
  536. publicEntrypoints:
  537. - packages/web/src/web-remote-control/index.ts
  538. - packages/web/src/web-remote-control/contract.ts
  539. - packages/web/src/web-remote-control/views.ts
  540. - packages/web/src/web-remote-control/adapters/webRemoteControlThemeSeed.ts
  541. layers:
  542. contract: contracts
  543. domain: domain
  544. app: app
  545. adapters: adapters
  546. ui: ui
  547. owner: remote
  548. layerOrder:
  549. - contract
  550. - domain
  551. - app
  552. - adapters
  553. - ui
  554. # 保留既有源码位置;精确登记源文件,不扩大到整个 CLI 或 handlers 目录。
  555. - id: cli-arguments
  556. roots:
  557. - apps/zcode-cli/packages/cli/src/argument-parsing
  558. - apps/zcode-cli/packages/cli/src/arguments.ts
  559. - apps/zcode-cli/packages/cli/tests/argument-parsing
  560. managed: true
  561. requires: []
  562. publicEntrypoints:
  563. - apps/zcode-cli/packages/cli/src/arguments.ts
  564. - apps/zcode-cli/packages/cli/src/argument-parsing/contract.ts
  565. layers: {adapters: .}
  566. owner: agent
  567. - id: workflow-tool-entrypoints
  568. roots:
  569. - apps/zcode-cli/packages/core/src/tool/workflow-entrypoints
  570. - apps/zcode-cli/packages/core/src/tool/handlers/amend-workflow.ts
  571. - apps/zcode-cli/packages/core/src/tool/handlers/list-models.ts
  572. - apps/zcode-cli/packages/core/src/tool/handlers/fill-workflow-hole.ts
  573. - apps/zcode-cli/packages/core/tests/workflow-entrypoints
  574. managed: true
  575. requires: [zcode-cli]
  576. publicEntrypoints:
  577. - apps/zcode-cli/packages/core/src/tool/handlers/amend-workflow.ts
  578. - apps/zcode-cli/packages/core/src/tool/handlers/list-models.ts
  579. - apps/zcode-cli/packages/core/src/tool/handlers/fill-workflow-hole.ts
  580. - apps/zcode-cli/packages/core/src/tool/workflow-entrypoints/contract.ts
  581. layers: {app: .}
  582. owner: agent
  583. - id: tool-result-settlement
  584. roots:
  585. - apps/zcode-cli/packages/core/src/runtime/tool-result-settlement
  586. - apps/zcode-cli/packages/core/src/runtime/methods/tool-result-settlement.ts
  587. - apps/zcode-cli/packages/core/tests/tool-result-settlement
  588. managed: true
  589. requires: [zcode-cli, session-features]
  590. publicEntrypoints:
  591. - apps/zcode-cli/packages/core/src/runtime/methods/tool-result-settlement.ts
  592. - apps/zcode-cli/packages/core/src/runtime/tool-result-settlement/contract.ts
  593. layers: {app: .}
  594. owner: agent
  595. # remote-input-prediction:手机远控输入预测(v4 线格式、Host 侧开关、CLI 只读查询)。
  596. # 规格:docs/web-remote-control/mobile-input-prediction.md。
  597. - id: remote-input-prediction
  598. roots:
  599. - packages/shared/src/zcode-protocol-v4/input-prediction
  600. - packages/services/src/zcode-agent/inputPredictionSwitch.ts
  601. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/input-prediction-handler.ts
  602. - apps/zcode-cli/packages/core/src/runtime/methods/input-prediction-sidecar.ts
  603. managed: true
  604. requires: [shared, zcode-cli]
  605. publicEntrypoints:
  606. - packages/shared/src/zcode-protocol-v4/input-prediction/contract.ts
  607. - packages/services/src/zcode-agent/inputPredictionSwitch.ts
  608. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/input-prediction-handler.ts
  609. - apps/zcode-cli/packages/core/src/runtime/methods/input-prediction-sidecar.ts
  610. layers: {app: .}
  611. owner: remote
  612. # remote-resident-rows-range:rowsRange 只读热会话(residency="resident-only")的 Host 侧执行端能力确认,
  613. # 供手机任务列表预加载;旧 CLI 不认识该参数时 Host 直接拒绝,不触发冷恢复。
  614. - id: remote-resident-rows-range
  615. roots:
  616. - packages/services/src/zcode-agent/resident-rows-range
  617. managed: true
  618. requires: [shared, services]
  619. publicEntrypoints:
  620. - packages/services/src/zcode-agent/resident-rows-range/contract.ts
  621. layers: {app: .}
  622. owner: remote
  623. - id: tool-discovery
  624. roots:
  625. - apps/zcode-cli/packages/core/src/tool/search
  626. - apps/zcode-cli/packages/core/src/tool/handlers/tool-search.ts
  627. - apps/zcode-cli/packages/core/src/tool/handlers/deferred-tool-call.ts
  628. - apps/zcode-cli/packages/contracts/src/tools/tool-search.ts
  629. - apps/zcode-cli/packages/core/tests/tool-discovery
  630. managed: true
  631. requires: [zcode-cli]
  632. publicEntrypoints:
  633. - apps/zcode-cli/packages/core/src/tool/search/contract.ts
  634. - apps/zcode-cli/packages/core/src/tool/search/exposure.ts
  635. - apps/zcode-cli/packages/core/src/tool/search/history.ts
  636. - apps/zcode-cli/packages/core/src/tool/search/search.ts
  637. - apps/zcode-cli/packages/core/src/tool/search/description.ts
  638. - apps/zcode-cli/packages/core/src/tool/search/local-projection.ts
  639. - apps/zcode-cli/packages/core/src/tool/handlers/tool-search.ts
  640. - apps/zcode-cli/packages/core/src/tool/handlers/deferred-tool-call.ts
  641. - apps/zcode-cli/packages/contracts/src/tools/tool-search.ts
  642. layers: {app: .}
  643. owner: agent
  644. # node-repl-call-ledger:node_repl 结果里可信事实的唯一来源(apps/zcode-cli/docs/design/v2/tool/20-node-repl-call-ledger.md)
  645. - id: node-repl-call-ledger
  646. roots:
  647. - apps/zcode-cli/packages/node-repl-host/src/call-ledger
  648. - apps/zcode-cli/packages/node-repl-host/test/call-ledger
  649. managed: true
  650. requires: [zcode-cli]
  651. publicEntrypoints:
  652. - apps/zcode-cli/packages/node-repl-host/src/call-ledger/contract.ts
  653. layers: {adapters: .}
  654. owner: agent
  655. - id: session-features
  656. roots:
  657. - apps/zcode-cli/packages/core/src/runtime/session-features
  658. - apps/zcode-cli/packages/core/tests/session-features
  659. managed: true
  660. requires: [zcode-cli]
  661. publicEntrypoints:
  662. - apps/zcode-cli/packages/core/src/runtime/session-features/contract.ts
  663. layers: {app: .}
  664. owner: agent
  665. - id: provider-tool-rounds
  666. roots:
  667. - apps/zcode-cli/packages/core/src/runtime/provider-tool-rounds
  668. - apps/zcode-cli/packages/core/tests/provider-tool-rounds
  669. managed: true
  670. requires: [zcode-cli]
  671. publicEntrypoints:
  672. - apps/zcode-cli/packages/core/src/runtime/provider-tool-rounds/contract.ts
  673. layers: {app: .}
  674. owner: agent
  675. - id: provider-builtin-tool-compat
  676. roots:
  677. - apps/zcode-cli/packages/adapters/src/model/provider-builtin-tool-compat
  678. - apps/zcode-cli/packages/adapters/tests/provider-builtin-tool-compat
  679. managed: true
  680. requires: []
  681. publicEntrypoints:
  682. - apps/zcode-cli/packages/adapters/src/model/provider-builtin-tool-compat/contract.ts
  683. layers: {adapters: .}
  684. owner: agent
  685. - id: conversation-quote-context
  686. roots:
  687. - apps/zcode-cli/packages/core/src/runtime/conversation-quote-context
  688. - apps/zcode-cli/packages/core/src/runtime/helpers/conversation-quotes.ts
  689. - apps/zcode-cli/packages/core/tests/conversation-quote-context
  690. managed: true
  691. requires: [zcode-cli]
  692. publicEntrypoints:
  693. - apps/zcode-cli/packages/core/src/runtime/conversation-quote-context/contract.ts
  694. - apps/zcode-cli/packages/core/src/runtime/helpers/conversation-quotes.ts
  695. layers: {domain: .}
  696. owner: agent
  697. - id: tool-search-comparison
  698. roots:
  699. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison-contract
  700. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison.ts
  701. - apps/zcode-cli/tools/prompt-trajectory/tests/tool-search-comparison
  702. managed: true
  703. requires: [zcode-cli]
  704. publicEntrypoints:
  705. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison-contract/contract.ts
  706. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison.ts
  707. layers: {domain: .}
  708. owner: agent
  709. - id: window-topic-resource-relay
  710. roots:
  711. - packages/desktop/src/host/topic-resource-relay
  712. - packages/desktop/src/host/windowTopicResourceRelay.ts
  713. - packages/desktop/test/topic-resource-relay
  714. managed: true
  715. requires: [services, shared]
  716. publicEntrypoints:
  717. - packages/desktop/src/host/topic-resource-relay/contract.ts
  718. - packages/desktop/src/host/windowTopicResourceRelay.ts
  719. layers: {adapters: .}
  720. owner: desktop
  721. - id: channel-reply-tool
  722. roots:
  723. - apps/zcode-cli/packages/core/src/tool/channel-reply
  724. - apps/zcode-cli/packages/core/src/tool/handlers/reply-to-channel.ts
  725. - apps/zcode-cli/packages/core/tests/channel-reply
  726. managed: true
  727. requires: [shared, zcode-cli]
  728. publicEntrypoints:
  729. - apps/zcode-cli/packages/core/src/tool/handlers/reply-to-channel.ts
  730. - apps/zcode-cli/packages/core/src/tool/channel-reply/contract.ts
  731. layers: {app: .}
  732. owner: agent
  733. # composer-toolbar-layout:登记既有 DOM 布局入口,不改调用路径。
  734. - id: composer-toolbar-layout
  735. roots:
  736. - packages/ui/src/composer-toolbar-layout
  737. - packages/ui/src/prompt-editor/useComposerToolbarFit.ts
  738. - packages/ui/test/composer-toolbar-layout
  739. managed: true
  740. requires: []
  741. publicEntrypoints:
  742. - packages/ui/src/prompt-editor/useComposerToolbarFit.ts
  743. - packages/ui/src/composer-toolbar-layout/contract.ts
  744. layers: {ui: .}
  745. owner: conversation
  746. # task-groups:由 architecture:adopt 登记
  747. - id: task-groups
  748. roots:
  749. - packages/services/src/task-groups
  750. managed: true
  751. requires:
  752. - services
  753. - session
  754. - shared
  755. publicEntrypoints:
  756. - packages/services/src/task-groups/index.ts
  757. - packages/services/src/task-groups/contract.ts
  758. - packages/services/src/task-groups/migration-v6.ts
  759. layers:
  760. adapters: .
  761. owner: conversation
  762. # window-project-directory:由 architecture:adopt 登记
  763. - id: window-project-directory
  764. roots:
  765. - packages/services/src/window-project-directory
  766. managed: true
  767. requires:
  768. - project
  769. - remote-projects
  770. - rpc
  771. - services
  772. - shared
  773. publicEntrypoints:
  774. - packages/services/src/window-project-directory/index.ts
  775. - packages/services/src/window-project-directory/contract.ts
  776. layers:
  777. adapters: .
  778. owner: conversation
  779. # conversation-share-interaction:由 architecture:adopt 登记
  780. - id: conversation-share-interaction
  781. roots:
  782. - packages/ui/src/conversation-share-interaction
  783. managed: true
  784. requires:
  785. - services
  786. - shared
  787. - ui
  788. publicEntrypoints:
  789. - packages/ui/src/conversation-share-interaction/index.ts
  790. - packages/ui/src/conversation-share-interaction/contract.ts
  791. - packages/ui/src/conversation-share-interaction/ConversationSharePopover.tsx
  792. - packages/ui/src/conversation-share-interaction/ConversationSharePreflightStatus.tsx
  793. - packages/ui/src/conversation-share-interaction/conversationSharePopoverActions.ts
  794. - packages/ui/src/conversation-share-interaction/conversationSharePreflightRequest.ts
  795. - packages/ui/src/conversation-share-interaction/conversationSharePreflightResponse.ts
  796. layers:
  797. contract: contract.ts
  798. ui: .
  799. owner: conversation
  800. # workspace-plugin-preview:由 architecture:adopt 登记
  801. - id: workspace-plugin-preview
  802. roots:
  803. - packages/ui/src/workspace-plugin-preview
  804. managed: true
  805. requires:
  806. - shared
  807. - ui
  808. publicEntrypoints:
  809. - packages/ui/src/workspace-plugin-preview/index.ts
  810. - packages/ui/src/workspace-plugin-preview/contract.ts
  811. layers:
  812. ui: .
  813. owner: plugin
  814. # office-runtime:内置文档插件查看面板的共享运行时,由 architecture:adopt 登记
  815. - id: office-runtime
  816. roots:
  817. - apps/zcode-cli/packages/office-runtime
  818. managed: true
  819. requires: []
  820. publicEntrypoints:
  821. - apps/zcode-cli/packages/office-runtime/index.ts
  822. - apps/zcode-cli/packages/office-runtime/contract.ts
  823. layers:
  824. app: .
  825. owner: plugin
  826. # embedded-browser-permission:由 architecture:adopt 登记
  827. - id: embedded-browser-permission
  828. roots:
  829. - packages/desktop/src/main/embedded-browser-permission-contract
  830. - packages/desktop/src/main/embeddedBrowserPermissionPolicy.ts
  831. managed: true
  832. requires:
  833. - desktop
  834. - shared
  835. publicEntrypoints:
  836. - packages/desktop/src/main/embeddedBrowserPermissionPolicy.ts
  837. - packages/desktop/src/main/embedded-browser-permission-contract/contract.ts
  838. layers:
  839. adapters: .
  840. owner: desktop
  841. # marketing-touch-controller:由 architecture:adopt 登记
  842. - id: marketing-touch-controller
  843. roots:
  844. - packages/ui/src/marketing-touch-contract
  845. - packages/ui/src/components/marketing-touch/marketingTouchController.ts
  846. managed: true
  847. requires:
  848. - services
  849. - shared
  850. - ui
  851. publicEntrypoints:
  852. - packages/ui/src/components/marketing-touch/marketingTouchController.ts
  853. - packages/ui/src/marketing-touch-contract/contract.ts
  854. layers:
  855. app: .
  856. owner: desktop
  857. # data-sync-service:数据同步分类服务形状与本机设备同步状态(docs/remote/data-sync.md)
  858. - id: data-sync-service
  859. roots:
  860. - packages/services/src/data-sync
  861. managed: true
  862. requires:
  863. - services
  864. - shared
  865. publicEntrypoints:
  866. - packages/services/src/data-sync/index.ts
  867. - packages/services/src/data-sync/contract.ts
  868. - packages/services/src/data-sync/node.ts
  869. layers:
  870. app: .
  871. owner: remote
  872. # provider-provisioning-status:数据同步页模型提供商读取 / 重试 Main 协调器的 Provisioning lane(R3 §8.3.6)
  873. - id: provider-provisioning-status
  874. roots:
  875. - packages/services/src/provider-provisioning-status
  876. managed: true
  877. requires:
  878. - services
  879. - shared
  880. publicEntrypoints:
  881. - packages/services/src/provider-provisioning-status/index.ts
  882. - packages/services/src/provider-provisioning-status/contract.ts
  883. - packages/services/src/provider-provisioning-status/node.ts
  884. layers:
  885. app: .
  886. owner: remote
  887. # data-sync:设置页「数据同步」与同步弹窗(docs/remote/data-sync.md)
  888. - id: data-sync
  889. roots:
  890. - packages/ui/src/data-sync
  891. managed: true
  892. requires:
  893. - services
  894. - shared
  895. - ui
  896. - conversation-workspace-target
  897. publicEntrypoints:
  898. - packages/ui/src/data-sync/index.ts
  899. - packages/ui/src/data-sync/contract.ts
  900. layers:
  901. contract: contract.ts
  902. domain: domain
  903. app: app
  904. ui: .
  905. layerOrder: [contract, domain, app, ui]
  906. owner: remote
  907. # settings-scope:设置页 Scope 菜单按设备分组(docs/remote/data-sync.md「Scope 菜单按设备分组」)
  908. - id: settings-scope
  909. roots:
  910. - packages/ui/src/settings-scope
  911. managed: true
  912. requires:
  913. - services
  914. - shared
  915. - ui
  916. - conversation-workspace-target
  917. - workspace-config-catalog
  918. publicEntrypoints:
  919. - packages/ui/src/settings-scope/index.ts
  920. - packages/ui/src/settings-scope/contract.ts
  921. layers:
  922. contract: contract.ts
  923. domain: domain
  924. app: app
  925. ui: .
  926. layerOrder: [contract, domain, app, ui]
  927. owner: remote
  928. # side-pane-full-view:由 architecture:adopt 登记
  929. - id: side-pane-full-view
  930. roots:
  931. - packages/ui/src/side-pane-full-view
  932. managed: true
  933. requires:
  934. - shared
  935. - ui
  936. publicEntrypoints:
  937. - packages/ui/src/side-pane-full-view/index.ts
  938. - packages/ui/src/side-pane-full-view/contract.ts
  939. layers:
  940. ui: .
  941. owner: conversation
  942. # 发行策略使用独立目录;修改后的文件由本模块承担边界检查。
  943. - id: request-security-edition
  944. roots: [packages/shared/src/request-security-edition]
  945. managed: true
  946. requires: [shared]
  947. publicEntrypoints:
  948. - packages/shared/src/request-security-edition/index.ts
  949. - packages/shared/src/request-security-edition/policy.ts
  950. - packages/shared/src/request-security-edition/verification-policy.ts
  951. - packages/shared/src/request-security-edition/contract.ts
  952. layers: {adapters: .}
  953. owner: request-security
  954. # local-ttft-contract:由 architecture:adopt 登记
  955. - id: local-ttft-contract
  956. roots:
  957. - packages/shared/src/local-ttft
  958. managed: true
  959. requires: []
  960. publicEntrypoints:
  961. - packages/shared/src/local-ttft/contract.ts
  962. layers:
  963. contract: .
  964. # local-ttft-renderer:由 architecture:adopt 登记
  965. - id: local-ttft-renderer
  966. roots:
  967. - packages/ui/src/v4/telemetry/local-ttft
  968. managed: true
  969. requires:
  970. - shared
  971. - ui
  972. publicEntrypoints:
  973. - packages/ui/src/v4/telemetry/local-ttft/contract.ts
  974. layers:
  975. ui: .
  976. # local-ttft-desktop:由 architecture:adopt 登记
  977. - id: local-ttft-desktop
  978. roots:
  979. - packages/desktop/src/renderer/src/local-ttft
  980. managed: true
  981. requires:
  982. - shared
  983. - ui
  984. publicEntrypoints:
  985. - packages/desktop/src/renderer/src/local-ttft/contract.ts
  986. layers:
  987. ui: .
  988. # local-ttft-cli:由 architecture:adopt 登记
  989. - id: local-ttft-cli
  990. roots:
  991. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/local-ttft
  992. managed: true
  993. requires:
  994. - shared
  995. - zcode-cli
  996. publicEntrypoints:
  997. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/local-ttft/contract.ts
  998. layers:
  999. adapters: .
  1000. # cli-official-command-endpoint:由 architecture:adopt 登记
  1001. - id: cli-official-command-endpoint
  1002. roots:
  1003. - apps/zcode-cli/packages/bootstrap/src/official-command-endpoint
  1004. - apps/zcode-cli/packages/bootstrap/tests/official-command-endpoint
  1005. managed: true
  1006. requires:
  1007. - shared
  1008. - zcode-cli
  1009. publicEntrypoints:
  1010. - apps/zcode-cli/packages/bootstrap/src/official-command-endpoint/index.ts
  1011. - apps/zcode-cli/packages/bootstrap/src/official-command-endpoint/contract.ts
  1012. layers:
  1013. adapters: .
  1014. owner: identity
  1015. # zcode-site-panel:zcode-site 插件自带的 Sites 面板(MCP server + 页面),由 architecture:adopt 登记
  1016. - id: zcode-site-panel
  1017. roots:
  1018. - apps/zcode-cli/packages/zcode-site-plugin/src
  1019. managed: true
  1020. requires:
  1021. - shared
  1022. publicEntrypoints:
  1023. - apps/zcode-cli/packages/zcode-site-plugin/src/index.ts
  1024. - apps/zcode-cli/packages/zcode-site-plugin/src/contract.ts
  1025. layers:
  1026. app: .
  1027. owner: plugin
  1028. # file-open-apps:由 architecture:adopt 登记
  1029. - id: file-open-apps
  1030. roots:
  1031. - packages/desktop/src/main/file-open-apps
  1032. managed: true
  1033. requires: [shared]
  1034. publicEntrypoints:
  1035. - packages/desktop/src/main/file-open-apps/index.ts
  1036. - packages/desktop/src/main/file-open-apps/contract.ts
  1037. layers:
  1038. adapters: .
  1039. owner: desktop
  1040. # ui-file-menu:由 architecture:adopt 登记
  1041. - id: ui-file-menu
  1042. roots:
  1043. - packages/ui/src/file-menu
  1044. managed: true
  1045. requires:
  1046. - shared
  1047. - ui
  1048. publicEntrypoints:
  1049. - packages/ui/src/file-menu/index.ts
  1050. - packages/ui/src/file-menu/contract.ts
  1051. layers:
  1052. ui: .
  1053. owner: file-preview
  1054. # web-platform:由 architecture:adopt 登记
  1055. - id: web-platform
  1056. roots:
  1057. - packages/web/src/platform
  1058. managed: true
  1059. requires:
  1060. - shared
  1061. - ui
  1062. - web
  1063. publicEntrypoints:
  1064. - packages/web/src/platform/index.ts
  1065. - packages/web/src/platform/contract.ts
  1066. layers:
  1067. adapters: .
  1068. owner: web
  1069. # image-preview-editor:由 architecture:adopt 登记
  1070. - id: image-preview-editor
  1071. roots:
  1072. - packages/ui/src/image-preview-editor
  1073. managed: true
  1074. requires: [ui]
  1075. publicEntrypoints:
  1076. - packages/ui/src/image-preview-editor/index.ts
  1077. - packages/ui/src/image-preview-editor/contract.ts
  1078. layers:
  1079. ui: .
  1080. owner: conversation
  1081. # protocol-session-data:由 architecture:adopt 登记
  1082. - id: protocol-session-data
  1083. roots:
  1084. - packages/shared/src/zcode-protocol-v4/session-data
  1085. managed: true
  1086. requires: []
  1087. publicEntrypoints:
  1088. - packages/shared/src/zcode-protocol-v4/session-data/index.ts
  1089. - packages/shared/src/zcode-protocol-v4/session-data/contract.ts
  1090. layers:
  1091. domain: .
  1092. # cli-session-data-files:由 architecture:adopt 登记
  1093. - id: cli-session-data-files
  1094. roots:
  1095. - apps/zcode-cli/packages/adapters/src/storage/session-data-files
  1096. managed: true
  1097. requires: []
  1098. publicEntrypoints:
  1099. - apps/zcode-cli/packages/adapters/src/storage/session-data-files/index.ts
  1100. - apps/zcode-cli/packages/adapters/src/storage/session-data-files/contract.ts
  1101. layers:
  1102. adapters: .
  1103. # cli-session-data:由 architecture:adopt 登记
  1104. - id: cli-session-data
  1105. roots:
  1106. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/session-data
  1107. managed: true
  1108. requires:
  1109. - shared
  1110. - zcode-cli
  1111. publicEntrypoints:
  1112. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/session-data/index.ts
  1113. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/session-data/contract.ts
  1114. layers:
  1115. app: .
  1116. - id: provider-regression
  1117. roots: [apps/zcode-cli/tools/provider-regression]
  1118. managed: true
  1119. requires: [zcode-cli, provider, provider-node, shared]
  1120. publicEntrypoints:
  1121. - apps/zcode-cli/tools/provider-regression/index.ts
  1122. - apps/zcode-cli/tools/provider-regression/contract.ts
  1123. layers: {adapters: .}
  1124. owner: agent
  1125. # session-lifecycle:由 architecture:adopt 登记
  1126. - id: session-lifecycle
  1127. roots:
  1128. - apps/zcode-cli/packages/bootstrap/src/session-lifecycle
  1129. - apps/zcode-cli/packages/bootstrap/tests/session-lifecycle
  1130. managed: true
  1131. requires: [shared]
  1132. publicEntrypoints:
  1133. - apps/zcode-cli/packages/bootstrap/src/session-lifecycle/index.ts
  1134. - apps/zcode-cli/packages/bootstrap/src/session-lifecycle/contract.ts
  1135. layers:
  1136. app: .
  1137. owner: agent-runtime
  1138. # workspace-mcp-trust:由 architecture:adopt 登记
  1139. - id: workspace-mcp-trust
  1140. roots:
  1141. - apps/zcode-cli/packages/bootstrap/src/workspace-mcp-trust
  1142. managed: true
  1143. requires: [zcode-cli, shared]
  1144. publicEntrypoints:
  1145. - apps/zcode-cli/packages/bootstrap/src/workspace-mcp-trust/index.ts
  1146. - apps/zcode-cli/packages/bootstrap/src/workspace-mcp-trust/contract.ts
  1147. layers:
  1148. adapters: .
  1149. owner: cli
  1150. global:
  1151. # 临时时间戳(2026-09-10):unmanaged-new-file 只约束此日期之后首次入库的文件。
  1152. # 基于领先 staging 很多的分支开工时,merge-base 之前的"新增"文件不应被追溯。
  1153. newFilesEnforcedSince: "2026-09-10"
  1154. acceptedUpstreamCommits: []
  1155. maxFileLines: 800
  1156. maxContractLines: 300
  1157. maxPublicMethods: 12
  1158. forbidCycles: true
  1159. forbidDeepImports: true
  1160. managedOnly: true
  1161. acceptedUpstreamSnapshot: scripts/architecture/upstream-snapshot.json
  1162. exceptions:
  1163. - id: session-features-attribution-header-edit
  1164. rule: unmanaged-new-file
  1165. paths: [apps/zcode-cli/packages/adapters/src/model/runner-attribution.ts]
  1166. reason: 已准入的归因头构造器只追加 x-zcode-session-features(docs/design/v2/model/session-features-header.md);它仍是全部归因头的唯一写入点,签名与模块边界不变,接管整个 adapters 包不在本次范围内。
  1167. - id: session-features-workflow-command-pattern-edit
  1168. rule: unmanaged-new-file
  1169. paths: [apps/zcode-cli/packages/core/src/runtime/methods/dynamic-workflow-activation.ts]
  1170. reason: 已准入的动态工作流激活只导出既有 `/workflow` 历史判据常量,供 session-features 的历史推导复用同一判据;激活行为、owner 与模块边界不变。
  1171. - id: node-repl-call-ledger-cua-bridge-edit
  1172. rule: unmanaged-new-file
  1173. paths: [apps/zcode-cli/packages/node-repl-host/src/cua-bridge.ts]
  1174. 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 包不在本次范围内。
  1175. - id: node-repl-call-ledger-cua-broker-edit
  1176. rule: unmanaged-new-file
  1177. paths: [apps/zcode-cli/packages/node-repl-host/src/cua-broker.ts]
  1178. 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 调用与响应格式不变。
  1179. - id: node-repl-call-ledger-result-edit
  1180. rule: unmanaged-new-file
  1181. paths: [apps/zcode-cli/packages/node-repl-host/src/result.ts]
  1182. 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 处置不变。
  1183. - id: offpeak-expiration-codes-existing-edit
  1184. rule: unmanaged-new-file
  1185. paths: [apps/zcode-cli/packages/core/src/runtime/off-peak/model-binding.ts]
  1186. reason: 已准入的闲时请求包装器仅复用共享错误码判断,补齐 3106 运行超时的既有生命周期通知;不改变 owner、控制协议或模块边界,不扩展为整个 CLI runtime 目录接管。
  1187. - id: multi-cursor-badge-title-passthrough-edit
  1188. rule: unmanaged-new-file
  1189. paths:
  1190. - apps/zcode-cli/packages/node-repl-host/src/cua-broker.ts
  1191. 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 目录。
  1192. - id: side-pane-full-view-shortcut-command-edit
  1193. rule: unmanaged-new-file
  1194. paths: [packages/shared/src/shortcutCommands.ts]
  1195. reason: 已准入的快捷键命令表只追加一条 toggleSidePaneFullView 命令(Side Pane 完整视图,docs/ui/side-pane-full-view.md);命令表仍是唯一数据源,签名与模块边界不变,接管整个 shared 包不在本次范围内。
  1196. - id: zcode-site-deploy-runtime-template
  1197. rule: unmanaged-new-file
  1198. paths: [apps/zcode-cli/packages/zcode-site-plugin/skills/site-deploy/templates/static-server.mjs]
  1199. reason: site-deploy 技能复制进用户部署包的静态站服务器模板,只在 Sites runner 的容器里由 start.sh 执行;仓库代码不 import 它,也不属于任何运行时模块。同目录的 start.sh 模板是 shell,不受本规则约束。
  1200. - id: opensource-cua-test-project-config
  1201. rule: unmanaged-new-file
  1202. paths: [packages/zcode-cua/vitest.config.ts]
  1203. reason: 该文件只装配测试项目,开源占位版本用于保持根单测入口可运行;不包含 producer 运行逻辑,不为同目录实现文件开放例外。
  1204. - id: project-location-cache-recovery-existing-edit
  1205. rule: unmanaged-new-file
  1206. paths:
  1207. - packages/shared/src/project-access-token.ts
  1208. - packages/shared/src/project-access-token-client.ts
  1209. - packages/services/src/model-provider/accountProjectTokenClient.ts
  1210. - packages/services/src/credential/credentialService.ts
  1211. reason: 已有项目 Token 与凭据存储增加派生缓存的局部恢复端口,并把换证请求失败按固定类别分码(ZCT-2111046389485834240);保持原有 owner 和共享文件锁,不接管全目录。
  1212. - id: test-ids-subpath-import-unmanaged-edit
  1213. rule: unmanaged-new-file
  1214. paths:
  1215. - packages/ui/src/browser-use/EmbeddedBrowserPermissionPrompts.tsx
  1216. - packages/ui/src/hooks/useStartPlanRecommendation.ts
  1217. - packages/ui/src/settings/DynamicWorkflowModeSetting.tsx
  1218. reason: 已准入的存量文件只把 TID 导入从 @zcode/shared 根入口改为 @zcode/shared/test-ids 子路径(根入口不再导出 test-ids,以收窄受影响单测范围);行为与模块边界不变,接管 ui 目录不在本次范围内。
  1219. - id: settings-personalization-section-new-file
  1220. rule: unmanaged-new-file
  1221. paths: [packages/ui/src/settings/PersonalizationSection.tsx]
  1222. reason: 个性化设置分区组件只编排 ISettingService 的 getUserInstructions/saveUserInstructions 与既有设置页 UI 原语(spec:docs/ui/settings-personalization.md);读写唯一事实源在服务层,不新增平行状态,接管整个 ui 目录不在本次范围内。
  1223. - id: settings-personalization-size-constant-new-file
  1224. rule: unmanaged-new-file
  1225. paths: [packages/shared/src/userInstructions.ts]
  1226. reason: 用户自定义指令字节上限共享常量(与 CLI 读取截断对齐,spec:docs/ui/settings-personalization.md),服务层校验与 UI 计数共用同一数值;仅两个常量导出,接管整个 shared 目录不在本次范围内。
  1227. - id: remote-workspace-admission-deadline-existing-edit
  1228. rule: unmanaged-new-file
  1229. paths: [packages/desktop/src/host/remoteWorkspacePreparation.ts]
  1230. reason: 已准入的远程项目目录 admission 只增加 30 秒截止时间和可重试的无响应错误码(3.16.2 远端回归 R8,docs/remote/project-first-remote-navigation-spec.md §2.4);owner、调用方与模块边界不变,接管 desktop host 目录不在本次修复范围内。
  1231. - id: gen-ui-existing-capability-check
  1232. rule: unmanaged-new-file
  1233. paths: [packages/services/src/zcode-agent/independentPlanSupport.ts]
  1234. reason: 在已存在的 CLI 能力查询入口补充 GenUI 上下文能力检查,防止旧 CLI 静默丢弃状态;保持既有 services/agent 边界,不扩展本次修复为整个 zcode-agent 模块接管。
  1235. - id: connection-log-secret-token-unmanaged-edit
  1236. rule: unmanaged-new-file
  1237. paths: [packages/shared/src/source-server/connectionLog.ts]
  1238. reason: 已存在的连接日志过滤函数只把已知秘密从子串替换改为完整 token 匹配,修复短密码反推泄露;签名与模块边界不变,接管整个 shared 包不在本次修复范围内。
  1239. - id: connection-errors-econnreset-unmanaged-edit
  1240. rule: unmanaged-new-file
  1241. paths: [packages/shared/src/source-server/connectionErrors.ts]
  1242. reason: 已存在的连接错误归一化码表补一项 ECONNRESET → remote-host-unreachable,修复在线断连恢复失败被误报为预检失败;签名与模块边界不变,接管整个 shared 包不在本次修复范围内。
  1243. - id: remote-authentication-unsupported-presentation-unmanaged-edit
  1244. rule: unmanaged-new-file
  1245. paths: [packages/ui/src/lib/remoteConnectionPresentationErrors.ts]
  1246. reason: 已存在的远程连接错误展示映射为新增公开码 remote-authentication-unsupported 补一项标题与“查看详情”操作,修复 SSH 二次验证失败被提示为检查密码;签名与模块边界不变,接管 ui 目录不在本次修复范围内。
  1247. - id: source-server-operation-log-level-unmanaged-edit
  1248. rule: unmanaged-new-file
  1249. paths: [packages/desktop/src/host/sourceServerOperationLogs.ts]
  1250. reason: 已有连接日志封装透传 TransportContext 已定义的 level,使低版本 glibc 提示保留 warn;Host 仍是唯一日志 owner,签名与模块边界不变,接管整个 desktop 包不在本次范围内。
  1251. - id: client-config-public-field-unmanaged-edit
  1252. rule: unmanaged-new-file
  1253. paths: [packages/shared/src/clientConfig.ts]
  1254. 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.
  1255. - id: highspeed-fallback-snapshot-unmanaged-edit
  1256. rule: unmanaged-new-file
  1257. paths: [apps/zcode-cli/packages/core/src/runtime/methods/turn-execution-fallback.ts]
  1258. reason: 合并已存在于 staging 的加速卡回退模块,仅将可变 Session 读取替换为本轮固定候选;保持现有 Core 模块边界,不在同步分支时机械拆分整个 runtime。
  1259. - id: session-owned-workflow-shutdown-existing-files
  1260. rule: unmanaged-new-file
  1261. paths:
  1262. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-run-submit.ts
  1263. - apps/zcode-cli/packages/bootstrap/src/app/workflow-driver-quiescence.ts
  1264. reason: 两个文件已存在于集成基线;本次在既有 bootstrap owner 内补启动关闭互斥和 actor 清理等待,不新增模块或跨层依赖。整个 bootstrap/app 的接管另行治理,生命周期公开模块边界保持不变。
  1265. - id: workflow-quota-auto-resume-unmanaged-file
  1266. rule: unmanaged-new-file
  1267. paths: [apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-quota-resume.ts]
  1268. reason: 额度停止的 run 到点自动续跑,是 run service 旁的一个宿主模块(只读 journal 行、订阅结算、经注入的 resume 续跑);与同目录的 run service 文件同属未受管的 zcode-cli bootstrap,接管该目录需要单独的模块边界整理。
  1269. - id: mcp-node-fallback-unmanaged-file
  1270. rule: unmanaged-new-file
  1271. paths:
  1272. - apps/zcode-cli/packages/adapters/src/mcp/node-fallback.ts
  1273. - apps/zcode-cli/packages/bootstrap/src/app/mcp-node-fallback.ts
  1274. 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 需要单独的模块边界整理。
  1275. - id: workflow-unrecognized-code-cap-unmanaged-edit
  1276. rule: unmanaged-new-file
  1277. paths: [apps/zcode-cli/packages/adapters/src/model/workflow-model-failure-policy.ts]
  1278. reason: 已准入的 workflow 模型错误策略表只增加一行(分类器不认识的业务码在同一次请求里连续出现 10 次时停 run)、一个连续计数入参与两个计数纯函数;runner 与 driver 读同一函数的约束与模块边界不变,接管 adapters/model 目录不在本次范围内。
  1279. - id: automation-self-pause-turn-visibility-existing-edit
  1280. rule: unmanaged-new-file
  1281. paths: [apps/zcode-cli/packages/core/src/runtime/methods/turn-tool-visibility.ts]
  1282. reason: 已有 turn 工具可见性 owner 仅增加当前 automation 自暂停的反向可见性规则;不新增跨模块依赖或 owner,接管整个 zcode-cli runtime 超出本次缺陷修复范围。
  1283. - id: compact-bundle-reminder-builder-unmanaged-edit
  1284. rule: unmanaged-new-file
  1285. paths: [apps/zcode-cli/packages/core/src/runtime/methods/runtime-reminder-persistence.ts]
  1286. reason: 已入库的隐藏提醒落盘函数拆出只构建记录的函数,供 compaction 把公告、summary 与附件交给同一个 store 事务;记录不再写 tools 字段,中断标记按普通 user 文本取正文;Core 模块边界不变,接管整个 runtime 目录不在本次范围内。
  1287. - id: tool-search-schema-key-order-unmanaged-edit
  1288. rule: unmanaged-new-file
  1289. paths: [apps/zcode-cli/packages/contracts/src/tools/tool-search.ts]
  1290. reason: 已入库的 ToolSearch 输入 schema 改走统一的 toToolJsonSchema,使 key 顺序与其他工具一致,$schema 随之从 draft-07 改为 2020-12;contracts 模块边界不变,接管整个 tools 目录不在本次范围内。
  1291. - id: tool-search-removal-reason-unmanaged-edit
  1292. rule: unmanaged-new-file
  1293. paths:
  1294. - apps/zcode-cli/packages/adapters/src/model/tool-search.ts
  1295. - apps/zcode-cli/packages/core/src/tool/search/exposure.ts
  1296. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison.ts
  1297. reason: 已入库的 ToolSearch 能力解析、公告渲染与离线轨迹识别按删除原因分段,并由 adapter 声明 Anthropic 协议的提醒折叠能力;增量事实、持久化与模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  1298. - id: interrupt-marker-unmanaged-new-file
  1299. rule: unmanaged-new-file
  1300. paths: [apps/zcode-cli/packages/core/src/runtime/methods/interrupt-marker.ts]
  1301. reason: 停止轮次后给模型的中断标记放在 runtime/methods 的独立小文件,避免继续增大已超行数的 turn.ts;复用隐藏提醒的落盘函数(persistRuntimeReminderMessage)与历史提交,Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  1302. - id: off-peak-takeover-context-prefix-unmanaged-edit
  1303. rule: unmanaged-new-file
  1304. paths: [apps/zcode-cli/packages/core/src/runtime/off-peak/turn.ts]
  1305. reason: 已入库的闲时接管函数换成用户模型后,按新模型重建 Context Prefix,与 guide 换模型共用 rebuildContextPrefix;接管时机、归属与 Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  1306. - id: turn-work-segment-comment-unmanaged-edit
  1307. rule: unmanaged-new-file
  1308. paths: [packages/ui/src/v4/conversationTurnRenderUnitTypes.ts]
  1309. reason: 已入库的渲染单元类型只更新 workSegments 字段注释,使其与同一 drain 边界的 guide 共用一段的行为一致;类型与 ui 模块边界不变,接管整个 v4 目录不在本次范围内。
  1310. - id: shortcut-settings-existing-ui-edit
  1311. rule: unmanaged-new-file
  1312. paths:
  1313. - packages/ui/src/components/ui/kbd.tsx
  1314. - packages/ui/src/settings/ShortcutSearchBar.tsx
  1315. - packages/ui/src/settings/ShortcutSettingsSection.tsx
  1316. 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.
  1317. - id: sidebar-workflow-tooltip-existing-ui-edit
  1318. rule: unmanaged-new-file
  1319. paths: [packages/ui/src/components/workflow-run-line/WorkflowRunRail.tsx]
  1320. 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.
  1321. - id: onboarding-existing-module-edit
  1322. rule: unmanaged-new-file
  1323. paths:
  1324. - packages/services/src/onboarding/
  1325. - packages/ui/src/onboarding/
  1326. reason: onboarding 目录(记录持久化服务与触发 hook)是已合入 staging 的存量功能模块,本轮修复在其既有边界内收紧老用户判定与兜底;模块 adopt 登记需单独的边界梳理,不在本缺陷修复内展开。
  1327. - id: remote-connection-flow-existing-size
  1328. rule: max-file-lines
  1329. paths: [packages/ui/src/remote-connection-flow/index.ts]
  1330. reason: Preserve the existing single hook owner and closure; module adoption must not mechanically split state to satisfy line counts.
  1331. - id: gen-ui-tweak-runtime-size
  1332. rule: max-file-lines
  1333. paths: [packages/desktop/src/renderer/src/plugin-sandbox/genUiTweakRuntime.js]
  1334. reason: Keep parameter binding and registration lifecycle together; runtime-manifest.json and tests verify file integrity.
  1335. - id: gen-ui-tweak-runtime-lint
  1336. rule: disable-count
  1337. paths: [packages/desktop/src/renderer/src/plugin-sandbox/genUiTweakRuntime.js]
  1338. reason: Allow the control-character validation regex and the single-file parameter-control runtime.
  1339. - id: workflow-amend-provider-boundary-unmanaged-edit
  1340. rule: unmanaged-new-file
  1341. paths:
  1342. - apps/zcode-cli/packages/contracts/src/tools/amend-workflow.ts
  1343. - apps/zcode-cli/packages/core/src/tool/handlers/amend-workflow-resolve.ts
  1344. 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.
  1345. - id: remote-device-list-unmanaged-new-files
  1346. rule: unmanaged-new-file
  1347. paths:
  1348. - packages/ui/src/settings/SourceServerDeviceRow.tsx
  1349. - packages/ui/src/settings/sourceServerDeviceList.ts
  1350. - packages/ui/src/lib/remoteConnectionPresentation.ts
  1351. 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).
  1352. - id: workflow-share-unmanaged-new-files
  1353. rule: unmanaged-new-file
  1354. paths:
  1355. - packages/services/src/conversation-share/conversationShareInlineImages.ts
  1356. - packages/services/src/conversation-share/conversationShareWorkflowSnapshot.ts
  1357. - packages/shared/src/conversation-share-content.ts
  1358. - packages/shared/src/conversation-share-tool-presentation.ts
  1359. - packages/ui/src/v4/ConversationShareContent.tsx
  1360. - packages/ui/src/v4/ConversationShareWorkflow.tsx
  1361. - packages/ui/src/v4/conversationShareItems.ts
  1362. - packages/ui/src/ToolCallBlocks/ToolPresentation.tsx
  1363. - packages/ui/src/ToolCallBlocks/presentationCapabilities.tsx
  1364. - packages/ui/src/ToolCallBlocks/renderers/list-models.tsx
  1365. - packages/ui/src/ToolCallBlocks/renderers/list-saved-workflows-presentation.tsx
  1366. - packages/ui/src/ToolCallBlocks/renderers/web-fetch.tsx
  1367. - packages/ui/src/hooks/useToolPresentationHostCapabilities.ts
  1368. - packages/ui/src/chat-input-toolbar/thoughtLevelLabels.ts
  1369. - packages/ui/src/components/workflow-timeline/subagent-model-label.ts
  1370. - packages/desktop/src/main/fileApplications.ts
  1371. 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).
  1372. - id: workflow-notifications-unmanaged-files
  1373. rule: unmanaged-new-file
  1374. paths:
  1375. - apps/zcode-cli/packages/core/src/runtime-task/workflow-blocked-reminder.ts
  1376. - apps/zcode-cli/packages/core/src/runtime/methods/dynamic-workflow-blocked-reminder.ts
  1377. - apps/zcode-cli/packages/core/src/runtime-task/workflow-notification-copy.ts
  1378. - apps/zcode-cli/packages/core/src/runtime/methods/dynamic-workflow-run-hole-notification.ts
  1379. - apps/zcode-cli/packages/core/src/tool/handlers/model-reference.ts
  1380. - packages/shared/src/test-ids-workflow.ts
  1381. 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.
  1382. - id: composer-toolbar-unmanaged-files
  1383. rule: unmanaged-new-file
  1384. paths:
  1385. - packages/ui/src/ControlShortcutBadge.tsx
  1386. - packages/ui/src/chat-input-toolbar/ComposerEffortHeading.tsx
  1387. - packages/ui/src/chat-input-toolbar/ComposerModelMenu.tsx
  1388. - packages/ui/src/chat-input-toolbar/ComposerProviderMenu.tsx
  1389. - packages/ui/src/chat-input-toolbar/ComposerTriggerTransition.tsx
  1390. - packages/ui/src/hooks/useComposerConnectionSwitch.ts
  1391. - packages/ui/src/lib/composerPlanGroups.ts
  1392. - packages/ui/src/lib/providerFamilyConnectionTransition.ts
  1393. - packages/ui/src/prompt-editor/useComposerToolbarFit.ts
  1394. 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.
  1395. - id: provider-endpoint-routing-unmanaged-edit
  1396. rule: unmanaged-new-file
  1397. paths:
  1398. - apps/zcode-cli/packages/adapters/src/model/endpoint-routing-edition/index.ts
  1399. - apps/zcode-cli/packages/adapters/src/model/provider-endpoint-routing-options.ts
  1400. 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.
  1401. - id: workflow-mode-user-choice-unmanaged-edit
  1402. rule: unmanaged-new-file
  1403. paths:
  1404. - packages/shared/src/dynamic-workflow-feature.ts
  1405. - packages/ui/src/settings/DynamicWorkflowModeSetting.tsx
  1406. - packages/ui/src/store/dynamicWorkflowAvailabilityStore.ts
  1407. reason: Admitted upstream files edited only to let the user's dynamic workflow mode choice always win and keep the settings row visible; adopting packages/shared/src and packages/ui/src needs a separate module boundary refactor.
  1408. - id: workflow-source-error-hint-unmanaged-edit
  1409. rule: unmanaged-new-file
  1410. paths:
  1411. - apps/zcode-cli/packages/contracts/src/tools/fill-workflow-hole.ts
  1412. 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.
  1413. - id: workflow-analyzer-complexity-unmanaged-edit
  1414. rule: unmanaged-new-file
  1415. paths:
  1416. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-bindings.ts
  1417. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-calls.ts
  1418. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-functions.ts
  1419. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-loops.ts
  1420. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-settle.ts
  1421. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-state.ts
  1422. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-strands.ts
  1423. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-types.ts
  1424. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/flow-strands.ts
  1425. 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.
  1426. - id: off-peak-model-descriptor-unmanaged-edit
  1427. rule: unmanaged-new-file
  1428. paths: [apps/zcode-cli/packages/core/src/runtime/off-peak/model-binding.ts]
  1429. reason: 已入库的闲时 Model 包装改用 contracts 的 modelDescriptorOf 复制全部数据字段,修复逐字段手抄漏掉 requestCapabilities;包装行为与 Core 模块边界不变,接管整个 runtime 目录不在本次范围内。
  1430. - id: workflow-draft-read-state-per-path-unmanaged-edit
  1431. rule: unmanaged-new-file
  1432. paths: [apps/zcode-cli/packages/core/src/tool/handlers/workflow-draft-read-state.ts]
  1433. reason: 已入库的工作流草稿读状态登记改走 setReadFileStateEntry,跟随读状态改为每个路径一条;草稿流程与 Core 模块边界不变,接管整个 tool 目录不在本次范围内。
  1434. - id: workflow-skill-gate-compact-read-state-comment-unmanaged-edit
  1435. rule: unmanaged-new-file
  1436. paths: [apps/zcode-cli/packages/core/src/tool/handlers/workflow-skill-gate.ts]
  1437. reason: 已入库的工作流技能门只更新一句注释,跟随 compaction 后读取状态改为只留补回的文件;门的判据、代码与 Core 模块边界不变,接管整个 tool 目录不在本次范围内。
  1438. - id: conversation-telemetry-existing-state-machine-size
  1439. rule: max-file-lines
  1440. paths:
  1441. - packages/shared/src/conversation-telemetry/conversationTelemetryEngine.ts
  1442. - packages/shared/src/conversation-telemetry/messageTelemetry.ts
  1443. 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.
  1444. - id: conversation-telemetry-existing-state-machine-lint
  1445. rule: disable-count
  1446. paths:
  1447. - packages/shared/src/conversation-telemetry/conversationTelemetryEngine.ts
  1448. - packages/shared/src/conversation-telemetry/messageTelemetry.ts
  1449. reason: Preserve the two original file-length annotations while relocating the existing implementation.
  1450. - id: host-service-telemetry-existing-file
  1451. rule: unmanaged-new-file
  1452. paths: [packages/desktop/src/host/hostServiceResourceTelemetry.ts]
  1453. reason: Existing main-branch registration point gains a Host-only event and capability gate; adopting the whole Host runtime is outside this telemetry change.
  1454. - id: request-verification-config-recovery-presentation
  1455. rule: unmanaged-new-file
  1456. paths:
  1457. - packages/ui/src/request-security-edition/errors.ts
  1458. reason: 在现有官方版本安全校验展示入口补充配置读取失败的分类与本地化,不改变状态 owner 或模块边界;公共 errors.ts 入口及其开源占位实现承接同一契约,沿用本条精确路径准入;接管整个 UI 安全校验目录不属于本次网络恢复修复。
  1459. - id: node-repl-no-progress-hint-unmanaged-edit
  1460. rule: unmanaged-new-file
  1461. paths:
  1462. - apps/zcode-cli/packages/node-repl-host/src/no-progress-guard.ts
  1463. - apps/zcode-cli/packages/node-repl-host/src/tool-contract.ts
  1464. 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.
  1465. - id: zcode-cua-unmanaged-new-files
  1466. rule: unmanaged-new-file
  1467. paths:
  1468. - packages/zcode-cua/src/**
  1469. 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.