MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / allowResult

Function allowResult

packages/agent-core/src/session/hooks/runner.ts:183–200  ·  view source on GitHub ↗
(input: {
  readonly message?: string;
  readonly stdout?: string;
  readonly stderr?: string;
  readonly exitCode?: number;
  readonly timedOut?: boolean;
  readonly structuredOutput?: boolean;
})

Source from the content-addressed store, hash-verified

181}
182
183function allowResult(input: {
184 readonly message?: string;
185 readonly stdout?: string;
186 readonly stderr?: string;
187 readonly exitCode?: number;
188 readonly timedOut?: boolean;
189 readonly structuredOutput?: boolean;
190}): HookResult {
191 return {
192 action: 'allow',
193 message: input.message,
194 stdout: input.stdout,
195 stderr: input.stderr,
196 exitCode: input.exitCode,
197 timedOut: input.timedOut,
198 structuredOutput: input.structuredOutput,
199 };
200}
201
202function killProcess(child: ChildProcessWithoutNullStreams): void {
203 tryKillProcess(child, 'SIGTERM');

Callers 3

runHookFunction · 0.85
onAbortFunction · 0.85
resultFromExitCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected