docs: reserve seam for complete capabilities
This commit is contained in:
@@ -243,7 +243,7 @@ function normalizedList(value: unknown): value is string[] {
|
||||
return Array.isArray(value) && value.every(normalizedText)
|
||||
}
|
||||
|
||||
/** Defensively decode the fixed script's report across an implementation seam. */
|
||||
/** Defensively decode the fixed script's report across a provider boundary. */
|
||||
function readReport(value: unknown, expectedStatus: RalphRoundStatus, maxChars: number): RalphRoundReport {
|
||||
if (!isRecord(value)
|
||||
|| Object.keys(value).sort().join(',') !== 'blocker,evidence,nextSteps,status,summary'
|
||||
|
||||
@@ -180,7 +180,7 @@ export class WorkflowExecution {
|
||||
return { value: null, stopReason: 'cancelled', error: this.cancelledError().message, agentsStarted: this.started }
|
||||
}
|
||||
// renderThrown is total (thrown values of any realm), so this arm
|
||||
// cannot throw — drive() resolving is the `result` never-rejects seam
|
||||
// cannot throw — drive() resolving is the `result` never-rejects contract
|
||||
// contract.
|
||||
return { value: null, stopReason: 'error', error: renderThrown(error), agentsStarted: this.started }
|
||||
}
|
||||
@@ -283,7 +283,7 @@ export class WorkflowExecution {
|
||||
} catch (error: unknown) {
|
||||
// The host refuses starts once the run is cancelled — a refusal that
|
||||
// races our own cancel state must read as the cancellation it is,
|
||||
// not as a broken seam.
|
||||
// not as a broken contract.
|
||||
if (this.isCancelled()) throw this.cancelledError()
|
||||
throw new WorkflowError(`agent() could not start a child: ${renderThrown(error)}`, 'AGENT_START', { cause: error })
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Workflow capability seam. Implementations execute orchestration scripts;
|
||||
* Service Definition for the workflow capability seam. Service providers execute orchestration scripts;
|
||||
* observe-only lifecycle events never expose run control.
|
||||
* @module @deepseek-ai/dsh-workflow
|
||||
*/
|
||||
@@ -150,7 +150,7 @@ export function isFatalWorkflowError(error: unknown): boolean {
|
||||
}
|
||||
|
||||
/**
|
||||
* Workflow execution seam. Invalid requests throw before publication; a live
|
||||
* Workflow Service Definition contract. Invalid requests throw before publication; a live
|
||||
* run is holder-owned, its result never rejects, cancellation and disposal are
|
||||
* bounded, and disposal waits for child cleanup within that bound. Lifecycle
|
||||
* listener failures are contained, and `workflow/end` fires exactly once as the
|
||||
|
||||
Reference in New Issue
Block a user