docs: reserve seam for complete capabilities

This commit is contained in:
Turtle
2026-08-09 15:34:32 +08:00
parent 27ac49e687
commit dda02250f5
966 changed files with 2166 additions and 2159 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 packages/scaffold/server/README.md
README.md: 0afb3a38ece57f74729a218dc85348fa6c7fa529
README.zh.md: 5305434abbd83eb230dcdd81e72120d96da26cda
README.md: 9c53946f4112e9ce8e17590c2ff91fb4b8c2ef74
README.zh.md: 270691f859426dbdc6ca9d8f05049d290eaa8e1b

View File

@@ -10,7 +10,7 @@ The `jsonrpc` plugin serves newline-delimited JSON-RPC over stdio so out-of-proc
## Config
`maxTokensAsSuccess` defaults to `false` and affects only the deployment-mapped status on `subagent.finished`; root-session prompts have no prompt-level status. `JsonRpcConfig.input`, `output`, and `exit` are runtime-only transport seams; production uses process stdio and `process.exit`.
`maxTokensAsSuccess` defaults to `false` and affects only the deployment-mapped status on `subagent.finished`; root-session prompts have no prompt-level status. `JsonRpcConfig.input`, `output`, and `exit` are runtime-only transport hooks; production uses process stdio and `process.exit`.
## stdout is the protocol

View File

@@ -10,7 +10,7 @@
## 配置
`maxTokensAsSuccess` 默认为 `false`,且只影响 `subagent.finished` 上由部署映射的状态;根会话提示词没有提示词级状态。`JsonRpcConfig.input`、`output` 和 `exit` 是仅供运行时使用的传输 seam;生产环境使用进程 stdio 和 `process.exit`。
`maxTokensAsSuccess` 默认为 `false`,且只影响 `subagent.finished` 上由部署映射的状态;根会话提示词没有提示词级状态。`JsonRpcConfig.input`、`output` 和 `exit` 是仅供运行时使用的传输钩子;生产环境使用进程 stdio 和 `process.exit`。
## stdout 即协议

View File

@@ -25,7 +25,7 @@ export const name = 'jsonrpc'
// Only the agent factory is required; initialize reads the optional LLM seam with ctx.get().
export const inject = ['agents']
/** JSON-RPC deployment config plus runtime-only test seams. */
/** JSON-RPC deployment config plus runtime-only test hooks. */
export interface JsonRpcConfig {
/** Report max-token turn/subagent termination as a successful SDK result. */
maxTokensAsSuccess?: boolean
@@ -53,11 +53,11 @@ export function apply(ctx: Context, config: JsonRpcConfig): void {
// Protocol shutdown owns the complete runtime process, so it must await the
// root lifecycle (including persistence) before exiting.
const rootFiber = ctx.root.fiber
/* v8 ignore next -- production stdio wiring; tests always inject the runtime seams */
/* v8 ignore next -- production stdio wiring; tests always inject the runtime hooks */
const input = config.input ?? process.stdin
/* v8 ignore next -- production stdio wiring; tests always inject the runtime seams */
/* v8 ignore next -- production stdio wiring; tests always inject the runtime hooks */
const output = config.output ?? process.stdout
/* v8 ignore next -- production exit wiring; tests always inject the runtime seams */
/* v8 ignore next -- production exit wiring; tests always inject the runtime hooks */
const exit = config.exit ?? ((code: number): void => { process.exit(code) })
const transport = new JsonRpcLineTransport(input, output)

View File

@@ -11,7 +11,7 @@ import SessionPersistenceJsonl from '@deepseek-ai/dsh-session-persistence-jsonl'
import * as jsonrpc from '../src/index.ts'
/**
* Mount the real namespace plugin with in-memory stdio and exit seams. Covers
* Mount the real namespace plugin with in-memory stdio and exit hooks. Covers
* the full transport/server path, response-before-exit shutdown exactly once,
* and bare-fiber disposal without process exit.
*/