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

Function agentWithContext

packages/agent-core/test/tools/goal.test.ts:264–277  ·  view source on GitHub ↗
(
    store: GoalMode,
    reminders: Array<{ readonly content: string; readonly origin: unknown }> = [],
  )

Source from the content-addressed store, hash-verified

262 // Terminal paths append follow-up reminders, so the agent needs a context
263 // exposing appendSystemReminder.
264 function agentWithContext(
265 store: GoalMode,
266 reminders: Array<{ readonly content: string; readonly origin: unknown }> = [],
267 ): Agent {
268 return {
269 type: 'main',
270 goal: store,
271 context: {
272 appendSystemReminder: (content: string, origin: unknown) => {
273 reminders.push({ content, origin });
274 },
275 },
276 } as unknown as Agent;
277 }
278
279 it('accepts only active / complete / paused / blocked', () => {
280 for (const status of ['active', 'complete', 'paused', 'blocked']) {

Callers 1

goal.test.tsFile · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected