Merge master into compact-tool-result-prune

This commit is contained in:
Tianyi Cui
2026-07-20 16:41:59 +08:00
807 changed files with 15501 additions and 3177 deletions

View File

@@ -66,6 +66,10 @@
"text": "ctx.sandbox",
"link": "/zh-CN/api/harness/sandbox"
},
{
"text": "ctx.sandboxPolicy",
"link": "/zh-CN/api/harness/sandbox-policy"
},
{
"text": "ctx.sessionPersistence",
"link": "/zh-CN/api/harness/session-persistence"

View File

@@ -6,7 +6,7 @@
Registry (`ctx.bashEnv`) for trusted, per-execution `DSH_*` variables. The namespace is rebuilt for every model bash call: ambient `DSH_*` values are discarded by the executor, then the registry's current snapshot is injected. Built-in shell facts remain owned by the registry itself while plugins can register additional, enumerable facts with effect-scoped disposal.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/tool-bash/src/index.ts#L102)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/tool-bash/src/index.ts#L103)
### ctx.bashEnv.register(contributor)
@@ -26,7 +26,7 @@ Register one environment contributor. Names and keys are unique; built-in keys a
**Returns** the disposer that unregisters the contribution.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/tool-bash/src/index.ts#L123)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/tool-bash/src/index.ts#L124)
### ctx.bashEnv.collect(execution)
@@ -45,7 +45,7 @@ Build the trusted `DSH_*` snapshot for one bash tool execution.
**Returns** an immutable environment overlay containing built-ins and current contributions.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/tool-bash/src/index.ts#L165)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/tool-bash/src/index.ts#L166)
### ctx.bashEnv.list()
@@ -61,4 +61,4 @@ Enumerate plugin-contributed variables without executing their resolvers.
**Returns** declarations sorted by environment variable name.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/tool-bash/src/index.ts#L197)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/tool-bash/src/index.ts#L198)

View File

@@ -11,7 +11,7 @@ Implementations must honor these semantics:
- BashProcess.readOutput is incremental: consecutive reads never repeat output. Lossy reads report truncation and available spill files.
- Disposal kills all running background processes and awaits their exit.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L49)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L48)
### ctx.bash.sandboxMode
@@ -26,7 +26,7 @@ get sandboxMode(): SandboxMode | undefined
The sandbox mode this executor applies by default, or `undefined` when it does not sandbox commands.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L59)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L58)
### ctx.bash.resolve(request)
@@ -46,7 +46,7 @@ Apply implementation-owned defaults and caps to a request before execution.
**Returns** the fully-specified spec to hand to `run`/`start`.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L69)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L68)
### ctx.bash.run(spec)
@@ -66,7 +66,7 @@ Run a command in the foreground; resolves when it finishes.
**Returns** the outcome; nonzero exits, timeout kills, and abort kills resolve with a descriptive result rather than reject.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L77)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L76)
### ctx.bash.start(spec)
@@ -85,4 +85,4 @@ Start a background process and return its handle immediately.
**Returns** the live process handle (reads, kill, quiescence promise).
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L84)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/bash/bash/src/index.ts#L83)

View File

@@ -470,7 +470,7 @@ Single-slot decision for the next FileSystem.editText. Calling `next()` yields a
- `target` — the resolved target about to be edited.
- `actor` — the opaque tool-execution context the decider keys off.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L61)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L62)
### fs/observed
@@ -494,7 +494,7 @@ Record a successful observation. Listeners must be synchronous recorders: throws
- `version` — the version the actor now holds as its observation.
- `actor` — the observing tool-execution context; undefined records nothing useful.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L70)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L71)
### fs/write-intent
@@ -517,7 +517,7 @@ Single-slot decision for the next FileSystem.writeText. Calling `next()` yields
- `target` — the resolved target about to be written.
- `actor` — the opaque tool-execution context the decider keys off.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L53)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L54)
## llm/*
@@ -532,7 +532,7 @@ Single-slot decision for the next FileSystem.writeText. Calling `next()` yields
* adapter's stream, or yield your own chunks to short-circuit.
* @param options - the full request. A LOOP-built request arrives
* deep-frozen (mutation throws): its content is a pure function of the
* session log (the reconstructability RFC), so listeners read it, never
* session log (the reconstructability Agent Note), so listeners read it, never
* rewrite it. A hand-built one-shot (compaction summarize) is the
* caller's own object and stays mutable here.
* @mode waterfall
@@ -542,7 +542,7 @@ Single-slot decision for the next FileSystem.writeText. Calling `next()` yields
Waterfall around every streaming model call (retry, replay, routing). Bound to the LlmService; call `next()` to reach the resolved adapter's stream, or yield your own chunks to short-circuit.
- `options` — the full request. A LOOP-built request arrives deep-frozen (mutation throws): its content is a pure function of the session log (the reconstructability RFC), so listeners read it, never rewrite it. A hand-built one-shot (compaction summarize) is the caller's own object and stays mutable here.
- `options` — the full request. A LOOP-built request arrives deep-frozen (mutation throws): its content is a pure function of the session log (the reconstructability Agent Note), so listeners read it, never rewrite it. A hand-built one-shot (compaction summarize) is the caller's own object and stays mutable here.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/llm/llm/src/index.ts#L43)

View File

@@ -6,7 +6,30 @@
Abstract filesystem provider. Targets must preserve identity across aliases; reads expose regular UTF-8 text or typed errors, listings are stable and content-free, and mutations are atomic. Optional guards add stale protection without changing the unguarded provider contract.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L80)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L81)
### ctx.fs.sandboxMode
```ts website-api
/**
/**
* The sandbox mode this backend enforces on mutations BY DEFAULT, or
* `undefined` when it does not confine at all — the capability fact the tool
* layer reads to advertise the escalation fields honestly (mirrors
* `BashExecutor.sandboxMode`). The base class and the bare local backend
* report `undefined`; a sandboxing backend (`@deepseek-ai/dsh-fs-sandbox`)
* overrides it with the deployment default. A session override may make the
* effective mode narrower or wider, so strict escalation widening is checked
* per call rather than encoded in this default-relative fact.
* @returns the configured default mode of a sandboxing backend; `undefined`
* for a backend that never confines.
*/
get sandboxMode(): SandboxMode | undefined
```
/** The sandbox mode this backend enforces on mutations BY DEFAULT, or `undefined` when it does not confine at all — the capability fact the tool layer reads to advertise the escalation fields honestly (mirrors `BashExecutor.sandboxMode`). The base class and the bare local backend report `undefined`; a sandboxing backend (`@deepseek-ai/dsh-fs-sandbox`) overrides it with the deployment default. A session override may make the effective mode narrower or wider, so strict escalation widening is checked per call rather than encoded in this default-relative fact.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L99)
### ctx.fs.resolve(path, opts?)
@@ -30,7 +53,7 @@ Resolve a model/plugin-supplied path into a stable FsTarget. May perform I/O (a
**Returns** the stable target; the same file yields the same `targetKey`.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L94)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L112)
### ctx.fs.stat(target, signal?)
@@ -51,7 +74,7 @@ Return target metadata, or `undefined` when the target does not exist.
**Returns** metadata only, never content; undefined for an absent target.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L102)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L120)
### ctx.fs.lstat(path, opts?, signal?)
@@ -82,7 +105,7 @@ Return path metadata without following the final path component when it is a sym
**Returns** metadata only, never content; undefined for an absent path.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L118)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L136)
### ctx.fs.readText(target, signal?)
@@ -103,7 +126,7 @@ Read the whole regular text file as a single decoded string.
**Returns** the full decoded UTF-8 content.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L126)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L144)
### ctx.fs.streamText(target, signal?)
@@ -127,7 +150,7 @@ Stream the whole regular text file as decoded text chunks (same text semantics a
**Returns** the chunk iterable, decoded and validated like `readText`.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L137)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L155)
### ctx.fs.listDir(target, signal?)
@@ -149,9 +172,9 @@ List direct children of a directory in stable name order. Returns resolved child
**Returns** one entry per direct child, in stable name order.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L146)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L164)
### ctx.fs.writeText(target, content, expected?, signal?)
### ctx.fs.writeText(target, content, expected?, signal?, sandboxMode?)
```ts website-api
/**
@@ -161,9 +184,12 @@ List direct children of a directory in stable name order. Returns resolved child
* @param content - the full new file content.
* @param expected - the write intent guarding the write; omit for unconditional.
* @param signal - aborts before the atomic rename takes effect.
* @param sandboxMode - the per-call sandbox mode this write runs under; a
* sandboxing backend fences the write by it, the bare backend ignores it.
* Omit to leave the backend its own default.
* @returns the outcome, including the version the write produced.
*/
abstract writeText(target: FsTarget, content: string, expected?: FsWriteIntent, signal?: AbortSignal): Promise<FsWriteOutcome>
abstract writeText( target: FsTarget, content: string, expected?: FsWriteIntent, signal?: AbortSignal, sandboxMode?: SandboxMode, ): Promise<FsWriteOutcome>
```
Atomically create or replace UTF-8 text. `expected` guards intent and staleness; omission allows unconditional overwrite.
@@ -172,12 +198,13 @@ Atomically create or replace UTF-8 text. `expected` guards intent and staleness;
- `content` — the full new file content.
- `expected` — the write intent guarding the write; omit for unconditional.
- `signal` — aborts before the atomic rename takes effect.
- `sandboxMode` — the per-call sandbox mode this write runs under; a sandboxing backend fences the write by it, the bare backend ignores it. Omit to leave the backend its own default.
**Returns** the outcome, including the version the write produced.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L157)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L178)
### ctx.fs.editText(target, edit, expected?, signal?)
### ctx.fs.editText(target, edit, expected?, signal?, sandboxMode?)
```ts website-api
/**
@@ -188,9 +215,12 @@ Atomically create or replace UTF-8 text. `expected` guards intent and staleness;
* @param edit - the literal search/replace request.
* @param expected - the version guard; omit for an unconditional edit.
* @param signal - aborts before the atomic rename takes effect.
* @param sandboxMode - the per-call sandbox mode this edit runs under; a
* sandboxing backend fences the edit by it, the bare backend ignores it.
* Omit to leave the backend its own default.
* @returns the outcome, including the version the edit produced.
*/
abstract editText(target: FsTarget, edit: FsEditRequest, expected?: { version: FsVersion }, signal?: AbortSignal): Promise<FsEditOutcome>
abstract editText( target: FsTarget, edit: FsEditRequest, expected?: { version: FsVersion }, signal?: AbortSignal, sandboxMode?: SandboxMode, ): Promise<FsEditOutcome>
```
Atomically edit literal text. When supplied, the version guard is checked before matching so stale content reports `FS_STALE_VERSION`; omission edits the current content without a freshness precondition.
@@ -199,7 +229,8 @@ Atomically edit literal text. When supplied, the version guard is checked before
- `edit` — the literal search/replace request.
- `expected` — the version guard; omit for an unconditional edit.
- `signal` — aborts before the atomic rename takes effect.
- `sandboxMode` — the per-call sandbox mode this edit runs under; a sandboxing backend fences the edit by it, the bare backend ignores it. Omit to leave the backend its own default.
**Returns** the outcome, including the version the edit produced.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L169)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/fs/fs/src/index.ts#L199)

View File

@@ -6,7 +6,7 @@
Owns the deployment's permission presets and their write path. Requires a confining `ctx.bash` executor and `ctx.approval`; unmatched knob values are reported as CUSTOM_PRESET, not an error.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L94)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L97)
### ctx.permission.names
@@ -20,7 +20,7 @@ get names(): readonly string[]
The advertised preset names, in the preset table's declaration order.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L134)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L137)
### ctx.permission.current(events)
@@ -41,7 +41,7 @@ Resolve the preset matching the effective knob values. A still-matching last sel
**Returns** the effective preset name, or `custom` when nothing matches.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L145)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L148)
### ctx.permission.resolve(name)
@@ -61,7 +61,7 @@ Resolve a preset's knob bundle.
**Returns** the configured bundle.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L166)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L169)
### ctx.permission.optionOf(name)
@@ -82,7 +82,7 @@ Build the client option for a table entry or CUSTOM_PRESET. A missing label fall
**Returns** the option a client renders.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L181)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L184)
### ctx.permission.set(session, name)
@@ -101,4 +101,4 @@ Record a changed preset, then update each changed knob through its own setter. S
- `session` — the session the switch belongs to.
- `name` — the preset to switch to; unknown names throw.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L195)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/ui/permission/src/index.ts#L198)

View File

@@ -0,0 +1,31 @@
<!-- Generated by scripts/gen-website-api.ts — do not edit by hand. Run `pnpm run gen-website-api` to regenerate. -->
# ctx.sandboxPolicy
`SandboxPolicyService` — provided by `@deepseek-ai/dsh-sandbox-policy`.
The sandbox-policy service (`ctx.sandboxPolicy`). Owns the deployment default mode and workspace root; enforcing implementations read defaultMode and workspaceRoot, and the tool layers fold each session's `sandbox/mode` override with effectiveSandboxMode on top.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/sandbox/sandbox-policy/src/index.ts#L60)
### ctx.sandboxPolicy.defaultMode
```ts website-api
/** The deployment default mode — the fallback beneath a session override. */
readonly defaultMode: SandboxMode
```
The deployment default mode — the fallback beneath a session override.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/sandbox/sandbox-policy/src/index.ts#L70)
### ctx.sandboxPolicy.workspaceRoot
```ts website-api
/** The absolute `workspace-write` boundary root both families fence against. */
readonly workspaceRoot: string
```
The absolute `workspace-write` boundary root both families fence against.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/sandbox/sandbox-policy/src/index.ts#L72)

View File

@@ -6,7 +6,7 @@
Abstract process-sandbox service. confine must return enforcing argv or fail closed at wrap or runner-execution time; silent unconfined passthrough is forbidden. Functional probes arbitrate multi-runner chains and may be skipped for a sole candidate, whose own refusal remains the fail-closed end.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/sandbox/sandbox/src/index.ts#L111)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/sandbox/sandbox/src/index.ts#L122)
### ctx.sandbox.confine(argv, policy)
@@ -32,4 +32,4 @@ Wrap `argv` so it executes confined under `policy` on this host; the caller spaw
**Returns** the argv to spawn instead, plus the enforcement completeness the selected backend achieves for it.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/sandbox/sandbox/src/index.ts#L127)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/sandbox/sandbox/src/index.ts#L138)

View File

@@ -6,38 +6,38 @@
Cordis 微内核提供的基础能力,所有插件开发都建立在这些 API 之上:
- [Context](./cordis/context) — 上下文对象,所有服务和方法的入口
- [Events](./cordis/events) — 事件系统 APIon / emit / bail / serial / waterfall
- [Fiber](./cordis/fiber) — 插件生命周期状态机、effect、dispose
- [Registry](./cordis/registry) — 插件注册plugin / inject
- [Service](./cordis/service) — 服务基类
- [Context](cordis/context) — 上下文对象,所有服务和方法的入口
- [Events](cordis/events) — 事件系统 APIon / emit / bail / serial / waterfall
- [Fiber](cordis/fiber) — 插件生命周期状态机、effect、dispose
- [Registry](cordis/registry) — 插件注册plugin / inject
- [Service](cordis/service) — 服务基类
## Harness API
每个 `ctx.*` 服务一页,按服务名索引:
- [ctx.agentLoop](./harness/agent-loop) — ReAct 循环的创建与恢复
- [ctx.agents](./harness/agents) — Agent 注册表与工厂
- [ctx.approval](./harness/approval) — 用户审批
- [ctx.bash](./harness/bash) — Bash 执行接口(抽象缝)
- [ctx.codeRuntime](./harness/code-runtime) — 代码执行接口(抽象缝)
- [ctx.compact](./harness/compact) — 上下文压缩接口(抽象缝)
- [ctx.fs](./harness/fs) — 文件系统接口(抽象缝)
- [ctx.llm](./harness/llm) — LLM 服务与适配器注册
- [ctx.permission](./harness/permission) — 权限策略
- [ctx.sandbox](./harness/sandbox) — 沙箱执行接口(抽象缝)
- [ctx.sessionPersistence](./harness/session-persistence) — 会话持久化接口(抽象缝)
- [ctx.sessionQuery](./harness/session-query) — 会话检索
- [ctx.sessions](./harness/sessions) — 会话存储
- [ctx.skills](./harness/skills) — 技能加载
- [ctx.subagents](./harness/subagents) — 子代理委派
- [ctx.systemPrompt](./harness/system-prompt) — 系统提示词组装
- [ctx.tasks](./harness/tasks) — 后台任务
- [ctx.tools](./harness/tools) — Tool 注册表
- [ctx.userInteraction](./harness/user-interaction) — 用户交互接口
- [ctx.web](./harness/web) — Web 搜索与抓取
- [ctx.workflows](./harness/workflows) — 动态工作流引擎(抽象缝)
- [ctx.agentLoop](harness/agent-loop) — ReAct 循环的创建与恢复
- [ctx.agents](harness/agents) — Agent 注册表与工厂
- [ctx.approval](harness/approval) — 用户审批
- [ctx.bash](harness/bash) — Bash 执行接口(抽象缝)
- [ctx.codeRuntime](harness/code-runtime) — 代码执行接口(抽象缝)
- [ctx.compact](harness/compact) — 上下文压缩接口(抽象缝)
- [ctx.fs](harness/fs) — 文件系统接口(抽象缝)
- [ctx.llm](harness/llm) — LLM 服务与适配器注册
- [ctx.permission](harness/permission) — 权限策略
- [ctx.sandbox](harness/sandbox) — 沙箱执行接口(抽象缝)
- [ctx.sessionPersistence](harness/session-persistence) — 会话持久化接口(抽象缝)
- [ctx.sessionQuery](harness/session-query) — 会话检索
- [ctx.sessions](harness/sessions) — 会话存储
- [ctx.skills](harness/skills) — 技能加载
- [ctx.subagents](harness/subagents) — 子代理委派
- [ctx.systemPrompt](harness/system-prompt) — 系统提示词组装
- [ctx.tasks](harness/tasks) — 后台任务
- [ctx.tools](harness/tools) — Tool 注册表
- [ctx.userInteraction](harness/user-interaction) — 用户交互接口
- [ctx.web](harness/web) — Web 搜索与抓取
- [ctx.workflows](harness/workflows) — 动态工作流引擎(抽象缝)
事件总表:[Harness events](./harness/events) — 全部事件按作用域分组,含触发模式与载荷签名。
事件总表:[Harness events](harness/events) — 全部事件按作用域分组,含触发模式与载荷签名。
想学"怎么写一个 tool / 插件"?教程在[开发指南](../develop/basic/);本节只做精确的接口参考。

View File

@@ -52,8 +52,8 @@ Cordis 选择了不同的路径——在运行时层面解决可组合性问题
这由两个互补机制实现:
- **[可逆作用](./revertible-effects)** — 将副作用形式化为可逆的群操作
- **[响应式余作用](./reactive-coeffects)** — 将依赖建模为具有生命周期的服务
- **[可逆作用](revertible-effects)** — 将副作用形式化为可逆的群操作
- **[响应式余作用](reactive-coeffects)** — 将依赖建模为具有生命周期的服务
## 在 Agent 开发中的意义

View File

@@ -16,11 +16,11 @@ Harness 追求三种可组合性的统一:
## 目录
- [可组合性与插件系统](./composability) — 组合的本质,以及传统插件系统为什么不可靠
- [作用与余作用](./effects-coeffects) — Cordis 效果系统的理论模型
- [可逆作用](./revertible-effects) — 时间可组合性的形式化定义与证明
- [响应式余作用](./reactive-coeffects) — 空间可组合性的服务语义
- [上下文模型](./context-model) — Context 如何将作用与余作用统一
- [可组合性与插件系统](composability) — 组合的本质,以及传统插件系统为什么不可靠
- [作用与余作用](effects-coeffects) — Cordis 效果系统的理论模型
- [可逆作用](revertible-effects) — 时间可组合性的形式化定义与证明
- [响应式余作用](reactive-coeffects) — 空间可组合性的服务语义
- [上下文模型](context-model) — Context 如何将作用与余作用统一
## 设计如何映射到 Harness

View File

@@ -159,5 +159,5 @@ export function apply(ctx: Context) {
## 下一步
- [开发一个 Tool](./tool) — 详细了解 tool 定义 DSL
- [插件配置](./config) — 让插件接受用户配置
- [开发一个 Tool](tool) — 详细了解 tool 定义 DSL
- [插件配置](config) — 让插件接受用户配置

View File

@@ -238,5 +238,5 @@ export function apply(ctx: Context) {
## 下一步
- [插件配置](./config) — 让你的 tool 可配置
- [插件配置](config) — 让你的 tool 可配置
- [能力三件套](../practice/) — 了解 seam/impl/consumer 模式

View File

@@ -153,5 +153,5 @@ effect cleaned up
## 下一步
- [服务与依赖](./service) — 让你的插件对外提供能力
- [事件系统](./events) — 插件间通信的核心机制
- [服务与依赖](service) — 让你的插件对外提供能力
- [事件系统](events) — 插件间通信的核心机制

View File

@@ -177,5 +177,5 @@ export function apply(ctx: Context) {
## 下一步
- [事件系统](./events) — 插件间松耦合通信
- [事件系统](events) — 插件间松耦合通信
- [能力三件套](../practice/) — 服务在 seam 模式中的应用

View File

@@ -153,4 +153,4 @@ export function apply(ctx: Context) {
## 下一步
- [LLM 适配器](./llm-adapter) — 实现一个 LLM 后端(最常见的 seam 扩展)
- [LLM 适配器](llm-adapter) — 实现一个 LLM 后端(最常见的 seam 扩展)

View File

@@ -28,7 +28,7 @@ Harness 将一个 AI Agent智能体 所需要的所有能力——LLM 调
2. 填写 API key
3. 运行
不需要写任何代码。详见 [快速开始](./quickstart)。
不需要写任何代码。详见 [快速开始](quickstart)。
### 插件开发者

View File

@@ -94,5 +94,5 @@ echo-agent 和 repl-agent 用的是同一个应用框架(`@deepseek-ai/dsh-stdio
## 下一步
- [配置文件](./config) — 了解 `cordis.yml` 的完整语法
- [配置文件](config) — 了解 `cordis.yml` 的完整语法
- [开发插件](../develop/basic/) — 编写你自己的 tool 或后端