dsh-plugin-dev-kb 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (500) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.en.md +23 -6
  3. package/README.md +28 -8
  4. package/kb/INDEX.md +3 -3
  5. package/kb/README.md +9 -4
  6. package/kb/extra/AGENTS.md +1 -1
  7. package/kb/extra/cli-help.md +15 -7
  8. package/kb/extra/cli-help.zh.md +15 -7
  9. package/kb/extra/cookbook/adding-a-plugin-preview.md +18 -25
  10. package/kb/extra/cookbook/adding-a-plugin-preview.zh.md +18 -25
  11. package/kb/extra/cookbook/reviewing-persistence-type-changes.md +1 -1
  12. package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +1 -1
  13. package/kb/extra/cookbook/reviewing-ui-design.md +166 -0
  14. package/kb/extra/cookbook/reviewing-ui-design.zh.md +166 -0
  15. package/kb/extra/deepseek-llm-api-wire-extensions.md +2 -2
  16. package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +2 -2
  17. package/kb/extra/defensive-patterns/conversation-and-session.md +2 -2
  18. package/kb/extra/defensive-patterns/conversation-and-session.zh.md +2 -2
  19. package/kb/extra/defensive-patterns/general.md +2 -0
  20. package/kb/extra/defensive-patterns/general.zh.md +2 -0
  21. package/kb/extra/defensive-patterns/package-surface.md +1 -0
  22. package/kb/extra/defensive-patterns/package-surface.zh.md +1 -0
  23. package/kb/extra/defensive-patterns/remote-and-api.md +5 -3
  24. package/kb/extra/defensive-patterns/remote-and-api.zh.md +5 -3
  25. package/kb/extra/development.md +16 -9
  26. package/kb/extra/development.zh.md +16 -9
  27. package/kb/extra/event-producer-consumer.md +64 -51
  28. package/kb/extra/event-producer-consumer.zh.md +64 -51
  29. package/kb/extra/i18n/README.md +2 -0
  30. package/kb/extra/i18n/README.zh.md +2 -0
  31. package/kb/extra/module-graph.md +204 -92
  32. package/kb/extra/module-graph.zh.md +204 -92
  33. package/kb/extra/persistence-changes/2026-10-13-liveshare-share-viewer-principal.md +60 -0
  34. package/kb/extra/persistence-changes/2026-10-13-liveshare-share-viewer-principal.zh.md +60 -0
  35. package/kb/extra/persistence-changes/2026-10-19-session-team-mode.md +48 -0
  36. package/kb/extra/persistence-changes/2026-10-19-session-team-mode.zh.md +48 -0
  37. package/kb/extra/persistence-changes/2026-10-22-action-card-status.md +60 -0
  38. package/kb/extra/persistence-changes/2026-10-22-action-card-status.zh.md +60 -0
  39. package/kb/extra/persistence-changes/2026-10-25-skill-catalog-incomplete.md +60 -0
  40. package/kb/extra/persistence-changes/2026-10-25-skill-catalog-incomplete.zh.md +60 -0
  41. package/kb/extra/persistence-changes/2026-10-27-retry-control-input.md +60 -0
  42. package/kb/extra/persistence-changes/2026-10-27-retry-control-input.zh.md +60 -0
  43. package/kb/extra/persistence-changes/2026-10-27-subagent-settlement-attribution.md +60 -0
  44. package/kb/extra/persistence-changes/2026-10-27-subagent-settlement-attribution.zh.md +60 -0
  45. package/kb/extra/persistence-changes/2026-11-02-subagent-catalog-names.md +48 -0
  46. package/kb/extra/persistence-changes/2026-11-02-subagent-catalog-names.zh.md +48 -0
  47. package/kb/extra/persistence-changes/2026-11-02-team-task-owner-names.md +48 -0
  48. package/kb/extra/persistence-changes/2026-11-02-team-task-owner-names.zh.md +48 -0
  49. package/kb/extra/persistence-changes/README.md +2 -0
  50. package/kb/extra/persistence-changes/README.zh.md +2 -0
  51. package/kb/extra/persistence-changes/historical-formats/README.md +1 -1
  52. package/kb/extra/persistence-changes/historical-formats/README.zh.md +1 -1
  53. package/kb/extra/rescope.md +7 -5
  54. package/kb/extra/rescope.zh.md +7 -5
  55. package/kb/extra/subsystems/agent-team.md +38 -75
  56. package/kb/extra/subsystems/agent-team.zh.md +38 -75
  57. package/kb/extra/subsystems/attachment.md +36 -13
  58. package/kb/extra/subsystems/attachment.zh.md +36 -13
  59. package/kb/extra/subsystems/boot.md +179 -5
  60. package/kb/extra/subsystems/boot.zh.md +179 -5
  61. package/kb/extra/subsystems/computer-use.md +78 -0
  62. package/kb/extra/subsystems/computer-use.zh.md +78 -0
  63. package/kb/extra/subsystems/deliverables.md +2 -0
  64. package/kb/extra/subsystems/deliverables.zh.md +2 -0
  65. package/kb/extra/subsystems/forge.md +1226 -0
  66. package/kb/extra/subsystems/forge.zh.md +1226 -0
  67. package/kb/extra/subsystems/liveshare.md +158 -0
  68. package/kb/extra/subsystems/liveshare.zh.md +158 -0
  69. package/kb/extra/subsystems/mcp.md +96 -1
  70. package/kb/extra/subsystems/mcp.zh.md +96 -1
  71. package/kb/extra/subsystems/worktrees.md +54 -3
  72. package/kb/extra/subsystems/worktrees.zh.md +54 -3
  73. package/kb/extra/testing.md +1 -1
  74. package/kb/extra/testing.zh.md +1 -1
  75. package/kb/extra/ui-design-review-cases.md +445 -0
  76. package/kb/extra/ui-design-review-cases.zh.md +445 -0
  77. package/kb/extra/ui-radius.md +3 -1
  78. package/kb/extra/ui-radius.zh.md +3 -1
  79. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +1 -1
  80. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +1 -1
  81. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/cordis-timer-wrappers/guide.md +24 -0
  82. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/cordis-timer-wrappers/guide.zh.md +24 -0
  83. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-manager-view-fields/guide.md +25 -0
  84. package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-manager-view-fields/guide.zh.md +25 -0
  85. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/model-switch-compaction/guide.md +30 -0
  86. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/model-switch-compaction/guide.zh.md +30 -0
  87. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/session-model-selection/guide.md +28 -0
  88. package/kb/extra/upgrade-guide/v0.2.1-alpha.4/session-model-selection/guide.zh.md +28 -0
  89. package/kb/extra/upgrade-guide/v0.2.1-rc.1/agent-instructions-chain-budgets/guide.md +24 -0
  90. package/kb/extra/upgrade-guide/v0.2.1-rc.1/agent-instructions-chain-budgets/guide.zh.md +24 -0
  91. package/kb/extra/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.md +23 -0
  92. package/kb/extra/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.zh.md +23 -0
  93. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-runtime-owner/guide.md +20 -0
  94. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-runtime-owner/guide.zh.md +20 -0
  95. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-team-subagents/guide.md +31 -0
  96. package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-team-subagents/guide.zh.md +31 -0
  97. package/kb/extra/upgrade-guide/v0.2.1-rc.2/approval-projection-dependency/guide.md +34 -0
  98. package/kb/extra/upgrade-guide/v0.2.1-rc.2/approval-projection-dependency/guide.zh.md +34 -0
  99. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-shutdown/guide.md +20 -0
  100. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-shutdown/guide.zh.md +20 -0
  101. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-user-sources/guide.md +18 -0
  102. package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-user-sources/guide.zh.md +18 -0
  103. package/kb/extra/upgrade-guide/v0.2.1-rc.2/built-in-japanese/guide.md +18 -0
  104. package/kb/extra/upgrade-guide/v0.2.1-rc.2/built-in-japanese/guide.zh.md +18 -0
  105. package/kb/extra/upgrade-guide/v0.2.1-rc.2/conditional-tools/guide.md +25 -0
  106. package/kb/extra/upgrade-guide/v0.2.1-rc.2/conditional-tools/guide.zh.md +25 -0
  107. package/kb/extra/upgrade-guide/v0.2.1-rc.2/context-menu-services/guide.md +23 -0
  108. package/kb/extra/upgrade-guide/v0.2.1-rc.2/context-menu-services/guide.zh.md +23 -0
  109. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-consent-storage/guide.md +22 -0
  110. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-consent-storage/guide.zh.md +22 -0
  111. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-preset-scope/guide.md +18 -0
  112. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-preset-scope/guide.zh.md +18 -0
  113. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-relative-coordinates/guide.md +17 -0
  114. package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-relative-coordinates/guide.zh.md +17 -0
  115. package/kb/extra/upgrade-guide/v0.2.1-rc.2/file-drag-callbacks/guide.md +19 -0
  116. package/kb/extra/upgrade-guide/v0.2.1-rc.2/file-drag-callbacks/guide.zh.md +19 -0
  117. package/kb/extra/upgrade-guide/v0.2.1-rc.2/headless-policy-composition/guide.md +27 -0
  118. package/kb/extra/upgrade-guide/v0.2.1-rc.2/headless-policy-composition/guide.zh.md +27 -0
  119. package/kb/extra/upgrade-guide/v0.2.1-rc.2/model-badge-package-removal/guide.md +18 -0
  120. package/kb/extra/upgrade-guide/v0.2.1-rc.2/model-badge-package-removal/guide.zh.md +18 -0
  121. package/kb/extra/upgrade-guide/v0.2.1-rc.2/new-session-blank-reuse/guide.md +22 -0
  122. package/kb/extra/upgrade-guide/v0.2.1-rc.2/new-session-blank-reuse/guide.zh.md +22 -0
  123. package/kb/extra/upgrade-guide/v0.2.1-rc.2/node-24/guide.md +17 -0
  124. package/kb/extra/upgrade-guide/v0.2.1-rc.2/node-24/guide.zh.md +17 -0
  125. package/kb/extra/upgrade-guide/v0.2.1-rc.2/official-bundle-lists/guide.md +18 -0
  126. package/kb/extra/upgrade-guide/v0.2.1-rc.2/official-bundle-lists/guide.zh.md +18 -0
  127. package/kb/extra/upgrade-guide/v0.2.1-rc.2/persistent-terminal-controls/guide.md +18 -0
  128. package/kb/extra/upgrade-guide/v0.2.1-rc.2/persistent-terminal-controls/guide.zh.md +18 -0
  129. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-default-capacities/guide.md +18 -0
  130. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-default-capacities/guide.zh.md +18 -0
  131. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-model-catalog/guide.md +53 -0
  132. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-model-catalog/guide.zh.md +53 -0
  133. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-protocol-replay/guide.md +30 -0
  134. package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-protocol-replay/guide.zh.md +30 -0
  135. package/kb/extra/upgrade-guide/v0.2.1-rc.2/ptc-script-format/guide.md +20 -0
  136. package/kb/extra/upgrade-guide/v0.2.1-rc.2/ptc-script-format/guide.zh.md +20 -0
  137. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-desktop-context/guide.md +18 -0
  138. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-desktop-context/guide.zh.md +18 -0
  139. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-minimal-checkpoints/guide.md +18 -0
  140. package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-minimal-checkpoints/guide.zh.md +18 -0
  141. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-projection-handles/guide.md +24 -0
  142. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-projection-handles/guide.zh.md +24 -0
  143. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-store-writes/guide.md +25 -0
  144. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-store-writes/guide.zh.md +25 -0
  145. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-team-mode/guide.md +22 -0
  146. package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-team-mode/guide.zh.md +22 -0
  147. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-activation-options/guide.md +18 -0
  148. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-activation-options/guide.zh.md +18 -0
  149. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-service-methods/guide.md +19 -0
  150. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-service-methods/guide.zh.md +19 -0
  151. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-user-controls/guide.md +26 -0
  152. package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-user-controls/guide.zh.md +26 -0
  153. package/kb/extra/upgrade-guide/v0.2.1-rc.2/tool-executor-plugins/guide.md +35 -0
  154. package/kb/extra/upgrade-guide/v0.2.1-rc.2/tool-executor-plugins/guide.zh.md +35 -0
  155. package/kb/extra/upgrade-guide/v0.2.1-rc.2/web-fetch-private-destinations/guide.md +21 -0
  156. package/kb/extra/upgrade-guide/v0.2.1-rc.2/web-fetch-private-destinations/guide.zh.md +21 -0
  157. package/kb/extra/upgrade-guide/v0.2.1-rc.2/webserver-index-peer/guide.md +17 -0
  158. package/kb/extra/upgrade-guide/v0.2.1-rc.2/webserver-index-peer/guide.zh.md +17 -0
  159. package/kb/extra/upgrade-guide/v0.2.1-rc.3/attachment-read-access/guide.md +23 -0
  160. package/kb/extra/upgrade-guide/v0.2.1-rc.3/attachment-read-access/guide.zh.md +23 -0
  161. package/kb/extra/upgrade-guide/v0.2.1-rc.3/computer-use-helper-permissions/guide.md +21 -0
  162. package/kb/extra/upgrade-guide/v0.2.1-rc.3/computer-use-helper-permissions/guide.zh.md +21 -0
  163. package/kb/extra/upgrade-guide/v0.2.1-rc.3/cua-bundle-id-consent/guide.md +20 -0
  164. package/kb/extra/upgrade-guide/v0.2.1-rc.3/cua-bundle-id-consent/guide.zh.md +20 -0
  165. package/kb/extra/upgrade-guide/v0.2.1-rc.3/generated-worktree-names/guide.md +20 -0
  166. package/kb/extra/upgrade-guide/v0.2.1-rc.3/generated-worktree-names/guide.zh.md +20 -0
  167. package/kb/extra/upgrade-guide/v0.2.1-rc.3/inbox-only-agent-wait/guide.md +19 -0
  168. package/kb/extra/upgrade-guide/v0.2.1-rc.3/inbox-only-agent-wait/guide.zh.md +19 -0
  169. package/kb/extra/upgrade-guide/v0.2.1-rc.3/independent-session-forks/guide.md +23 -0
  170. package/kb/extra/upgrade-guide/v0.2.1-rc.3/independent-session-forks/guide.zh.md +23 -0
  171. package/kb/extra/upgrade-guide/v0.2.1-rc.3/ptc-caller-cancellation/guide.md +20 -0
  172. package/kb/extra/upgrade-guide/v0.2.1-rc.3/ptc-caller-cancellation/guide.zh.md +20 -0
  173. package/kb/extra/upgrade-guide/v0.2.1-rc.3/session-follow-activation/guide.md +21 -0
  174. package/kb/extra/upgrade-guide/v0.2.1-rc.3/session-follow-activation/guide.zh.md +21 -0
  175. package/kb/extra/upgrade-guide/v0.2.1-rc.3/subagent-runtime-ownership/guide.md +21 -0
  176. package/kb/extra/upgrade-guide/v0.2.1-rc.3/subagent-runtime-ownership/guide.zh.md +21 -0
  177. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-mode-menu/guide.md +18 -0
  178. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-mode-menu/guide.zh.md +18 -0
  179. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-projection/guide.md +20 -0
  180. package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-projection/guide.zh.md +20 -0
  181. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-file-downloads/guide.md +19 -0
  182. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-file-downloads/guide.zh.md +19 -0
  183. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-search-defaults/guide.md +18 -0
  184. package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-search-defaults/guide.zh.md +18 -0
  185. package/kb/extra/upgrade-guide/v0.2.1-rc.4/model-listing-refresh/guide.md +22 -0
  186. package/kb/extra/upgrade-guide/v0.2.1-rc.4/model-listing-refresh/guide.zh.md +22 -0
  187. package/kb/extra/upgrade-guide/v0.2.1-rc.4/reasoning-body-props/guide.md +20 -0
  188. package/kb/extra/upgrade-guide/v0.2.1-rc.4/reasoning-body-props/guide.zh.md +20 -0
  189. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/context-menu-target/guide.md +19 -0
  190. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/context-menu-target/guide.zh.md +19 -0
  191. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cordis-loader-entry-trees/guide.md +24 -0
  192. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cordis-loader-entry-trees/guide.zh.md +24 -0
  193. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/css-anchored-menus/guide.md +21 -0
  194. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/css-anchored-menus/guide.zh.md +21 -0
  195. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cua-source-dev-helper/guide.md +19 -0
  196. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cua-source-dev-helper/guide.zh.md +19 -0
  197. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/desktop-stable-channel/guide.md +18 -0
  198. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/desktop-stable-channel/guide.zh.md +18 -0
  199. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-git-permissions/guide.md +21 -0
  200. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-git-permissions/guide.zh.md +21 -0
  201. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-worktree-entry/guide.md +29 -0
  202. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-worktree-entry/guide.zh.md +29 -0
  203. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/fs-observation-policy-default-off/guide.md +29 -0
  204. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/fs-observation-policy-default-off/guide.zh.md +29 -0
  205. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-request-purpose-declarations/guide.md +29 -0
  206. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-request-purpose-declarations/guide.zh.md +29 -0
  207. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/pi-ai-request-image-count/guide.md +18 -0
  208. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/pi-ai-request-image-count/guide.zh.md +18 -0
  209. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-event-frames/guide.md +32 -0
  210. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-event-frames/guide.zh.md +32 -0
  211. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-released-checkpoint/guide.md +30 -0
  212. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-released-checkpoint/guide.zh.md +30 -0
  213. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-snapshot-scope/guide.md +19 -0
  214. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-snapshot-scope/guide.zh.md +19 -0
  215. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/retained-ptc-timeout/guide.md +21 -0
  216. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/retained-ptc-timeout/guide.zh.md +21 -0
  217. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-agent-tools/guide.md +37 -0
  218. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-agent-tools/guide.zh.md +37 -0
  219. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-remote-host-tasks/guide.md +22 -0
  220. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-remote-host-tasks/guide.zh.md +22 -0
  221. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/sdk-run-commands/guide.md +24 -0
  222. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/sdk-run-commands/guide.zh.md +24 -0
  223. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/session-header-menu/guide.md +20 -0
  224. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/session-header-menu/guide.zh.md +20 -0
  225. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/subagent-explicit-reasoning/guide.md +20 -0
  226. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/subagent-explicit-reasoning/guide.zh.md +20 -0
  227. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-credential-modes/guide.md +17 -0
  228. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-credential-modes/guide.zh.md +17 -0
  229. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-default-provider/guide.md +19 -0
  230. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-default-provider/guide.zh.md +19 -0
  231. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/chat-process-activity-context/guide.md +18 -0
  232. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/chat-process-activity-context/guide.zh.md +18 -0
  233. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/subagent-names/guide.md +29 -0
  234. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/subagent-names/guide.zh.md +29 -0
  235. package/kb/extra/web-styling.md +19 -1
  236. package/kb/extra/web-styling.zh.md +19 -1
  237. package/kb/meta/search-index.json +1272 -1098
  238. package/kb/meta/source.json +8 -4
  239. package/kb/site/develop/cordis-tutorial/04-events.md +1 -1
  240. package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +5 -4
  241. package/kb/site/develop/framework/events.md +1 -1
  242. package/kb/site/develop/practice/dynamic-cordis.md +1 -1
  243. package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -1
  244. package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +5 -4
  245. package/kb/site/en/develop/framework/events.md +1 -1
  246. package/kb/site/en/develop/practice/dynamic-cordis.md +1 -1
  247. package/kb/site/en/guide/network-proxy.md +1 -1
  248. package/kb/site/en/guide/plugin-market.md +10 -10
  249. package/kb/site/en/guide/providers.md +5 -1
  250. package/kb/site/en/guide/python-sdk.md +17 -2
  251. package/kb/site/en/guide/schedule.md +45 -26
  252. package/kb/site/en/reference/agent-lifecycle.md +3 -1
  253. package/kb/site/en/reference/api-gateway.md +4 -4
  254. package/kb/site/en/reference/capability-seams.md +65 -17
  255. package/kb/site/en/reference/config-catalog.md +560 -238
  256. package/kb/site/en/reference/cookbook/adding-a-package.md +4 -2
  257. package/kb/site/en/reference/cookbook/extension-cookbook.md +1 -1
  258. package/kb/site/en/reference/cordis-api/context.md +1 -1
  259. package/kb/site/en/reference/cordis-api/events.md +9 -9
  260. package/kb/site/en/reference/cordis-api/fiber.md +85 -32
  261. package/kb/site/en/reference/cordis-api/inherited.md +10 -9
  262. package/kb/site/en/reference/experimental-persistence-catalog.md +3 -0
  263. package/kb/site/en/reference/index.md +14 -8
  264. package/kb/site/en/reference/persistence-catalog.md +532 -246
  265. package/kb/site/en/reference/subsystems/client-modules.md +19 -11
  266. package/kb/site/en/reference/subsystems/compaction.md +1 -1
  267. package/kb/site/en/reference/subsystems/conversation.md +2 -0
  268. package/kb/site/en/reference/subsystems/core.md +119 -65
  269. package/kb/site/en/reference/subsystems/filesystem.md +202 -28
  270. package/kb/site/en/reference/subsystems/index.md +3 -1
  271. package/kb/site/en/reference/subsystems/llm-streaming.md +92 -4
  272. package/kb/site/en/reference/subsystems/persistence.md +17 -7
  273. package/kb/site/en/reference/subsystems/plan.md +4 -4
  274. package/kb/site/en/reference/subsystems/ptc-runtime.md +12 -5
  275. package/kb/site/en/reference/subsystems/sandbox.md +11 -4
  276. package/kb/site/en/reference/subsystems/schedule.md +194 -430
  277. package/kb/site/en/reference/subsystems/session-projection.md +186 -44
  278. package/kb/site/en/reference/subsystems/session-reference.md +4 -3
  279. package/kb/site/en/reference/subsystems/session.md +119 -31
  280. package/kb/site/en/reference/subsystems/sidebar-right.md +12 -11
  281. package/kb/site/en/reference/subsystems/skills.md +4 -4
  282. package/kb/site/en/reference/subsystems/slots.md +30 -3
  283. package/kb/site/en/reference/subsystems/storage.md +26 -9
  284. package/kb/site/en/reference/subsystems/subagent.md +119 -102
  285. package/kb/site/en/reference/subsystems/system-prompt.md +13 -11
  286. package/kb/site/en/reference/subsystems/token-meter.md +45 -0
  287. package/kb/site/en/reference/subsystems/tools.md +222 -82
  288. package/kb/site/en/reference/subsystems/typert.md +21 -11
  289. package/kb/site/en/reference/subsystems/user-questions.md +22 -6
  290. package/kb/site/en/reference/subsystems/web-client.md +1 -1
  291. package/kb/site/en/reference/subsystems/web-server.md +68 -23
  292. package/kb/site/en/reference/subsystems/web.md +79 -21
  293. package/kb/site/en/reference/tool-catalog.md +270 -395
  294. package/kb/site/en/reference/tool-execution-pipeline.md +5 -4
  295. package/kb/site/guide/network-proxy.md +1 -1
  296. package/kb/site/guide/plugin-market.md +10 -10
  297. package/kb/site/guide/providers.md +5 -1
  298. package/kb/site/guide/python-sdk.md +17 -2
  299. package/kb/site/guide/schedule.md +45 -26
  300. package/kb/site/reference/agent-lifecycle.md +3 -1
  301. package/kb/site/reference/api-gateway.md +4 -4
  302. package/kb/site/reference/capability-seams.md +65 -17
  303. package/kb/site/reference/config-catalog.md +560 -238
  304. package/kb/site/reference/cookbook/adding-a-package.md +4 -2
  305. package/kb/site/reference/cookbook/extension-cookbook.md +1 -1
  306. package/kb/site/reference/cordis-api/context.md +1 -1
  307. package/kb/site/reference/cordis-api/events.md +9 -9
  308. package/kb/site/reference/cordis-api/fiber.md +87 -32
  309. package/kb/site/reference/cordis-api/inherited.md +10 -9
  310. package/kb/site/reference/experimental-persistence-catalog.md +3 -0
  311. package/kb/site/reference/index.md +14 -8
  312. package/kb/site/reference/persistence-catalog.md +532 -246
  313. package/kb/site/reference/subsystems/client-modules.md +19 -11
  314. package/kb/site/reference/subsystems/compaction.md +1 -1
  315. package/kb/site/reference/subsystems/conversation.md +4 -0
  316. package/kb/site/reference/subsystems/core.md +119 -65
  317. package/kb/site/reference/subsystems/filesystem.md +202 -28
  318. package/kb/site/reference/subsystems/index.md +3 -1
  319. package/kb/site/reference/subsystems/llm-streaming.md +92 -4
  320. package/kb/site/reference/subsystems/persistence.md +17 -7
  321. package/kb/site/reference/subsystems/plan.md +4 -4
  322. package/kb/site/reference/subsystems/ptc-runtime.md +12 -5
  323. package/kb/site/reference/subsystems/sandbox.md +11 -4
  324. package/kb/site/reference/subsystems/schedule.md +197 -433
  325. package/kb/site/reference/subsystems/session-projection.md +186 -44
  326. package/kb/site/reference/subsystems/session-reference.md +4 -3
  327. package/kb/site/reference/subsystems/session.md +119 -31
  328. package/kb/site/reference/subsystems/sidebar-right.md +12 -11
  329. package/kb/site/reference/subsystems/skills.md +4 -4
  330. package/kb/site/reference/subsystems/slots.md +30 -3
  331. package/kb/site/reference/subsystems/storage.md +26 -9
  332. package/kb/site/reference/subsystems/subagent.md +119 -102
  333. package/kb/site/reference/subsystems/system-prompt.md +13 -11
  334. package/kb/site/reference/subsystems/token-meter.md +45 -0
  335. package/kb/site/reference/subsystems/tools.md +222 -82
  336. package/kb/site/reference/subsystems/typert.md +21 -11
  337. package/kb/site/reference/subsystems/user-questions.md +22 -6
  338. package/kb/site/reference/subsystems/web-client.md +1 -1
  339. package/kb/site/reference/subsystems/web-server.md +68 -23
  340. package/kb/site/reference/subsystems/web.md +79 -21
  341. package/kb/site/reference/tool-catalog.md +273 -399
  342. package/kb/site/reference/tool-execution-pipeline.md +4 -3
  343. package/lib/index.js +123 -8
  344. package/lib/kb-version.js +118 -0
  345. package/package.json +4 -2
  346. package/scripts/refresh-kb.mjs +153 -0
  347. package/scripts/selfcheck.mjs +18 -0
  348. package/scripts/smoke.mjs +77 -0
  349. package/skills/dsh-plugin-dev-kb.md +7 -6
  350. package/skills/dsh-plugin-starter.md +65 -0
  351. package/skills/dsh-upgrade-assistant.md +62 -0
  352. package/kb/extra/agent-lifecycle.md +0 -91
  353. package/kb/extra/agent-lifecycle.zh.md +0 -93
  354. package/kb/extra/api-gateway.md +0 -172
  355. package/kb/extra/api-gateway.zh.md +0 -178
  356. package/kb/extra/architecture.md +0 -165
  357. package/kb/extra/architecture.zh.md +0 -169
  358. package/kb/extra/capability-seams.md +0 -714
  359. package/kb/extra/capability-seams.zh.md +0 -716
  360. package/kb/extra/config-catalog.md +0 -4801
  361. package/kb/extra/config-catalog.zh.md +0 -4803
  362. package/kb/extra/cookbook/adding-a-package.md +0 -170
  363. package/kb/extra/cookbook/adding-a-package.zh.md +0 -170
  364. package/kb/extra/cookbook/adding-a-settings-card.md +0 -72
  365. package/kb/extra/cookbook/adding-a-settings-card.zh.md +0 -72
  366. package/kb/extra/cookbook/adding-a-tool.md +0 -101
  367. package/kb/extra/cookbook/adding-a-tool.zh.md +0 -103
  368. package/kb/extra/cookbook/adding-an-llm-adapter.md +0 -43
  369. package/kb/extra/cookbook/adding-an-llm-adapter.zh.md +0 -43
  370. package/kb/extra/cookbook/extension-cookbook.md +0 -132
  371. package/kb/extra/cookbook/extension-cookbook.zh.md +0 -136
  372. package/kb/extra/cordis-api/context.md +0 -364
  373. package/kb/extra/cordis-api/context.zh.md +0 -366
  374. package/kb/extra/cordis-api/events.md +0 -207
  375. package/kb/extra/cordis-api/events.zh.md +0 -209
  376. package/kb/extra/cordis-api/fiber.md +0 -375
  377. package/kb/extra/cordis-api/fiber.zh.md +0 -377
  378. package/kb/extra/cordis-api/inherited.md +0 -38
  379. package/kb/extra/cordis-api/registry.md +0 -152
  380. package/kb/extra/cordis-api/registry.zh.md +0 -154
  381. package/kb/extra/cordis-api/service.md +0 -102
  382. package/kb/extra/cordis-api/service.zh.md +0 -104
  383. package/kb/extra/cordis-tutorial/01-first-plugin.md +0 -95
  384. package/kb/extra/cordis-tutorial/01-first-plugin.zh.md +0 -95
  385. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.md +0 -98
  386. package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.zh.md +0 -98
  387. package/kb/extra/cordis-tutorial/03-services.md +0 -98
  388. package/kb/extra/cordis-tutorial/03-services.zh.md +0 -98
  389. package/kb/extra/cordis-tutorial/04-events.md +0 -144
  390. package/kb/extra/cordis-tutorial/04-events.zh.md +0 -144
  391. package/kb/extra/cordis-tutorial/05-config.md +0 -111
  392. package/kb/extra/cordis-tutorial/05-config.zh.md +0 -111
  393. package/kb/extra/cordis-tutorial/06-composition-and-hmr.md +0 -113
  394. package/kb/extra/cordis-tutorial/06-composition-and-hmr.zh.md +0 -113
  395. package/kb/extra/cordis-tutorial/07-into-the-harness.md +0 -108
  396. package/kb/extra/cordis-tutorial/07-into-the-harness.zh.md +0 -108
  397. package/kb/extra/cordis-tutorial/index.md +0 -60
  398. package/kb/extra/cordis-tutorial/index.zh.md +0 -62
  399. package/kb/extra/experimental-persistence-catalog.md +0 -17
  400. package/kb/extra/experimental-persistence-catalog.zh.md +0 -17
  401. package/kb/extra/persistence-catalog.md +0 -9140
  402. package/kb/extra/persistence-catalog.zh.md +0 -9142
  403. package/kb/extra/subsystems/README.md +0 -76
  404. package/kb/extra/subsystems/README.zh.md +0 -76
  405. package/kb/extra/subsystems/approval.md +0 -170
  406. package/kb/extra/subsystems/approval.zh.md +0 -170
  407. package/kb/extra/subsystems/client-modules.md +0 -198
  408. package/kb/extra/subsystems/client-modules.zh.md +0 -198
  409. package/kb/extra/subsystems/client-resources.md +0 -92
  410. package/kb/extra/subsystems/client-resources.zh.md +0 -92
  411. package/kb/extra/subsystems/commands.md +0 -223
  412. package/kb/extra/subsystems/commands.zh.md +0 -223
  413. package/kb/extra/subsystems/compaction.md +0 -284
  414. package/kb/extra/subsystems/compaction.zh.md +0 -284
  415. package/kb/extra/subsystems/conversation.md +0 -301
  416. package/kb/extra/subsystems/conversation.zh.md +0 -303
  417. package/kb/extra/subsystems/core.md +0 -1113
  418. package/kb/extra/subsystems/core.zh.md +0 -1125
  419. package/kb/extra/subsystems/credentials.md +0 -493
  420. package/kb/extra/subsystems/credentials.zh.md +0 -493
  421. package/kb/extra/subsystems/filesystem.md +0 -530
  422. package/kb/extra/subsystems/filesystem.zh.md +0 -530
  423. package/kb/extra/subsystems/goal.md +0 -313
  424. package/kb/extra/subsystems/goal.zh.md +0 -313
  425. package/kb/extra/subsystems/jobs.md +0 -554
  426. package/kb/extra/subsystems/jobs.zh.md +0 -554
  427. package/kb/extra/subsystems/llm-streaming.md +0 -1196
  428. package/kb/extra/subsystems/llm-streaming.zh.md +0 -1202
  429. package/kb/extra/subsystems/lsp.md +0 -202
  430. package/kb/extra/subsystems/lsp.zh.md +0 -202
  431. package/kb/extra/subsystems/permission-presets.md +0 -167
  432. package/kb/extra/subsystems/permission-presets.zh.md +0 -167
  433. package/kb/extra/subsystems/persistence.md +0 -418
  434. package/kb/extra/subsystems/persistence.zh.md +0 -418
  435. package/kb/extra/subsystems/plan.md +0 -87
  436. package/kb/extra/subsystems/plan.zh.md +0 -87
  437. package/kb/extra/subsystems/ptc-runtime.md +0 -250
  438. package/kb/extra/subsystems/ptc-runtime.zh.md +0 -250
  439. package/kb/extra/subsystems/sandbox.md +0 -221
  440. package/kb/extra/subsystems/sandbox.zh.md +0 -221
  441. package/kb/extra/subsystems/schedule.md +0 -550
  442. package/kb/extra/subsystems/schedule.zh.md +0 -550
  443. package/kb/extra/subsystems/scope.md +0 -59
  444. package/kb/extra/subsystems/scope.zh.md +0 -61
  445. package/kb/extra/subsystems/session-projection.md +0 -356
  446. package/kb/extra/subsystems/session-projection.zh.md +0 -356
  447. package/kb/extra/subsystems/session-query.md +0 -511
  448. package/kb/extra/subsystems/session-query.zh.md +0 -511
  449. package/kb/extra/subsystems/session-reference.md +0 -224
  450. package/kb/extra/subsystems/session-reference.zh.md +0 -224
  451. package/kb/extra/subsystems/session-telemetry.md +0 -212
  452. package/kb/extra/subsystems/session-telemetry.zh.md +0 -212
  453. package/kb/extra/subsystems/session-title.md +0 -213
  454. package/kb/extra/subsystems/session-title.zh.md +0 -213
  455. package/kb/extra/subsystems/session.md +0 -1339
  456. package/kb/extra/subsystems/session.zh.md +0 -1343
  457. package/kb/extra/subsystems/settings.md +0 -155
  458. package/kb/extra/subsystems/settings.zh.md +0 -155
  459. package/kb/extra/subsystems/shell.md +0 -314
  460. package/kb/extra/subsystems/shell.zh.md +0 -314
  461. package/kb/extra/subsystems/sidebar-right.md +0 -160
  462. package/kb/extra/subsystems/sidebar-right.zh.md +0 -160
  463. package/kb/extra/subsystems/skills.md +0 -352
  464. package/kb/extra/subsystems/skills.zh.md +0 -352
  465. package/kb/extra/subsystems/slots.md +0 -200
  466. package/kb/extra/subsystems/slots.zh.md +0 -204
  467. package/kb/extra/subsystems/spill.md +0 -124
  468. package/kb/extra/subsystems/spill.zh.md +0 -124
  469. package/kb/extra/subsystems/storage.md +0 -259
  470. package/kb/extra/subsystems/storage.zh.md +0 -259
  471. package/kb/extra/subsystems/subagent.md +0 -686
  472. package/kb/extra/subsystems/subagent.zh.md +0 -688
  473. package/kb/extra/subsystems/subprocess.md +0 -321
  474. package/kb/extra/subsystems/subprocess.zh.md +0 -321
  475. package/kb/extra/subsystems/system-prompt.md +0 -254
  476. package/kb/extra/subsystems/system-prompt.zh.md +0 -254
  477. package/kb/extra/subsystems/terminal.md +0 -184
  478. package/kb/extra/subsystems/terminal.zh.md +0 -184
  479. package/kb/extra/subsystems/token-meter.md +0 -106
  480. package/kb/extra/subsystems/token-meter.zh.md +0 -106
  481. package/kb/extra/subsystems/tools.md +0 -747
  482. package/kb/extra/subsystems/tools.zh.md +0 -747
  483. package/kb/extra/subsystems/typert.md +0 -690
  484. package/kb/extra/subsystems/typert.zh.md +0 -690
  485. package/kb/extra/subsystems/user-questions.md +0 -307
  486. package/kb/extra/subsystems/user-questions.zh.md +0 -307
  487. package/kb/extra/subsystems/web-client.md +0 -100
  488. package/kb/extra/subsystems/web-client.zh.md +0 -100
  489. package/kb/extra/subsystems/web-server.md +0 -302
  490. package/kb/extra/subsystems/web-server.zh.md +0 -302
  491. package/kb/extra/subsystems/web.md +0 -206
  492. package/kb/extra/subsystems/web.zh.md +0 -206
  493. package/kb/extra/subsystems/workflow.md +0 -278
  494. package/kb/extra/subsystems/workflow.zh.md +0 -278
  495. package/kb/extra/subsystems/workspace.md +0 -647
  496. package/kb/extra/subsystems/workspace.zh.md +0 -647
  497. package/kb/extra/tool-catalog.md +0 -2824
  498. package/kb/extra/tool-catalog.zh.md +0 -2832
  499. package/kb/extra/tool-execution-pipeline.md +0 -65
  500. package/kb/extra/tool-execution-pipeline.zh.md +0 -67
@@ -1,690 +0,0 @@
1
- # Typert remote calls
2
-
3
- English | [中文](typert.zh.md)
4
-
5
- Types shared by generated Remote artifacts, the Host Gateway, and consumer API assemblies. The [Typert Gateway Agent Note](../../.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.md) owns the architecture and transport decisions; this page records the literal public contracts from [`dsh-typert-protocol`](../../packages/typert/protocol/src/types.ts) and [`dsh-api-gateway`](../../packages/api/gateway/src/types.ts).
6
-
7
- ## Lookup and Context declarations
8
-
9
- Business-object packages extend two empty maps through declaration merging. A lookup associates one Host object type with its wire identity; a Context declaration associates one scoped Context kind with its wire identity. Generated descriptors name these keys, while runtime providers supply the live resolution behavior.
10
-
11
- ```ts type-equiv
12
- /** Merge-extensible Host object lookup declarations. */
13
- interface TypertLookupMap {}
14
- ```
15
-
16
- ```ts type-equiv
17
- /** Merge-extensible scoped Context declarations. */
18
- interface TypertContextMap {}
19
- ```
20
-
21
- The registry retains a lookup's wire declaration after its resolver unloads. SRC discovery therefore continues to classify the parameter as a lookup and fails unavailable instead of accepting the wire value as an ordinary business object.
22
-
23
- ```ts type-equiv
24
- /** Stable wire declaration retained after a lookup provider unloads. */
25
- interface TypertLookupDefinition {
26
- /** Merge-declared lookup key. */
27
- readonly key: string
28
- /** Source parameter name recognized by the SRC weak parser. */
29
- readonly parameter: string
30
- /** Wire field replacing the Host object parameter. */
31
- readonly wire: string
32
- /** Canonical Host type symbol used by strict generation. */
33
- readonly hostTypeSymbol: string
34
- /** Canonical wire type symbol used by strict generation. */
35
- readonly wireTypeSymbol: string
36
- }
37
- ```
38
-
39
- ## Invocation descriptors
40
-
41
- An `InvocationDescriptor` is local reflection, not a wire message. Host and consumer builds generate corresponding descriptors; the request sends only the endpoint and named `args`. Strict codecs carry generated schema factories, while SRC codecs enforce JSON-safe inputs without structural type recovery. Unary result codecs can supply `encode()` for byte-containing subtrees and `decode()` for recursive native-byte validation; Client declarations narrow every `Uint8Array` to `ArrayBuffer` backing. Pure JSON results need neither byte detection nor Client decoding. Cancellation is an out-of-band carrier signal injected after business parameters and never enters `args`.
42
-
43
- `createTypertRemoteInfo` returns a lazy class instance implementing `TypertRemoteInfo`, which extends the mountable `TypertRemoteContribution`. Its `methods` index aliases the direct objects in `descriptors`: each `TypertRemoteMethod` adds named `input(options?)` and `invoke`, retains documentation on the method and its parameters, and uses `result` as its only output codec. Unary `mode` is absent; stream `mode` is `'stream'`. Context-only receivers remain in descriptors and scoped declarations. Registry queries return base descriptors; `isTypertRemoteMethod` narrows generated direct capabilities without recovering endpoint-specific generics.
44
-
45
- `TypertSchema` guarantees parsing, not arbitrary Zod operations, although the raw factory spec requires Zod factories. Missing documentation or an unsupported optional JSON Schema projection does not invalidate an ordinary method. The info index and each input-policy view, parser, and derived projection are independently lazy and cached; no metadata or schema access invokes the network. The [protocol reference](<../../packages/typert/protocol/README.md>) defines these APIs, and the [generator reference](<../../packages/typert/generator/README.md#ordinary-remote-metadata>) defines their separate Host `./typert`, consumer `./remote`, and Client `./client/typert` artifacts.
46
-
47
- `TypertRemoteSpec` holds a package and endpoint-keyed `TypertRemoteMethodSpec` values. Each ordered `TypertRemoteParameterSpec` contains normal `codec` and `strictCodec` factories from the same checker-resolved type model; the runtime derives identities, wire-name defaults, and named-call views. `TypertRemoteInputOptions` has only `strict?: boolean`; `method.input(options?)` selects a cached `TypertRemoteValue<T>` with matching parsing and optional documentation/projection, without changing Host dispatch or `result`. `RemoteDecoded<T>` describes carrier-reconstructed unary results without narrowing arbitrary parser outputs.
48
-
49
- ```ts type-equiv
50
- /** Codec attached to one invocation parameter or result. */
51
- type TypertCodec<Value = unknown> =
52
- | TypertRemoteValue<Value> & {
53
- readonly mode: 'strict'
54
- readonly typeSymbol: string
55
- /**
56
- * Decode a unary result whose fields require type-specific handling.
57
- * @param value - result reconstructed by the RPC carrier.
58
- * @returns the validated result, retaining native byte views.
59
- */
60
- readonly decode?: ((value: unknown) => unknown) | undefined
61
- /**
62
- * Project typed binary fields into RPC result attachments.
63
- * @param value - native unary result.
64
- * @param writeBytes - records a byte view at its result-relative path and returns its JSON placeholder.
65
- * @returns JSON metadata with untouched JSON subtrees retained.
66
- */
67
- readonly encode?: ((value: unknown, writeBytes: (bytes: Uint8Array, path: readonly (string | number)[]) => null) => unknown) | undefined
68
- }
69
- | {
70
- readonly mode: 'src-json'
71
- }
72
- ```
73
-
74
- ```ts type-equiv
75
- /** One ordered business parameter in a Remote invocation. */
76
- interface InvocationParameterDescriptor {
77
- /** Source-level parameter name. */
78
- readonly name: string
79
- /** Source parameter documentation, independent of JSON Schema support. */
80
- readonly description?: string
81
- /** Required key in the wire `args` object. */
82
- readonly wire: string
83
- /** Whether the value is JSON or requires a registered Host lookup. */
84
- readonly source: 'json' | 'lookup'
85
- /** Lookup key when `source` is `lookup`. */
86
- readonly lookup?: string
87
- /** Boundary codec for the wire representation. */
88
- readonly codec: TypertCodec
89
- /** Missing wire fields decode to `undefined` only for an explicitly declared `T | undefined`. */
90
- readonly acceptsUndefined?: true
91
- }
92
- ```
93
-
94
- ```ts type-equiv
95
- /** Carrier-independent description of one exported method invocation. */
96
- interface InvocationDescriptor {
97
- /** Globally stable generated identity. */
98
- readonly id: string
99
- /** Cordis service key owning the method. */
100
- readonly service: string
101
- /** Wire namespace, defaulting to the service key. */
102
- readonly namespace: string
103
- /** Public instance method name. */
104
- readonly method: string
105
- /** Service member invoked when the exported method name is an alias. */
106
- readonly implementation?: string
107
- /** Absent for unary calls; stream calls deliver every yielded item as the Host produced it. */
108
- readonly mode?: 'stream'
109
- /** Receiver selection mode. */
110
- readonly invocation:
111
- | { readonly kind: 'direct' }
112
- | {
113
- readonly kind: 'context'
114
- readonly context: string
115
- readonly wire: string
116
- readonly codec: TypertCodec
117
- }
118
- /** Optional consuming-Context projection for one direct lookup parameter. */
119
- readonly scope?: {
120
- /** Context kind whose Client adapter supplies the identity. */
121
- readonly context: string
122
- /** Lookup parameter wire field replaced by the Context identity. */
123
- readonly wire: string
124
- }
125
- /** Ordered business parameters. */
126
- readonly parameters: readonly InvocationParameterDescriptor[]
127
- /**
128
- * Client-to-Host items of the same logical stream, generated from the `In`
129
- * type argument of the method's `RemoteStream<Out, In>` return type; absent
130
- * when `In` is `never`. The method reads the items through
131
- * `RemoteInvocation.uplink()`, so nothing enters the parameter list.
132
- */
133
- readonly uplink?: {
134
- /** Codec validating every uplink item before `uplink()` delivers it. */
135
- readonly codec: TypertCodec
136
- }
137
- /** Transport cancellation injected after business parameters instead of entering wire args. */
138
- readonly cancellation?: {
139
- /** Reserved final Host method parameter. */
140
- readonly parameter: 'signal'
141
- }
142
- /** Codec for the unary result or each yielded stream item. */
143
- readonly result: TypertCodec
144
- /** Source-owned method documentation; ordinary methods need not have JSDoc. */
145
- readonly description?: string
146
- /** Source declaration used only for diagnostics. */
147
- readonly sourceLocation?: InvocationSourceLocation
148
- }
149
- ```
150
-
151
- The Host alias `RemoteStream<Out, In>` names both directions of one stream, and the receiving method reads its call context as `this.ctx.invocation`:
152
-
153
- ```ts type-equiv
154
- /**
155
- * One Remote stream as a Host method returns it: the items it yields to the
156
- * Client, iterated as a plain `AsyncIterable<Out>`. `In` is the type of the
157
- * items the Client may send back on the same logical stream, read through
158
- * `RemoteInvocation.uplink()`; it is carried only as a type-level marker. The
159
- * default `never` declares a method that reads none, and its descriptor
160
- * carries no uplink codec. A generated Client stream method returns the same
161
- * stream as a `RemoteStreamHandle<Out, In>`.
162
- * @template Out - item type the Host method yields.
163
- * @template In - item type the Client may send; `never` when the method reads none.
164
- */
165
- type RemoteStream<Out, In = never> = AsyncIterable<Out> & { readonly [STREAM_UPLINK]?: In }
166
- ```
167
-
168
- ```ts type-equiv
169
- /**
170
- * One open Remote stream as the Client holds it: the downlink items as an
171
- * `AsyncIterable`, plus the uplink and cancellation of the same logical
172
- * stream. A generated Client stream method returns it, and calling that
173
- * method opens the stream: a holder that neither iterates nor disposes the
174
- * handle keeps the Host stream alive. A handle stands for one generation:
175
- * when the carrier is lost, iteration fails with the carrier error and the
176
- * handle is finished.
177
- * @template Out - item type the Host method yields.
178
- * @template In - item type the Client may send; `never` when the method reads none.
179
- */
180
- interface RemoteStreamHandle<Out, In> extends AsyncIterable<Out> {
181
- /**
182
- * Send one uplink item. Items sent before the stream has opened are queued
183
- * and sent once the `open` frame is on the wire. A top-level `undefined`
184
- * travels as an `item` frame without `value`.
185
- * @param item - item the Host validates against the method's uplink codec.
186
- * @throws {Error} when the item is not a lossless JSON value, when `end()`
187
- * was called, or once the stream has terminated.
188
- */
189
- send(item: In): void
190
- /** Half-close the uplink: the Host's `uplink()` iteration ends. Idempotent; ignored after termination. */
191
- end(): void
192
- /**
193
- * Cancel the logical stream: send `cancel` unless a terminal frame has
194
- * arrived, and end the downlink iterator quietly. Breaking out of
195
- * `for await` early does the same.
196
- */
197
- dispose(): void
198
- }
199
- ```
200
-
201
- ```ts type-equiv
202
- /**
203
- * Merge-extensible caller identities. Each driver declares its own entry.
204
- * Every entry is a JSON value with a unique literal `kind`, carries no
205
- * credential, and is safe to persist in a Session log.
206
- */
207
- interface PrincipalMap {
208
- /** The local user who owns this Host. */
209
- owner: { readonly kind: 'owner' }
210
- }
211
- ```
212
-
213
- ```ts type-equiv
214
- /** One caller identity; the authorization layer reads only this. */
215
- type Principal = PrincipalMap[keyof PrincipalMap]
216
- ```
217
-
218
- ```ts type-equiv
219
- /**
220
- * One Peer's session on this Host. Its creator owns it: `ctx` is the Cordis
221
- * scope that owns connection-lifetime registrations and is disposed with the
222
- * Peer, and `principal` is the caller identity fixed when the Peer was created.
223
- */
224
- interface PeerScope {
225
- readonly id: PeerId
226
- /** Connection-lifetime registrations; disposed with the Peer. */
227
- readonly ctx: Context
228
- /** Caller identity fixed at creation by in-process Host code; no wire field can set it. */
229
- readonly principal: Principal
230
- /** Aborted once the Peer is disposed; Remote streams that speak for the Peer end with it. */
231
- readonly signal: AbortSignal
232
- /** Whether the Peer may open a forwarded-event stream; this does not grant business permissions. */
233
- readonly interactions: 'answer' | 'none'
234
- /**
235
- * Tear down every registration made through `ctx`.
236
- * @returns settles once the scope has quiesced; racing calls share one completion.
237
- */
238
- dispose(): Promise<void>
239
- }
240
- ```
241
-
242
- ```ts type-equiv
243
- /** Carrier capacity for buffered uplink frames of one logical stream. */
244
- interface RemoteUplinkWindow {
245
- /** Maximum complete encoded frame bytes waiting for the Host consumer. */
246
- readonly maxBytes: number
247
- /** UTF-8 envelope bytes added to a compact JSON item with a present value field. */
248
- readonly frameOverheadBytes: number
249
- }
250
- ```
251
-
252
- ```ts type-equiv
253
- /**
254
- * The context of one Remote call, reachable inside the receiving method as
255
- * `this.ctx.invocation`. The Gateway derives the receiver from a Context that
256
- * carries it, so no parameter is injected and nothing crosses the wire.
257
- */
258
- interface RemoteInvocation {
259
- readonly request: {
260
- readonly namespace: string
261
- readonly method: string
262
- readonly args: Readonly<Record<string, unknown>>
263
- }
264
- /** Cordis service key of the receiving Service. */
265
- readonly service: string
266
- /** Peer the call speaks for; every carrier names it explicitly. */
267
- readonly peer: PeerScope
268
- /** Carrier cancellation: Client cancel, socket close, or an uplink failure. */
269
- readonly signal: AbortSignal
270
- /** Carrier frame capacity; absent when the carrier imposes no encoded-frame inbox limit. */
271
- readonly uplinkWindow?: RemoteUplinkWindow | undefined
272
- /**
273
- * The Client's uplink items for this call. Available once; a second call
274
- * throws. With an uplink codec on the descriptor every item is decoded to
275
- * `In`; without one items arrive as `unknown` after a JSON-safety check.
276
- * Iteration ends when the Client ends its uplink; when the method finishes
277
- * its downlink the Gateway calls the iterator's `return()` and unread items
278
- * are dropped. `In` is the caller's assertion: the runtime decodes by the
279
- * descriptor and does not cross-check it.
280
- * @template In - item type the caller reads; the descriptor codec decides what arrives.
281
- * @returns the single-consumer uplink iterable.
282
- */
283
- uplink<In = unknown>(): AsyncIterable<In>
284
- }
285
- ```
286
-
287
- ## Remote access resources
288
-
289
- Every Remote method is under the access control of [`dsh-api-remote-access`](../../packages/api/remote-access/README.md): a non-owner call is allowed only when the policy for its principal kind binds, on every resource the call touches, a role that lists the endpoint action. The package that owns an identity type merge-declares its resource kind in `TypertResourceMap`; `global`, the built-in identity-less resource, is never a kind there. The Gateway reads a kind's identities from the `resources` readers of `@Remote({ resources })` or `@RemoteScope(key, { resources })`, else from a lookup parameter or scoped Context that declares the kind as its `resource`, else from the default field registered in `typert.resources`; a call that names no resource touches `global`. The [Peer principals Agent Note](../../.agents/notes/implemented/architecture/2026-10-12-peer-principal-and-remote-access.md) owns the decision.
290
-
291
- ```ts type-equiv
292
- /**
293
- * Merge-extensible resource kinds whose identities a Remote call or forwarded
294
- * event may carry. The package that owns an identity type declares its kind;
295
- * the value is that kind's identity type, a string type such as a branded id.
296
- * `global` names the built-in identity-less resource and is never a kind here.
297
- */
298
- interface TypertResourceMap {}
299
- ```
300
-
301
- ```ts type-equiv
302
- /** One resource kind: the built-in `global` kind or a declared kind. */
303
- type RemoteAccessResourceKind = 'global' | TypertResourceKind
304
- ```
305
-
306
- ```ts type-equiv
307
- /**
308
- * One resource a call or forwarded event touches: `global`, or one identity
309
- * of a declared kind. Identities are wire values, read before any lookup
310
- * resolves or validates them.
311
- */
312
- type RemoteAccessResource =
313
- | { readonly kind: 'global' }
314
- | {
315
- [Kind in TypertResourceKind]: { readonly kind: Kind; readonly id: TypertResourceId<TypertResourceMap[Kind]> }
316
- }[TypertResourceKind]
317
- ```
318
-
319
- ```ts type-equiv
320
- /**
321
- * Explicit endpoint and resource choices for one Remote Scope method.
322
- * @template WireArgs - the decorated method's positional parameters as the
323
- * wire carries them; the default `never` admits readers of any tuple.
324
- */
325
- interface RemoteScopeOptions<WireArgs extends readonly unknown[] = never> {
326
- /** Exported endpoint method; omission retains the implementation member name. */
327
- readonly name?: string
328
- /**
329
- * Per-kind readers of the resources one call touches. Each receives the
330
- * method's arguments as its own parameters, JSON arguments as their Typert
331
- * codecs validated them, a lookup parameter as its wire identity and a
332
- * cancellation parameter as the call's signal, so it performs plain reads
333
- * only, and returns one identity, several, or `undefined` for none. A
334
- * throw, an empty list, or an identity other than a non-empty string
335
- * refuses the call. For a kind without a reader, the Gateway reads the
336
- * identity of a scoped Context whose Host adapter declares that `resource`
337
- * and of lookup parameters declaring it, else the field registered in
338
- * `typert.resources`: a top-level argument or, failing that, the first
339
- * object argument. A call that carries no identity touches `global`. The
340
- * readers and these defaults together must name every resource the method
341
- * accesses: access control never checks a resource they omit.
342
- */
343
- readonly resources?: TypertResourceReaders<WireArgs>
344
- }
345
- ```
346
-
347
- ```ts type-equiv
348
- /**
349
- * Explicit endpoint, stream, and resource choices for one direct Remote method.
350
- * @template WireArgs - the decorated method's positional parameters as the
351
- * wire carries them; the default `never` admits readers of any tuple.
352
- */
353
- interface RemoteMethodOptions<WireArgs extends readonly unknown[] = never> extends RemoteScopeOptions<WireArgs> {
354
- /** `stream`: deliver each Iterable item over the shared logical-stream carrier. */
355
- readonly mode?: 'stream'
356
- }
357
- ```
358
-
359
- ## Typert registry
360
-
361
- `ctx.typert` separates current-environment descriptors, explicitly selected Remote contributions, lookup providers, scoped Context providers, and the default fields of resource kinds. A lookup provider owns the stable wire declaration and default resolver; Host composition can configure an effect-scoped synchronous or asynchronous resolver for the same key, and unloading that configuration restores the default policy. Registrations are Cordis-owned effects and return awaitable disposers.
362
-
363
- ```ts type-equiv
364
- /** Minimal Typert runtime consumed through dependency inversion. */
365
- interface TypertRegistryContract {
366
- readonly local: TypertLocalRegistry
367
- readonly remotes: TypertRemoteRegistry
368
- readonly lookups: TypertLookupRegistry
369
- readonly contexts: TypertContextRegistry
370
- readonly resources: TypertResourceRegistry
371
- }
372
- ```
373
-
374
- Generated consumer declarations merge direct namespaces into the map inherited by `TypertClientRemote`.
375
-
376
- ```ts type-equiv
377
- /** Merge-extensible direct namespace surface generated for Client Remote services. */
378
- interface TypertRemoteNamespaceMap {}
379
- ```
380
-
381
- ## Host Gateway
382
-
383
- Connection decodes its carrier envelope before calling `ctx.typertGateway`. The request carries exact named wire fields, the carrier's cancellation signal, and the Peer the call speaks for separately; every carrier and in-process caller names that Peer, and the Gateway refuses a disposed one with `gateway/peer-disposed`. For a non-owner call the Gateway resolves its resources and asks `ctx.remoteAccess.decide()` after argument validation and before any lookup or Context resolution; infrastructure and boundary failures ride `TypertGatewayError`, whose `gateway/*` codes are ordinary `RemoteError` codes, so the RPC adapter passes every structurally identified `RemoteError` through with its code and details intact and folds only unrecognized exceptions into `gateway/internal`.
384
-
385
- ```ts type-equiv
386
- /** One Remote method request after a carrier has decoded its envelope. */
387
- interface InvokeRemoteRequest {
388
- /** Remote namespace selected by the generated descriptor. */
389
- readonly namespace: string
390
- /** Exported Service method name. */
391
- readonly method: string
392
- /** Named wire values; fields must exactly match the descriptor. */
393
- readonly args: Readonly<Record<string, unknown>>
394
- /**
395
- * Client uplink items of this logical stream, delivered to the method through
396
- * `invocation.uplink()`; absent means an immediately ended iterable.
397
- */
398
- readonly uplink?: AsyncIterable<unknown>
399
- /** Carrier-provided frame capacity; absent for carriers without an encoded-frame inbox limit. */
400
- readonly uplinkWindow?: RemoteUplinkWindow | undefined
401
- /** Peer the call speaks for; every carrier and in-process caller names it explicitly. */
402
- readonly peer: PeerScope
403
- /** Carrier or direct-caller cancellation injected only into cancellation-aware methods. */
404
- readonly signal?: AbortSignal
405
- }
406
- ```
407
-
408
- ```ts type-equiv
409
- /** Stable infrastructure and boundary failures emitted before or after business execution. */
410
- type TypertGatewayErrorCode =
411
- | 'gateway/ambiguous-endpoint'
412
- | 'gateway/arguments-invalid'
413
- | 'gateway/binding-invalid'
414
- | 'gateway/context-failed'
415
- | 'gateway/context-not-found'
416
- | 'gateway/context-unavailable'
417
- | 'gateway/definition-unavailable'
418
- | 'gateway/input-invalid'
419
- | 'gateway/interactions-forbidden'
420
- | 'gateway/invocation-unavailable'
421
- | 'gateway/lookup-failed'
422
- | 'gateway/lookup-not-found'
423
- | 'gateway/lookup-unavailable'
424
- | 'gateway/method-unavailable'
425
- | 'gateway/peer-disposed'
426
- | 'gateway/protocol'
427
- | 'gateway/provider-mismatch'
428
- | 'gateway/result-invalid'
429
- | 'gateway/service-unavailable'
430
- | 'gateway/signature-invalid'
431
- | 'gateway/uplink-overflow'
432
- ```
433
-
434
- ```ts type-equiv
435
- /** Host dispatcher consumed by Connection adapters. */
436
- interface TypertGateway {
437
- /** Carrier adapter shared by WebSocket and in-process transports. */
438
- readonly wireStream: TypertGatewayWireStream
439
- /**
440
- * Check for an active owner Client event stream, the only kind that can answer forwarded waterfalls.
441
- * @returns whether an owner stream is open and has not been cancelled.
442
- */
443
- hasLiveClient(): boolean
444
- /**
445
- * Register the application-selected forwarded-event source.
446
- * @param source - stream factory installed by the Remote assembly.
447
- * @param host - stable Host facts included in each Client generation's opening frame.
448
- * @returns disposer removing this exact source and cancelling its active streams.
449
- */
450
- registerRemoteEvents(
451
- source: TypertRemoteEventSource,
452
- host: RemoteEventHostInfo,
453
- ): () => Promise<void>
454
- /**
455
- * Invoke one live Remote method without assuming a carrier or response envelope.
456
- * @param request - decoded endpoint and named wire arguments.
457
- * @returns the business result without output decoding.
458
- * @throws {@link TypertGatewayError} for dispatch, provider, or boundary failures; lookup-policy and business errors retain identity.
459
- */
460
- invoke(request: InvokeRemoteRequest): Promise<unknown>
461
- /**
462
- * Open one live stream Remote method without assuming a physical carrier.
463
- * @param request - decoded endpoint, named wire arguments, and the Client uplink when the carrier has one.
464
- * @returns a cancellation-aware iterable over the business results.
465
- */
466
- stream(request: InvokeRemoteRequest): Promise<AsyncIterable<unknown>>
467
- }
468
- ```
469
-
470
- ## Consumer Remote
471
-
472
- `ctx.remote` exposes only namespaces contributed by imported `/remote` artifacts. `$mount()` installs generated descriptors and concrete methods as one fiber-owned operation. Each namespace is a traced `remote.<namespace>` Cordis child Service whose lifetime spans its mounted methods; no JavaScript Proxy or Host business Service type enters the consumer.
473
-
474
- Metadata ownership is separate from connection ownership; the [registry reference](<../../packages/typert/registry/README.md>) covers offline registration and mount lifetimes.
475
-
476
- ```ts type-equiv
477
- /** Client Remote capability implemented by the Gateway and consumed by Remote assemblies. */
478
- interface TypertClientRemote extends TypertRemoteNamespaceMap {
479
- /**
480
- * Mount one generated Host-for-Client contribution in the caller's fiber.
481
- * @param contribution - explicitly selected Remote package artifact.
482
- * @returns disposer after namespace services and concrete methods are ready.
483
- */
484
- $mount(contribution: TypertRemoteContribution): Promise<TypertDisposer>
485
- /**
486
- * Subscribe to one forwarded Host event. Notifications run in registration
487
- * order and isolate failures; scoped waterfalls return, delegate through
488
- * `next()`, or reject the Host dispatch.
489
- * @template Event - forwarded event name selected by the Host assembly.
490
- * @param event - forwarded Host event name, unchanged on the wire.
491
- * @param listener - receives the Client projection of the Cordis `Events` declaration.
492
- * @returns disposer owned by the calling fiber.
493
- */
494
- $on<Event extends TypertRemoteEvent>(event: Event, listener: TypertClientEventListener<Event>): () => void
495
- }
496
- ```
497
-
498
- <!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
499
-
500
- <a id="cordis-surface"></a>
501
-
502
- ## Cordis API
503
-
504
- Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
505
-
506
- <a id="ctxremoteaccess--remoteaccessservice"></a>
507
-
508
- ### `ctx.remoteAccess` — `RemoteAccessService`
509
-
510
- Registry of access policies, the Gateway's access decisions, list filtering, and the per-Peer access snapshot. Every composition that mounts the Gateway mounts this service too.
511
-
512
- ```ts cordis-catalog
513
- /**
514
- * Register the policy of one non-owner principal kind in the caller's
515
- * fiber; open snapshots are recomputed on registration and removal.
516
- * @param kind - the principal kind the policy serves; never `owner`.
517
- * @param policy - business-owned bindings and refusal reasons for principals of `kind`.
518
- * @returns disposer removing this policy.
519
- * @throws Error when `kind` already has a policy.
520
- */
521
- registerPolicy<K extends Exclude<keyof PrincipalMap, 'owner'>>(kind: K, policy: RemoteAccessPolicy<PrincipalMap[K]>): () => void
522
-
523
- /**
524
- * Report that the bindings or condition answers for `principal` may have
525
- * changed. Business packages call this on every grant, revocation, mode
526
- * change, and expiry; open snapshots re-push, and the next failure of each
527
- * policy is logged again.
528
- * @param principal - affected principal; omitted for every principal.
529
- */
530
- invalidate(principal?: Principal): void
531
-
532
- /**
533
- * Gateway-only: decide one request whose resources the Gateway resolved.
534
- * The owner is allowed, and so is `remoteAccess/follow`: every Peer reads
535
- * its own snapshot. Otherwise the action is allowed only when, on every
536
- * listed resource, some binding of the principal's policy names that
537
- * resource, has a role listing the action, and has no condition or a
538
- * condition that allows. `bindings()` is called once per decision.
539
- * @param request - the caller or recipient, the action, the resources it
540
- * touches, and a call's arguments.
541
- * @returns `allow`; or `deny` with `no-allow` when the principal kind has
542
- * no policy, the first refusing condition's reason on the first resource
543
- * no binding allows, else `explain()`'s reason, else `no-allow`;
544
- * `policy-failed` when `bindings()`, a condition, or `explain()` throws,
545
- * logged once per policy until the next `invalidate()`. The Gateway
546
- * throws `remote-access/denied` for a denied call and drops a denied event.
547
- */
548
- decide(request: RemoteAccessRequest<Principal>): RemoteAccessDecision
549
-
550
- /**
551
- * Filter items inside a Remote method. The invocation is read from the
552
- * Context that accessed this service, so call it as
553
- * `this.ctx.remoteAccess.allows(resource)` from the Remote method. Each
554
- * check reads the policy's bindings again, so a long-running stream sees
555
- * binding changes from the next check on.
556
- * @param resource - resource of one result item.
557
- * @returns true for the owner and outside a Remote call; otherwise whether
558
- * the invocation's endpoint action is allowed on `resource` without call
559
- * arguments, false when the policy is absent or fails.
560
- */
561
- allows(resource: RemoteAccessResource): boolean
562
-
563
- /**
564
- * The baseline a page opens with before its snapshot stream connects. A
565
- * business package rendering a non-owner page assigns this value to
566
- * {@link REMOTE_ACCESS_SNAPSHOT_KEY} after every index injection row,
567
- * replacing the owner baseline the webServer index carries.
568
- * @param principal - the page's caller identity.
569
- * @returns the owner baseline for the owner; otherwise the principal's current grants.
570
- */
571
- snapshotFor(principal: Principal): RemoteAccessBaseline
572
-
573
- /**
574
- * Stream the calling Peer's access snapshot: one baseline, then `upsert`
575
- * and `remove` frames after each `invalidate()` and each policy
576
- * registration or removal that changes a grant. The owner receives only
577
- * `{ owner: true }`. The generation ends when `signal` aborts or this
578
- * service unloads, so a reloaded service starts every reader from a fresh
579
- * baseline.
580
- * @param signal - generation cancellation.
581
- * @returns the access frames of one generation.
582
- */
583
- @Remote({ mode: 'stream' }) async *follow(signal: AbortSignal): AsyncIterable<RemoteAccessFrame>
584
- ```
585
-
586
- Source: [`packages/api/remote-access/src/index.ts`](../../packages/api/remote-access/src/index.ts)
587
-
588
- <a id="ctxtypert--typertregistry"></a>
589
-
590
- ### `ctx.typert` — `TypertRegistry`
591
-
592
- Registry of generated schemas, package reflection, invocations, and Remote dependency providers.
593
-
594
- ```ts cordis-catalog
595
- /**
596
- * Register one generated contribution atomically for the calling fiber.
597
- * Duplicate package-face identities, schemas, invocation ids, or endpoints
598
- * reject the whole batch.
599
- * @param contribution - generated schemas, reflection, and Host invocations.
600
- * @returns the exact effect disposer that removes this contribution.
601
- */
602
- register(contribution: TypertContribution): TypertDisposer
603
-
604
- /**
605
- * Look up one schema by `<package>#<name>`.
606
- * @param key - global schema key.
607
- * @returns a record containing the cached schema, or `undefined` when absent.
608
- */
609
- get(key: string): TypertSchemaRecord | undefined
610
-
611
- /**
612
- * Resolve one required schema.
613
- * @param key - global schema key.
614
- * @returns a record containing the cached schema.
615
- * @throws when the key is malformed, the package face is absent, or the schema is not contributed.
616
- */
617
- resolve(key: string): TypertSchemaRecord
618
-
619
- /**
620
- * Enumerate live schemas in registration order.
621
- * @param filter - optional package and face restriction.
622
- * @returns matching records containing the cached schemas.
623
- */
624
- list(filter: TypertSchemaFilter = {}): TypertSchemaRecord[]
625
-
626
- /**
627
- * Look up generated reflection for one package face.
628
- * @param packageName - exact npm package name.
629
- * @param face - face to query; defaults to the host runtime.
630
- * @returns the live package record, or `undefined` when absent.
631
- */
632
- getPackage(packageName: string, face: TypertFace = 'host'): TypertPackageRecord | undefined
633
-
634
- /**
635
- * Enumerate generated package reflection in registration order.
636
- * @param filter - optional package and face restriction.
637
- * @returns matching package records.
638
- */
639
- listPackages(filter: TypertPackageFilter = {}): TypertPackageRecord[]
640
-
641
- /**
642
- * Project a live Zod schema to JSON Schema without caching the result.
643
- * @param key - global schema key.
644
- * @param params - Zod projection parameters.
645
- * @returns a fresh JSON Schema document.
646
- */
647
- toJSONSchema(key: string, params?: z.core.ToJSONSchemaParams): z.core.JSONSchema.BaseSchema
648
- ```
649
-
650
- Source: [`packages/typert/registry/src/service.ts`](../../packages/typert/registry/src/service.ts)
651
-
652
- <a id="ctxtypertgateway--typertgatewayservice"></a>
653
-
654
- ### `ctx.typertGateway` — `TypertGatewayService`
655
-
656
- Resolve strict generated definitions or conservative SRC markers against current Cordis Services and Typert providers.
657
-
658
- ```ts cordis-catalog
659
- /**
660
- * Check for an active owner Client event stream, the only kind that can answer forwarded waterfalls.
661
- * @returns whether an owner stream is open and has not been cancelled.
662
- */
663
- hasLiveClient(): boolean
664
-
665
- /**
666
- * Register the sole application-selected forwarded-event source.
667
- * @param source - stream factory installed by the Remote assembly.
668
- * @param host - stable Host facts included in each Client generation's opening frame.
669
- * @returns disposer removing this source and cancelling its active streams.
670
- */
671
- registerRemoteEvents( source: TypertRemoteEventSource, host: RemoteEventHostInfo, ): () => Promise<void>
672
-
673
- /**
674
- * Invoke one live Remote method through strict generated reflection or SRC markers.
675
- * @param request - decoded endpoint and exact named wire arguments.
676
- * @returns the business result without output decoding.
677
- * @throws {@link TypertGatewayError} for dispatch, provider, or boundary failures; lookup-policy and business errors retain identity.
678
- */
679
- async invoke(request: InvokeRemoteRequest): Promise<unknown>
680
-
681
- /**
682
- * Open one live stream Remote method without assuming a physical carrier.
683
- * @param request - decoded endpoint, named wire arguments, and the Client uplink when the carrier has one.
684
- * @returns a cancellation-aware iterable over the business results.
685
- */
686
- async stream(request: InvokeRemoteRequest): Promise<AsyncIterable<unknown>>
687
- ```
688
-
689
- Source: [`packages/api/gateway/src/index.ts`](../../packages/api/gateway/src/index.ts)
690
- <!-- END GENERATED cordis-surface -->