// Run with Node's test runner and Playwright on the module path; see README.md. // The Library's Memory tab (internal/memory, /api/memory): the switch that // gives the agents ticked for instructions the memories' summary, the // Magpie Memory server offered while it isn't in the library, the memories // in use pinned first, a search, the ones an agent only guessed waiting // under To review, and a memory added, edited through the app's menu (never // a await drow.locator(".lib-distmodel").click(); await page.locator(".proto-menu .pm-item", { hasText: "Model One" }).click(); await page.waitForFunction(() => /Model One/.test(document.querySelector("#view-library .lib-distmodel")?.textContent || "")); assert.deepEqual(sent.findLast((x) => x.path === "/api/memory/distill").body, { on: true, model: "dt/m1" }); assert.equal(await page.locator(`${view} select`).count(), 0, "a native select"); await drow.locator(".lib-distnow").waitFor({ timeout: 8000 }); // a run that stopped says why await drow.locator(".lib-distnow").click(); await drow.locator(".sub.err").waitFor(); assert.match(await drow.locator(".sub.err").textContent(), /429: too many requests/); assert.ok(sent.some((x) => x.path === "/api/memory/distill/run")); } // tidied now: what it set aside leaves To review, and is undone once await page.locator(`${view} .lib-memstatus .opt`, { hasText: w.review }).click(); await page.locator(`${view} .lib-mems .lib-mem`, { hasText: "Ships on Tuesdays" }).waitFor(); await trow.locator(".lib-dreamnow").click(); await trow.locator(".lib-dreamundo").waitFor({ timeout: 8000 }); assert.ok(sent.some((x) => x.path === "/api/memory/dream/run")); assert.match(await trow.locator(".sub").textContent(), /1/); await page.locator(`${view} .lib-mems .lib-mem`, { hasText: "Ships on Tuesdays" }).waitFor({ state: "detached" }); await trow.locator(".lib-dreamundo").click(); await page.locator(`${view} .lib-mems .lib-mem`, { hasText: "Ships on Tuesdays" }).waitFor(); assert.equal(await trow.locator(".lib-dreamundo").count(), 0); assert.ok(sent.some((x) => x.path === "/api/memory/dream/undo")); assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth + 1), "the page scrolls sideways"); await ctx.close(); }); } assert.deepEqual(errors, []); }); }