dsh-plugin-dev-kb 1.8.0 → 1.8.1

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 (229) hide show
  1. package/CHANGELOG.md +186 -178
  2. package/README.en.md +172 -172
  3. package/README.md +183 -183
  4. package/kb/INDEX.md +236 -234
  5. package/kb/README.md +88 -88
  6. package/kb/extra/AGENTS.md +77 -77
  7. package/kb/extra/deepseek-llm-api-wire-extensions.md +162 -162
  8. package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +162 -162
  9. package/kb/extra/defensive-patterns/package-surface.md +233 -232
  10. package/kb/extra/defensive-patterns/package-surface.zh.md +233 -232
  11. package/kb/extra/defensive-patterns/remote-and-api.md +117 -117
  12. package/kb/extra/defensive-patterns/remote-and-api.zh.md +117 -117
  13. package/kb/extra/development.md +221 -221
  14. package/kb/extra/development.zh.md +228 -228
  15. package/kb/extra/event-producer-consumer.md +133 -123
  16. package/kb/extra/event-producer-consumer.zh.md +135 -125
  17. package/kb/extra/module-graph.md +1961 -1888
  18. package/kb/extra/module-graph.zh.md +1963 -1890
  19. package/kb/extra/persistence-changes/2026-11-05-timeline-priority-notice.md +60 -0
  20. package/kb/extra/persistence-changes/2026-11-05-timeline-priority-notice.zh.md +60 -0
  21. package/kb/extra/persistence-changes/README.md +92 -92
  22. package/kb/extra/persistence-changes/README.zh.md +92 -92
  23. package/kb/extra/persistence-changes/historical-formats/README.md +75 -75
  24. package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -75
  25. package/kb/extra/persistence-changes/releases/README.md +103 -103
  26. package/kb/extra/persistence-changes/releases/README.zh.md +103 -103
  27. package/kb/extra/rescope.md +55 -55
  28. package/kb/extra/rescope.zh.md +55 -55
  29. package/kb/extra/subsystems/boot.md +631 -621
  30. package/kb/extra/subsystems/boot.zh.md +631 -621
  31. package/kb/extra/subsystems/computer-use.md +179 -137
  32. package/kb/extra/subsystems/computer-use.zh.md +179 -137
  33. package/kb/extra/subsystems/extensions.md +387 -384
  34. package/kb/extra/subsystems/extensions.zh.md +387 -384
  35. package/kb/extra/subsystems/feedback.md +418 -400
  36. package/kb/extra/subsystems/feedback.zh.md +418 -400
  37. package/kb/extra/subsystems/forge.md +2169 -1226
  38. package/kb/extra/subsystems/forge.zh.md +2171 -1226
  39. package/kb/extra/subsystems/liveshare.md +167 -158
  40. package/kb/extra/subsystems/liveshare.zh.md +167 -158
  41. package/kb/extra/subsystems/mcp.md +237 -234
  42. package/kb/extra/subsystems/mcp.zh.md +237 -234
  43. package/kb/extra/subsystems/office-kit.md +122 -0
  44. package/kb/extra/subsystems/office-kit.zh.md +122 -0
  45. package/kb/extra/subsystems/working-directory.md +95 -64
  46. package/kb/extra/subsystems/working-directory.zh.md +95 -64
  47. package/kb/extra/subsystems/worktrees.md +187 -127
  48. package/kb/extra/subsystems/worktrees.zh.md +187 -127
  49. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.md +21 -21
  50. package/kb/extra/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.zh.md +21 -21
  51. package/kb/extra/upgrade-guide/v0.2.1-rc.4/sandbox-unsupported-policy-error/guide.md +18 -0
  52. package/kb/extra/upgrade-guide/v0.2.1-rc.4/sandbox-unsupported-policy-error/guide.zh.md +18 -0
  53. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-error-builtin-codes/guide.md +18 -0
  54. package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-error-builtin-codes/guide.zh.md +18 -0
  55. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-kit-package/guide.md +34 -0
  56. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-kit-package/guide.zh.md +34 -0
  57. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-operation-tools/guide.md +49 -0
  58. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-operation-tools/guide.zh.md +49 -0
  59. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-skill-resources/guide.md +36 -0
  60. package/kb/extra/upgrade-guide/v0.2.2-alpha.3/office-skill-resources/guide.zh.md +36 -0
  61. package/kb/extra/upgrade-guide/v0.2.2-rc.1/account-notification-fields/guide.md +26 -0
  62. package/kb/extra/upgrade-guide/v0.2.2-rc.1/account-notification-fields/guide.zh.md +26 -0
  63. package/kb/extra/upgrade-guide/v0.2.2-rc.1/account-remote-provider/guide.md +22 -0
  64. package/kb/extra/upgrade-guide/v0.2.2-rc.1/account-remote-provider/guide.zh.md +22 -0
  65. package/kb/extra/upgrade-guide/v0.2.2-rc.1/archive-worktrees/guide.md +21 -0
  66. package/kb/extra/upgrade-guide/v0.2.2-rc.1/archive-worktrees/guide.zh.md +21 -0
  67. package/kb/extra/upgrade-guide/v0.2.2-rc.1/attachment-error-codes/guide.md +23 -0
  68. package/kb/extra/upgrade-guide/v0.2.2-rc.1/attachment-error-codes/guide.zh.md +23 -0
  69. package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-ax-read-limits/guide.md +20 -0
  70. package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-ax-read-limits/guide.zh.md +20 -0
  71. package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-hover-ax-only/guide.md +18 -0
  72. package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-hover-ax-only/guide.zh.md +18 -0
  73. package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-native-platform/guide.md +23 -0
  74. package/kb/extra/upgrade-guide/v0.2.2-rc.1/cua-native-platform/guide.zh.md +23 -0
  75. package/kb/extra/upgrade-guide/v0.2.2-rc.1/dsh-doc-skill/guide.md +35 -0
  76. package/kb/extra/upgrade-guide/v0.2.2-rc.1/dsh-doc-skill/guide.zh.md +35 -0
  77. package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-change-request-overview/guide.md +26 -0
  78. package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-change-request-overview/guide.zh.md +26 -0
  79. package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-pinned-diff/guide.md +26 -0
  80. package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-pinned-diff/guide.zh.md +26 -0
  81. package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-review-reads/guide.md +19 -0
  82. package/kb/extra/upgrade-guide/v0.2.2-rc.1/forge-review-reads/guide.zh.md +19 -0
  83. package/kb/extra/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.md +26 -0
  84. package/kb/extra/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.zh.md +26 -0
  85. package/kb/extra/upgrade-guide/v0.2.2-rc.1/plugin-update-method/guide.md +22 -0
  86. package/kb/extra/upgrade-guide/v0.2.2-rc.1/plugin-update-method/guide.zh.md +22 -0
  87. package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.md +25 -0
  88. package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.zh.md +25 -0
  89. package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.md +48 -0
  90. package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.zh.md +48 -0
  91. package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.md +45 -0
  92. package/kb/extra/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.zh.md +45 -0
  93. package/kb/extra/upgrade-guide/v0.2.2-rc.1/runtime-context-reminders/guide.md +19 -0
  94. package/kb/extra/upgrade-guide/v0.2.2-rc.1/runtime-context-reminders/guide.zh.md +19 -0
  95. package/kb/extra/upgrade-guide/v0.2.2-rc.1/session-append-overloads/guide.md +17 -0
  96. package/kb/extra/upgrade-guide/v0.2.2-rc.1/session-append-overloads/guide.zh.md +17 -0
  97. package/kb/extra/upgrade-guide/v0.2.2-rc.1/subagent-interrupt-default/guide.md +27 -0
  98. package/kb/extra/upgrade-guide/v0.2.2-rc.1/subagent-interrupt-default/guide.zh.md +27 -0
  99. package/kb/extra/upgrade-guide/v0.2.2-rc.1/terminal-backend-cleanup-error/guide.md +20 -0
  100. package/kb/extra/upgrade-guide/v0.2.2-rc.1/terminal-backend-cleanup-error/guide.zh.md +20 -0
  101. package/kb/extra/upgrade-guide/v0.2.2-rc.1/terminal-bundle-sidebar-backend/guide.md +19 -0
  102. package/kb/extra/upgrade-guide/v0.2.2-rc.1/terminal-bundle-sidebar-backend/guide.zh.md +19 -0
  103. package/kb/extra/upgrade-guide/v0.2.2-rc.1/web-fetch-transport-error-codes/guide.md +18 -0
  104. package/kb/extra/upgrade-guide/v0.2.2-rc.1/web-fetch-transport-error-codes/guide.zh.md +18 -0
  105. package/kb/extra/upgrade-guide/v0.2.2-rc.1/web-search-billing/guide.md +41 -0
  106. package/kb/extra/upgrade-guide/v0.2.2-rc.1/web-search-billing/guide.zh.md +41 -0
  107. package/kb/extra/upgrade-guide/v0.2.2-rc.1/window-drag-regions/guide.md +21 -0
  108. package/kb/extra/upgrade-guide/v0.2.2-rc.1/window-drag-regions/guide.zh.md +21 -0
  109. package/kb/extra/upgrade-guide/v0.2.2-rc.2/client-module-metadata/guide.md +29 -0
  110. package/kb/extra/upgrade-guide/v0.2.2-rc.2/client-module-metadata/guide.zh.md +29 -0
  111. package/kb/extra/upgrade-guide/v0.2.2-rc.2/connection-page-peer/guide.md +25 -0
  112. package/kb/extra/upgrade-guide/v0.2.2-rc.2/connection-page-peer/guide.zh.md +25 -0
  113. package/kb/extra/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.md +31 -0
  114. package/kb/extra/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.zh.md +31 -0
  115. package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-agents-without-preset/guide.md +24 -0
  116. package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-agents-without-preset/guide.zh.md +24 -0
  117. package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-macos-provider/guide.md +24 -0
  118. package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-macos-provider/guide.zh.md +24 -0
  119. package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.md +19 -0
  120. package/kb/extra/upgrade-guide/v0.2.2-rc.2/cua-partial-observations/guide.zh.md +19 -0
  121. package/kb/extra/upgrade-guide/v0.2.2-rc.2/deepseek-files-timeout/guide.md +15 -0
  122. package/kb/extra/upgrade-guide/v0.2.2-rc.2/deepseek-files-timeout/guide.zh.md +15 -0
  123. package/kb/extra/upgrade-guide/v0.2.2-rc.2/experimental-tool-error-codes/guide.md +28 -0
  124. package/kb/extra/upgrade-guide/v0.2.2-rc.2/experimental-tool-error-codes/guide.zh.md +28 -0
  125. package/kb/extra/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.md +36 -0
  126. package/kb/extra/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.zh.md +36 -0
  127. package/kb/extra/upgrade-guide/v0.2.2-rc.2/python-ptc-removal/guide.md +22 -0
  128. package/kb/extra/upgrade-guide/v0.2.2-rc.2/python-ptc-removal/guide.zh.md +22 -0
  129. package/kb/extra/upgrade-guide/v0.2.2-rc.2/session-status-package/guide.md +31 -0
  130. package/kb/extra/upgrade-guide/v0.2.2-rc.2/session-status-package/guide.zh.md +31 -0
  131. package/kb/extra/upgrade-guide/v0.2.2-rc.2/shared-search-filter/guide.md +18 -0
  132. package/kb/extra/upgrade-guide/v0.2.2-rc.2/shared-search-filter/guide.zh.md +18 -0
  133. package/kb/extra/upgrade-guide/v0.2.2-rc.2/shell-fs-tool-error-codes/guide.md +30 -0
  134. package/kb/extra/upgrade-guide/v0.2.2-rc.2/shell-fs-tool-error-codes/guide.zh.md +30 -0
  135. package/kb/extra/web-styling.md +57 -57
  136. package/kb/extra/web-styling.zh.md +57 -57
  137. package/kb/meta/search-index.json +4508 -3980
  138. package/kb/meta/source.json +18 -18
  139. package/kb/site/develop/practice/llm-adapter.md +192 -192
  140. package/kb/site/en/develop/practice/llm-adapter.md +192 -192
  141. package/kb/site/en/guide/desktop-uninstall-cleanup.md +63 -0
  142. package/kb/site/en/guide/plugin-market.md +153 -151
  143. package/kb/site/en/guide/providers.md +234 -234
  144. package/kb/site/en/guide/quickstart.md +35 -34
  145. package/kb/site/en/reference/capability-seams.md +789 -767
  146. package/kb/site/en/reference/config-catalog.md +5432 -5128
  147. package/kb/site/en/reference/cookbook/adding-a-package.md +175 -175
  148. package/kb/site/en/reference/cookbook/adding-a-tool.md +105 -104
  149. package/kb/site/en/reference/cookbook/extension-cookbook.md +178 -135
  150. package/kb/site/en/reference/cordis-api/context.md +373 -369
  151. package/kb/site/en/reference/cordis-api/fiber.md +457 -433
  152. package/kb/site/en/reference/cordis-api/inherited.md +44 -44
  153. package/kb/site/en/reference/cordis-api/service.md +118 -107
  154. package/kb/site/en/reference/experimental-persistence-catalog.md +36 -23
  155. package/kb/site/en/reference/index.md +174 -174
  156. package/kb/site/en/reference/persistence-catalog.md +9453 -9432
  157. package/kb/site/en/reference/subsystems/compaction.md +288 -288
  158. package/kb/site/en/reference/subsystems/core.md +1172 -1171
  159. package/kb/site/en/reference/subsystems/credentials.md +526 -497
  160. package/kb/site/en/reference/subsystems/filesystem.md +708 -708
  161. package/kb/site/en/reference/subsystems/index.md +82 -82
  162. package/kb/site/en/reference/subsystems/llm-streaming.md +1290 -1288
  163. package/kb/site/en/reference/subsystems/lsp.md +230 -206
  164. package/kb/site/en/reference/subsystems/persistence.md +451 -432
  165. package/kb/site/en/reference/subsystems/plan.md +91 -91
  166. package/kb/site/en/reference/subsystems/ptc-runtime.md +295 -261
  167. package/kb/site/en/reference/subsystems/sandbox.md +250 -232
  168. package/kb/site/en/reference/subsystems/session-query.md +525 -515
  169. package/kb/site/en/reference/subsystems/session-reference.md +231 -229
  170. package/kb/site/en/reference/subsystems/session.md +1478 -1431
  171. package/kb/site/en/reference/subsystems/sidebar-right.md +165 -165
  172. package/kb/site/en/reference/subsystems/skills.md +356 -356
  173. package/kb/site/en/reference/subsystems/slots.md +235 -231
  174. package/kb/site/en/reference/subsystems/terminal.md +188 -188
  175. package/kb/site/en/reference/subsystems/tools.md +902 -891
  176. package/kb/site/en/reference/subsystems/user-questions.md +330 -327
  177. package/kb/site/en/reference/subsystems/web-client.md +161 -104
  178. package/kb/site/en/reference/subsystems/web-server.md +434 -351
  179. package/kb/site/en/reference/subsystems/web.md +268 -268
  180. package/kb/site/en/reference/subsystems/workflow.md +287 -282
  181. package/kb/site/en/reference/subsystems/workspace.md +743 -651
  182. package/kb/site/en/reference/tool-catalog.md +2867 -2704
  183. package/kb/site/guide/desktop-uninstall-cleanup.md +63 -0
  184. package/kb/site/guide/plugin-market.md +153 -151
  185. package/kb/site/guide/providers.md +234 -234
  186. package/kb/site/guide/quickstart.md +35 -34
  187. package/kb/site/reference/capability-seams.md +789 -767
  188. package/kb/site/reference/config-catalog.md +5432 -5128
  189. package/kb/site/reference/cookbook/adding-a-package.md +175 -175
  190. package/kb/site/reference/cookbook/adding-a-tool.md +107 -106
  191. package/kb/site/reference/cookbook/extension-cookbook.md +182 -139
  192. package/kb/site/reference/cordis-api/context.md +373 -369
  193. package/kb/site/reference/cordis-api/fiber.md +459 -435
  194. package/kb/site/reference/cordis-api/inherited.md +44 -44
  195. package/kb/site/reference/cordis-api/service.md +118 -107
  196. package/kb/site/reference/experimental-persistence-catalog.md +36 -23
  197. package/kb/site/reference/index.md +178 -178
  198. package/kb/site/reference/persistence-catalog.md +9453 -9432
  199. package/kb/site/reference/subsystems/compaction.md +288 -288
  200. package/kb/site/reference/subsystems/core.md +1184 -1183
  201. package/kb/site/reference/subsystems/credentials.md +526 -497
  202. package/kb/site/reference/subsystems/filesystem.md +708 -708
  203. package/kb/site/reference/subsystems/index.md +82 -82
  204. package/kb/site/reference/subsystems/llm-streaming.md +1296 -1294
  205. package/kb/site/reference/subsystems/lsp.md +230 -206
  206. package/kb/site/reference/subsystems/persistence.md +451 -432
  207. package/kb/site/reference/subsystems/plan.md +91 -91
  208. package/kb/site/reference/subsystems/ptc-runtime.md +295 -261
  209. package/kb/site/reference/subsystems/sandbox.md +250 -232
  210. package/kb/site/reference/subsystems/session-query.md +525 -515
  211. package/kb/site/reference/subsystems/session-reference.md +231 -229
  212. package/kb/site/reference/subsystems/session.md +1482 -1435
  213. package/kb/site/reference/subsystems/sidebar-right.md +165 -165
  214. package/kb/site/reference/subsystems/skills.md +356 -356
  215. package/kb/site/reference/subsystems/slots.md +239 -235
  216. package/kb/site/reference/subsystems/terminal.md +188 -188
  217. package/kb/site/reference/subsystems/tools.md +902 -891
  218. package/kb/site/reference/subsystems/user-questions.md +330 -327
  219. package/kb/site/reference/subsystems/web-client.md +161 -104
  220. package/kb/site/reference/subsystems/web-server.md +434 -351
  221. package/kb/site/reference/subsystems/web.md +268 -268
  222. package/kb/site/reference/subsystems/workflow.md +287 -282
  223. package/kb/site/reference/subsystems/workspace.md +743 -651
  224. package/kb/site/reference/tool-catalog.md +2872 -2709
  225. package/lib/index.js +359 -359
  226. package/package.json +68 -68
  227. package/skills/dsh-plugin-dev-kb.md +71 -70
  228. package/kb/extra/subsystems/office-to-pdf.md +0 -87
  229. package/kb/extra/subsystems/office-to-pdf.zh.md +0 -87
