MCPcopy Create free account
hub / github.com/Wirasm/kild / agent

Function agent

engine/src/cli.ts:87–106  ·  view source on GitHub ↗
(action: string | undefined, args: string[])

Source from the content-addressed store, hash-verified

85 console.error(`\x1b[31merror:\x1b[0m ${err instanceof Error ? err.message : err}`);
86 process.exit(1);
87}
88
89async function dispatch(): Promise<void> {
90 switch (group) {
91 case 'project':
92 return project(action, rest);
93 case 'persona':
94 return persona(action, rest);
95 case 'run':
96 return run([action, ...rest].filter(Boolean).join(' '));
97 case 'ls':
98 return kildList();
99 case 'new':
100 return kildNew([action, ...rest].filter(Boolean).join(' '));
101 case 'send': {
102 if (!action || rest.length === 0) {
103 throw new Error('usage: kild send <id> --to a,b <text…>');
104 }
105 return kildSend(action, rest.join(' '));
106 }
107 case 'stop': {
108 if (!action) throw new Error('usage: kild stop <id> [--as <handle>]');
109 return kildStop(action);

Callers 1

dispatchFunction · 0.85

Calls 2

findProjectFunction · 0.90
listAgentsFunction · 0.90

Tested by

no test coverage detected