| 73 | }) |
| 74 | |
| 75 | function loaded(filepath: string): SessionV1.WithParts[] { |
| 76 | const sessionID = SessionID.make("session-loaded-1") |
| 77 | const messageID = MessageID.make("msg_message-loaded-1") |
| 78 | |
| 79 | return [ |
| 80 | { |
| 81 | info: { |
| 82 | id: messageID, |
| 83 | sessionID, |
| 84 | role: "user", |
| 85 | time: { created: 0 }, |
| 86 | agent: "build", |
| 87 | model: { |
| 88 | providerID: ProviderV2.ID.make("anthropic"), |
| 89 | modelID: ModelV2.ID.make("claude-sonnet-4-20250514"), |
| 90 | }, |
| 91 | }, |
| 92 | parts: [ |
| 93 | { |
| 94 | id: PartID.make("prt_part-loaded-1"), |
| 95 | messageID, |
| 96 | sessionID, |
| 97 | type: "tool", |
| 98 | callID: "call-loaded-1", |
| 99 | tool: "read", |
| 100 | state: { |
| 101 | status: "completed", |
| 102 | input: {}, |
| 103 | output: "done", |
| 104 | title: "Read", |
| 105 | metadata: { loaded: [filepath] }, |
| 106 | time: { start: 0, end: 1 }, |
| 107 | }, |
| 108 | }, |
| 109 | ], |
| 110 | }, |
| 111 | ] |
| 112 | } |
| 113 | |
| 114 | describe("Instruction.resolve", () => { |
| 115 | it.live("returns empty when AGENTS.md is at project root (already in systemPaths)", () => |