@@ -1,369 +1,373 @@
1
- ---
2
- editSource: "docs/cordis-api/context.md"
3
- rawMarkdownPath: "en/reference/cordis-api/context.md"
4
- ---
5
-
6
- <!-- Generated by scripts/gen-cordis-catalog.ts — do not edit by hand.
7
- Run `pnpm run gen-cordis-catalog` to regenerate. -->
8
-
9
- # Context
10
-
11
- The context is the core Cordis object: every service, event, and lifecycle API is reached through `ctx`. Event methods are documented on [Events](./events.md), effects and the current fiber on [Fiber](./fiber.md), and plugin loading on [Registry](./registry.md).
12
-
13
- Root and child dependency containers for Cordis plugins.
14
-
15
- A context is a proxy: normal property reads go through the service resolver, while `extend()`, `isolate()`, and `intercept()` create scoped child contexts without mutating their parent.
16
-
17
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L42)
18
-
19
- ### ctx.extend(meta?)
20
-
21
- ```ts cordis-catalog
22
- /**
23
- * Create a child context with extra metadata on top of the current scope.
24
- *
25
- * The child prototypally inherits every property of this context; own
26
- * properties of `meta` shadow the inherited ones. The parent is not mutated.
27
- *
28
- * @param meta — own properties (including symbol keys) to define on the child.
29
- * @returns a child context inheriting from this one.
30
- */
31
- extend(meta = {}): this
32
- ```
33
-
34
- Create a child context with extra metadata on top of the current scope.
35
-
36
- The child prototypally inherits every property of this context; own properties of `meta` shadow the inherited ones. The parent is not mutated.
37
-
38
- - `meta` — own properties (including symbol keys) to define on the child.
39
-
40
- **Returns** a child context inheriting from this one.
41
-
42
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L99)
43
-
44
- ### ctx.isolate(name, label?)
45
-
46
- ```ts cordis-catalog
47
- /**
48
- * Create a child context with an independent service scope for `name`.
49
- *
50
- * Below the returned context, reads and writes of the service `name`
51
- * resolve against the new label instead of the parent's, so a different
52
- * implementation can be provided without affecting the parent scope.
53
- * Passing the same `label` to two `isolate()` calls joins their scopes.
54
- *
55
- * @param name — the service name to isolate.
56
- * @param label — scope label to join; defaults to a fresh unique symbol.
57
- * @returns a child context whose `name` service resolves in the new scope.
58
- */
59
- isolate(name: string, label?: symbol)
60
- ```
61
-
62
- Create a child context with an independent service scope for `name`.
63
-
64
- Below the returned context, reads and writes of the service `name` resolve against the new label instead of the parent's, so a different implementation can be provided without affecting the parent scope. Passing the same `label` to two `isolate()` calls joins their scopes.
65
-
66
- - `name` — the service name to isolate.
67
- - `label` — scope label to join; defaults to a fresh unique symbol.
68
-
69
- **Returns** a child context whose `name` service resolves in the new scope.
70
-
71
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L121)
72
-
73
- ### ctx.intercept(name, config)
74
-
75
- ```ts cordis-catalog
76
- /**
77
- * Add service-specific intercept config for plugins started below this
78
- * context.
79
- *
80
- * Plugins loaded under the returned context see `config` merged into the
81
- * service's resolved config (ancestor entries first; see
82
- * `Service[symbols.resolveConfig]`). The parent context is not affected.
83
- *
84
- * @param name — the service name whose config to intercept.
85
- * @param config — the intercept config to merge for that service.
86
- * @returns a child context carrying the additional intercept entry.
87
- */
88
- intercept<K extends InjectKey>(name: K, config: Context[K] extends { [symbols.config]: infer T } ? T : never): this
89
- intercept(name: string, config: any): this
90
- ```
91
-
92
- Add service-specific intercept config for plugins started below this context.
93
-
94
- Plugins loaded under the returned context see `config` merged into the service's resolved config (ancestor entries first; see `Service[symbols.resolveConfig]`). The parent context is not affected.
95
-
96
- - `name` — the service name whose config to intercept.
97
- - `config` — the intercept config to merge for that service.
98
-
99
- **Returns** a child context carrying the additional intercept entry.
100
-
101
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L139)
102
-
103
- ### ctx.root
104
-
105
- ```ts cordis-catalog
106
- /** The root context of the application (every child context shares it). @experimental */
107
- root: this
108
- ```
109
-
110
- The root context of the application (every child context shares it). @experimental
111
-
112
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L22)
113
-
114
- ### ctx.baseUrl
115
-
116
- ```ts cordis-catalog
117
- /** Base URL used to resolve relative plugin/module specifiers, if the runtime sets one. */
118
- baseUrl?: string | undefined
119
- ```
120
-
121
- Base URL used to resolve relative plugin/module specifiers, if the runtime sets one.
122
-
123
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L24)
124
-
125
- ### ctx.events
126
-
127
- ```ts cordis-catalog
128
- /** The event bus. Its methods are also mixed onto `ctx` (`ctx.on`, `ctx.emit`, ...). */
129
- events: EventsService
130
- ```
131
-
132
- The event bus. Its methods are also mixed onto `ctx` (`ctx.on`, `ctx.emit`, ...).
133
-
134
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L26)
135
-
136
- ### ctx.logger
137
-
138
- ```ts cordis-catalog
139
- /** The logging service. Call `ctx.logger(name)` for a named logger. */
140
- logger: LoggerService
141
- ```
142
-
143
- The logging service. Call `ctx.logger(name)` for a named logger.
144
-
145
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L28)
146
-
147
- ### ctx.reflect
148
-
149
- ```ts cordis-catalog
150
- /** The reflection layer backing the context proxy (`ctx.get`, `ctx.provide`, ...). */
151
- reflect: ReflectService
152
- ```
153
-
154
- The reflection layer backing the context proxy (`ctx.get`, `ctx.provide`, ...).
155
-
156
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L30)
157
-
158
- ### ctx.registry
159
-
160
- ```ts cordis-catalog
161
- /** The plugin registry. Its methods are mixed onto `ctx` (`ctx.plugin`, `ctx.inject`). */
162
- registry: RegistryService
163
- ```
164
-
165
- The plugin registry. Its methods are mixed onto `ctx` (`ctx.plugin`, `ctx.inject`).
166
-
167
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L32)
168
-
169
- ## Static members
170
-
171
- ### Context.effect
172
-
173
- ```ts cordis-catalog
174
- /** Symbol key under which a disposer exposes its {@link EffectMeta} diagnostics tree. */
175
- static readonly effect: unique symbol
176
- ```
177
-
178
- Symbol key under which a disposer exposes its EffectMeta diagnostics tree.
179
-
180
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L44)
181
-
182
- ### Context.filter
183
-
184
- ```ts cordis-catalog
185
- /** Symbol key for a context's listener filter, consulted on every event dispatch. */
186
- static readonly filter: unique symbol
187
- ```
188
-
189
- Symbol key for a context's listener filter, consulted on every event dispatch.
190
-
191
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L46)
192
-
193
- ### Context.isolate
194
-
195
- ```ts cordis-catalog
196
- /** Symbol key of the isolation map (see the `Context[symbols.isolate]` property). */
197
- static readonly isolate: unique symbol
198
- ```
199
-
200
- Symbol key of the isolation map (see the `Context[symbols.isolate]` property).
201
-
202
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L48)
203
-
204
- ### Context.intercept
205
-
206
- ```ts cordis-catalog
207
- /** Symbol key of the intercept map (see the `Context[symbols.intercept]` property). */
208
- static readonly intercept: unique symbol
209
- ```
210
-
211
- Symbol key of the intercept map (see the `Context[symbols.intercept]` property).
212
-
213
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L50)
214
-
215
- ### Context.is(value)
216
-
217
- ```ts cordis-catalog
218
- /**
219
- * Returns true for Cordis context proxies and context prototypes.
220
- *
221
- * Works across realms and across multiple copies of cordis, because the
222
- * brand is keyed by a global symbol rather than by `instanceof`.
223
- *
224
- * @param value — the value to test.
225
- * @returns `true` if `value` is a Cordis context, narrowing its type.
226
- */
227
- static is(value: any): value is Context
228
- ```
229
-
230
- Returns true for Cordis context proxies and context prototypes.
231
-
232
- Works across realms and across multiple copies of cordis, because the brand is keyed by a global symbol rather than by `instanceof`.
233
-
234
- - `value` — the value to test.
235
-
236
- **Returns** `true` if `value` is a Cordis context, narrowing its type.
237
-
238
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L61)
239
-
240
- ## Service store and mixins
241
-
242
- ### ctx.get(name, strict?)
243
-
244
- ```ts cordis-catalog
245
- /**
246
- * Read a service from the store without the inject requirement.
247
- *
248
- * @param name — the service name.
249
- * @param strict — when `true` (default), only return implementations
250
- * whose providing fiber is currently active.
251
- * @returns the service value, or `undefined` when not (yet) provided.
252
- */
253
- get<K extends string & keyof this>(name: K, strict?: boolean): undefined | this[K]
254
- get(name: string, strict?: boolean): any
255
- ```
256
-
257
- Read a service from the store without the inject requirement.
258
-
259
- - `name` — the service name.
260
- - `strict` — when `true` (default), only return implementations whose providing fiber is currently active.
261
-
262
- **Returns** the service value, or `undefined` when not (yet) provided.
263
-
264
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L17)
265
-
266
- ### ctx.set(name, value)
267
-
268
- ```ts cordis-catalog
269
- /**
270
- * Overwrite a provided service's value.
271
- *
272
- * Only the fiber that provided the service may set it; setting an
273
- * unprovided name throws.
274
- *
275
- * @param name — the service name.
276
- * @param value — the new service value.
277
- */
278
- set<K extends string & keyof this>(name: K, value: undefined | this[K]): void
279
- set(name: string, value: any): void
280
- ```
281
-
282
- Overwrite a provided service's value.
283
-
284
- Only the fiber that provided the service may set it; setting an unprovided name throws.
285
-
286
- - `name` — the service name.
287
- - `value` — the new service value.
288
-
289
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L29)
290
-
291
- ### ctx.provide(name, value)
292
-
293
- ```ts cordis-catalog
294
- /**
295
- * Register a service implementation owned by the current fiber.
296
- *
297
- * The service becomes visible to dependents in the same isolation scope
298
- * once the fiber is active; it is unregistered (waking dependents) when
299
- * the returned disposer runs or the fiber unloads. Throws if the name is
300
- * already provided in this scope or declared as an accessor.
301
- *
302
- * @param name — the service name.
303
- * @param value — the service value.
304
- * @returns a disposer that unregisters the service.
305
- */
306
- provide<K extends string & keyof this>(name: K, value: undefined | this[K]): () => void
307
- provide(name: string, value?: any): () => void
308
- ```
309
-
310
- Register a service implementation owned by the current fiber.
311
-
312
- The service becomes visible to dependents in the same isolation scope once the fiber is active; it is unregistered (waking dependents) when the returned disposer runs or the fiber unloads. Throws if the name is already provided in this scope or declared as an accessor.
313
-
314
- - `name` — the service name.
315
- - `value` — the service value.
316
-
317
- **Returns** a disposer that unregisters the service.
318
-
319
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L44)
320
-
321
- ### ctx.accessor(name, options)
322
-
323
- ```ts cordis-catalog
324
- /**
325
- * Define a computed context property backed by get/set hooks.
326
- *
327
- * The accessor is removed when the current fiber unloads. Throws if the
328
- * name is already declared.
329
- *
330
- * @param name — the context property name.
331
- * @param options — the `get` hook and optional `set` hook.
332
- */
333
- accessor(name: string, options: Omit<Property.Accessor, 'type'>): void
334
- ```
335
-
336
- Define a computed context property backed by get/set hooks.
337
-
338
- The accessor is removed when the current fiber unloads. Throws if the name is already declared.
339
-
340
- - `name` — the context property name.
341
- - `options` — the `get` hook and optional `set` hook.
342
-
343
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L56)
344
-
345
- ### ctx.mixin(name, mixins)
346
-
347
- ```ts cordis-catalog
348
- /**
349
- * Expose selected members of a service directly on `ctx`.
350
- *
351
- * Each mixed-in key becomes an accessor that forwards to the service
352
- * (binding methods to it), so e.g. `ctx.on` forwards to `ctx.events.on`.
353
- * Mixins are removed when the current fiber unloads.
354
- *
355
- * @param name — the context property holding the source service.
356
- * @param mixins — keys to forward, or a source-key → ctx-key map.
357
- */
358
- mixin<K extends string & keyof this>(name: K, mixins: (keyof this & keyof this[K])[] | Dict<string>): void
359
- mixin<T extends {}>(source: T, mixins: (keyof this & keyof T)[] | Dict<string>): void
360
- ```
361
-
362
- Expose selected members of a service directly on `ctx`.
363
-
364
- Each mixed-in key becomes an accessor that forwards to the service (binding methods to it), so e.g. `ctx.on` forwards to `ctx.events.on`. Mixins are removed when the current fiber unloads.
365
-
366
- - `name` — the context property holding the source service.
367
- - `mixins` — keys to forward, or a source-key → ctx-key map.
368
-
369
- [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L67)
1
+ ---
2
+ editSource: "docs/cordis-api/context.md"
3
+ rawMarkdownPath: "en/reference/cordis-api/context.md"
4
+ ---
5
+
6
+ <!-- Generated by scripts/gen-cordis-catalog.ts — do not edit by hand.
7
+ Run `pnpm run gen-cordis-catalog` to regenerate. -->
8
+
9
+ # Context
10
+
11
+ The context is the core Cordis object: every service, event, and lifecycle API is reached through `ctx`. Event methods are documented on [Events](./events.md), effects and the current fiber on [Fiber](./fiber.md), and plugin loading on [Registry](./registry.md).
12
+
13
+ Root and child dependency containers for Cordis plugins.
14
+
15
+ A context is a proxy: normal property reads go through the service resolver, while `extend()`, `isolate()`, and `intercept()` create scoped child contexts without mutating their parent.
16
+
17
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L42)
18
+
19
+ ### ctx.extend(meta?)
20
+
21
+ ```ts cordis-catalog
22
+ /**
23
+ * Create a child context with extra metadata on top of the current scope.
24
+ *
25
+ * The child prototypally inherits every property of this context; own
26
+ * properties of `meta` shadow the inherited ones. The parent is not mutated.
27
+ *
28
+ * @param meta — own properties (including symbol keys) to define on the child.
29
+ * @returns a child context inheriting from this one.
30
+ */
31
+ extend(meta = {}): this
32
+ ```
33
+
34
+ Create a child context with extra metadata on top of the current scope.
35
+
36
+ The child prototypally inherits every property of this context; own properties of `meta` shadow the inherited ones. The parent is not mutated.
37
+
38
+ - `meta` — own properties (including symbol keys) to define on the child.
39
+
40
+ **Returns** a child context inheriting from this one.
41
+
42
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L101)
43
+
44
+ ### ctx.isolate(name, label?)
45
+
46
+ ```ts cordis-catalog
47
+ /**
48
+ * Create a child context with an independent service scope for `name`.
49
+ *
50
+ * Below the returned context, reads and writes of the service `name`
51
+ * resolve against the new label instead of the parent's, so a different
52
+ * implementation can be provided without affecting the parent scope.
53
+ * Passing the same `label` to two `isolate()` calls joins their scopes.
54
+ * The returned context and plugins started below it never fall back to the
55
+ * enclosing plugin's injected `name`, even when `label` equals the parent's
56
+ * label; until a provider in the new scope supplies `name`, reading it throws.
57
+ *
58
+ * @param name — the service name to isolate.
59
+ * @param label — scope label to join; defaults to a fresh unique symbol.
60
+ * @returns a child context whose `name` service resolves in the new scope.
61
+ */
62
+ isolate(name: string, label?: symbol)
63
+ ```
64
+
65
+ Create a child context with an independent service scope for `name`.
66
+
67
+ Below the returned context, reads and writes of the service `name` resolve against the new label instead of the parent's, so a different implementation can be provided without affecting the parent scope. Passing the same `label` to two `isolate()` calls joins their scopes. The returned context and plugins started below it never fall back to the enclosing plugin's injected `name`, even when `label` equals the parent's label; until a provider in the new scope supplies `name`, reading it throws.
68
+
69
+ - `name` — the service name to isolate.
70
+ - `label` — scope label to join; defaults to a fresh unique symbol.
71
+
72
+ **Returns** a child context whose `name` service resolves in the new scope.
73
+
74
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L126)
75
+
76
+ ### ctx.intercept(name, config)
77
+
78
+ ```ts cordis-catalog
79
+ /**
80
+ * Add service-specific intercept metadata for plugins started below this
81
+ * context.
82
+ *
83
+ * Plugins loaded under the returned context see `config` merged into the
84
+ * service's resolved intercept metadata (injected metadata first, then
85
+ * ancestor intercepts; see `Service[symbols.resolveIntercept]`). The parent
86
+ * context is not affected.
87
+ *
88
+ * @param name — the service name whose metadata to intercept.
89
+ * @param config — the intercept metadata to merge for that service.
90
+ * @returns a child context carrying the additional intercept entry.
91
+ */
92
+ intercept<K extends InjectKey>(name: K, config: Context[K] extends { [symbols.metadata]: infer T } ? T : never): this
93
+ intercept(name: string, config: any): this
94
+ ```
95
+
96
+ Add service-specific intercept metadata for plugins started below this context.
97
+
98
+ Plugins loaded under the returned context see `config` merged into the service's resolved intercept metadata (injected metadata first, then ancestor intercepts; see `Service[symbols.resolveIntercept]`). The parent context is not affected.
99
+
100
+ - `name` — the service name whose metadata to intercept.
101
+ - `config` — the intercept metadata to merge for that service.
102
+
103
+ **Returns** a child context carrying the additional intercept entry.
104
+
105
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L145)
106
+
107
+ ### ctx.baseUrl
108
+
109
+ ```ts cordis-catalog
110
+ /** Base URL used to resolve relative plugin/module specifiers, if the runtime sets one. */
111
+ baseUrl?: string | undefined
112
+ ```
113
+
114
+ Base URL used to resolve relative plugin/module specifiers, if the runtime sets one.
115
+
116
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L24)
117
+
118
+ ### ctx.events
119
+
120
+ ```ts cordis-catalog
121
+ /** The event bus. Its methods are also mixed onto `ctx` (`ctx.on`, `ctx.emit`, ...). */
122
+ events: EventsService
123
+ ```
124
+
125
+ The event bus. Its methods are also mixed onto `ctx` (`ctx.on`, `ctx.emit`, ...).
126
+
127
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L26)
128
+
129
+ ### ctx.logger
130
+
131
+ ```ts cordis-catalog
132
+ /** The logging service. Call `ctx.logger(name)` for a named logger. */
133
+ logger: LoggerService
134
+ ```
135
+
136
+ The logging service. Call `ctx.logger(name)` for a named logger.
137
+
138
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L28)
139
+
140
+ ### ctx.reflect
141
+
142
+ ```ts cordis-catalog
143
+ /** The reflection layer backing the context proxy (`ctx.get`, `ctx.provide`, ...). */
144
+ reflect: ReflectService
145
+ ```
146
+
147
+ The reflection layer backing the context proxy (`ctx.get`, `ctx.provide`, ...).
148
+
149
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L30)
150
+
151
+ ### ctx.registry
152
+
153
+ ```ts cordis-catalog
154
+ /** The plugin registry. Its methods are mixed onto `ctx` (`ctx.plugin`, `ctx.inject`). */
155
+ registry: RegistryService
156
+ ```
157
+
158
+ The plugin registry. Its methods are mixed onto `ctx` (`ctx.plugin`, `ctx.inject`).
159
+
160
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L32)
161
+
162
+ ## Static members
163
+
164
+ ### Context.root
165
+
166
+ ```ts cordis-catalog
167
+ /** Symbol key of the root context: `ctx[Context.root]` is the application's root context, shared by every child context. */
168
+ static readonly root: unique symbol
169
+ ```
170
+
171
+ Symbol key of the root context: `ctx[Context.root]` is the application's root context, shared by every child context.
172
+
173
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L44)
174
+
175
+ ### Context.effect
176
+
177
+ ```ts cordis-catalog
178
+ /** Symbol key under which a disposer exposes its {@link EffectMeta} diagnostics tree. */
179
+ static readonly effect: unique symbol
180
+ ```
181
+
182
+ Symbol key under which a disposer exposes its EffectMeta diagnostics tree.
183
+
184
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L46)
185
+
186
+ ### Context.filter
187
+
188
+ ```ts cordis-catalog
189
+ /** Symbol key for a context's listener filter, consulted on every event dispatch. */
190
+ static readonly filter: unique symbol
191
+ ```
192
+
193
+ Symbol key for a context's listener filter, consulted on every event dispatch.
194
+
195
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L48)
196
+
197
+ ### Context.isolate
198
+
199
+ ```ts cordis-catalog
200
+ /** Symbol key of the isolation map: `ctx[Context.isolate]` maps each service name to its scope label. */
201
+ static readonly isolate: unique symbol
202
+ ```
203
+
204
+ Symbol key of the isolation map: `ctx[Context.isolate]` maps each service name to its scope label.
205
+
206
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L50)
207
+
208
+ ### Context.intercept
209
+
210
+ ```ts cordis-catalog
211
+ /** Symbol key of the intercept map: `ctx[Context.intercept]` maps each service name to its intercept metadata. */
212
+ static readonly intercept: unique symbol
213
+ ```
214
+
215
+ Symbol key of the intercept map: `ctx[Context.intercept]` maps each service name to its intercept metadata.
216
+
217
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L52)
218
+
219
+ ### Context.is(value)
220
+
221
+ ```ts cordis-catalog
222
+ /**
223
+ * Returns true for Cordis context proxies and context prototypes.
224
+ *
225
+ * Works across realms and across multiple copies of cordis, because the
226
+ * brand is keyed by a global symbol rather than by `instanceof`.
227
+ *
228
+ * @param value — the value to test.
229
+ * @returns `true` if `value` is a Cordis context, narrowing its type.
230
+ */
231
+ static is(value: any): value is Context
232
+ ```
233
+
234
+ Returns true for Cordis context proxies and context prototypes.
235
+
236
+ Works across realms and across multiple copies of cordis, because the brand is keyed by a global symbol rather than by `instanceof`.
237
+
238
+ - `value` — the value to test.
239
+
240
+ **Returns** `true` if `value` is a Cordis context, narrowing its type.
241
+
242
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/context.ts#L63)
243
+
244
+ ## Service store and mixins
245
+
246
+ ### ctx.get(name, strict?)
247
+
248
+ ```ts cordis-catalog
249
+ /**
250
+ * Read a service from the store without the inject requirement.
251
+ *
252
+ * @param name — the service name.
253
+ * @param strict — when `true` (default), only return implementations
254
+ * whose providing fiber is currently active.
255
+ * @returns the service value, or `undefined` when not (yet) provided.
256
+ */
257
+ get<K extends string & keyof this>(name: K, strict?: boolean): undefined | this[K]
258
+ get(name: string, strict?: boolean): any
259
+ ```
260
+
261
+ Read a service from the store without the inject requirement.
262
+
263
+ - `name` — the service name.
264
+ - `strict` — when `true` (default), only return implementations whose providing fiber is currently active.
265
+
266
+ **Returns** the service value, or `undefined` when not (yet) provided.
267
+
268
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L17)
269
+
270
+ ### ctx.set(name, value)
271
+
272
+ ```ts cordis-catalog
273
+ /**
274
+ * Overwrite a provided service's value.
275
+ *
276
+ * Only the fiber that provided the service may set it; setting an
277
+ * unprovided name throws.
278
+ *
279
+ * @param name — the service name.
280
+ * @param value — the new service value.
281
+ */
282
+ set<K extends string & keyof this>(name: K, value: undefined | this[K]): void
283
+ set(name: string, value: any): void
284
+ ```
285
+
286
+ Overwrite a provided service's value.
287
+
288
+ Only the fiber that provided the service may set it; setting an unprovided name throws.
289
+
290
+ - `name` — the service name.
291
+ - `value` — the new service value.
292
+
293
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L29)
294
+
295
+ ### ctx.provide(name, value)
296
+
297
+ ```ts cordis-catalog
298
+ /**
299
+ * Register a service implementation owned by the current fiber.
300
+ *
301
+ * The service becomes visible to dependents in the same isolation scope
302
+ * once the fiber is active; it is unregistered (waking dependents) when
303
+ * the returned disposer runs or the fiber unloads. Throws if the name is
304
+ * already provided in this scope or declared as an accessor.
305
+ *
306
+ * @param name — the service name.
307
+ * @param value — the service value.
308
+ * @returns a disposer that unregisters the service.
309
+ */
310
+ provide<K extends string & keyof this>(name: K, value: undefined | this[K]): () => void
311
+ provide(name: string, value?: any): () => void
312
+ ```
313
+
314
+ Register a service implementation owned by the current fiber.
315
+
316
+ The service becomes visible to dependents in the same isolation scope once the fiber is active; it is unregistered (waking dependents) when the returned disposer runs or the fiber unloads. Throws if the name is already provided in this scope or declared as an accessor.
317
+
318
+ - `name` — the service name.
319
+ - `value` — the service value.
320
+
321
+ **Returns** a disposer that unregisters the service.
322
+
323
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L44)
324
+
325
+ ### ctx.accessor(name, options)
326
+
327
+ ```ts cordis-catalog
328
+ /**
329
+ * Define a computed context property backed by get/set hooks.
330
+ *
331
+ * The accessor is removed when the current fiber unloads. Throws if the
332
+ * name is already declared.
333
+ *
334
+ * @param name — the context property name.
335
+ * @param options — the `get` hook and optional `set` hook.
336
+ */
337
+ accessor(name: string, options: Omit<Property.Accessor, 'type'>): void
338
+ ```
339
+
340
+ Define a computed context property backed by get/set hooks.
341
+
342
+ The accessor is removed when the current fiber unloads. Throws if the name is already declared.
343
+
344
+ - `name` — the context property name.
345
+ - `options` — the `get` hook and optional `set` hook.
346
+
347
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L56)
348
+
349
+ ### ctx.mixin(name, mixins)
350
+
351
+ ```ts cordis-catalog
352
+ /**
353
+ * Expose selected members of a service directly on `ctx`.
354
+ *
355
+ * Each mixed-in key becomes an accessor that forwards to the service
356
+ * (binding methods to it), so e.g. `ctx.on` forwards to `ctx.events.on`.
357
+ * Mixins are removed when the current fiber unloads.
358
+ *
359
+ * @param name — the context property holding the source service.
360
+ * @param mixins — keys to forward, or a source-key → ctx-key map.
361
+ */
362
+ mixin<K extends string & keyof this>(name: K, mixins: (keyof this & keyof this[K])[] | Dict<string>): void
363
+ mixin<T extends {}>(source: T, mixins: (keyof this & keyof T)[] | Dict<string>): void
364
+ ```
365
+
366
+ Expose selected members of a service directly on `ctx`.
367
+
368
+ Each mixed-in key becomes an accessor that forwards to the service (binding methods to it), so e.g. `ctx.on` forwards to `ctx.events.on`. Mixins are removed when the current fiber unloads.
369
+
370
+ - `name` — the context property holding the source service.
371
+ - `mixins` — keys to forward, or a source-key → ctx-key map.
372
+
373
+ [Source](https://github.com/deepseek-ai/deepseek-harness/blob/master/vendor/cordis/src/reflect.ts#L67)