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

Function mapKind

packages/agent-core/src/services/task/task.ts:49–61  ·  view source on GitHub ↗
(k: BackgroundTaskInfo['kind'])

Source from the content-addressed store, hash-verified

47// ---------------------------------------------------------------------------
48
49function mapKind(k: BackgroundTaskInfo['kind']): BackgroundTaskKind {
50 switch (k) {
51 case 'process':
52 return 'bash';
53 case 'agent':
54 return 'subagent';
55 case 'question':
56 // SCHEMAS §7 has no 'question' literal; question background tasks are
57 // tool-spawned flows (Loop runs them as part of `Question` tool
58 // execution), so 'tool' is the closest spec literal.
59 return 'tool';
60 }
61}
62
63function mapStatus(s: BackgroundTaskInfo['status']): BackgroundTaskStatus {
64 switch (s) {

Callers 1

toProtocolTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected