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

Function readSessionStart

packages/agent-core/src/plugin/manifest.ts:233–251  ·  view source on GitHub ↗
(
  raw: unknown,
  diagnostics: PluginDiagnostic[],
)

Source from the content-addressed store, hash-verified

231}
232
233function readSessionStart(
234 raw: unknown,
235 diagnostics: PluginDiagnostic[],
236): PluginManifest['sessionStart'] {
237 if (raw === undefined) return undefined;
238 if (!isObject(raw)) {
239 diagnostics.push({ severity: 'warn', message: '"sessionStart" must be an object' });
240 return undefined;
241 }
242 const skill = typeof raw['skill'] === 'string' ? raw['skill'].trim() : '';
243 if (skill.length === 0) {
244 diagnostics.push({
245 severity: 'warn',
246 message: '"sessionStart.skill" is required when sessionStart is present',
247 });
248 return undefined;
249 }
250 return { skill };
251}
252
253async function readMcpServers(
254 pluginRoot: string,

Callers 1

parseManifestFunction · 0.85

Calls 2

isObjectFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected