The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(deps): update tinymemory vendor dependency
Steven Enamakel724f6fc7a418
diff --git a/app/src/components/settings/components/__tests__/MemoryWindowControl.test.tsx b/app/src/components/settings/components/__tests__/MemoryWindowControl.test.tsxdeleted file mode 100644index a1dd189484..0000000000--- a/app/src/components/settings/components/__tests__/MemoryWindowControl.test.tsx+++ /dev/null@@ -1,133 +0,0 @@-/**- * Tests for the user-facing memory-context window selector.- *- * Covers the wording the user sees (so the cost/continuity tradeoff is- * surfaced explicitly), the persisted-preference roundtrip, and the- * core RPC contract — the panel must call `update_memory_settings`- * with the canonical lowercase preset label so the core stays the- * source of truth for actual char budgets.- */-import { fireEvent, screen, waitFor } from '@testing-library/react';-import { beforeEach, describe, expect, it, vi } from 'vitest';--import { renderWithProviders } from '../../../../test/test-utils';-import MemoryWindowControl from '../MemoryWindowControl';--const hoisted = vi.hoisted(() => ({- mockGetConfig: vi.fn(),- mockUpdateMemorySettings: vi.fn(),- mockIsTauri: vi.fn(() => true),-}));--vi.mock('../../../../utils/tauriCommands', () => ({- isTauri: hoisted.mockIsTauri,- openhumanGetConfig: hoisted.mockGetConfig,- openhumanUpdateMemorySettings: hoisted.mockUpdateMemorySettings,- MEMORY_CONTEXT_WINDOWS: ['minimal', 'balanced', 'extended', 'maximum'],-}));--beforeEach(() => {- hoisted.mockGetConfig.mockReset();- hoisted.mockUpdateMemorySettings.mockReset();- hoisted.mockIsTauri.mockReturnValue(true);-});--const respondWithWindow = (memory_window: string | undefined) => {- hoisted.mockGetConfig.mockResolvedValue({- result: {- config: { agent: memory_window === undefined ? {} : { memory_window } },- workspace_dir: '/tmp/ws',- config_path: '/tmp/cfg.toml',- },- });-};--describe('MemoryWindowControl', () => {- it('explains the cost/continuity tradeoff in plain language', async () => {- respondWithWindow('balanced');- renderWithProviders(<MemoryWindowControl />);-- // Header copy makes the tradeoff explicit — increasing the window- // costs more on every run.- expect(screen.getByText(/larger windows feel more aware/i)).toHaveTextContent(- /use more tokens/i- );- expect(screen.getByText(/cost more/i)).toBeInTheDocument();-- // All four presets are offered.- for (const label of ['Minimal', 'Balanced', 'Extended', 'Maximum']) {- expect(screen.getByText(label)).toBeInTheDocument();- }-- await waitFor(() => {- expect(screen.getByTestId('memory-window-option-balanced')).toHaveAttribute(- 'aria-checked',- 'true'- );- });- });-- it('reflects the persisted preference returned by the core', async () => {- respondWithWindow('extended');- renderWithProviders(<MemoryWindowControl />);-- await waitFor(() => {- expect(screen.getByTestId('memory-window-option-extended')).toHaveAttribute(- 'aria-checked',- 'true'- );- });- expect(screen.getByTestId('memory-window-hint')).toHaveTextContent(/more long-term memory/i);- });-- it('falls back to balanced when the snapshot omits the field', async () => {- respondWithWindow(undefined);- renderWithProviders(<MemoryWindowControl />);-- await waitFor(() => {- expect(screen.getByTestId('memory-window-option-balanced')).toHaveAttribute(- 'aria-checked',- 'true'- );- });- });-- it('persists the chosen preset via update_memory_settings using the canonical label', async () => {- respondWithWindow('balanced');- hoisted.mockUpdateMemorySettings.mockResolvedValue({- result: { config: { agent: { memory_window: 'maximum' } } },- });- const onSaved = vi.fn();- renderWithProviders(<MemoryWindowControl onSaved={onSaved} />);-- await waitFor(() => expect(hoisted.mockGetConfig).toHaveBeenCalled());- fireEvent.click(screen.getByTestId('memory-window-option-maximum'));-- await waitFor(() => {- expect(hoisted.mockUpdateMemorySettings).toHaveBeenCalledWith({ memory_window: 'maximum' });- });- await waitFor(() => expect(onSaved).toHaveBeenCalledWith('maximum'));- await waitFor(() => {- expect(screen.getByTestId('memory-window-option-maximum')).toHaveAttribute(- 'aria-checked',- 'true'- );- });- });-- it('surfaces save failures to the parent without rolling forward', async () => {- respondWithWindow('balanced');- hoisted.mockUpdateMemorySettings.mockRejectedValue(new Error('disk full'));- const onError = vi.fn();- renderWithProviders(<MemoryWindowControl onError={onError} />);-- await waitFor(() => expect(hoisted.mockGetConfig).toHaveBeenCalled());- fireEvent.click(screen.getByTestId('memory-window-option-extended'));-- await waitFor(() => expect(onError).toHaveBeenCalledWith('disk full'));- expect(screen.getByTestId('memory-window-option-balanced')).toHaveAttribute(- 'aria-checked',- 'true'- );- });-});diff --git a/app/src/services/api/goalsApi.test.ts b/app/src/services/api/goalsApi.test.tsdeleted file mode 100644index f07b7361f8..0000000000--- a/app/src/services/api/goalsApi.test.ts+++ /dev/null@@ -1,113 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--import { callCoreRpc } from '../coreRpcClient';-import { goalsApi } from './goalsApi';--vi.mock('../coreRpcClient', () => ({ callCoreRpc: vi.fn() }));--const mockCall = vi.mocked(callCoreRpc);--describe('goalsApi', () => {- beforeEach(() => vi.clearAllMocks());-- it('list returns items from the bare GoalsDoc shape', async () => {- mockCall.mockResolvedValueOnce({ items: [{ id: 'g1', text: 'ship it' }] });- const res = await goalsApi.list();- expect(mockCall).toHaveBeenCalledWith({ method: 'openhuman.memory_goals_list', params: {} });- expect(res).toEqual([{ id: 'g1', text: 'ship it' }]);- });-- it('list tolerates a missing/garbage response', async () => {- mockCall.mockResolvedValueOnce(null);- expect(await goalsApi.list()).toEqual([]);- });-- it('add unwraps the { result: { goals: { items } }, logs } envelope', async () => {- mockCall.mockResolvedValueOnce({- result: {- id: 'g2',- goals: {- items: [- { id: 'g1', text: 'a' },- { id: 'g2', text: 'b' },- ],- },- },- logs: ['added goal g2'],- });- const res = await goalsApi.add('b');- expect(mockCall).toHaveBeenCalledWith({- method: 'openhuman.memory_goals_add',- params: { text: 'b' },- });- expect(res.map(g => g.id)).toEqual(['g1', 'g2']);- });-- it('edit unwraps the { result: { items }, logs } envelope', async () => {- mockCall.mockResolvedValueOnce({ result: { items: [{ id: 'g1', text: 'new' }] }, logs: [] });- const res = await goalsApi.edit('g1', 'new');- expect(mockCall).toHaveBeenCalledWith({- method: 'openhuman.memory_goals_edit',- params: { id: 'g1', text: 'new' },- });- expect(res).toEqual([{ id: 'g1', text: 'new' }]);- });-- it('remove sends the id and returns the updated list', async () => {- mockCall.mockResolvedValueOnce({ result: { items: [] }, logs: [] });- const res = await goalsApi.remove('g1');- expect(mockCall).toHaveBeenCalledWith({- method: 'openhuman.memory_goals_delete',- params: { id: 'g1' },- });- expect(res).toEqual([]);- });-- it('reflect prunes undefined context and parses ran/summary/items', async () => {- mockCall.mockResolvedValueOnce({- result: { ran: true, summary: 'Added 1 goal', goals: { items: [{ id: 'g1', text: 'x' }] } },- logs: ['reflect complete'],- });- const res = await goalsApi.reflect();- expect(mockCall).toHaveBeenCalledWith(- expect.objectContaining({ method: 'openhuman.memory_goals_reflect', params: {} })- );- expect(res.ran).toBe(true);- expect(res.summary).toBe('Added 1 goal');- expect(res.items).toEqual([{ id: 'g1', text: 'x' }]);- });-- it('reflect forwards a provided context string', async () => {- mockCall.mockResolvedValueOnce({ result: { ran: false, summary: '', goals: { items: [] } } });- await goalsApi.reflect('focus on shipping');- expect(mockCall).toHaveBeenCalledWith(- expect.objectContaining({ params: { context: 'focus on shipping' } })- );- });-- it('reflect parses a bare (un-enveloped) response', async () => {- mockCall.mockResolvedValueOnce({ ran: true, summary: 'bare', goals: { items: [] } });- const res = await goalsApi.reflect();- expect(res.ran).toBe(true);- expect(res.summary).toBe('bare');- expect(res.items).toEqual([]);- });-- it('reflect tolerates a null response', async () => {- mockCall.mockResolvedValueOnce(null);- const res = await goalsApi.reflect();- expect(res).toEqual({ ran: false, summary: '', items: [] });- });-- it('list returns [] when the payload has neither items nor goals', async () => {- mockCall.mockResolvedValueOnce({ something: 'else' });- expect(await goalsApi.list()).toEqual([]);- });-- it('extractItems drops malformed entries', async () => {- mockCall.mockResolvedValueOnce({- items: [{ id: 'g1', text: 'ok' }, { id: 5 }, null, { text: 'no id' }],- });- expect(await goalsApi.list()).toEqual([{ id: 'g1', text: 'ok' }]);- });-});diff --git a/vendor/tinymemory b/vendor/tinymemoryindex b569e3ffc4..0cfa0e473a 160000--- a/vendor/tinymemory+++ b/vendor/tinymemory@@ -1 +1 @@-Subproject commit b569e3ffc44034c40480f71073cb828add665887+Subproject commit 0cfa0e473a27128eb7996f34bdceaafaa3f7a8c9