Merge remote-tracking branch 'origin/master' into worktree/docs-website

# Conflicts:
#	docs/user/develop/basic/config.zh.md
#	docs/user/develop/basic/index.zh.md
#	docs/user/develop/basic/tool.zh.md
#	docs/user/develop/framework/index.zh.md
#	docs/user/develop/framework/service.zh.md
#	docs/user/develop/practice/index.zh.md
#	docs/user/guide/index.zh.md
#	package.json
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
#	website/.vitepress/config/index.ts
#	website/.vitepress/config/zh-CN.ts
#	website/package.json
#	website/zh-CN/api/cordis/context.md
#	website/zh-CN/api/cordis/events.md
#	website/zh-CN/api/cordis/fiber.md
#	website/zh-CN/api/cordis/registry.md
#	website/zh-CN/api/cordis/service.md
#	website/zh-CN/api/harness/bash.md
#	website/zh-CN/api/harness/fs.md
#	website/zh-CN/api/harness/llm.md
#	website/zh-CN/api/harness/tools.md
#	website/zh-CN/api/index.md
#	website/zh-CN/design/composability.md
#	website/zh-CN/design/context-model.md
#	website/zh-CN/design/reactive-coeffects.md
#	website/zh-CN/design/revertible-effects.md
#	website/zh-CN/develop/framework/events.md
#	website/zh-CN/develop/practice/llm-adapter.md
#	website/zh-CN/guide/config.md
This commit is contained in:
Yichen Jiang
2026-07-18 21:35:06 +08:00
872 changed files with 49886 additions and 12091 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
index.md: bb08e7cb3f9d3a094100806451fd33d1482003cb
index.zh.md: 4b9d6d22c8d82bece67c71032a0028b21939f98f
index.md: 79e925b54509da41535735527e283850384257ec
index.zh.md: 62be8c706510704f7b07286f166f14fa81235a0a

View File

@@ -79,11 +79,16 @@ export function apply(ctx: Context) {
To stop a plugin instance early:
```ts ignore-check
```ts
import type { Context } from 'cordis'
declare const ctx: Context
declare function myPlugin(ctx: Context): void
const fiber = ctx.plugin(myPlugin)
// Dispose it manually later.
fiber.dispose()
await fiber.dispose()
```
`dispose` guarantees:

View File

@@ -79,11 +79,16 @@ export function apply(ctx: Context) {
当你需要提前终止一个插件实例:
```ts ignore-check
```ts
import type { Context } from 'cordis'
declare const ctx: Context
declare function myPlugin(ctx: Context): void
const fiber = ctx.plugin(myPlugin)
// Dispose it manually later.
fiber.dispose()
await fiber.dispose()
```
`dispose` 保证: