(options?: {
memoryAccess?: MemoryScopeAccess;
})
| 42 | } |
| 43 | |
| 44 | async function createFixture(options?: { |
| 45 | memoryAccess?: MemoryScopeAccess; |
| 46 | }): Promise<MemoryToolFixture> { |
| 47 | const tempDir = new TestTempDir("test-memory-tool"); |
| 48 | const muxHome = path.join(tempDir.path, "mux-home"); |
| 49 | const checkout = path.join(tempDir.path, "checkout"); |
| 50 | await fsPromises.mkdir(muxHome, { recursive: true }); |
| 51 | await fsPromises.mkdir(checkout, { recursive: true }); |
| 52 | const config = createTestToolConfig(checkout, { workspaceId: "ws-tool" }); |
| 53 | config.workspaceProjectPath = FIXTURE_PROJECT_PATH; |
| 54 | config.runtime = new LocalRuntime(checkout); |
| 55 | config.memoryService = new MemoryService(new Config(muxHome), new MemoryMetaService(muxHome)); |
| 56 | config.memoryAccess = options?.memoryAccess ?? { |
| 57 | global: "readwrite", |
| 58 | project: "readwrite", |
| 59 | workspace: "readwrite", |
| 60 | }; |
| 61 | return { |
| 62 | muxHome, |
| 63 | checkout, |
| 64 | config, |
| 65 | tool: createMemoryTool(config), |
| 66 | [Symbol.dispose]() { |
| 67 | tempDir[Symbol.dispose](); |
| 68 | }, |
| 69 | }; |
| 70 | } |
| 71 | |
| 72 | describe("memory tool sub-project workspaces", () => { |
| 73 | it("resolves project memory from the project identity, not the execution cwd", async () => { |
no test coverage detected