(args: {
runtime: TestRuntime;
metadata: WorkspaceMetadata;
workspacePath: string;
cfg: ProjectsConfig;
isSubagentWorkspace: boolean;
effectiveAdditionalInstructions?: string;
planFilePath?: string;
memoryToolAvailable?: boolean;
})
| 74 | } |
| 75 | |
| 76 | async function buildSystemContextForTest(args: { |
| 77 | runtime: TestRuntime; |
| 78 | metadata: WorkspaceMetadata; |
| 79 | workspacePath: string; |
| 80 | cfg: ProjectsConfig; |
| 81 | isSubagentWorkspace: boolean; |
| 82 | effectiveAdditionalInstructions?: string; |
| 83 | planFilePath?: string; |
| 84 | memoryToolAvailable?: boolean; |
| 85 | }) { |
| 86 | return buildStreamSystemContext({ |
| 87 | runtime: args.runtime, |
| 88 | metadata: args.metadata, |
| 89 | workspacePath: args.workspacePath, |
| 90 | workspaceId: args.metadata.id, |
| 91 | agentDefinition: { id: "exec", scope: "built-in" }, |
| 92 | effectiveMode: "exec", |
| 93 | agentDiscoveryRuntime: args.runtime, |
| 94 | agentDiscoveryPath: args.workspacePath, |
| 95 | isSubagentWorkspace: args.isSubagentWorkspace, |
| 96 | effectiveAdditionalInstructions: args.effectiveAdditionalInstructions, |
| 97 | planFilePath: args.planFilePath, |
| 98 | modelString: "openai:gpt-5.2", |
| 99 | cfg: args.cfg, |
| 100 | providersConfig: null, |
| 101 | mcpServers: {}, |
| 102 | memoryToolAvailable: args.memoryToolAvailable, |
| 103 | }); |
| 104 | } |
| 105 | |
| 106 | describe("buildPlanInstructions", () => { |
| 107 | test("prepends runtime plan file guidance ahead of caller additional instructions", async () => { |
no test coverage detected