chore(shell): align the pwsh mirror comments and the promotion read JSDoc
renderProcessRead and renderPwshProcessRead described themselves as the job_output renderer; their only caller is the timeout promotion embedding one consuming read, while job_output reads come from the registry ring. The pwsh presenter comment gains the promotions clause bash already has, and pwsh-sandbox drops a stray blank line.
This commit is contained in:
1 parent
15cbcad1eb
commit
600b780b97
4 files changed
+11
-9
No files matched your search
@@ -154,7 +154,6 @@ export class SandboxPwshExecutor extends PwshLocalExecutor {
|
||||
return ex
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Stamp per-process sandbox facts before `done` settles. Full-access
|
||||
* processes have no facts; signal deaths are not denials.
|
||||
|
||||
@@ -81,10 +81,11 @@ export function renderPromoted(promoted: { jobId: string; timeoutMs: number; out
|
||||
}
|
||||
|
||||
/**
|
||||
* Shape one background-process read into the `job_output` delta the model
|
||||
* sees: the incremental delta, plus the lossy-read notice (with full-stream
|
||||
* spill paths) when in-memory truncation dropped unread bytes. Empty-delta
|
||||
* rendering (`(no new output)`) is the generic job controller's job.
|
||||
* Shape the one consuming read a timeout promotion embeds in its result: the
|
||||
* output produced so far, plus the lossy-read notice (with full-stream spill
|
||||
* paths) when in-memory truncation dropped unread bytes and the sandbox
|
||||
* notices. Later `job_output` reads come from the registry's ring, not from
|
||||
* this renderer.
|
||||
* @param read - one incremental read from the process handle.
|
||||
* @param sandbox - settled sandbox facts, when this was a confined process.
|
||||
* @param escalationModes - escalation targets advertised by this composition.
|
||||
|
||||
@@ -517,7 +517,7 @@ export function apply(ctx: Context, config: Config = {}): void {
|
||||
const raw = block.text
|
||||
const isBackground = typeof args === 'object' && args !== null && (args as { run_in_background?: unknown }).run_in_background === true
|
||||
const isPromoted = (result as { value?: { kind?: unknown } }).value?.kind === 'promoted'
|
||||
// Background acknowledgements and errors have no terminal exit status.
|
||||
// Background acknowledgements, promotions, and errors have no terminal exit status.
|
||||
if (isBackground || isPromoted || result.isError) {
|
||||
return { card: 'generic', content: [{ type: 'text', text: `\`\`\`console\n${raw.replace(/\n+$/, '')}\n\`\`\`` }] }
|
||||
}
|
||||
|
||||
@@ -99,9 +99,11 @@ export function renderPwshPromoted(promoted: { jobId: string; timeoutMs: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shape one background-process read into the `job_output` delta the model
|
||||
* sees: the incremental delta, plus the lossy-read notice (with full-stream
|
||||
* spill paths) when in-memory truncation dropped unread bytes.
|
||||
* Shape the one consuming read a timeout promotion embeds in its result: the
|
||||
* output produced so far, plus the lossy-read notice (with full-stream spill
|
||||
* paths) when in-memory truncation dropped unread bytes and the sandbox
|
||||
* notices. Later `job_output` reads come from the registry's ring, not from
|
||||
* this renderer.
|
||||
* @param read - one incremental read from the process handle.
|
||||
* @param sandbox - settled sandbox facts, when this was a confined process.
|
||||
* @param escalationModes - escalation targets advertised by this composition.
|
||||
|
||||
Reference in new issue
Block a user