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

@@ -1,5 +1,5 @@
/**
* Quiescence tracking for emit-shaped hook runs that no seam awaits. Bridges
* Quiescence tracking for emit-shaped hook runs that no extension point awaits. Bridges
* track the run plus its continuation, pass the tracker signal into execution,
* and drain on disposal so no process or late callback outlives the fiber.
* @module @deepseek-ai/dsh-hook-protocol/detached

View File

@@ -2,7 +2,7 @@
* Shared, non-plugin hook protocol library: matching, command execution and
* decoding, restrictive outcome merging, durable event helpers, and detached
* run quiescence. Claude Code and Codex bridges own their distinct payloads,
* environment rules, matcher mode, and typed seam mappings.
* environment rules, matcher mode, and typed extension-point mappings.
* @module @deepseek-ai/dsh-hook-protocol
*/

View File

@@ -57,7 +57,7 @@ function decisionForRank(maxRank: number): MergedDecision {
* yields a neutral outcome (`decision: 'none'`, no stop, empty context) — the
* caller treats that as "no hook had anything to say".
* @param outputs - every matched hook's decoded output, in hook order.
* @returns the single folded outcome the bridge maps onto its seam.
* @returns the single folded outcome the bridge maps onto its extension point.
*/
export function mergeHookOutputs(outputs: HookOutput[]): MergedHookOutcome {
let maxRank = 0

View File

@@ -58,7 +58,7 @@ export interface RunHookResult {
* timeout in seconds overrides the default; trusted environment entries merge
* after the executor scrub. Infrastructure rejection becomes an outcome with
* no exit code, so this function never throws or crashes the calling turn.
* @param bash - the executor seam the command runs through.
* @param bash - The executor service the command runs through.
* @param hook - the configured command; its `timeoutSec` (wire unit: seconds) overrides the default timeout.
* @param options - the invocation's payload, env, cwd, signal, stdin framing, and default timeout.
* @param now - millisecond clock used for the reported duration.

View File

@@ -1,7 +1,7 @@
/**
* Dialect-neutral vocabulary and log-only events shared by the Claude Code and
* Codex hook bridges. Payload construction, matching differences, environment,
* and seam-specific decision mapping remain owned by each bridge.
* and extension-point-specific decision mapping remain owned by each bridge.
* @module @deepseek-ai/dsh-hook-protocol/types
*/
@@ -42,8 +42,8 @@ declare module '@deepseek-ai/dsh-session' {
/**
* The bridge that ran a hook — the CC bridge stamps `'claude'`, the Codex
* bridge `'codex'`. A native plugin on the interception seams is not a bridge
* and writes no `hook/*` invocation/result records (see the interception-seams Agent Note).
* bridge `'codex'`. A native plugin at the interception points is not a bridge
* and writes no `hook/*` invocation/result records (see the interception extension-points Agent Note).
*/
export type HookDialect = 'claude' | 'codex'
@@ -81,7 +81,7 @@ export type MatcherMode = 'claude' | 'codex'
/**
* The dialect-neutral OUTCOME a hook produced, parsed from its exit code +
* stdout JSON + stderr by {@link parseHookOutput}. A bridge maps this onto a
* seam-specific typed Decision (PreToolDecision, PreStepDecision, …). Every field
* extension-point-specific typed Decision (PreToolDecision, PreStepDecision, …). Every field
* is OPTIONAL because a hook may exercise any subset; the bridge decides which
* fields are meaningful for its hook point and which it ignores (faithful-but-
* degraded — e.g. Codex ignores `allow`/`ask`).
@@ -130,7 +130,7 @@ export interface HookOutput {
systemMessage?: string
/**
* A tool-input rewrite a hook requested (CC `updatedInput`). PARSED but NOT
* honored — input rewrite is deferred (see the interception-seams Agent Note); a
* honored — input rewrite is deferred (see the interception extension-points Agent Note); a
* bridge logs + warns when this is present.
*/
updatedInput?: Record<string, unknown>