fix(mods): type narrowings for plugin validate --strict (BLK-049)
Claude Code 2.1.323 type-checks mods in validate --strict: three TS2339 in the memory kit, the Bash hook return type, thirteen sites in the model-router kit and the agent.spawn deny arm. Type-only or behaviour-equivalent changes; kits 288/640 unchanged; guards stay fail-open (BDR-136).
This commit is contained in:
1 parent
9ee3fdad23
commit
6433e4d32a
4 files changed
+25
-11
No files matched your search
@@ -5,7 +5,9 @@
|
||||
// through unchanged: the mod may never break a tool call or a prompt.
|
||||
// It also recalls: registry entries on a qualifying prompt and a known-error
|
||||
// line on a Bash failure, both switchable with "recall": false.
|
||||
import type { EngineInterface, On, Register } from 'claude-code'
|
||||
import type {
|
||||
EngineInterface, On, Register, ToolCallResult,
|
||||
} from 'claude-code'
|
||||
|
||||
type Api = EngineInterface
|
||||
|
||||
@@ -1586,7 +1588,8 @@ function registerBash(on: On, st: State): void {
|
||||
await captureMilestones($, st, at, e, out as BashOut)
|
||||
const line = await knownContext($, st, at, e, f)
|
||||
if (line === '') return out
|
||||
return { ...out, context: [...(out.context ?? []), line] }
|
||||
return { ...out, context: [...(out.context ?? []), line] } as
|
||||
ToolCallResult<'Bash'>
|
||||
}).catch(($, e, next) => {
|
||||
warnOnce(st, $, 'Bash', next.error.kind)
|
||||
return next(e)
|
||||
|
||||
Reference in new issue
Block a user