architecture-policy.yaml 128 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667
  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: [services]
  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, packages/shared/vitest.config.ts]
  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. # bash-cmd-readonly-policy:shell 为 cmd / legacy-shell 时按 CMD 语法做保守只读判定(替代 Bash AST,见 tool/04-bash.md)。
  734. - id: bash-cmd-readonly-policy
  735. roots:
  736. - apps/zcode-cli/packages/core/src/tool/cmd-readonly
  737. - apps/zcode-cli/packages/core/src/tool/handlers/bash-cmd-readonly-policy.ts
  738. - apps/zcode-cli/packages/core/tests/cmd-readonly
  739. managed: true
  740. requires: [zcode-cli]
  741. publicEntrypoints:
  742. - apps/zcode-cli/packages/core/src/tool/handlers/bash-cmd-readonly-policy.ts
  743. - apps/zcode-cli/packages/core/src/tool/cmd-readonly/contract.ts
  744. layers: {app: .}
  745. owner: agent
  746. # MCP 的连接基础设施、配置桥接与会话消费;工具实现归工具自身,不混入等待模块。
  747. - id: mcp-runtime
  748. roots:
  749. - apps/zcode-cli/packages/core/src/mcp/runtime
  750. - apps/zcode-cli/packages/adapters/src/mcp/resource-subscriptions.ts
  751. - apps/zcode-cli/packages/adapters/src/mcp/tool-catalog-cache.ts
  752. - apps/zcode-cli/packages/adapters/src/mcp/config-source.ts
  753. - apps/zcode-cli/packages/adapters/src/mcp/config-loader.ts
  754. - apps/zcode-cli/packages/adapters/src/mcp/transport-errors.ts
  755. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-mcp-config.ts
  756. - apps/zcode-cli/packages/core/tests/mcp
  757. - apps/zcode-cli/packages/core/tests/mcp-runtime-fixture.ts
  758. managed: true
  759. requires: [zcode-cli, shared, plugin-discovery, live-config-watch, plugin-host-queries]
  760. publicEntrypoints:
  761. - apps/zcode-cli/packages/core/src/mcp/runtime/session.ts
  762. - apps/zcode-cli/packages/core/src/mcp/runtime/contract.ts
  763. - apps/zcode-cli/packages/adapters/src/mcp/resource-subscriptions.ts
  764. - apps/zcode-cli/packages/adapters/src/mcp/config-source.ts
  765. - apps/zcode-cli/packages/adapters/src/mcp/tool-catalog-cache.ts
  766. - apps/zcode-cli/packages/adapters/src/mcp/transport-errors.ts
  767. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-mcp-config.ts
  768. - apps/zcode-cli/packages/core/tests/mcp-runtime-fixture.ts
  769. layers:
  770. contract: contract.ts
  771. app: ../../../../core/src/mcp/runtime
  772. adapters: .
  773. owner: agent
  774. # 打开的会话重读配置与插件的共享原语:进程级条目、锚点监听、去抖与插件清单读取。
  775. # MCP 配置源与 Skill 实时目录各自的加载器都建在它上面(docs/skills-live-catalog.md)。
  776. - id: live-config-watch
  777. roots:
  778. - apps/zcode-cli/packages/adapters/src/watch
  779. - apps/zcode-cli/packages/adapters/src/plugins/live-inventory.ts
  780. - apps/zcode-cli/packages/adapters/tests/watched-source-directories.test.ts
  781. managed: true
  782. requires: [zcode-cli, plugin-discovery, workspace-plugin-declaration]
  783. publicEntrypoints:
  784. - apps/zcode-cli/packages/adapters/src/watch/watched-source.ts
  785. - apps/zcode-cli/packages/adapters/src/watch/contract.ts
  786. - apps/zcode-cli/packages/adapters/src/plugins/live-inventory.ts
  787. layers: {contract: contract.ts, adapters: .}
  788. owner: agent
  789. # Skill 实时目录:进程级目录快照、读快照的 SkillPort 与只追加增量的列表公告。
  790. - id: skill-live-catalog
  791. roots:
  792. - apps/zcode-cli/packages/core/src/skills
  793. - apps/zcode-cli/packages/adapters/src/skills/catalog.ts
  794. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-skill-catalog.ts
  795. - apps/zcode-cli/packages/adapters/tests/skill-catalog.test.ts
  796. - apps/zcode-cli/packages/core/tests/skills-listing.test.ts
  797. managed: true
  798. requires: [zcode-cli, shared, live-config-watch]
  799. publicEntrypoints:
  800. - apps/zcode-cli/packages/core/src/skills/listing.ts
  801. - apps/zcode-cli/packages/core/src/skills/listing-metadata.ts
  802. - apps/zcode-cli/packages/core/src/skills/contract.ts
  803. - apps/zcode-cli/packages/adapters/src/skills/catalog.ts
  804. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-skill-catalog.ts
  805. layers: {contract: contract.ts, app: .}
  806. owner: agent
  807. - id: plugin-discovery
  808. roots: [apps/zcode-cli/packages/adapters/src/plugins/discovery, apps/zcode-cli/packages/adapters/tests/plugin-discovery]
  809. managed: true
  810. requires: [zcode-cli, shared]
  811. publicEntrypoints:
  812. - apps/zcode-cli/packages/adapters/src/plugins/discovery/index.ts
  813. - apps/zcode-cli/packages/adapters/src/plugins/discovery/contract.ts
  814. layers: {contract: contract.ts, adapters: .}
  815. owner: plugin
  816. - id: tool-result-settlement
  817. roots:
  818. - apps/zcode-cli/packages/core/src/runtime/tool-result-settlement
  819. - apps/zcode-cli/packages/core/src/runtime/methods/tool-result-settlement.ts
  820. - apps/zcode-cli/packages/core/tests/tool-result-settlement
  821. managed: true
  822. requires: [zcode-cli, session-features]
  823. publicEntrypoints:
  824. - apps/zcode-cli/packages/core/src/runtime/methods/tool-result-settlement.ts
  825. - apps/zcode-cli/packages/core/src/runtime/tool-result-settlement/contract.ts
  826. layers: {app: .}
  827. owner: agent
  828. # remote-input-prediction:手机远控输入预测(v4 线格式、Host 侧开关、CLI 只读查询)。
  829. # 规格:docs/web-remote-control/mobile-input-prediction.md。
  830. - id: remote-input-prediction
  831. roots:
  832. - packages/shared/src/zcode-protocol-v4/input-prediction
  833. - packages/services/src/zcode-agent/inputPredictionSwitch.ts
  834. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/input-prediction-handler.ts
  835. - apps/zcode-cli/packages/core/src/runtime/methods/input-prediction-sidecar.ts
  836. managed: true
  837. requires: [shared, zcode-cli]
  838. publicEntrypoints:
  839. - packages/shared/src/zcode-protocol-v4/input-prediction/contract.ts
  840. - packages/services/src/zcode-agent/inputPredictionSwitch.ts
  841. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/input-prediction-handler.ts
  842. - apps/zcode-cli/packages/core/src/runtime/methods/input-prediction-sidecar.ts
  843. layers: {app: .}
  844. owner: remote
  845. # context-composition:context 组成(扩展进程 P1):v4 线格式、CLI 分类/预演/修订号/协议处理、App 侧查询与通知。
  846. # 规格:apps/zcode-cli/docs/design/v2/model/context-composition.md。
  847. - id: context-composition
  848. roots:
  849. - packages/shared/src/zcode-protocol-v4/context-composition
  850. - apps/zcode-cli/packages/core/src/runtime/context-composition
  851. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/context-composition
  852. - packages/services/src/zcode-agent/contextCompositionClient.ts
  853. - apps/zcode-cli/packages/core/tests/context-composition
  854. - apps/zcode-cli/packages/bootstrap/tests/context-composition
  855. managed: true
  856. requires: [rpc, services, shared, tool-discovery, zcode-cli]
  857. publicEntrypoints:
  858. - packages/shared/src/zcode-protocol-v4/context-composition/contract.ts
  859. - apps/zcode-cli/packages/core/src/runtime/context-composition/index.ts
  860. # runtime 内部的变更点直接引用 state.ts:经 index 会形成 context-refresh → query → preview → context-refresh 的环。
  861. - apps/zcode-cli/packages/core/src/runtime/context-composition/state.ts
  862. - apps/zcode-cli/packages/core/src/runtime/context-composition/query.ts
  863. - apps/zcode-cli/packages/core/src/runtime/context-composition/classifier.ts
  864. - apps/zcode-cli/packages/core/src/runtime/context-composition/items.ts
  865. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/context-composition/index.ts
  866. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/context-composition/tracker.ts
  867. - packages/services/src/zcode-agent/contextCompositionClient.ts
  868. layers: {app: .}
  869. owner: agent
  870. # plugin-host-queries:扩展进程 P2 的插件宿主查询——敏感选项私有存储、plugins/readUserOptions、
  871. # plugins/mentionItems 的线格式、CLI 实现与 App 侧客户端。规格:apps/zcode-cli/docs/design/v2/plugin-compat.md
  872. # 「Sensitive Option Storage」「Composer Mention Items」。
  873. - id: plugin-host-queries
  874. roots:
  875. - packages/shared/src/zcode-protocol/plugin-host-queries
  876. - apps/zcode-cli/packages/adapters/src/config/plugin-secrets.adapter.ts
  877. - apps/zcode-cli/packages/bootstrap/src/plugin-secrets.ts
  878. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-user-options.ts
  879. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-mention-items.ts
  880. - packages/services/src/zcode-agent/pluginHostQueriesClient.ts
  881. managed: true
  882. requires: [services, shared, zcode-cli]
  883. publicEntrypoints:
  884. - packages/shared/src/zcode-protocol/plugin-host-queries/contract.ts
  885. - apps/zcode-cli/packages/adapters/src/config/plugin-secrets.adapter.ts
  886. - apps/zcode-cli/packages/bootstrap/src/plugin-secrets.ts
  887. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-user-options.ts
  888. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-mention-items.ts
  889. - packages/services/src/zcode-agent/pluginHostQueriesClient.ts
  890. layers: {app: .}
  891. owner: plugin
  892. # remote-resident-rows-range:rowsRange 只读热会话(residency="resident-only")的 Host 侧执行端能力确认,
  893. # 供手机任务列表预加载;旧 CLI 不认识该参数时 Host 直接拒绝,不触发冷恢复。
  894. - id: remote-resident-rows-range
  895. roots:
  896. - packages/services/src/zcode-agent/resident-rows-range
  897. managed: true
  898. requires: [shared, services]
  899. publicEntrypoints:
  900. - packages/services/src/zcode-agent/resident-rows-range/contract.ts
  901. layers: {app: .}
  902. owner: remote
  903. # 官方市场工具只在接到支持卡片的输入时开放,目录排序和安装由 CLI 所有。
  904. - id: agent-plugin-discovery
  905. roots:
  906. - apps/zcode-cli/packages/bootstrap/src/plugin-discovery
  907. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-discovery-port.ts
  908. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-install-interaction.ts
  909. - apps/zcode-cli/packages/contracts/src/interfaces/plugin-discovery.port.ts
  910. - apps/zcode-cli/packages/contracts/src/tools/plugin-discovery.ts
  911. - apps/zcode-cli/packages/core/src/tool/handlers/plugin-discovery.ts
  912. managed: true
  913. requires: [shared, zcode-cli, plugin-install-interaction]
  914. publicEntrypoints:
  915. - apps/zcode-cli/packages/bootstrap/src/plugin-discovery/contract.ts
  916. - apps/zcode-cli/packages/bootstrap/src/plugin-discovery/subscription.ts
  917. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-discovery-port.ts
  918. - apps/zcode-cli/packages/contracts/src/interfaces/plugin-discovery.port.ts
  919. - apps/zcode-cli/packages/contracts/src/tools/plugin-discovery.ts
  920. - apps/zcode-cli/packages/core/src/tool/handlers/plugin-discovery.ts
  921. layers: {app: .}
  922. owner: plugin
  923. # 卡片只投影协议载荷并提交选择;不拥有安装或重载状态。
  924. - id: plugin-install-interaction
  925. roots:
  926. - packages/shared/src/plugin-discovery
  927. - packages/shared/src/plugin-store-visibility.ts
  928. - packages/shared/src/zcode-protocol-v4/pluginInstall.ts
  929. - packages/ui/src/v4/PluginInstallCard.tsx
  930. - packages/ui/src/settings/PluginAutoRecommendationSetting.tsx
  931. managed: true
  932. requires: [shared, ui]
  933. publicEntrypoints:
  934. - packages/shared/src/plugin-discovery/contract.ts
  935. - packages/shared/src/plugin-store-visibility.ts
  936. - packages/shared/src/zcode-protocol-v4/pluginInstall.ts
  937. - packages/ui/src/v4/PluginInstallCard.tsx
  938. - packages/ui/src/settings/PluginAutoRecommendationSetting.tsx
  939. layers: {app: .}
  940. owner: plugin
  941. - id: tool-discovery
  942. roots:
  943. - apps/zcode-cli/packages/core/src/tool/search
  944. - apps/zcode-cli/packages/core/src/tool/handlers/tool-search.ts
  945. - apps/zcode-cli/packages/core/src/tool/handlers/deferred-tool-call.ts
  946. - apps/zcode-cli/packages/contracts/src/tools/tool-search.ts
  947. # ToolSearch 关闭时说明连接中 MCP server 的工具。
  948. - apps/zcode-cli/packages/core/src/tool/handlers/wait-for-mcp-servers.ts
  949. - apps/zcode-cli/packages/contracts/src/tools/wait-for-mcp-servers.ts
  950. - apps/zcode-cli/packages/core/tests/tool-discovery
  951. - apps/zcode-cli/packages/core/tests/tool-search
  952. - apps/zcode-cli/packages/core/src/agent/tool-search-hydration.ts
  953. managed: true
  954. requires: [zcode-cli]
  955. publicEntrypoints:
  956. - apps/zcode-cli/packages/core/src/tool/search/contract.ts
  957. - apps/zcode-cli/packages/core/src/tool/search/exposure.ts
  958. - apps/zcode-cli/packages/core/src/tool/search/history.ts
  959. - apps/zcode-cli/packages/core/src/tool/search/search.ts
  960. - apps/zcode-cli/packages/core/src/tool/search/description.ts
  961. - apps/zcode-cli/packages/core/src/tool/search/local-projection.ts
  962. - apps/zcode-cli/packages/core/src/tool/handlers/tool-search.ts
  963. - apps/zcode-cli/packages/core/src/tool/handlers/deferred-tool-call.ts
  964. - apps/zcode-cli/packages/contracts/src/tools/tool-search.ts
  965. - apps/zcode-cli/packages/core/src/tool/handlers/wait-for-mcp-servers.ts
  966. - apps/zcode-cli/packages/contracts/src/tools/wait-for-mcp-servers.ts
  967. - apps/zcode-cli/packages/core/src/agent/tool-search-hydration.ts
  968. layers: {app: .}
  969. owner: agent
  970. # node-repl-call-ledger:node_repl 结果里可信事实的唯一来源(apps/zcode-cli/docs/design/v2/tool/20-node-repl-call-ledger.md)
  971. - id: node-repl-call-ledger
  972. roots:
  973. - apps/zcode-cli/packages/node-repl-host/src/call-ledger
  974. - apps/zcode-cli/packages/node-repl-host/test/call-ledger
  975. managed: true
  976. requires: [zcode-cli]
  977. publicEntrypoints:
  978. - apps/zcode-cli/packages/node-repl-host/src/call-ledger/contract.ts
  979. layers: {adapters: .}
  980. owner: agent
  981. - id: session-features
  982. roots:
  983. - apps/zcode-cli/packages/core/src/runtime/session-features
  984. - apps/zcode-cli/packages/core/tests/session-features
  985. managed: true
  986. requires: [zcode-cli]
  987. publicEntrypoints:
  988. - apps/zcode-cli/packages/core/src/runtime/session-features/contract.ts
  989. layers: {app: .}
  990. owner: agent
  991. - id: provider-tool-rounds
  992. roots:
  993. - apps/zcode-cli/packages/core/src/runtime/provider-tool-rounds
  994. - apps/zcode-cli/packages/core/tests/provider-tool-rounds
  995. managed: true
  996. requires: [zcode-cli]
  997. publicEntrypoints:
  998. - apps/zcode-cli/packages/core/src/runtime/provider-tool-rounds/contract.ts
  999. layers: {app: .}
  1000. owner: agent
  1001. - id: provider-builtin-tool-compat
  1002. roots:
  1003. - apps/zcode-cli/packages/adapters/src/model/provider-builtin-tool-compat
  1004. - apps/zcode-cli/packages/adapters/tests/provider-builtin-tool-compat
  1005. managed: true
  1006. requires: []
  1007. publicEntrypoints:
  1008. - apps/zcode-cli/packages/adapters/src/model/provider-builtin-tool-compat/contract.ts
  1009. layers: {adapters: .}
  1010. owner: agent
  1011. - id: conversation-quote-context
  1012. roots:
  1013. - apps/zcode-cli/packages/core/src/runtime/conversation-quote-context
  1014. - apps/zcode-cli/packages/core/src/runtime/helpers/conversation-quotes.ts
  1015. - apps/zcode-cli/packages/core/tests/conversation-quote-context
  1016. managed: true
  1017. requires: [zcode-cli]
  1018. publicEntrypoints:
  1019. - apps/zcode-cli/packages/core/src/runtime/conversation-quote-context/contract.ts
  1020. - apps/zcode-cli/packages/core/src/runtime/helpers/conversation-quotes.ts
  1021. layers: {domain: .}
  1022. owner: agent
  1023. - id: tool-search-comparison
  1024. roots:
  1025. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison-contract
  1026. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison.ts
  1027. - apps/zcode-cli/tools/prompt-trajectory/tests/tool-search-comparison
  1028. managed: true
  1029. requires: [zcode-cli]
  1030. publicEntrypoints:
  1031. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison-contract/contract.ts
  1032. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison.ts
  1033. layers: {domain: .}
  1034. owner: agent
  1035. - id: window-topic-resource-relay
  1036. roots:
  1037. - packages/desktop/src/host/topic-resource-relay
  1038. - packages/desktop/src/host/windowTopicResourceRelay.ts
  1039. - packages/desktop/test/topic-resource-relay
  1040. managed: true
  1041. requires: [services, shared]
  1042. publicEntrypoints:
  1043. - packages/desktop/src/host/topic-resource-relay/contract.ts
  1044. - packages/desktop/src/host/windowTopicResourceRelay.ts
  1045. layers: {adapters: .}
  1046. owner: desktop
  1047. - id: channel-reply-tool
  1048. roots:
  1049. - apps/zcode-cli/packages/core/src/tool/channel-reply
  1050. - apps/zcode-cli/packages/core/src/tool/handlers/reply-to-channel.ts
  1051. - apps/zcode-cli/packages/core/tests/channel-reply
  1052. managed: true
  1053. requires: [shared, zcode-cli]
  1054. publicEntrypoints:
  1055. - apps/zcode-cli/packages/core/src/tool/handlers/reply-to-channel.ts
  1056. - apps/zcode-cli/packages/core/src/tool/channel-reply/contract.ts
  1057. layers: {app: .}
  1058. owner: agent
  1059. # topic-resource-tool:ReadSessionContext(topic, attachment) 拆出的话题资源工具(会话工具设计 0.8)。
  1060. - id: topic-resource-tool
  1061. roots:
  1062. - apps/zcode-cli/packages/core/src/tool/topic-resource
  1063. - apps/zcode-cli/packages/core/src/tool/handlers/read-topic-resource.ts
  1064. managed: true
  1065. requires: [shared, zcode-cli]
  1066. publicEntrypoints:
  1067. - apps/zcode-cli/packages/core/src/tool/handlers/read-topic-resource.ts
  1068. - apps/zcode-cli/packages/core/src/tool/topic-resource/contract.ts
  1069. layers: {app: .}
  1070. owner: agent
  1071. # bot-topic-history-attachment:登记既有话题历史附件构造,提示改指向 ReadTopicResource 时纳管。
  1072. - id: bot-topic-history-attachment
  1073. roots:
  1074. - packages/services/src/bots/topic-history-attachment
  1075. - packages/services/src/bots/topicHistoryAttachment.ts
  1076. managed: true
  1077. requires: [shared]
  1078. publicEntrypoints:
  1079. - packages/services/src/bots/topicHistoryAttachment.ts
  1080. - packages/services/src/bots/topic-history-attachment/contract.ts
  1081. layers: {app: .}
  1082. owner: conversation
  1083. # composer-toolbar-layout:登记既有 DOM 布局入口,不改调用路径。
  1084. - id: composer-toolbar-layout
  1085. roots:
  1086. - packages/ui/src/composer-toolbar-layout
  1087. - packages/ui/src/prompt-editor/useComposerToolbarFit.ts
  1088. - packages/ui/test/composer-toolbar-layout
  1089. managed: true
  1090. requires: []
  1091. publicEntrypoints:
  1092. - packages/ui/src/prompt-editor/useComposerToolbarFit.ts
  1093. - packages/ui/src/composer-toolbar-layout/contract.ts
  1094. layers: {ui: .}
  1095. owner: conversation
  1096. # task-groups:由 architecture:adopt 登记
  1097. - id: task-groups
  1098. roots:
  1099. - packages/services/src/task-groups
  1100. managed: true
  1101. requires:
  1102. - services
  1103. - session
  1104. - shared
  1105. publicEntrypoints:
  1106. - packages/services/src/task-groups/index.ts
  1107. - packages/services/src/task-groups/contract.ts
  1108. - packages/services/src/task-groups/migration-v6.ts
  1109. layers:
  1110. adapters: .
  1111. owner: conversation
  1112. # window-project-directory:由 architecture:adopt 登记
  1113. - id: window-project-directory
  1114. roots:
  1115. - packages/services/src/window-project-directory
  1116. managed: true
  1117. requires:
  1118. - project
  1119. - remote-projects
  1120. - rpc
  1121. - services
  1122. - shared
  1123. publicEntrypoints:
  1124. - packages/services/src/window-project-directory/index.ts
  1125. - packages/services/src/window-project-directory/contract.ts
  1126. layers:
  1127. adapters: .
  1128. owner: conversation
  1129. # conversation-share-interaction:由 architecture:adopt 登记
  1130. - id: conversation-share-interaction
  1131. roots:
  1132. - packages/ui/src/conversation-share-interaction
  1133. managed: true
  1134. requires:
  1135. - services
  1136. - shared
  1137. - ui
  1138. publicEntrypoints:
  1139. - packages/ui/src/conversation-share-interaction/index.ts
  1140. - packages/ui/src/conversation-share-interaction/contract.ts
  1141. - packages/ui/src/conversation-share-interaction/ConversationSharePopover.tsx
  1142. - packages/ui/src/conversation-share-interaction/ConversationShareExpiryPicker.tsx
  1143. - packages/ui/src/conversation-share-interaction/ConversationSharePreflightStatus.tsx
  1144. - packages/ui/src/conversation-share-interaction/conversationSharePopoverActions.ts
  1145. - packages/ui/src/conversation-share-interaction/conversationSharePreflightRequest.ts
  1146. - packages/ui/src/conversation-share-interaction/conversationSharePreflightResponse.ts
  1147. - packages/ui/src/conversation-share-interaction/conversationSharePreflightCache.ts
  1148. - packages/ui/src/conversation-share-interaction/SettingsShareManagement.tsx
  1149. layers:
  1150. contract: contract.ts
  1151. ui: .
  1152. owner: conversation
  1153. # workspace-plugin-preview:由 architecture:adopt 登记
  1154. - id: workspace-plugin-preview
  1155. roots:
  1156. - packages/ui/src/workspace-plugin-preview
  1157. managed: true
  1158. requires:
  1159. - shared
  1160. - ui
  1161. publicEntrypoints:
  1162. - packages/ui/src/workspace-plugin-preview/index.ts
  1163. - packages/ui/src/workspace-plugin-preview/contract.ts
  1164. layers:
  1165. ui: .
  1166. owner: plugin
  1167. # office-runtime:内置文档插件查看面板的共享运行时,由 architecture:adopt 登记
  1168. - id: office-runtime
  1169. roots:
  1170. - apps/zcode-cli/packages/office-runtime
  1171. managed: true
  1172. requires: []
  1173. publicEntrypoints:
  1174. - apps/zcode-cli/packages/office-runtime/index.ts
  1175. - apps/zcode-cli/packages/office-runtime/contract.ts
  1176. layers:
  1177. app: .
  1178. owner: plugin
  1179. # embedded-browser-permission:由 architecture:adopt 登记
  1180. - id: embedded-browser-permission
  1181. roots:
  1182. - packages/desktop/src/main/embedded-browser-permission-contract
  1183. - packages/desktop/src/main/embeddedBrowserPermissionPolicy.ts
  1184. managed: true
  1185. requires:
  1186. - desktop
  1187. - shared
  1188. publicEntrypoints:
  1189. - packages/desktop/src/main/embeddedBrowserPermissionPolicy.ts
  1190. - packages/desktop/src/main/embedded-browser-permission-contract/contract.ts
  1191. layers:
  1192. adapters: .
  1193. owner: desktop
  1194. # marketing-touch-controller:由 architecture:adopt 登记
  1195. - id: marketing-touch-controller
  1196. roots:
  1197. - packages/ui/src/marketing-touch-contract
  1198. - packages/ui/src/components/marketing-touch/marketingTouchController.ts
  1199. managed: true
  1200. requires:
  1201. - services
  1202. - shared
  1203. - ui
  1204. publicEntrypoints:
  1205. - packages/ui/src/components/marketing-touch/marketingTouchController.ts
  1206. - packages/ui/src/marketing-touch-contract/contract.ts
  1207. layers:
  1208. app: .
  1209. owner: desktop
  1210. # data-sync-service:数据同步分类服务形状与本机设备同步状态(docs/remote/data-sync.md)
  1211. - id: data-sync-service
  1212. roots:
  1213. - packages/services/src/data-sync
  1214. managed: true
  1215. requires:
  1216. - services
  1217. - shared
  1218. publicEntrypoints:
  1219. - packages/services/src/data-sync/index.ts
  1220. - packages/services/src/data-sync/contract.ts
  1221. - packages/services/src/data-sync/node.ts
  1222. layers:
  1223. app: .
  1224. owner: remote
  1225. # voice-input-service:Composer 语音输入的本机 Host ASR 连接(docs/chat/composer-voice-input.md)
  1226. - id: voice-input-service
  1227. roots:
  1228. - packages/services/src/voice-input
  1229. managed: true
  1230. requires:
  1231. - services
  1232. - shared
  1233. - rpc
  1234. publicEntrypoints:
  1235. - packages/services/src/voice-input/index.ts
  1236. - packages/services/src/voice-input/contract.ts
  1237. - packages/services/src/voice-input/node.ts
  1238. layers:
  1239. adapters: .
  1240. owner: desktop
  1241. # provider-provisioning-status:数据同步页模型提供商读取 / 重试 Main 协调器的 Provisioning lane(R3 §8.3.6)
  1242. - id: provider-provisioning-status
  1243. roots:
  1244. - packages/services/src/provider-provisioning-status
  1245. managed: true
  1246. requires:
  1247. - services
  1248. - shared
  1249. publicEntrypoints:
  1250. - packages/services/src/provider-provisioning-status/index.ts
  1251. - packages/services/src/provider-provisioning-status/contract.ts
  1252. - packages/services/src/provider-provisioning-status/node.ts
  1253. layers:
  1254. app: .
  1255. owner: remote
  1256. # data-sync:设置页「数据同步」与同步弹窗(docs/remote/data-sync.md)
  1257. - id: data-sync
  1258. roots:
  1259. - packages/ui/src/data-sync
  1260. managed: true
  1261. requires:
  1262. - services
  1263. - shared
  1264. - ui
  1265. - conversation-workspace-target
  1266. publicEntrypoints:
  1267. - packages/ui/src/data-sync/index.ts
  1268. - packages/ui/src/data-sync/contract.ts
  1269. layers:
  1270. contract: contract.ts
  1271. domain: domain
  1272. app: app
  1273. ui: .
  1274. layerOrder: [contract, domain, app, ui]
  1275. owner: remote
  1276. # voice-input:Composer 语音输入按钮、状态机与麦克风采集(docs/chat/composer-voice-input.md)
  1277. - id: voice-input
  1278. roots:
  1279. - packages/ui/src/voice-input
  1280. managed: true
  1281. requires:
  1282. - services
  1283. - shared
  1284. - ui
  1285. - shortcuts
  1286. publicEntrypoints:
  1287. - packages/ui/src/voice-input/index.ts
  1288. - packages/ui/src/voice-input/contract.ts
  1289. layers:
  1290. contract: contract.ts
  1291. domain: domain
  1292. adapters: adapters
  1293. ui: .
  1294. layerOrder: [contract, domain, adapters, ui]
  1295. owner: desktop
  1296. # settings-scope:设置页 Scope 菜单按设备分组(docs/remote/data-sync.md「Scope 菜单按设备分组」)
  1297. - id: settings-scope
  1298. roots:
  1299. - packages/ui/src/settings-scope
  1300. managed: true
  1301. requires:
  1302. - services
  1303. - shared
  1304. - ui
  1305. - conversation-workspace-target
  1306. - workspace-config-catalog
  1307. publicEntrypoints:
  1308. - packages/ui/src/settings-scope/index.ts
  1309. - packages/ui/src/settings-scope/contract.ts
  1310. layers:
  1311. contract: contract.ts
  1312. domain: domain
  1313. app: app
  1314. ui: .
  1315. layerOrder: [contract, domain, app, ui]
  1316. owner: remote
  1317. # side-pane-full-view:由 architecture:adopt 登记
  1318. - id: side-pane-full-view
  1319. roots:
  1320. - packages/ui/src/side-pane-full-view
  1321. managed: true
  1322. requires:
  1323. - shared
  1324. - ui
  1325. publicEntrypoints:
  1326. - packages/ui/src/side-pane-full-view/index.ts
  1327. - packages/ui/src/side-pane-full-view/contract.ts
  1328. layers:
  1329. ui: .
  1330. owner: conversation
  1331. # 发行策略使用独立目录;修改后的文件由本模块承担边界检查。
  1332. - id: request-security-edition
  1333. roots: [packages/shared/src/request-security-edition]
  1334. managed: true
  1335. requires: [shared]
  1336. publicEntrypoints:
  1337. - packages/shared/src/request-security-edition/index.ts
  1338. - packages/shared/src/request-security-edition/policy.ts
  1339. - packages/shared/src/request-security-edition/verification-policy.ts
  1340. - packages/shared/src/request-security-edition/contract.ts
  1341. layers: {adapters: .}
  1342. owner: request-security
  1343. # local-ttft-contract:由 architecture:adopt 登记
  1344. - id: local-ttft-contract
  1345. roots:
  1346. - packages/shared/src/local-ttft
  1347. managed: true
  1348. requires: []
  1349. publicEntrypoints:
  1350. - packages/shared/src/local-ttft/contract.ts
  1351. layers:
  1352. contract: .
  1353. # local-ttft-renderer:由 architecture:adopt 登记
  1354. - id: local-ttft-renderer
  1355. roots:
  1356. - packages/ui/src/v4/telemetry/local-ttft
  1357. managed: true
  1358. requires:
  1359. - shared
  1360. - ui
  1361. publicEntrypoints:
  1362. - packages/ui/src/v4/telemetry/local-ttft/contract.ts
  1363. layers:
  1364. ui: .
  1365. # local-ttft-desktop:由 architecture:adopt 登记
  1366. - id: local-ttft-desktop
  1367. roots:
  1368. - packages/desktop/src/renderer/src/local-ttft
  1369. managed: true
  1370. requires:
  1371. - shared
  1372. - ui
  1373. publicEntrypoints:
  1374. - packages/desktop/src/renderer/src/local-ttft/contract.ts
  1375. layers:
  1376. ui: .
  1377. # local-ttft-cli:由 architecture:adopt 登记
  1378. - id: local-ttft-cli
  1379. roots:
  1380. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/local-ttft
  1381. managed: true
  1382. requires:
  1383. - shared
  1384. - zcode-cli
  1385. publicEntrypoints:
  1386. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/local-ttft/contract.ts
  1387. layers:
  1388. adapters: .
  1389. # cli-official-command-endpoint:由 architecture:adopt 登记
  1390. - id: cli-official-command-endpoint
  1391. roots:
  1392. - apps/zcode-cli/packages/bootstrap/src/official-command-endpoint
  1393. - apps/zcode-cli/packages/bootstrap/tests/official-command-endpoint
  1394. managed: true
  1395. requires:
  1396. - shared
  1397. - zcode-cli
  1398. publicEntrypoints:
  1399. - apps/zcode-cli/packages/bootstrap/src/official-command-endpoint/index.ts
  1400. - apps/zcode-cli/packages/bootstrap/src/official-command-endpoint/contract.ts
  1401. layers:
  1402. adapters: .
  1403. owner: identity
  1404. # zcode-site-panel:zcode-site 插件自带的 Sites 面板(MCP server + 页面),由 architecture:adopt 登记
  1405. - id: zcode-site-panel
  1406. roots:
  1407. - apps/zcode-cli/packages/zcode-site-plugin/src
  1408. managed: true
  1409. requires:
  1410. - shared
  1411. publicEntrypoints:
  1412. - apps/zcode-cli/packages/zcode-site-plugin/src/index.ts
  1413. - apps/zcode-cli/packages/zcode-site-plugin/src/contract.ts
  1414. layers:
  1415. app: .
  1416. owner: plugin
  1417. # file-open-apps:由 architecture:adopt 登记
  1418. - id: file-open-apps
  1419. roots:
  1420. - packages/desktop/src/main/file-open-apps
  1421. managed: true
  1422. requires: [shared]
  1423. publicEntrypoints:
  1424. - packages/desktop/src/main/file-open-apps/index.ts
  1425. - packages/desktop/src/main/file-open-apps/contract.ts
  1426. layers:
  1427. adapters: .
  1428. owner: desktop
  1429. # ui-file-menu:由 architecture:adopt 登记
  1430. - id: ui-file-menu
  1431. roots:
  1432. - packages/ui/src/file-menu
  1433. managed: true
  1434. requires:
  1435. - shared
  1436. - ui
  1437. publicEntrypoints:
  1438. - packages/ui/src/file-menu/index.ts
  1439. - packages/ui/src/file-menu/contract.ts
  1440. layers:
  1441. ui: .
  1442. owner: file-preview
  1443. # web-platform:由 architecture:adopt 登记
  1444. - id: web-platform
  1445. roots:
  1446. - packages/web/src/platform
  1447. managed: true
  1448. requires:
  1449. - shared
  1450. - ui
  1451. - web
  1452. publicEntrypoints:
  1453. - packages/web/src/platform/index.ts
  1454. - packages/web/src/platform/contract.ts
  1455. layers:
  1456. adapters: .
  1457. owner: web
  1458. # image-preview-editor:由 architecture:adopt 登记
  1459. - id: image-preview-editor
  1460. roots:
  1461. - packages/ui/src/image-preview-editor
  1462. - packages/ui/src/hooks/useImageFilePreview.ts
  1463. - packages/ui/src/lib/copyPreviewImage.ts
  1464. - packages/ui/src/lib/imagePreviewDownload.ts
  1465. - packages/ui/src/v4/ConversationImageFileMention.tsx
  1466. managed: true
  1467. requires: [ui, shared, ui-file-menu]
  1468. publicEntrypoints:
  1469. - packages/ui/src/image-preview-editor/index.ts
  1470. - packages/ui/src/image-preview-editor/contract.ts
  1471. - packages/ui/src/hooks/useImageFilePreview.ts
  1472. - packages/ui/src/lib/copyPreviewImage.ts
  1473. - packages/ui/src/lib/imagePreviewDownload.ts
  1474. - packages/ui/src/v4/ConversationImageFileMention.tsx
  1475. layers:
  1476. ui: .
  1477. owner: conversation
  1478. # 用户消息正文组合;保留现有 v4 入口,以精确 root 登记展示层归属。
  1479. - id: conversation-user-input-presentation
  1480. roots:
  1481. - packages/ui/src/conversation-user-input-presentation
  1482. - packages/ui/src/v4/ConversationUserInputBubble.tsx
  1483. managed: true
  1484. requires: [ui, shared, image-preview-editor]
  1485. publicEntrypoints:
  1486. - packages/ui/src/conversation-user-input-presentation/contract.ts
  1487. - packages/ui/src/v4/ConversationUserInputBubble.tsx
  1488. layers:
  1489. ui: .
  1490. owner: conversation
  1491. # protocol-session-data:由 architecture:adopt 登记
  1492. - id: protocol-session-data
  1493. roots:
  1494. - packages/shared/src/zcode-protocol-v4/session-data
  1495. managed: true
  1496. requires: []
  1497. publicEntrypoints:
  1498. - packages/shared/src/zcode-protocol-v4/session-data/index.ts
  1499. - packages/shared/src/zcode-protocol-v4/session-data/contract.ts
  1500. layers:
  1501. domain: .
  1502. # cli-session-data-files:由 architecture:adopt 登记
  1503. - id: cli-session-data-files
  1504. roots:
  1505. - apps/zcode-cli/packages/adapters/src/storage/session-data-files
  1506. managed: true
  1507. requires: []
  1508. publicEntrypoints:
  1509. - apps/zcode-cli/packages/adapters/src/storage/session-data-files/index.ts
  1510. - apps/zcode-cli/packages/adapters/src/storage/session-data-files/contract.ts
  1511. layers:
  1512. adapters: .
  1513. # cli-session-data:由 architecture:adopt 登记
  1514. - id: cli-session-data
  1515. roots:
  1516. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/session-data
  1517. managed: true
  1518. requires:
  1519. - shared
  1520. - zcode-cli
  1521. publicEntrypoints:
  1522. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/session-data/index.ts
  1523. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/session-data/contract.ts
  1524. layers:
  1525. app: .
  1526. - id: cli-plugin-startup-budget
  1527. roots:
  1528. - apps/zcode-cli/packages/bootstrap/src/plugin-startup-budget
  1529. managed: true
  1530. requires: [zcode-cli]
  1531. publicEntrypoints:
  1532. - apps/zcode-cli/packages/bootstrap/src/plugin-startup-budget/index.ts
  1533. - apps/zcode-cli/packages/bootstrap/src/plugin-startup-budget/contract.ts
  1534. layers:
  1535. app: .
  1536. owner: plugin
  1537. - id: provider-regression
  1538. roots: [apps/zcode-cli/tools/provider-regression]
  1539. managed: true
  1540. requires: [zcode-cli, provider, provider-node, shared]
  1541. publicEntrypoints:
  1542. - apps/zcode-cli/tools/provider-regression/index.ts
  1543. - apps/zcode-cli/tools/provider-regression/contract.ts
  1544. layers: {adapters: .}
  1545. owner: agent
  1546. # session-lifecycle:由 architecture:adopt 登记
  1547. - id: session-lifecycle
  1548. roots:
  1549. - apps/zcode-cli/packages/bootstrap/src/session-lifecycle
  1550. - apps/zcode-cli/packages/bootstrap/tests/session-lifecycle
  1551. managed: true
  1552. requires: [shared]
  1553. publicEntrypoints:
  1554. - apps/zcode-cli/packages/bootstrap/src/session-lifecycle/index.ts
  1555. - apps/zcode-cli/packages/bootstrap/src/session-lifecycle/contract.ts
  1556. layers:
  1557. app: .
  1558. owner: agent-runtime
  1559. # workspace-mcp-trust:由 architecture:adopt 登记
  1560. - id: workspace-mcp-trust
  1561. roots:
  1562. - apps/zcode-cli/packages/bootstrap/src/workspace-mcp-trust
  1563. managed: true
  1564. requires: [zcode-cli, shared]
  1565. publicEntrypoints:
  1566. - apps/zcode-cli/packages/bootstrap/src/workspace-mcp-trust/index.ts
  1567. - apps/zcode-cli/packages/bootstrap/src/workspace-mcp-trust/contract.ts
  1568. layers:
  1569. adapters: .
  1570. owner: cli
  1571. # composer-edit-mode:由 architecture:adopt 登记
  1572. - id: composer-edit-mode
  1573. roots:
  1574. - packages/ui/src/composer-edit-mode
  1575. managed: true
  1576. requires: [shared, ui]
  1577. publicEntrypoints:
  1578. - packages/ui/src/composer-edit-mode/index.ts
  1579. - packages/ui/src/composer-edit-mode/contract.ts
  1580. layers:
  1581. contract: contract.ts
  1582. ui: .
  1583. owner: conversation
  1584. # desktop-microphone-access:由 architecture:adopt 登记
  1585. - id: desktop-microphone-access
  1586. roots:
  1587. - packages/desktop/src/main/microphone-access
  1588. managed: true
  1589. requires:
  1590. - shared
  1591. publicEntrypoints:
  1592. - packages/desktop/src/main/microphone-access/index.ts
  1593. - packages/desktop/src/main/microphone-access/contract.ts
  1594. layers:
  1595. adapters: .
  1596. owner: desktop
  1597. # web-share-manage:由 architecture:adopt 登记
  1598. - id: web-share-manage
  1599. roots:
  1600. - packages/web/src/share-manage
  1601. managed: true
  1602. requires:
  1603. - shared
  1604. - ui
  1605. - web
  1606. - web-auth
  1607. publicEntrypoints:
  1608. - packages/web/src/share-manage/index.ts
  1609. - packages/web/src/share-manage/contract.ts
  1610. - packages/web/src/share-manage/mockConversationShareManageClient.ts
  1611. layers:
  1612. ui: .
  1613. owner: conversation
  1614. # managed-worktree-shared:由 architecture:adopt 登记
  1615. - id: managed-worktree-shared
  1616. roots:
  1617. - packages/shared/src/managed-worktree
  1618. managed: true
  1619. # Trust identity 由远程 identity 的 host 部分与执行目录构造,复用 shared 的统一 identity 工具,不另写解析规则。
  1620. requires: [shared]
  1621. publicEntrypoints:
  1622. - packages/shared/src/managed-worktree/index.ts
  1623. - packages/shared/src/managed-worktree/contract.ts
  1624. layers:
  1625. app: .
  1626. owner: desktop
  1627. # managed-worktree-repo:由 architecture:adopt 登记
  1628. - id: managed-worktree-repo
  1629. roots:
  1630. - packages/services/src/git/managed-worktree
  1631. managed: true
  1632. requires:
  1633. - managed-worktree-shared
  1634. - services
  1635. - shared
  1636. publicEntrypoints:
  1637. - packages/services/src/git/managed-worktree/index.ts
  1638. - packages/services/src/git/managed-worktree/contract.ts
  1639. layers:
  1640. adapters: .
  1641. owner: desktop
  1642. # managed-worktree-tasks:由 architecture:adopt 登记
  1643. - id: managed-worktree-tasks
  1644. roots:
  1645. - packages/services/src/managed-worktree-tasks
  1646. managed: true
  1647. requires:
  1648. - managed-worktree-repo
  1649. - managed-worktree-shared
  1650. - project-storage
  1651. - rpc
  1652. - services
  1653. - shared
  1654. publicEntrypoints:
  1655. - packages/services/src/managed-worktree-tasks/index.ts
  1656. - packages/services/src/managed-worktree-tasks/contract.ts
  1657. layers:
  1658. app: .
  1659. owner: desktop
  1660. # managed-worktree-ui:由 architecture:adopt 登记
  1661. - id: managed-worktree-ui
  1662. roots:
  1663. - packages/ui/src/managed-worktrees
  1664. managed: true
  1665. requires:
  1666. - services
  1667. - shared
  1668. - ui
  1669. - conversation-user-input-presentation
  1670. publicEntrypoints:
  1671. - packages/ui/src/managed-worktrees/index.ts
  1672. - packages/ui/src/managed-worktrees/contract.ts
  1673. layers:
  1674. contract: contract.ts
  1675. ui: .
  1676. owner: desktop
  1677. - id: session-tool-presentation
  1678. roots: [packages/ui/src/ToolCallBlocks/session]
  1679. managed: true
  1680. requires: [ui]
  1681. publicEntrypoints: [packages/ui/src/ToolCallBlocks/session/contract.ts]
  1682. layers: {ui: "."}
  1683. owner: conversation
  1684. # extension-host-protocol:扩展进程三方共用的纯 schema、类型与纯函数(docs/plugins/extension-host.md §4)。
  1685. - id: extension-host-protocol
  1686. roots:
  1687. - packages/shared/src/extension-host
  1688. managed: true
  1689. # 能力表引用 context 组成的线格式与模型选择 schema(docs/plugins/extension-host.md §7.2、§9);
  1690. # composer.mention 的候选项与 CLI plugins/mentionItems 共用一份 schema(§16.6);
  1691. # 会话能力的入参与返回直接用 session-control 的端口 schema(§17.3)。
  1692. requires: [context-composition, plugin-host-queries, session-control, shared]
  1693. publicEntrypoints:
  1694. - packages/shared/src/extension-host/index.ts
  1695. - packages/shared/src/extension-host/contract.ts
  1696. layers:
  1697. domain: .
  1698. owner: plugin
  1699. # extensions-service:Window Host 的扩展门面与能力网关(docs/plugins/extension-host.md §3.5)。
  1700. - id: extensions-service
  1701. roots:
  1702. - packages/services/src/extensions
  1703. managed: true
  1704. requires:
  1705. - extension-host-protocol
  1706. # 扩展视图复用 MCP App 的沙箱句柄与 HTML 挑选(§8)。
  1707. - mcp-apps-protocol
  1708. - plugin-ui-bridge
  1709. # settings 能力用 Window Host 进程内的 plugins/readUserOptions 读取器(§16.7)。
  1710. - plugin-host-queries
  1711. # 会话能力以客户端类调用方调 AppControlService.bindClient(§17.2),错误按 session-control 码映射。
  1712. - app-control
  1713. - session-control
  1714. # 插件项目(§17.4):只经 IProjectService 的 readProjects / saveProject,不碰项目库。
  1715. - project
  1716. - rpc
  1717. - services
  1718. - shared
  1719. publicEntrypoints:
  1720. - packages/services/src/extensions/index.ts
  1721. - packages/services/src/extensions/contract.ts
  1722. - packages/services/src/extensions/node.ts
  1723. layers:
  1724. app: .
  1725. owner: plugin
  1726. # extension-host:全 App 唯一的扩展进程与 Main 侧监管器(docs/plugins/extension-host.md §12.1)。
  1727. - id: extension-host
  1728. roots:
  1729. - packages/desktop/src/extension-host
  1730. - packages/desktop/src/main/extensionHostSupervisor.ts
  1731. managed: true
  1732. requires:
  1733. - extension-host-protocol
  1734. # 扩展视图的进程内 MCP Client 宣告 MCP Apps 能力、页面资源 mimeType(§8)。
  1735. - mcp-apps-protocol
  1736. - rpc
  1737. - desktop
  1738. publicEntrypoints:
  1739. - packages/desktop/src/extension-host/index.ts
  1740. - packages/desktop/src/extension-host/contract.ts
  1741. - packages/desktop/src/main/extensionHostSupervisor.ts
  1742. layers:
  1743. adapters: .
  1744. owner: plugin
  1745. # extension-slots:Renderer 的贡献表快照、插槽组件(docs/plugins/extension-host.md §6)。
  1746. - id: extension-slots
  1747. roots:
  1748. - packages/ui/src/extension-slots
  1749. managed: true
  1750. requires:
  1751. - extension-host-protocol
  1752. # 扩展视图页面复用 MCP App 的沙箱句柄、握手常量与页面原语(docs/plugins/extension-host.md §8)。
  1753. - mcp-apps-protocol
  1754. - plugin-ui
  1755. - services
  1756. - shared
  1757. - ui
  1758. publicEntrypoints:
  1759. - packages/ui/src/extension-slots/index.ts
  1760. - packages/ui/src/extension-slots/contract.ts
  1761. layers:
  1762. domain: domain
  1763. app: app
  1764. adapters: adapters
  1765. ui: components
  1766. layerOrder: [domain, app, adapters, ui]
  1767. owner: plugin
  1768. # 内置浏览器本地 HTML 的受控文件读取边界。
  1769. - id: browser-local-preview
  1770. roots:
  1771. - packages/desktop/src/main/browser-local-preview
  1772. managed: true
  1773. requires: [shared]
  1774. publicEntrypoints:
  1775. - packages/desktop/src/main/browser-local-preview/index.ts
  1776. - packages/desktop/src/main/browser-local-preview/contract.ts
  1777. layers:
  1778. adapters: .
  1779. owner: desktop
  1780. # plugin-api:插件作者用的类型包 @zcode-dev/plugin-api(docs/plugins/extension-host.md §17.9)。
  1781. # 只转出 extension-host-protocol 与 v4 协议(shared)的类型;四个子入口都是公开入口。
  1782. # tsup.config.ts 与 scripts/ 产出仓库外用的 dist 声明。
  1783. - id: plugin-api
  1784. roots:
  1785. - packages/plugin-api/src
  1786. - packages/plugin-api/scripts
  1787. - packages/plugin-api/tsup.config.ts
  1788. managed: true
  1789. requires:
  1790. - extension-host-protocol
  1791. - shared
  1792. publicEntrypoints:
  1793. - packages/plugin-api/src/contract.ts
  1794. - packages/plugin-api/src/manifest.ts
  1795. - packages/plugin-api/src/sessions.ts
  1796. - packages/plugin-api/src/protocol-v4.ts
  1797. layers:
  1798. contract: .
  1799. owner: plugin
  1800. # 选区批注输入浮层;调用方是 v4 选区浮层,引用数据仍归 ui lib。
  1801. - id: selection-comment
  1802. roots:
  1803. - packages/ui/src/selection-comment
  1804. managed: true
  1805. requires:
  1806. - ui
  1807. publicEntrypoints:
  1808. - packages/ui/src/selection-comment/index.ts
  1809. - packages/ui/src/selection-comment/contract.ts
  1810. layers:
  1811. ui: .
  1812. owner: conversation
  1813. - id: web-auth
  1814. roots:
  1815. - packages/web/src/auth
  1816. managed: true
  1817. requires:
  1818. - mobile-ui
  1819. - shared
  1820. - ui
  1821. publicEntrypoints:
  1822. - packages/web/src/auth/index.ts
  1823. - packages/web/src/auth/contract.ts
  1824. layers:
  1825. app: .
  1826. owner: identity
  1827. - id: credential-security
  1828. roots:
  1829. - packages/shared/src/credential-security
  1830. managed: true
  1831. requires: [shared]
  1832. publicEntrypoints:
  1833. - packages/shared/src/credential-security/module.ts
  1834. - packages/shared/src/credential-security/contract.ts
  1835. layers:
  1836. adapters: .
  1837. owner: authentication
  1838. # preinstalled-tools-contract:由 architecture:adopt 登记
  1839. - id: preinstalled-tools-contract
  1840. roots:
  1841. - packages/shared/src/preinstalled-tools
  1842. managed: true
  1843. requires: []
  1844. publicEntrypoints:
  1845. - packages/shared/src/preinstalled-tools/contract.ts
  1846. - packages/shared/src/preinstalled-tools/node.ts
  1847. layers:
  1848. adapters: .
  1849. owner: desktop
  1850. # desktop-preinstalled-tools:由 architecture:adopt 登记
  1851. - id: desktop-preinstalled-tools
  1852. roots:
  1853. - packages/desktop/src/preinstalled-tools
  1854. managed: true
  1855. requires: [desktop, services, shared, preinstalled-tools-contract]
  1856. publicEntrypoints:
  1857. - packages/desktop/src/preinstalled-tools/index.ts
  1858. - packages/desktop/src/preinstalled-tools/contract.ts
  1859. layers:
  1860. adapters: .
  1861. owner: desktop
  1862. # ui-preinstalled-tools:由 architecture:adopt 登记
  1863. - id: ui-preinstalled-tools
  1864. roots:
  1865. - packages/ui/src/preinstalled-tools
  1866. managed: true
  1867. requires: [ui, shared, preinstalled-tools-contract]
  1868. publicEntrypoints:
  1869. - packages/ui/src/preinstalled-tools/index.ts
  1870. - packages/ui/src/preinstalled-tools/contract.ts
  1871. layers:
  1872. ui: .
  1873. owner: desktop
  1874. - id: resource-manager
  1875. roots:
  1876. - packages/ui/src/resource-manager
  1877. - packages/services/src/process/processResourceSampler.ts
  1878. managed: true
  1879. requires: [shared, ui]
  1880. publicEntrypoints:
  1881. - packages/ui/src/resource-manager/ResourceManagerApp.tsx
  1882. - packages/ui/src/resource-manager/contract.ts
  1883. - packages/ui/src/resource-manager/resourceUsageView.ts
  1884. - packages/services/src/process/processResourceSampler.ts
  1885. layers:
  1886. contract: contract.ts
  1887. adapters: ../../../services/src/process/processResourceSampler.ts
  1888. ui: .
  1889. layerOrder: [contract, adapters, ui]
  1890. owner: desktop
  1891. # settings-search:由 architecture:adopt 登记
  1892. - id: settings-search
  1893. roots:
  1894. - packages/ui/src/settings-search
  1895. managed: true
  1896. requires:
  1897. - ui
  1898. publicEntrypoints:
  1899. - packages/ui/src/settings-search/index.ts
  1900. - packages/ui/src/settings-search/contract.ts
  1901. layers:
  1902. ui: .
  1903. owner: settings
  1904. # task-row-hover:会话行悬停卡片(docs/ui/task-row-hover-details.md)
  1905. - id: task-row-hover
  1906. roots:
  1907. - packages/ui/src/task-row-hover
  1908. managed: true
  1909. requires:
  1910. - managed-worktree-ui
  1911. - shared
  1912. - ui
  1913. publicEntrypoints:
  1914. - packages/ui/src/task-row-hover/index.ts
  1915. - packages/ui/src/task-row-hover/contract.ts
  1916. layers:
  1917. ui: .
  1918. owner: conversation
  1919. # cli-memory-diagnostics:由 architecture:adopt 登记
  1920. - id: cli-memory-diagnostics
  1921. roots:
  1922. - apps/zcode-cli/packages/adapters/src/memory-diagnostics
  1923. - apps/zcode-cli/packages/adapters/tests/memory-diagnostics
  1924. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/resource-sampler.ts
  1925. - packages/services/src/feedback/feedbackLogArchive.ts
  1926. - packages/desktop/scripts/cli-diagnostic-evidence-smoke.mjs
  1927. - packages/services/src/zcode-agent/agentStderrCollector.ts
  1928. managed: true
  1929. requires: [shared, zcode-cli, agent-crash-diagnostic]
  1930. publicEntrypoints:
  1931. - apps/zcode-cli/packages/adapters/src/memory-diagnostics/index.ts
  1932. - apps/zcode-cli/packages/adapters/src/memory-diagnostics/contract.ts
  1933. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/resource-sampler.ts
  1934. - packages/services/src/feedback/feedbackLogArchive.ts
  1935. - packages/services/src/zcode-agent/agentStderrCollector.ts
  1936. layers:
  1937. adapters: .
  1938. owner: agent
  1939. # shortcuts:快捷键内核(docs/desktop/shortcut-settings-spec.md)。公开入口沿用登记前各处直接引用的文件
  1940. - id: shortcuts
  1941. roots:
  1942. - packages/ui/src/shortcuts
  1943. managed: true
  1944. requires:
  1945. - shared
  1946. - ui
  1947. publicEntrypoints:
  1948. - packages/ui/src/shortcuts/contract.ts
  1949. - packages/ui/src/shortcuts/bindings.ts
  1950. - packages/ui/src/shortcuts/conflicts.ts
  1951. - packages/ui/src/shortcuts/label.ts
  1952. - packages/ui/src/shortcuts/useShortcutBindings.ts
  1953. - packages/ui/src/shortcuts/composerShortcuts.ts
  1954. layers:
  1955. ui: .
  1956. owner: desktop
  1957. # workspace-plugin-trust:由 architecture:adopt 登记
  1958. - id: workspace-plugin-trust
  1959. roots:
  1960. - apps/zcode-cli/packages/bootstrap/src/workspace-plugin-trust
  1961. managed: true
  1962. requires:
  1963. - shared
  1964. - zcode-cli
  1965. publicEntrypoints:
  1966. - apps/zcode-cli/packages/bootstrap/src/workspace-plugin-trust/index.ts
  1967. - apps/zcode-cli/packages/bootstrap/src/workspace-plugin-trust/contract.ts
  1968. layers:
  1969. adapters: .
  1970. owner: cli
  1971. # workspace-plugin-declaration:由 architecture:adopt 登记
  1972. - id: workspace-plugin-declaration
  1973. roots:
  1974. - apps/zcode-cli/packages/adapters/src/plugins/workspace-plugin-declaration
  1975. managed: true
  1976. requires:
  1977. - plugin-discovery
  1978. - zcode-cli
  1979. publicEntrypoints:
  1980. - apps/zcode-cli/packages/adapters/src/plugins/workspace-plugin-declaration/index.ts
  1981. - apps/zcode-cli/packages/adapters/src/plugins/workspace-plugin-declaration/contract.ts
  1982. layers:
  1983. adapters: .
  1984. owner: cli
  1985. # windows-git-bash-discovery:由 architecture:adopt 登记
  1986. - id: windows-git-bash-discovery
  1987. roots:
  1988. - packages/shared/src/node/windowsGitBashDiscovery
  1989. managed: true
  1990. requires: []
  1991. publicEntrypoints:
  1992. - packages/shared/src/node/windowsGitBashDiscovery/index.ts
  1993. - packages/shared/src/node/windowsGitBashDiscovery/contract.ts
  1994. layers:
  1995. adapters: .
  1996. owner: runtime
  1997. # company-protocol:办公室模拟的跨进程类型
  1998. - id: company-protocol
  1999. roots:
  2000. - packages/shared/src/company-protocol
  2001. managed: true
  2002. requires:
  2003. - shared
  2004. publicEntrypoints:
  2005. - packages/shared/src/company-protocol/index.ts
  2006. - packages/shared/src/company-protocol/contract.ts
  2007. - packages/shared/src/company-protocol/growth.ts
  2008. - packages/shared/src/company-protocol/work.ts
  2009. layers:
  2010. domain: .
  2011. owner: conversation
  2012. # company-engine:办公室模拟的 Host 引擎(会话路由、员工常驻会话与换班、任务与工作会话、成长与反馈、档案与补丁、人事、留痕)
  2013. - id: company-engine
  2014. roots:
  2015. - packages/services/src/company
  2016. managed: true
  2017. requires:
  2018. - rpc
  2019. - services
  2020. - shared
  2021. - company-protocol
  2022. publicEntrypoints:
  2023. - packages/services/src/company/index.ts
  2024. - packages/services/src/company/contract.ts
  2025. # 根目录的 index.ts / module.ts / contract.example.ts 不归层;分层文件各在自己的子目录。
  2026. layers: { contract: contract.ts, domain: domain, app: app, adapters: adapters }
  2027. layerOrder: [contract, domain, app, adapters]
  2028. owner: conversation
  2029. # company:办公室模拟的界面(会话与成员列表、任务板、办公室场景、聊天窗口、角色面板、模型面板、人事、搜索、工作动态)
  2030. - id: company
  2031. roots:
  2032. - packages/ui/src/company
  2033. managed: true
  2034. requires:
  2035. - shared
  2036. - company-protocol
  2037. - ui
  2038. publicEntrypoints:
  2039. - packages/ui/src/company/index.ts
  2040. - packages/ui/src/company/contract.ts
  2041. # contract.ts 单独归契约层,其余文件都是界面层;module.ts / contract.example.ts 不归层。
  2042. layers: { contract: contract.ts, ui: . }
  2043. layerOrder: [contract, ui]
  2044. owner: conversation
  2045. global:
  2046. # 临时时间戳(2026-09-10):unmanaged-new-file 只约束此日期之后首次入库的文件。
  2047. # 基于领先 staging 很多的分支开工时,merge-base 之前的"新增"文件不应被追溯。
  2048. newFilesEnforcedSince: "2026-09-10"
  2049. acceptedUpstreamCommits: []
  2050. maxFileLines: 800
  2051. maxContractLines: 300
  2052. maxPublicMethods: 12
  2053. forbidCycles: true
  2054. forbidDeepImports: true
  2055. managedOnly: true
  2056. acceptedUpstreamSnapshot: scripts/architecture/upstream-snapshot.json
  2057. exceptions:
  2058. - id: region-copy-suggested-prompts-edit
  2059. rule: unmanaged-new-file
  2060. paths: [packages/ui/src/v4/featureSuggestedPrompts.ts]
  2061. reason: 上游 f3fcc23e04 已引入的模式推荐提示词仅替换「国内」为「中国」一处区域称谓;本次不接管整个 ui 未受管模块。
  2062. - id: workflow-fill-frames-scrollbar-loop-fix
  2063. rule: unmanaged-new-file
  2064. paths: [packages/ui/src/app-shell/WorkflowRunFillFrames.tsx]
  2065. reason: 上游已有的侧板补全框只修一处崩溃——框的 svg 不再按量到的尺寸定盒子,消除它与滚动条互相触发的无限更新(Maximum update depth);不新增导入、不改模块边界,本次不接管整个 ui 未受管模块。
  2066. - id: removed-tool-grouping-action-catalog
  2067. rule: unmanaged-new-file
  2068. paths: [packages/ui/src/lib/userActionTraceCatalog.ts]
  2069. reason: 上游已有埋点目录仅删除已移除分组选项的三个事件声明;本次不接管整个 UI lib 目录。
  2070. - id: assistant-block-order-tool-part-order-edit
  2071. rule: unmanaged-new-file
  2072. paths: [apps/zcode-cli/packages/core/src/agent/tool-part-order.ts]
  2073. reason: 已准入的工具 part 选择只增加 blockIndex 排序(apps/zcode-cli/docs/design/v2/model/assistant-block-order.md),declarationIndex 与物理顺序兜底不变;接管整个 core 包不在本次范围内。
  2074. - id: assistant-block-order-prompt-trajectory-continuity-edit
  2075. rule: unmanaged-new-file
  2076. paths: [apps/zcode-cli/tools/prompt-trajectory/src/message-continuity.ts]
  2077. reason: 已准入的调试工具比较回复前折叠多个文字块,适配每个文字块单独回放(apps/zcode-cli/docs/design/v2/model/assistant-block-order.md);只读比较逻辑,不改变模块边界。
  2078. - id: session-features-attribution-header-edit
  2079. rule: unmanaged-new-file
  2080. paths: [apps/zcode-cli/packages/adapters/src/model/runner-attribution.ts]
  2081. reason: 已准入的归因头构造器只追加 x-zcode-session-features(docs/design/v2/model/session-features-header.md);它仍是全部归因头的唯一写入点,签名与模块边界不变,接管整个 adapters 包不在本次范围内。
  2082. - id: session-features-workflow-command-pattern-edit
  2083. rule: unmanaged-new-file
  2084. paths: [apps/zcode-cli/packages/core/src/runtime/methods/dynamic-workflow-activation.ts]
  2085. reason: 已准入的动态工作流激活只导出既有 `/workflow` 历史判据常量,供 session-features 的历史推导复用同一判据;激活行为、owner 与模块边界不变。
  2086. - id: node-repl-call-ledger-cua-bridge-edit
  2087. rule: unmanaged-new-file
  2088. paths: [apps/zcode-cli/packages/node-repl-host/src/cua-bridge.ts]
  2089. 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 包不在本次范围内。
  2090. - id: node-repl-call-ledger-cua-broker-edit
  2091. rule: unmanaged-new-file
  2092. paths: [apps/zcode-cli/packages/node-repl-host/src/cua-broker.ts]
  2093. 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 调用与响应格式不变。
  2094. - id: node-repl-call-ledger-result-edit
  2095. rule: unmanaged-new-file
  2096. paths: [apps/zcode-cli/packages/node-repl-host/src/result.ts]
  2097. 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 处置不变。
  2098. - id: offpeak-expiration-codes-existing-edit
  2099. rule: unmanaged-new-file
  2100. paths: [apps/zcode-cli/packages/core/src/runtime/off-peak/model-binding.ts]
  2101. reason: 已准入的闲时请求包装器仅复用共享错误码判断,补齐 3106 运行超时的既有生命周期通知;不改变 owner、控制协议或模块边界,不扩展为整个 CLI runtime 目录接管。
  2102. - id: multi-cursor-badge-title-passthrough-edit
  2103. rule: unmanaged-new-file
  2104. paths:
  2105. - apps/zcode-cli/packages/node-repl-host/src/cua-broker.ts
  2106. 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 目录。
  2107. - id: conversation-share-manage-scope-passthrough-edit
  2108. rule: unmanaged-new-file
  2109. paths: [packages/services/src/conversation-share/conversationShareConnectionScope.ts]
  2110. reason: 已准入的分享 attachment 作用域包装只追加设置页分享管理的四个方法(docs/conversation-share-v1.md「设置页分享管理」):桌面分支原样透传,手机远控分支拒绝;不改变 R3 受信连接、发布/导入作用域与模块边界,接管整个 services/conversation-share 目录(含既有超长文件)不在本次范围内。
  2111. - id: conversation-selection-comment-quote-schema-edit
  2112. rule: unmanaged-new-file
  2113. paths: [packages/shared/src/conversationSelection.ts]
  2114. reason: 已准入的对话引用 schema 只追加可选 comment 与 agent 字段(选区批注,docs/ui/conversation-selection-side-chat.md「选区批注」);仍是 conversationQuotes 的唯一 schema,长度上限与模块边界不变,接管整个 shared 包不在本次范围内。
  2115. - id: conversation-selection-comment-model-guidance-edit
  2116. rule: unmanaged-new-file
  2117. paths: [apps/zcode-cli/packages/core/src/runtime/helpers/conversation-quotes.ts]
  2118. reason: 已准入的引用模型材料拼装只在引用带批注时追加一句说明(docs/ui/conversation-selection-side-chat.md「选区批注」);仍是 withConversationQuotes 的唯一实现,canonical 正文与 Bot 投递边界不变,接管整个 core 包不在本次范围内。
  2119. - id: side-pane-full-view-shortcut-command-edit
  2120. rule: unmanaged-new-file
  2121. paths: [packages/shared/src/shortcutCommands.ts]
  2122. reason: 已准入的快捷键命令表只追加一条 toggleSidePaneFullView 命令(Side Pane 完整视图,docs/ui/side-pane-full-view.md);命令表仍是唯一数据源,签名与模块边界不变,接管整个 shared 包不在本次范围内。
  2123. - id: browser-session-recent-visits-ui
  2124. rule: unmanaged-new-file
  2125. paths:
  2126. - packages/ui/src/store/browserRecentVisitsStore.ts
  2127. reason: Session 最近访问仅为 renderer 内存态展示数据,复用既有 UI store 与浏览器 owner,不改变 UI 模块边界或跨层契约。
  2128. - id: zcode-site-deploy-runtime-template
  2129. rule: unmanaged-new-file
  2130. paths: [apps/zcode-cli/packages/zcode-site-plugin/skills/site-deploy/templates/static-server.mjs]
  2131. reason: site-deploy 技能复制进用户部署包的静态站服务器模板,只在 Sites runner 的容器里由 start.sh 执行;仓库代码不 import 它,也不属于任何运行时模块。同目录的 start.sh 模板是 shell,不受本规则约束。
  2132. - id: opensource-cua-broker-placeholder
  2133. rule: unmanaged-new-file
  2134. paths: [packages/zcode-cua/broker-in-process.js]
  2135. reason: 导出时此路径由公开占位包提供,只报告 Computer Use 不可用。真实 broker 实现在 producer 的 src 目录,继续按其架构规则检查。
  2136. - id: opensource-cua-test-project-config
  2137. rule: unmanaged-new-file
  2138. paths: [packages/zcode-cua/vitest.config.ts]
  2139. reason: 该文件只装配测试项目,开源占位版本用于保持根单测入口可运行;不包含 producer 运行逻辑,不为同目录实现文件开放例外。
  2140. - id: project-location-cache-recovery-existing-edit
  2141. rule: unmanaged-new-file
  2142. paths:
  2143. - packages/shared/src/project-access-token.ts
  2144. - packages/shared/src/project-access-token-client.ts
  2145. - packages/services/src/model-provider/accountProjectTokenClient.ts
  2146. - packages/services/src/credential/credentialService.ts
  2147. reason: 已有项目 Token 与凭据存储增加派生缓存的局部恢复端口,并把换证请求失败按固定类别分码(ZCT-2111046389485834240);已确认的 PAT 签发临时故障仅在原 pending 内重试一次,不扩展到 Key 创建或 OAuth;保持原有 owner 和共享文件锁,不接管全目录。
  2148. - id: plugin-agent-permission-mode-restrict-only-existing-edit
  2149. rule: unmanaged-new-file
  2150. paths:
  2151. - packages/shared/src/subagent-profile.ts
  2152. - packages/shared/src/subagent-profile-parser.ts
  2153. reason: 已准入的存量文件为插件 agent 的 permissionMode 只能收紧(ZP-20261028-13)增加进程内 profile 标记字段并更新注释;跨进程 schema 与解析行为不变,接管 shared 目录不在本次范围内。
  2154. - id: test-ids-subpath-import-unmanaged-edit
  2155. rule: unmanaged-new-file
  2156. paths:
  2157. - packages/ui/src/browser-use/EmbeddedBrowserPermissionPrompts.tsx
  2158. - packages/ui/src/hooks/useStartPlanRecommendation.ts
  2159. - packages/ui/src/settings/DynamicWorkflowModeSetting.tsx
  2160. reason: 已准入的存量文件只把 TID 导入从 @zcode/shared 根入口改为 @zcode/shared/test-ids 子路径(根入口不再导出 test-ids,以收窄受影响单测范围);行为与模块边界不变,接管 ui 目录不在本次范围内。
  2161. - id: settings-personalization-section-new-file
  2162. rule: unmanaged-new-file
  2163. paths: [packages/ui/src/settings/PersonalizationSection.tsx]
  2164. reason: 个性化设置分区组件只编排 ISettingService 的 getUserInstructions/saveUserInstructions 与既有设置页 UI 原语(spec:docs/ui/settings-personalization.md);读写唯一事实源在服务层,不新增平行状态,接管整个 ui 目录不在本次范围内。
  2165. - id: settings-personalization-size-constant-new-file
  2166. rule: unmanaged-new-file
  2167. paths: [packages/shared/src/userInstructions.ts]
  2168. reason: 用户自定义指令字节上限共享常量(与 CLI 读取截断对齐,spec:docs/ui/settings-personalization.md),服务层校验与 UI 计数共用同一数值;仅两个常量导出,接管整个 shared 目录不在本次范围内。
  2169. - id: remote-workspace-admission-deadline-existing-edit
  2170. rule: unmanaged-new-file
  2171. paths: [packages/desktop/src/host/remoteWorkspacePreparation.ts]
  2172. reason: 已准入的远程项目目录 admission 只增加 30 秒截止时间和可重试的无响应错误码(3.16.2 远端回归 R8,docs/remote/project-first-remote-navigation-spec.md §2.4);owner、调用方与模块边界不变,接管 desktop host 目录不在本次修复范围内。
  2173. - id: gen-ui-existing-capability-check
  2174. rule: unmanaged-new-file
  2175. paths: [packages/services/src/zcode-agent/independentPlanSupport.ts]
  2176. reason: 在已存在的 CLI 能力查询入口补充 GenUI 上下文能力检查,防止旧 CLI 静默丢弃状态;保持既有 services/agent 边界,不扩展本次修复为整个 zcode-agent 模块接管。
  2177. - id: connection-log-secret-token-unmanaged-edit
  2178. rule: unmanaged-new-file
  2179. paths: [packages/shared/src/source-server/connectionLog.ts]
  2180. reason: 已存在的连接日志过滤函数只把已知秘密从子串替换改为完整 token 匹配,修复短密码反推泄露;签名与模块边界不变,接管整个 shared 包不在本次修复范围内。
  2181. - id: connection-errors-econnreset-unmanaged-edit
  2182. rule: unmanaged-new-file
  2183. paths: [packages/shared/src/source-server/connectionErrors.ts]
  2184. reason: 已存在的连接错误归一化码表补一项 ECONNRESET → remote-host-unreachable,修复在线断连恢复失败被误报为预检失败;签名与模块边界不变,接管整个 shared 包不在本次修复范围内。
  2185. - id: remote-authentication-unsupported-presentation-unmanaged-edit
  2186. rule: unmanaged-new-file
  2187. paths: [packages/ui/src/lib/remoteConnectionPresentationErrors.ts]
  2188. reason: 已存在的远程连接错误展示映射为新增公开码 remote-authentication-unsupported 补一项标题与“查看详情”操作,修复 SSH 二次验证失败被提示为检查密码;签名与模块边界不变,接管 ui 目录不在本次修复范围内。
  2189. - id: source-server-operation-log-level-unmanaged-edit
  2190. rule: unmanaged-new-file
  2191. paths: [packages/desktop/src/host/sourceServerOperationLogs.ts]
  2192. reason: 已有连接日志封装透传 TransportContext 已定义的 level,使低版本 glibc 提示保留 warn;Host 仍是唯一日志 owner,签名与模块边界不变,接管整个 desktop 包不在本次范围内。
  2193. - id: client-config-public-field-unmanaged-edit
  2194. rule: unmanaged-new-file
  2195. paths: [packages/shared/src/clientConfig.ts]
  2196. 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.
  2197. - id: draft-model-migration-composer-files
  2198. rule: unmanaged-new-file
  2199. paths:
  2200. - packages/ui/src/v4/composer/draftModelMigration.ts
  2201. - packages/ui/src/v4/composer/newTaskDraft.ts
  2202. reason: 服务端规则驱动的草稿模型迁移(docs/chat/draft-model-migration.md)。新增文件只含纯判定与本设备 localStorage 标记;newTaskDraft 仅额外返回 Recent 来源。草稿 owner 仍是 useDraftConfigControl,不新增模块、IO 通道或状态 owner;接管整个 ui 目录不在本次紧急上线范围内。
  2203. - id: highspeed-transcript-owner-existing-edit
  2204. rule: unmanaged-new-file
  2205. paths: [packages/ui/src/highspeed/highspeedTurnHydration.ts]
  2206. reason: 该文件已存在于集成基线;本次仅在既有 transcript 水合映射中保留稳定匿名 ownerKey,不新增模块、IO 或状态 owner。账号归属校验仍由 Host 执行,UI store 继续拥有临时查询占位。接管整个 UI 目录不在此变更范围,行为和验收见 docs/highspeed/highspeed-card-spec.md。
  2207. - id: client-config-optional-authorization-existing-readers
  2208. rule: unmanaged-new-file
  2209. paths:
  2210. - packages/services/src/client-config/clientConfigService.ts
  2211. - packages/provider-node/src/zcode-builtin-download.ts
  2212. reason: 现有配置读取器新增宿主注入的可选 JWT,并隔离身份缓存和 CDN 请求头;不新增源码文件或改变服务与下载器的 owner,整包架构接管不属于本次请求头修复。
  2213. - id: highspeed-fallback-snapshot-unmanaged-edit
  2214. rule: unmanaged-new-file
  2215. paths: [apps/zcode-cli/packages/core/src/runtime/methods/turn-execution-fallback.ts]
  2216. reason: 合并已存在于 staging 的加速卡回退模块,仅将可变 Session 读取替换为本轮固定候选;保持现有 Core 模块边界,不在同步分支时机械拆分整个 runtime。
  2217. - id: session-owned-workflow-shutdown-existing-files
  2218. rule: unmanaged-new-file
  2219. paths:
  2220. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-run-submit.ts
  2221. - apps/zcode-cli/packages/bootstrap/src/app/workflow-driver-quiescence.ts
  2222. reason: 两个文件已存在于集成基线;本次在既有 bootstrap owner 内补启动关闭互斥和 actor 清理等待,不新增模块或跨层依赖。整个 bootstrap/app 的接管另行治理,生命周期公开模块边界保持不变。
  2223. - id: workflow-quota-auto-resume-unmanaged-file
  2224. rule: unmanaged-new-file
  2225. paths: [apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-quota-resume.ts]
  2226. reason: 额度停止的 run 到点自动续跑,是 run service 旁的一个宿主模块(只读 journal 行、订阅结算、经注入的 resume 续跑);与同目录的 run service 文件同属未受管的 zcode-cli bootstrap,接管该目录需要单独的模块边界整理。
  2227. - id: mcp-node-fallback-unmanaged-file
  2228. rule: unmanaged-new-file
  2229. paths:
  2230. - apps/zcode-cli/packages/adapters/src/mcp/node-fallback.ts
  2231. - apps/zcode-cli/packages/bootstrap/src/app/mcp-node-fallback.ts
  2232. 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 需要单独的模块边界整理。
  2233. - id: workflow-unrecognized-code-cap-unmanaged-edit
  2234. rule: unmanaged-new-file
  2235. paths: [apps/zcode-cli/packages/adapters/src/model/workflow-model-failure-policy.ts]
  2236. reason: 已准入的 workflow 模型错误策略表只增加一行(分类器不认识的业务码在同一次请求里连续出现 10 次时停 run)、一个连续计数入参与两个计数纯函数;runner 与 driver 读同一函数的约束与模块边界不变,接管 adapters/model 目录不在本次范围内。
  2237. - id: plugin-async-discovery-existing-callers
  2238. rule: unmanaged-new-file
  2239. paths:
  2240. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/plugin-ui-surfaces.ts
  2241. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol/runtime-cleanup.ts
  2242. - apps/zcode-cli/packages/cli/src/plugins-command-shared.ts
  2243. - apps/zcode-cli/packages/cli/src/plugins-marketplace-command.ts
  2244. - apps/zcode-cli/packages/cli/src/tui-prompt-handler-queries.ts
  2245. reason: 已有插件发现调用方迁移为 await;runtime-cleanup 在原进程关闭编排中释放注入的准备 owner,没有新增文件。对应契约见 docs/workspace-capability-discovery-cache.md,不为此次异步化与预热接管整个 CLI 或协议目录。
  2246. - id: automation-self-pause-turn-visibility-existing-edit
  2247. rule: unmanaged-new-file
  2248. paths: [apps/zcode-cli/packages/core/src/runtime/methods/turn-tool-visibility.ts]
  2249. reason: 已有 turn 工具可见性 owner 仅增加当前 automation 自暂停的反向可见性规则;不新增跨模块依赖或 owner,接管整个 zcode-cli runtime 超出本次缺陷修复范围。
  2250. - id: compact-bundle-reminder-builder-unmanaged-edit
  2251. rule: unmanaged-new-file
  2252. paths: [apps/zcode-cli/packages/core/src/runtime/methods/runtime-reminder-persistence.ts]
  2253. reason: 已入库的隐藏提醒落盘函数拆出只构建记录的函数,供 compaction 把公告、summary 与附件交给同一个 store 事务;记录不再写 tools 字段,中断标记按普通 user 文本取正文;Core 模块边界不变,接管整个 runtime 目录不在本次范围内。
  2254. - id: tool-search-schema-key-order-unmanaged-edit
  2255. rule: unmanaged-new-file
  2256. paths: [apps/zcode-cli/packages/contracts/src/tools/tool-search.ts]
  2257. reason: 已入库的 ToolSearch 输入 schema 改走统一的 toToolJsonSchema,使 key 顺序与其他工具一致,$schema 随之从 draft-07 改为 2020-12;contracts 模块边界不变,接管整个 tools 目录不在本次范围内。
  2258. - id: tool-search-removal-reason-unmanaged-edit
  2259. rule: unmanaged-new-file
  2260. paths:
  2261. - apps/zcode-cli/packages/adapters/src/model/tool-search.ts
  2262. - apps/zcode-cli/packages/core/src/tool/search/exposure.ts
  2263. - apps/zcode-cli/tools/prompt-trajectory/src/tool-search-comparison.ts
  2264. reason: 已入库的 ToolSearch 能力解析、公告渲染与离线轨迹识别按删除原因分段,并由 adapter 声明 Anthropic 协议的提醒折叠能力;增量事实、持久化与模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  2265. - id: interrupt-marker-unmanaged-new-file
  2266. rule: unmanaged-new-file
  2267. paths: [apps/zcode-cli/packages/core/src/runtime/methods/interrupt-marker.ts]
  2268. reason: 停止轮次后给模型的中断标记放在 runtime/methods 的独立小文件,避免继续增大已超行数的 turn.ts;复用隐藏提醒的落盘函数(persistRuntimeReminderMessage)与历史提交,Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  2269. - id: instruction-files-delta-unmanaged-new-file
  2270. rule: unmanaged-new-file
  2271. paths: [apps/zcode-cli/packages/core/src/context/sections/instruction-files.ts]
  2272. 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 目录不在本次范围内。
  2273. - id: prompt-snapshot-unmanaged-new-file
  2274. rule: unmanaged-new-file
  2275. paths: [apps/zcode-cli/packages/core/src/runtime/helpers/prompt-snapshot.ts]
  2276. 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 目录不在本次范围内。
  2277. - id: gen-ui-output-fork-session-unmanaged-edit
  2278. rule: unmanaged-new-file
  2279. paths: [apps/zcode-cli/packages/core/src/runtime/helpers/gen-ui-output.ts]
  2280. reason: 已入库的 Gen UI 输出目录解析加一个可选 session id 参数,fork 时取子会话自己的目录写入环境更新(docs/specs/gen-ui-output-directory.md);默认仍取当前会话,调用方与 Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  2281. - id: off-peak-takeover-context-prefix-unmanaged-edit
  2282. rule: unmanaged-new-file
  2283. paths: [apps/zcode-cli/packages/core/src/runtime/off-peak/turn.ts]
  2284. reason: 已入库的闲时接管函数换成用户模型后,按新模型重建 Context Prefix,与 guide 换模型共用 rebuildContextPrefix;接管时机、归属与 Core 模块边界不变,接管整个 zcode-cli 目录不在本次范围内。
  2285. - id: turn-work-segment-comment-unmanaged-edit
  2286. rule: unmanaged-new-file
  2287. paths: [packages/ui/src/v4/conversationTurnRenderUnitTypes.ts]
  2288. reason: 已入库的渲染单元类型只更新 workSegments 字段注释,使其与同一 drain 边界的 guide 共用一段的行为一致;类型与 ui 模块边界不变,接管整个 v4 目录不在本次范围内。
  2289. - id: shortcut-settings-existing-ui-edit
  2290. rule: unmanaged-new-file
  2291. paths:
  2292. - packages/ui/src/components/ui/kbd.tsx
  2293. - packages/ui/src/settings/ShortcutSearchBar.tsx
  2294. - packages/ui/src/settings/ShortcutSettingsSection.tsx
  2295. 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.
  2296. - id: sidebar-workflow-tooltip-existing-ui-edit
  2297. rule: unmanaged-new-file
  2298. paths: [packages/ui/src/components/workflow-run-line/WorkflowRunRail.tsx]
  2299. 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.
  2300. - id: onboarding-existing-module-edit
  2301. rule: unmanaged-new-file
  2302. paths:
  2303. - packages/services/src/onboarding/
  2304. - packages/ui/src/onboarding/
  2305. reason: onboarding 目录(记录持久化服务与触发 hook)是已合入 staging 的存量功能模块,本轮修复在其既有边界内收紧老用户判定与兜底;模块 adopt 登记需单独的边界梳理,不在本缺陷修复内展开。
  2306. - id: settings-search-existing-row-edit
  2307. rule: unmanaged-new-file
  2308. paths: [packages/ui/src/settings/ProactiveSuggestionsSetting.tsx]
  2309. reason: 已有的主动任务推荐设置行只增加 SettingsRow 的稳定定位 id,不改变引导记录读写和模块依赖;搜索实现独立登记在 settings-search 模块,不把现有引导设置迁入搜索模块。
  2310. - id: remote-connection-flow-existing-size
  2311. rule: max-file-lines
  2312. paths: [packages/ui/src/remote-connection-flow/index.ts]
  2313. reason: Preserve the existing single hook owner and closure; module adoption must not mechanically split state to satisfy line counts.
  2314. - id: gen-ui-tweak-runtime-size
  2315. rule: max-file-lines
  2316. paths: [packages/desktop/src/renderer/src/plugin-sandbox/genUiTweakRuntime.js]
  2317. reason: Keep parameter binding and registration lifecycle together; runtime-manifest.json and tests verify file integrity.
  2318. - id: gen-ui-tweak-runtime-lint
  2319. rule: disable-count
  2320. paths: [packages/desktop/src/renderer/src/plugin-sandbox/genUiTweakRuntime.js]
  2321. reason: Allow the control-character validation regex and the single-file parameter-control runtime.
  2322. - id: workflow-amend-provider-boundary-unmanaged-edit
  2323. rule: unmanaged-new-file
  2324. paths:
  2325. - apps/zcode-cli/packages/contracts/src/tools/amend-workflow.ts
  2326. - apps/zcode-cli/packages/core/src/tool/handlers/amend-workflow-resolve.ts
  2327. 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.
  2328. - id: remote-device-list-unmanaged-new-files
  2329. rule: unmanaged-new-file
  2330. paths:
  2331. - packages/ui/src/settings/SourceServerDeviceRow.tsx
  2332. - packages/ui/src/settings/sourceServerDeviceList.ts
  2333. - packages/ui/src/lib/remoteConnectionPresentation.ts
  2334. 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).
  2335. - id: workflow-share-unmanaged-new-files
  2336. rule: unmanaged-new-file
  2337. paths:
  2338. - packages/services/src/conversation-share/conversationShareInlineImages.ts
  2339. - packages/services/src/conversation-share/conversationShareWorkflowSnapshot.ts
  2340. - packages/shared/src/conversation-share-content.ts
  2341. - packages/shared/src/conversation-share-tool-presentation.ts
  2342. - packages/ui/src/v4/ConversationShareContent.tsx
  2343. - packages/ui/src/v4/ConversationShareWorkflow.tsx
  2344. - packages/ui/src/v4/conversationShareItems.ts
  2345. - packages/ui/src/ToolCallBlocks/ToolPresentation.tsx
  2346. - packages/ui/src/ToolCallBlocks/presentationCapabilities.tsx
  2347. - packages/ui/src/ToolCallBlocks/renderers/list-models.tsx
  2348. - packages/ui/src/ToolCallBlocks/renderers/list-saved-workflows-presentation.tsx
  2349. - packages/ui/src/ToolCallBlocks/renderers/web-fetch.tsx
  2350. - packages/ui/src/hooks/useToolPresentationHostCapabilities.ts
  2351. - packages/ui/src/chat-input-toolbar/thoughtLevelLabels.ts
  2352. - packages/ui/src/components/workflow-timeline/subagent-model-label.ts
  2353. - packages/desktop/src/main/fileApplications.ts
  2354. 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).
  2355. # 既有 workflow 摘要 renderer 的展示调整;仅登记这两个文件,不放开整个 renderer 目录。
  2356. - id: workflow-summary-row-existing-ui-edit
  2357. rule: unmanaged-new-file
  2358. paths:
  2359. - packages/ui/src/ToolCallBlocks/renderers/workflow-draft-row.tsx
  2360. - packages/ui/src/ToolCallBlocks/renderers/workflow-fill-row.tsx
  2361. 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.
  2362. - id: workflow-notifications-unmanaged-files
  2363. rule: unmanaged-new-file
  2364. paths:
  2365. - apps/zcode-cli/packages/core/src/runtime-task/workflow-blocked-reminder.ts
  2366. - apps/zcode-cli/packages/core/src/runtime/methods/dynamic-workflow-blocked-reminder.ts
  2367. - apps/zcode-cli/packages/core/src/runtime-task/workflow-notification-copy.ts
  2368. - apps/zcode-cli/packages/core/src/runtime/methods/dynamic-workflow-run-hole-notification.ts
  2369. - apps/zcode-cli/packages/core/src/tool/handlers/model-reference.ts
  2370. - packages/shared/src/test-ids-workflow.ts
  2371. 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.
  2372. - id: composer-toolbar-unmanaged-files
  2373. rule: unmanaged-new-file
  2374. paths:
  2375. - packages/ui/src/ControlShortcutBadge.tsx
  2376. - packages/ui/src/chat-input-toolbar/ComposerEffortHeading.tsx
  2377. - packages/ui/src/chat-input-toolbar/ComposerModelMenu.tsx
  2378. - packages/ui/src/chat-input-toolbar/ComposerProviderMenu.tsx
  2379. - packages/ui/src/chat-input-toolbar/ComposerTriggerTransition.tsx
  2380. - packages/ui/src/hooks/useComposerConnectionSwitch.ts
  2381. - packages/ui/src/lib/composerPlanGroups.ts
  2382. - packages/ui/src/lib/providerFamilyConnectionTransition.ts
  2383. - packages/ui/src/prompt-editor/useComposerToolbarFit.ts
  2384. 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.
  2385. - id: provider-endpoint-routing-unmanaged-edit
  2386. rule: unmanaged-new-file
  2387. paths:
  2388. - apps/zcode-cli/packages/adapters/src/model/endpoint-routing-edition/index.ts
  2389. - apps/zcode-cli/packages/adapters/src/model/provider-endpoint-routing-options.ts
  2390. 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.
  2391. - id: workflow-mode-user-choice-unmanaged-edit
  2392. rule: unmanaged-new-file
  2393. paths:
  2394. - packages/shared/src/dynamic-workflow-feature.ts
  2395. - packages/ui/src/settings/DynamicWorkflowModeSetting.tsx
  2396. - packages/ui/src/store/dynamicWorkflowAvailabilityStore.ts
  2397. - packages/ui/src/hooks/useDynamicWorkflowAvailability.ts
  2398. 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.
  2399. - id: workflow-source-error-hint-unmanaged-edit
  2400. rule: unmanaged-new-file
  2401. paths:
  2402. - apps/zcode-cli/packages/contracts/src/tools/fill-workflow-hole.ts
  2403. 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.
  2404. - id: workflow-analyzer-complexity-unmanaged-edit
  2405. rule: unmanaged-new-file
  2406. paths:
  2407. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-bindings.ts
  2408. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-calls.ts
  2409. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-functions.ts
  2410. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-loops.ts
  2411. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-settle.ts
  2412. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-state.ts
  2413. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-strands.ts
  2414. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/causality-order-types.ts
  2415. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/flow-strands.ts
  2416. 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.
  2417. - id: off-peak-model-descriptor-unmanaged-edit
  2418. rule: unmanaged-new-file
  2419. paths: [apps/zcode-cli/packages/core/src/runtime/off-peak/model-binding.ts]
  2420. reason: 已入库的闲时 Model 包装改用 contracts 的 modelDescriptorOf 复制全部数据字段,修复逐字段手抄漏掉 requestCapabilities;包装行为与 Core 模块边界不变,接管整个 runtime 目录不在本次范围内。
  2421. - id: workflow-draft-read-state-per-path-unmanaged-edit
  2422. rule: unmanaged-new-file
  2423. paths: [apps/zcode-cli/packages/core/src/tool/handlers/workflow-draft-read-state.ts]
  2424. reason: 已入库的工作流草稿读状态登记改走 setReadFileStateEntry,跟随读状态改为每个路径一条;草稿流程与 Core 模块边界不变,接管整个 tool 目录不在本次范围内。
  2425. - id: workflow-skill-gate-compact-read-state-comment-unmanaged-edit
  2426. rule: unmanaged-new-file
  2427. paths: [apps/zcode-cli/packages/core/src/tool/handlers/workflow-skill-gate.ts]
  2428. reason: 已入库的工作流技能门只更新一句注释,跟随 compaction 后读取状态改为只留补回的文件;门的判据、代码与 Core 模块边界不变,接管整个 tool 目录不在本次范围内。
  2429. - id: conversation-telemetry-existing-state-machine-size
  2430. rule: max-file-lines
  2431. paths:
  2432. - packages/shared/src/conversation-telemetry/conversationTelemetryEngine.ts
  2433. - packages/shared/src/conversation-telemetry/messageTelemetry.ts
  2434. 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.
  2435. - id: conversation-telemetry-existing-state-machine-lint
  2436. rule: disable-count
  2437. paths:
  2438. - packages/shared/src/conversation-telemetry/conversationTelemetryEngine.ts
  2439. - packages/shared/src/conversation-telemetry/messageTelemetry.ts
  2440. reason: Preserve the two original file-length annotations while relocating the existing implementation.
  2441. - id: host-service-telemetry-existing-file
  2442. rule: unmanaged-new-file
  2443. paths: [packages/desktop/src/host/hostServiceResourceTelemetry.ts]
  2444. reason: Existing main-branch registration point gains a Host-only event and capability gate; adopting the whole Host runtime is outside this telemetry change.
  2445. - id: browser-device-presets-export-unmanaged-new-files
  2446. rule: unmanaged-new-file
  2447. paths:
  2448. - packages/ui/src/browser-use/browserPageExport.ts
  2449. - packages/ui/src/browser-use/useBrowserPageExport.ts
  2450. - packages/desktop/src/main/desktopCaptureBrowserGuestPage.ts
  2451. 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.
  2452. - id: browser-element-screenshot-unmanaged-new-files
  2453. rule: unmanaged-new-file
  2454. paths: [packages/ui/src/browser-use/browserElementScreenshot.ts]
  2455. 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.
  2456. - id: browser-file-live-reload-unmanaged-new-files
  2457. rule: unmanaged-new-file
  2458. paths: [packages/ui/src/browser-use/useBrowserFileLiveReload.ts]
  2459. 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.
  2460. - id: browser-design-mode-unmanaged-new-files
  2461. rule: unmanaged-new-file
  2462. paths:
  2463. - packages/ui/src/browser-use/BrowserDesignInspector.tsx
  2464. - packages/ui/src/browser-use/BrowserDesignFields.tsx
  2465. - packages/ui/src/browser-use/browserDesignProperties.ts
  2466. - packages/ui/src/browser-use/BrowserDesignToolbar.tsx
  2467. - packages/ui/src/browser-use/useBrowserDesignMode.ts
  2468. - packages/ui/src/browser-use/useBrowserDesignRuntime.ts
  2469. - packages/ui/src/browser-use/useBrowserDesignSourceWriter.ts
  2470. - packages/ui/src/v4/composer/ElementMentionSyncPlugin.tsx
  2471. 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.
  2472. - id: browser-design-preload-bridge-unmanaged-new-file
  2473. rule: unmanaged-new-file
  2474. paths: [packages/desktop/src/preload/embeddedBrowserDesignBridge.ts]
  2475. 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.
  2476. - id: file-tree-html-click-browser-unmanaged-new-file
  2477. rule: unmanaged-new-file
  2478. paths: [packages/ui/src/settings/FileTreeHtmlOpenSetting.tsx]
  2479. 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.
  2480. - id: request-verification-config-recovery-presentation
  2481. rule: unmanaged-new-file
  2482. paths:
  2483. - packages/ui/src/request-security-edition/errors.ts
  2484. reason: 在现有官方版本安全校验展示入口补充配置读取失败的分类与本地化,不改变状态 owner 或模块边界;公共 errors.ts 入口及其开源占位实现承接同一契约,沿用本条精确路径准入;接管整个 UI 安全校验目录不属于本次网络恢复修复。
  2485. - id: node-repl-no-progress-hint-unmanaged-edit
  2486. rule: unmanaged-new-file
  2487. paths:
  2488. - apps/zcode-cli/packages/node-repl-host/src/tool-contract.ts
  2489. reason: Admitted upstream node_repl host keeps bumping its serverInfo version in tool-contract.ts (the no-progress hint file itself was removed in 0.7.1); adopting the whole node-repl-host package needs a separate module boundary refactor.
  2490. - id: zcode-cua-unmanaged-new-files
  2491. rule: unmanaged-new-file
  2492. paths:
  2493. - packages/zcode-cua/src/**
  2494. 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.
  2495. - id: ui-more-locales-new-files
  2496. rule: unmanaged-new-file
  2497. paths:
  2498. - packages/shared/src/locale.ts
  2499. - packages/desktop/src/main/desktopApplicationLocaleBootstrap.ts
  2500. - packages/ui/src/i18n/localeMessages.ts
  2501. - packages/ui/src/i18n/locales/ja-JP.ts
  2502. - packages/ui/src/i18n/locales/ko-KR.ts
  2503. - packages/ui/src/i18n/locales/ru-RU.ts
  2504. reason: 新增日/俄/韩界面语言(docs/i18n/ui-locales.md)。locale.ts 是语言解析与回退的唯一事实源;Main 冷启动只读 setting.json 取界面语言;localeMessages 只装配各语言文案表;三份文案表与 en-US/zh-CN 同构,单文件远超 800 行上限,登记 managed 模块也须另加行数例外。接管整个 ui/shared/desktop 目录不在本次范围内。
  2505. - id: visualize-plugin-icon-existing-edit
  2506. rule: unmanaged-new-file
  2507. paths: [packages/ui/src/lib/pluginIconSource.ts]
  2508. reason: 已准入的存量图标解析文件仅增加 Visualize 官方身份与本地 PNG 的映射(docs/builtin-plugin-icons.md);不改变解析函数、受信任图片规则、状态归属或模块边界,不为其他 UI 文件开放例外。
  2509. - id: ui-loader-circle-existing-edit
  2510. rule: unmanaged-new-file
  2511. paths:
  2512. - packages/ui/src/DeleteAllArchivedTasksButton.tsx
  2513. - packages/ui/src/components/workflow-timeline/WorkflowRoll.tsx
  2514. - packages/ui/src/components/workflow-timeline/WorkflowRosterParts.tsx
  2515. - packages/ui/src/v4/BotTopicPreparation.tsx
  2516. reason: 已准入的四个存量 UI 文件仅统一 Lucide 图标为 LoaderCircle(docs/design/loading-icons.md),不新增文件、不改变状态 owner、公共契约或模块依赖;本次不接管其所在业务模块。
  2517. - id: ui-more-locales-existing-edit
  2518. rule: unmanaged-new-file
  2519. paths:
  2520. - packages/desktop/src/host/hostSessionCreateTelemetry.ts
  2521. - packages/services/src/marketing-touch/marketingTouch.ts
  2522. - packages/services/src/marketing-touch/marketingTouchService.ts
  2523. - packages/shared/src/marketingTouch.ts
  2524. - packages/ui/src/app-shell/WorkflowRunHoleParts.tsx
  2525. - packages/ui/src/app-shell/WorkflowRunProvenance.tsx
  2526. - packages/ui/src/components/marketing-touch/MarketingDialogs.tsx
  2527. - packages/ui/src/components/marketing-touch/MarketingTouchProvider.tsx
  2528. - packages/ui/src/components/workflow-timeline/WorkflowSettingsChangeRow.tsx
  2529. - packages/ui/src/components/workflow-timeline/WorkflowTimelineFills.tsx
  2530. reason: 已准入的存量文件只把中英二选一的 locale 类型放宽为全部界面语言(X-Client-Language 带真实界面语言,投放内容仍按中英渲染),会话创建遥测接收 Host 界面语言,时间格式化传入界面语言;owner、签名形态与模块边界不变,接管 marketing-touch/workflow-timeline 目录不在本次范围内。
  2531. - id: dwf-held-elsewhere-and-leftovers-existing-edit
  2532. rule: unmanaged-new-file
  2533. paths:
  2534. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-run-fill.ts
  2535. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-run-roster-phases.ts
  2536. - apps/zcode-cli/packages/bootstrap/src/app/dynamic-workflow-run-roster.ts
  2537. - apps/zcode-cli/packages/core/src/tool/handlers/amend-workflow-source.ts
  2538. - apps/zcode-cli/packages/core/src/tool/handlers/fill-workflow-hole-resolve.ts
  2539. - apps/zcode-cli/packages/core/src/tool/handlers/get-workflow-run-format-roster.ts
  2540. - apps/zcode-cli/packages/core/src/tool/handlers/get-workflow-run-summary.ts
  2541. 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.
  2542. - id: dwf-websearch-budget
  2543. rule: unmanaged-new-file
  2544. paths:
  2545. - apps/zcode-cli/packages/bootstrap/src/app/workflow-driver-types.ts
  2546. - apps/zcode-cli/packages/bootstrap/src/app/workflow-driver-web-search-budget.ts
  2547. - apps/zcode-cli/packages/contracts/src/interfaces/workflow-web-search-budget.port.ts
  2548. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/actor-budgets.ts
  2549. - apps/zcode-cli/packages/dynamic-workflow/src/analysis/actor-models.ts
  2550. - apps/zcode-cli/packages/dynamic-workflow/src/engine/persona.ts
  2551. 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.
  2552. - id: tool-executor-live-entry-resolution-unmanaged-file
  2553. rule: unmanaged-new-file
  2554. paths: [apps/zcode-cli/packages/core/src/tool/executor/live-entry-resolution.ts]
  2555. reason: 执行前把缓存 advertisement entry 换成 live entry 的纯函数,从同目录的 call-runner 拆出,只收敛不可用与取消两种错误形态;与同目录文件同属未受管的 zcode-cli core,接管整个 tool/executor 目录需要单独的模块边界整理。
  2556. - id: design-plugin-third-party-resources
  2557. rule: unmanaged-new-file
  2558. paths:
  2559. - apps/zcode-cli/packages/design-plugin/skills/design/design-resources/**
  2560. reason: 内置 design 插件随包的第三方设计资源(骨架里的 deck-stage.js、schema.ts 等示例资产),按上游字节保留并登记在 third-party/copied-components.json;它们只作为技能读取或复制给用户的模板,不被任何产品代码 import,不构成产品模块。
  2561. - id: agent-runtime-exit-banner
  2562. rule: unmanaged-new-file
  2563. paths: [packages/ui/src/v4/AgentRuntimeExitBanner.tsx]
  2564. reason: 后台 runtime 意外退出时会话底部的说明横幅与订阅 hook(docs/ui/agent-runtime-exit-notice.md),与 PendingCommandRecoveryBanner 同级;只读 services 的 onAgentRuntimeExited,不持有会话状态,不接管整个 ui 未受管模块。
  2565. - id: background-subagent-stall-notice
  2566. rule: unmanaged-new-file
  2567. paths:
  2568. - apps/zcode-cli/packages/core/src/subagent/background-stall.ts
  2569. - apps/zcode-cli/packages/core/src/runtime/methods/subagent-stall-reminder.ts
  2570. - apps/zcode-cli/packages/core/src/tool/handlers/task-output-projection.ts
  2571. reason: 后台 Agent 无进展提醒(apps/zcode-cli/docs/design/v2/tool/07-subagent.md「后台 Agent 无进展提醒」)新增纯逻辑停滞钟与 runtime 接线两个小文件,与既有 workflow 空闲提醒钟同构;task-output-projection 只为运行中的 local_agent 加 activity 投影。进展事实仍归 RuntimeTaskRegistry,投递复用后台通知队列,不改变模块边界。
  2572. - id: previous-runtime-subagent-leftovers-observation
  2573. rule: unmanaged-new-file
  2574. paths: [apps/zcode-cli/packages/bootstrap/src/app/subagent-observation.ts]
  2575. reason: TUI 的子代理观察与 V4 冷恢复共用 projectSessionSubagents;只多传本进程启动时间,使上一代 runtime 崩溃遗留的 child 不再显示为 running(apps/zcode-cli/docs/design/v2/tool/07-subagent.md「上一代 runtime 遗留的 Agent」)。不改变模块边界。
  2576. - id: total-tokens-reminder
  2577. rule: unmanaged-new-file
  2578. paths:
  2579. - apps/zcode-cli/packages/core/src/context/total-tokens.ts
  2580. - apps/zcode-cli/packages/core/src/runtime/helpers/total-tokens-budget.ts
  2581. - apps/zcode-cli/packages/core/src/runtime/helpers/provider-entry-origins.ts
  2582. 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 不在本次范围内。
  2583. - id: startup-failure-export-logs
  2584. rule: unmanaged-new-file
  2585. paths:
  2586. - packages/ui/src/root/GlobalDatabaseStartupLoading.tsx
  2587. reason: 启动失败页在现有复制诊断/重试/退出旁增加导出日志按钮(docs/desktop/database-migration-startup-gate-plan.md)。只扩展既有失败页交互,不新增文件、不改变启动状态 owner 或模块边界;接管 packages/ui/src/root 不在本次范围内。
  2588. - id: message-markdown-cjk-bare-url-unmanaged-new-file
  2589. rule: unmanaged-new-file
  2590. paths:
  2591. - packages/ui/src/lib/markdownCjkBareUrl.ts
  2592. reason: 消息 Markdown 解析前预处理新增「中文边界裸链接」改写(docs/ui/markdown-preview-renderers.md),由已有 unmanaged 的 message.tsx 预处理链调用。不改变状态 owner 或模块边界,接管整个 ui 目录不在本次修复范围内。
  2593. - id: workflow-draft-symlink-index-lines
  2594. rule: disable-count
  2595. paths: [apps/zcode-cli/packages/adapters/src/fs/index.ts]
  2596. reason: 存量 1673 计数行,超过 max-lines 上限;本次只为 ZP-20261110-04 在草稿写入路径增加符号链接校验,校验已移到 fs/symlink-guard.ts 以限制增长。拆分 index.ts 另开工单,不在本次安全修复范围内。
  2597. - id: workflow-draft-symlink-guard-new-file
  2598. rule: unmanaged-new-file
  2599. paths:
  2600. - apps/zcode-cli/packages/adapters/src/fs/symlink-guard.ts
  2601. reason: 从 fs/index.ts 拆出的符号链接写入校验(ZP-20261110-04),仅含 assertNoSymlinkBetween 与其错误类型,供草稿写入前核验父目录。拆分以限制 index.ts 增长,不新增模块边界;接管整个 zcode-cli 不在本次范围内。
  2602. - id: compact-task-status-restore
  2603. rule: unmanaged-new-file
  2604. paths: [apps/zcode-cli/packages/core/src/runtime/helpers/compact-task-status.ts]
  2605. reason: compaction 后补回后台任务状态(apps/zcode-cli/docs/design/v2/rewind-compact.md「后台任务状态」)新增一个纯函数小文件,只把 RuntimeTaskRegistry 快照转成 task_status 提醒文字;只被同包 compact-active 调用。任务事实仍归 RuntimeTaskRegistry,提醒走现有 system-reminder 来源与投影,不新增 owner、协议或模块边界,接管整个 zcode-cli 不在本次范围内。
  2606. - id: output-token-continuation-persisted
  2607. rule: unmanaged-new-file
  2608. paths: [apps/zcode-cli/packages/core/src/runtime/helpers/compact-preservation.ts]
  2609. reason: 输出上限 Continue 改为持久化的隐藏行(docs/model-request-output-tokens.md「Output-limit Continue 恢复」)后,已准入的 compact-preservation 只删除 queryScope 排除条件,Continue 按普通历史计数。不新增文件、owner、协议或模块边界,接管整个 zcode-cli 不在本次范围内。
  2610. - id: contracts-zod4-tool-json-schema
  2611. rule: unmanaged-new-file
  2612. paths: [apps/zcode-cli/packages/contracts/src/tools/deferred-tool-call.ts]
  2613. reason: 工具契约迁到 zod 4 后(apps/zcode-cli/docs/design/v2/tool/00-tool-change-chain.md「工具 JSON Schema 生成」),已准入的 deferred-tool-call 只把 zod-to-json-schema 换成统一的 toToolJsonSchema,record 写成双参数。不新增文件、owner、协议或模块边界,接管整个 zcode-cli 不在本次范围内。
  2614. - id: tool-error-wrapping-texts
  2615. rule: unmanaged-new-file
  2616. paths:
  2617. - apps/zcode-cli/packages/contracts/src/model/unparsed-tool-input.ts
  2618. - apps/zcode-cli/packages/core/src/tool/levenshtein.ts
  2619. - apps/zcode-cli/packages/core/src/tool/deferred-call.ts
  2620. reason: 工具错误的包装与文字(apps/zcode-cli/docs/design/v2/tool/00-tool-change-chain.md「工具错误的包装与文字」)新增两个纯函数小文件:入参 JSON 解析失败的 symbol 标记(adapter 写、executor 读),以及从 Read/Edit 各自副本合并出的编辑距离函数(Skill 的相近名称也用它);已准入的 deferred-call 只把拒绝结果改成带错误码的工具失败。不新增 owner、协议或模块边界,接管整个 zcode-cli 不在本次范围内。
  2621. - id: cli-browser-state-loader-new-file
  2622. rule: unmanaged-new-file
  2623. paths:
  2624. - apps/zcode-cli/packages/adapters/src/browser/storage-state.ts
  2625. reason: CLI headless Browser Use 登录态注入(docs/browser-use/2026-11-17-cli-browser-state-spec.md)的文件读取与 schema 校验,只被同目录已有 unmanaged 的 managed CDP adapter(browser/index.ts)调用并经其公开入口导出。不新增模块边界或状态 owner;接管整个 zcode-cli 不在本次范围内。
  2626. - id: cli-browser-state-option-new-file
  2627. rule: unmanaged-new-file
  2628. paths:
  2629. - apps/zcode-cli/packages/cli/src/browser-state-option.ts
  2630. reason: --browser-state 与 --no-browser-state 的参数校验与来源解析(docs/browser-use/2026-11-17-cli-browser-state-spec.md §4),只被已有 unmanaged 的 CLI 入口 run.ts 调用。不新增模块边界或状态 owner;接管整个 zcode-cli 不在本次范围内。