Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0f6f759
feat(kap-server): add WS v2 protocol message schemas
liruifengv Sep 3, 2026
9b0e108
feat(kap-server): add v2Projection layer with fixture-backed tests
liruifengv Sep 3, 2026
908c480
feat(agent-core-v2): mark steer-intended submissions in prompt.submitted
liruifengv Sep 3, 2026
6dd2f13
feat(kap-server): cover five more projection tabs with fixture parity
liruifengv Sep 3, 2026
c20d3fb
test(kap-server): re-vendor example fixtures with approval back-link …
liruifengv Sep 3, 2026
3c5e75c
docs(kap-server): record P1 implementation decisions in the refactor …
liruifengv Sep 3, 2026
1b5c3fe
test(kap-server): re-vendor fixtures with branch-aware normalization
liruifengv Sep 3, 2026
0d021fe
feat(kap-server): project interactions, compaction, undo and task str…
liruifengv Sep 3, 2026
665e4f5
feat(kap-server): project plan, goal, sidechat, attachment and cron s…
liruifengv Sep 3, 2026
8e07395
feat(kap-server): project injection and subagent streams, completing …
liruifengv Sep 3, 2026
8f7a9a9
test(kap-server): re-vendor fixtures with REST history ordering fix
liruifengv Sep 3, 2026
262a810
feat(agent-core-v2): carry the plan heading on plan.revision events
liruifengv Sep 3, 2026
b69df08
test(kap-server): re-vendor fixtures without interrupted-step usage
liruifengv Sep 3, 2026
3e0090a
feat(kap-server): add GET /sessions/{id}/history with wire cold rebuild
liruifengv Sep 3, 2026
4b8ea7c
test(kap-server): re-vendor fixtures with completed recovery streams
liruifengv Sep 3, 2026
5c22147
feat(kap-server): add the /api/v2/ws transport with handshake recovery
liruifengv Sep 3, 2026
95db235
feat(kap-server): fan out global and session-index messages over v2
liruifengv Sep 3, 2026
74a7195
docs(kap-server): record P2-P4 implementation decisions in the refact…
liruifengv Sep 3, 2026
e566bba
feat(kap-server): integrate the v2 stack with the real engine
liruifengv Sep 4, 2026
35e55c7
test(kap-server): align the abort tail with engine dispatch order
liruifengv Sep 4, 2026
41a2cb6
fix(kap-server): map engine interaction payloads to the wire shape
liruifengv Sep 4, 2026
2e4e4dc
fix(agent-core-v2): forward the steer flag through prompt submission
liruifengv Sep 4, 2026
751c70e
fix(kap-server): steer queued prompts in a single submission
liruifengv Sep 4, 2026
9bc3c7e
fix: clean up v2 projection and cold history output
liruifengv Sep 4, 2026
9d2b67a
fix(kap-server): carry the tool input display through v2 interactions
liruifengv Sep 4, 2026
9021422
feat(kap-server): project background task notifications as user messages
liruifengv Sep 4, 2026
d0e9ba2
fix(kap-server): rebuild busy-time task notifications in cold history
liruifengv Sep 4, 2026
ef7493f
fix(kap-server): place timed user messages past step gaps in cold his…
liruifengv Sep 4, 2026
de73d3b
fix(kap-server): carry the raw notification payload in the v2 stream
liruifengv Sep 4, 2026
7fe3c7e
feat(kap-server): project skill activations as skill-origin user mess…
liruifengv Sep 4, 2026
50658f5
fix(kap-server): surface skill activations missed by prompt.submitted
liruifengv Sep 4, 2026
59d30e7
fix(kap-server): emit a skill activation once via its steer delivery
liruifengv Sep 4, 2026
55b5388
fix(kap-server): project only user-triggered skill activations
liruifengv Sep 4, 2026
d7f7f64
fix(kap-server): strip bundled skill blocks from cold user text
liruifengv Sep 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-background-task-notification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Show background task completion notices in the session message stream.
5 changes: 5 additions & 0 deletions .changeset/fix-empty-thinking-parts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Fix empty thinking entries recorded for steps without reasoning content.
5 changes: 5 additions & 0 deletions .changeset/fix-history-paging-past-compaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Fix earlier-message history paging returning empty pages before compaction points.
5 changes: 5 additions & 0 deletions .changeset/fix-plan-approval-display.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Fix plan approvals and plan blocks missing the plan content in the v2 message stream.
5 changes: 5 additions & 0 deletions .changeset/fix-steer-duplicate-user-message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Fix steered prompts appearing twice in the session message stream.
5 changes: 5 additions & 0 deletions .changeset/goal-status-transitions-only.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Emit goal status stream entries only when the goal status actually changes.
5 changes: 5 additions & 0 deletions .changeset/skill-activation-user-message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Show skill activations as user messages in the session message stream.
1 change: 1 addition & 0 deletions packages/agent-core-v2/docs/wire-manifest.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ interface PlanRevisionPayload {
key: string;
sha256: string;
bytes: number;
summary?: string;
}

/**
Expand Down
16 changes: 12 additions & 4 deletions packages/agent-core-v2/src/agent/loop/loopService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ export class AgentLoopService extends Disposable implements IAgentLoopService {
response: AgentLLMRequestFinish,
): void {
for (const part of response.message.content) {
if (part.type === 'think' && part.think === '' && (part as { encrypted?: string }).encrypted === undefined) continue;
this.context.appendLoopEvent({
type: 'content.part',
uuid: randomUUID(),
Expand All @@ -950,6 +951,7 @@ export class AgentLoopService extends Disposable implements IAgentLoopService {
streamParts: StreamPartCollector,
): void {
for (const part of streamParts.drainInterruptedContent()) {
if (part.type === 'think' && part.think === '' && (part as { encrypted?: string }).encrypted === undefined) continue;
this.context.appendLoopEvent({
type: 'content.part',
uuid: randomUUID(),
Expand Down Expand Up @@ -1144,13 +1146,19 @@ export class AgentLoopService extends Disposable implements IAgentLoopService {
new AssistantDelta({ agentId: this.scopeContext.agentId, turnId, delta: part.text }),
);
return;
case 'think':
case 'think': {
const hasPayload =
part.think !== '' || (part as { encrypted?: string }).encrypted !== undefined;
if (!hasPayload) return;
onResponseEvent();
accumulate(part);
void this.dispatcher.dispatch(
new ThinkingDelta({ agentId: this.scopeContext.agentId, turnId, delta: part.think }),
);
if (part.think !== '') {
void this.dispatcher.dispatch(
new ThinkingDelta({ agentId: this.scopeContext.agentId, turnId, delta: part.think }),
);
}
return;
}
case 'image_url':
case 'audio_url':
case 'video_url':
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-core-v2/src/agent/prompt/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export interface PromptLaunchResult {

export interface PromptReservation extends IDisposable {
readonly id: string;
submit(message: ContextMessage): Promise<PromptHandle>;
submit(message: ContextMessage, opts?: { steer?: boolean }): Promise<PromptHandle>;
}

export const promptAdmission = Symbol('promptAdmission');
Expand Down
17 changes: 10 additions & 7 deletions packages/agent-core-v2/src/agent/prompt/promptService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { extractImageCompressionCaptions } from '#/agent/media/image-compress';
import { userCancellationReason } from '#/_base/utils/abort';
import { IAgentContextMemoryService } from '#/agent/contextMemory/contextMemory';
import { newMessageId } from '#/agent/contextMemory/messageId';
import { USER_PROMPT_ORIGIN, type ContextMessage } from '#/agent/contextMemory/types';
import { USER_PROMPT_ORIGIN, type ContextMessage, type PromptOrigin } from '#/agent/contextMemory/types';
import { IAgentFullCompactionService } from '#/agent/fullCompaction/fullCompaction';
import { IAgentLoopService, type Turn, type TurnResult } from '#/agent/loop/loop';
import { TurnSteer } from '#/agent/loop/turnOps';
Expand Down Expand Up @@ -157,6 +157,8 @@ export interface PromptSubmittedPayload {
readonly status: 'running' | 'queued';
readonly content: ContentPart[];
readonly createdAt: string;
readonly steer?: boolean;
readonly origin?: PromptOrigin;
}

export class PromptSubmitted extends AgentEvent2<PromptSubmittedPayload> {
Expand All @@ -179,6 +181,7 @@ export interface PromptStarted extends PromptStartedPayload {}
interface Deferred<T> { readonly promise: Promise<T>; resolve(value: T): void; reject(reason: unknown): void }
interface Record extends PromptSnapshot {
state: PromptState;
steerIntended: boolean;
readonly launchedDeferred: Deferred<Turn | undefined>;
readonly completionDeferred: Deferred<PromptCompletion>;
handle: PromptHandle;
Expand Down Expand Up @@ -277,7 +280,7 @@ export class AgentPromptService implements IAgentPromptService {
let submitted = false;
return {
id,
submit: async (message) => {
submit: async (message, opts) => {
if (submitted) throw new Error2(ErrorCodes.REQUEST_INVALID, 'prompt reservation already submitted');
submitted = true;
this.reservedPromptIds.delete(id);
Expand All @@ -288,23 +291,23 @@ export class AgentPromptService implements IAgentPromptService {
content: stripBundledSkillBlocks(message),
}),
);
return this.enqueue({ id, message });
return this.enqueue({ id, message }, opts);
},
dispose: () => {
this.reservedPromptIds.delete(id);
},
};
}

async enqueue(input: PromptInput): Promise<PromptHandle> {
async enqueue(input: PromptInput, opts?: { steer?: boolean }): Promise<PromptHandle> {
const id = input.id ?? input.message.id ?? newMessageId();
const message = { ...input.message, id };
const launchedDeferred = deferred<Turn | undefined>();
const completionDeferred = deferred<PromptCompletion>();
const record = {} as Record;
Object.assign(record, {
id, userMessageId: id, createdAt: new Date().toISOString(), state: 'pending', message,
launchedDeferred, completionDeferred,
launchedDeferred, completionDeferred, steerIntended: opts?.steer === true,
});
record.handle = {
get id() { return record.id; }, get userMessageId() { return record.userMessageId; },
Expand Down Expand Up @@ -360,7 +363,7 @@ export class AgentPromptService implements IAgentPromptService {
role: 'user',
content: [...payload.input],
toolCalls: [],
} });
} }, { steer: true });
if (queued.state !== 'pending') {
const turn = await queued.launched;
return turn === undefined ? undefined : { turn_id: turn.id };
Expand Down Expand Up @@ -570,7 +573,7 @@ export class AgentPromptService implements IAgentPromptService {
}
private publishSubmitted(record: Record, status: 'running' | 'queued'): void {
if ((record.message.origin ?? USER_PROMPT_ORIGIN).kind !== 'user') return;
void this.dispatcher.dispatch(new PromptSubmitted({ agentId: this.scopeContext.agentId, promptId: record.id, userMessageId: record.userMessageId, status, content: stripBundledSkillBlocks(record.message), createdAt: record.createdAt }));
void this.dispatcher.dispatch(new PromptSubmitted({ agentId: this.scopeContext.agentId, promptId: record.id, userMessageId: record.userMessageId, status, content: stripBundledSkillBlocks(record.message), createdAt: record.createdAt, steer: record.steerIntended ? true : undefined, origin: record.message.origin }));
}
private publishStarted(record: Record): void {
if ((record.message.origin ?? USER_PROMPT_ORIGIN).kind !== 'user') return;
Expand Down
2 changes: 2 additions & 0 deletions packages/agent-core-v2/src/agent/task/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export interface AgentTaskNotificationContext {
readonly severity: 'info' | 'warning';
readonly sourceKind: string;
readonly sourceId: string;
readonly sourceAgentId?: string;
readonly raw?: string;
}

export interface AgentTaskWaitDelivery {
Expand Down
2 changes: 2 additions & 0 deletions packages/agent-core-v2/src/agent/task/taskService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,8 @@ export class AgentTaskService extends Disposable implements IAgentTaskService {
severity: notification.severity,
sourceKind: notification.source_kind,
sourceId: notification.source_id,
sourceAgentId: typeof notification.agent_id === 'string' ? notification.agent_id : undefined,
raw: renderNotificationXml(notification),
}),
);
}
Expand Down
2 changes: 2 additions & 0 deletions packages/agent-core-v2/src/features/plan/planOps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface PlanRevisionRecordedEvent {
readonly key: string;
readonly sha256: string;
readonly bytes: number;
readonly summary?: string;
}

const planRevisionSchema = z.object({
Expand All @@ -71,6 +72,7 @@ const planRevisionSchema = z.object({
key: z.string(),
sha256: z.string(),
bytes: z.number(),
summary: z.string().optional(),
});

export class PlanRevision extends AgentEvent2<PlanRevisionRecordedEvent> {
Expand Down
6 changes: 6 additions & 0 deletions packages/agent-core-v2/src/features/plan/planService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ export class AgentPlanService extends Service implements IAgentPlanService {
const scope = this.agentCtx.scope();
const key = `plan/${id}/v${version}.md`;
await this.blobs.put(scope, key, bytes);
const heading = content
.split('\n')
.map((line) => line.trim())
.find((line) => line.startsWith('#'));
const summary = heading === undefined ? undefined : heading.replace(/^#+\s*/, '').trim() || undefined;
await this.dispatcher.dispatch(
new PlanRevision({
agentId: this.agentCtx.agentId,
Expand All @@ -216,6 +221,7 @@ export class AgentPlanService extends Service implements IAgentPlanService {
key,
sha256: createHash('sha256').update(bytes).digest('hex'),
bytes: bytes.byteLength,
summary,
}),
);
}
Expand Down
1 change: 1 addition & 0 deletions packages/agent-core-v2/src/features/todo/todoOps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const toolsUpdateStoreSchema = z.object({
export class ToolsUpdateStore extends AgentEvent2<z.infer<typeof toolsUpdateStoreSchema>> {
static override readonly type = 'tools.update_store';
static override readonly durable = true;
static override readonly observable = true;
static override readonly schema = toolsUpdateStoreSchema;
}
export interface ToolsUpdateStore {
Expand Down
1 change: 1 addition & 0 deletions packages/agent-core-v2/test/features/plan/plan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
key: revisionKey('rev-plan', 1),
sha256: createHash('sha256').update(content, 'utf8').digest('hex'),
bytes: Buffer.byteLength(content),
summary: 'Plan',
time: expect.any(Number),
},
]);
Expand Down Expand Up @@ -707,7 +708,7 @@
ctx.mockNextResponse({ type: 'text', text: 'The safe command printed plan-safe.' });
await ctx.rpc.prompt({ input: [{ type: 'text', text: 'Inspect without mutating files' }] });

expect(await ctx.untilTurnEnd()).toMatchInlineSnapshot(`

Check failure on line 711 in packages/agent-core-v2/test/features/plan/plan.test.ts

View workflow job for this annotation

GitHub Actions / test (2)

[agent-core-v2] test/features/plan/plan.test.ts > Plan service > plan allows safe tool flow > allows read-only Bash to continue through permission and execution

Error: Snapshot `Plan service > plan allows safe tool flow > allows read-only Bash to continue through permission and execution 1` mismatched - Expected + Received @@ -1,11 +1,11 @@ [wire] permission.set_mode { "agentId": "main", "mode": "yolo", "time": "<time>" } [wire] plan_mode.enter { "agentId": "main", "id": "test-plan", "time": "<time>" } [emit] agent.status.updated { "time": "<time>", "agentId": "main", "planMode": true } [wire] prompt.accepted { "agentId": "main", "promptId": "<msg-1>", "content": [ { "type": "text", "text": "Inspect without mutating files" } ], "time": "<time>" } [emit] prompt.accepted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "content": [ { "type": "text", "text": "Inspect without mutating files" } ] } - [emit] prompt.submitted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "userMessageId": "<msg-1>", "status": "running", "content": [ { "type": "text", "text": "Inspect without mutating files" } ], "createdAt": "<time>" } + [emit] prompt.submitted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "userMessageId": "<msg-1>", "status": "running", "content": [ { "type": "text", "text": "Inspect without mutating files" } ], "createdAt": "<time>", "origin": { "kind": "user" } } [wire] turn.prompt { "agentId": "main", "input": [ { "type": "text", "text": "Inspect without mutating files" } ], "origin": { "kind": "user" }, "promptId": "<msg-1>", "time": "<time>" } [emit] turn.started { "time": "<time>", "agentId": "main", "turnId": 0, "promptId": "<msg-1>", "origin": { "kind": "user" }, "prompt": "Inspect without mutating files" } [emit] agent.activity.updated { "time": "<time>", "lifecycle": "ready", "turn": { "turnId": 0, "origin": { "kind": "user" }, "phase": "running", "step": 0, "ending": false, "pendingApprovals": [], "activeToolCalls": [], "since": "<time>" }, "background": [], "agentId": "main" } [emit] context.spliced { "time": "<time>", "agentId": "main", "start": 0, "deleteCount": 0, "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Inspect without mutating files" } ], "toolCalls": [], "origin": { "kind": "user" }, "id": "<msg-1>" } ] } [emit] prompt.started { "time": "<time>", "agentId": "main", "promptId": "<msg-1>" } ❯ test/features/plan/plan.test.ts:711:40

Check failure on line 711 in packages/agent-core-v2/test/features/plan/plan.test.ts

View workflow job for this annotation

GitHub Actions / test (2)

[agent-core-v2] test/features/plan/plan.test.ts > Plan service > plan allows safe tool flow > allows read-only Bash to continue through permission and execution

Error: Snapshot `Plan service > plan allows safe tool flow > allows read-only Bash to continue through permission and execution 1` mismatched - Expected + Received @@ -1,11 +1,11 @@ [wire] permission.set_mode { "agentId": "main", "mode": "yolo", "time": "<time>" } [wire] plan_mode.enter { "agentId": "main", "id": "test-plan", "time": "<time>" } [emit] agent.status.updated { "time": "<time>", "agentId": "main", "planMode": true } [wire] prompt.accepted { "agentId": "main", "promptId": "<msg-1>", "content": [ { "type": "text", "text": "Inspect without mutating files" } ], "time": "<time>" } [emit] prompt.accepted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "content": [ { "type": "text", "text": "Inspect without mutating files" } ] } - [emit] prompt.submitted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "userMessageId": "<msg-1>", "status": "running", "content": [ { "type": "text", "text": "Inspect without mutating files" } ], "createdAt": "<time>" } + [emit] prompt.submitted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "userMessageId": "<msg-1>", "status": "running", "content": [ { "type": "text", "text": "Inspect without mutating files" } ], "createdAt": "<time>", "origin": { "kind": "user" } } [wire] turn.prompt { "agentId": "main", "input": [ { "type": "text", "text": "Inspect without mutating files" } ], "origin": { "kind": "user" }, "promptId": "<msg-1>", "time": "<time>" } [emit] turn.started { "time": "<time>", "agentId": "main", "turnId": 0, "promptId": "<msg-1>", "origin": { "kind": "user" }, "prompt": "Inspect without mutating files" } [emit] agent.activity.updated { "time": "<time>", "lifecycle": "ready", "turn": { "turnId": 0, "origin": { "kind": "user" }, "phase": "running", "step": 0, "ending": false, "pendingApprovals": [], "activeToolCalls": [], "since": "<time>" }, "background": [], "agentId": "main" } [emit] context.spliced { "time": "<time>", "agentId": "main", "start": 0, "deleteCount": 0, "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Inspect without mutating files" } ], "toolCalls": [], "origin": { "kind": "user" }, "id": "<msg-1>" } ] } [emit] prompt.started { "time": "<time>", "agentId": "main", "promptId": "<msg-1>" } ❯ test/features/plan/plan.test.ts:711:40
[wire] permission.set_mode { "agentId": "main", "mode": "yolo", "time": "<time>" }
[wire] plan_mode.enter { "agentId": "main", "id": "test-plan", "time": "<time>" }
[emit] agent.status.updated { "time": "<time>", "agentId": "main", "planMode": true }
Expand Down Expand Up @@ -790,7 +791,7 @@
ctx.mockNextResponse({ type: 'text', text: 'The command completed.' });
await ctx.rpc.prompt({ input: [{ type: 'text', text: 'Remove forbidden.txt' }] });

expect(await ctx.untilTurnEnd()).toMatchInlineSnapshot(`

Check failure on line 794 in packages/agent-core-v2/test/features/plan/plan.test.ts

View workflow job for this annotation

GitHub Actions / test (2)

[agent-core-v2] test/features/plan/plan.test.ts > Plan service > plan mode Bash ordinary permission behavior > allows Bash through ordinary yolo permission behavior

Error: Snapshot `Plan service > plan mode Bash ordinary permission behavior > allows Bash through ordinary yolo permission behavior 1` mismatched - Expected + Received @@ -1,11 +1,11 @@ [wire] permission.set_mode { "agentId": "main", "mode": "yolo", "time": "<time>" } [wire] plan_mode.enter { "agentId": "main", "id": "test-plan", "time": "<time>" } [emit] agent.status.updated { "time": "<time>", "agentId": "main", "planMode": true } [wire] prompt.accepted { "agentId": "main", "promptId": "<msg-1>", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ], "time": "<time>" } [emit] prompt.accepted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ] } - [emit] prompt.submitted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "userMessageId": "<msg-1>", "status": "running", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ], "createdAt": "<time>" } + [emit] prompt.submitted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "userMessageId": "<msg-1>", "status": "running", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ], "createdAt": "<time>", "origin": { "kind": "user" } } [wire] turn.prompt { "agentId": "main", "input": [ { "type": "text", "text": "Remove forbidden.txt" } ], "origin": { "kind": "user" }, "promptId": "<msg-1>", "time": "<time>" } [emit] turn.started { "time": "<time>", "agentId": "main", "turnId": 0, "promptId": "<msg-1>", "origin": { "kind": "user" }, "prompt": "Remove forbidden.txt" } [emit] agent.activity.updated { "time": "<time>", "lifecycle": "ready", "turn": { "turnId": 0, "origin": { "kind": "user" }, "phase": "running", "step": 0, "ending": false, "pendingApprovals": [], "activeToolCalls": [], "since": "<time>" }, "background": [], "agentId": "main" } [emit] context.spliced { "time": "<time>", "agentId": "main", "start": 0, "deleteCount": 0, "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ], "toolCalls": [], "origin": { "kind": "user" }, "id": "<msg-1>" } ] } [emit] prompt.started { "time": "<time>", "agentId": "main", "promptId": "<msg-1>" } ❯ test/features/plan/plan.test.ts:794:40

Check failure on line 794 in packages/agent-core-v2/test/features/plan/plan.test.ts

View workflow job for this annotation

GitHub Actions / test (2)

[agent-core-v2] test/features/plan/plan.test.ts > Plan service > plan mode Bash ordinary permission behavior > allows Bash through ordinary yolo permission behavior

Error: Snapshot `Plan service > plan mode Bash ordinary permission behavior > allows Bash through ordinary yolo permission behavior 1` mismatched - Expected + Received @@ -1,11 +1,11 @@ [wire] permission.set_mode { "agentId": "main", "mode": "yolo", "time": "<time>" } [wire] plan_mode.enter { "agentId": "main", "id": "test-plan", "time": "<time>" } [emit] agent.status.updated { "time": "<time>", "agentId": "main", "planMode": true } [wire] prompt.accepted { "agentId": "main", "promptId": "<msg-1>", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ], "time": "<time>" } [emit] prompt.accepted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ] } - [emit] prompt.submitted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "userMessageId": "<msg-1>", "status": "running", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ], "createdAt": "<time>" } + [emit] prompt.submitted { "time": "<time>", "agentId": "main", "promptId": "<msg-1>", "userMessageId": "<msg-1>", "status": "running", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ], "createdAt": "<time>", "origin": { "kind": "user" } } [wire] turn.prompt { "agentId": "main", "input": [ { "type": "text", "text": "Remove forbidden.txt" } ], "origin": { "kind": "user" }, "promptId": "<msg-1>", "time": "<time>" } [emit] turn.started { "time": "<time>", "agentId": "main", "turnId": 0, "promptId": "<msg-1>", "origin": { "kind": "user" }, "prompt": "Remove forbidden.txt" } [emit] agent.activity.updated { "time": "<time>", "lifecycle": "ready", "turn": { "turnId": 0, "origin": { "kind": "user" }, "phase": "running", "step": 0, "ending": false, "pendingApprovals": [], "activeToolCalls": [], "since": "<time>" }, "background": [], "agentId": "main" } [emit] context.spliced { "time": "<time>", "agentId": "main", "start": 0, "deleteCount": 0, "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Remove forbidden.txt" } ], "toolCalls": [], "origin": { "kind": "user" }, "id": "<msg-1>" } ] } [emit] prompt.started { "time": "<time>", "agentId": "main", "promptId": "<msg-1>" } ❯ test/features/plan/plan.test.ts:794:40
[wire] permission.set_mode { "agentId": "main", "mode": "yolo", "time": "<time>" }
[wire] plan_mode.enter { "agentId": "main", "id": "test-plan", "time": "<time>" }
[emit] agent.status.updated { "time": "<time>", "agentId": "main", "planMode": true }
Expand Down
Loading
Loading