Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions e2e/daemon-shell.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @offline - the shell the daemon serves is the bundled kit's (0.20.2): rendered in Chromium,
* the nav foot holds the Inbox bell, as on the deployed app host.
* @offline - the daemon serves the shell package of @agentage/apphost (shell-dashboard 0.3.1): rendered
* in Chromium, the page names that version and the nav foot holds the Inbox bell.
*/
import { createServer } from 'node:net';
import { expect, test } from '@playwright/test';
Expand Down Expand Up @@ -31,10 +31,11 @@ test.afterAll(async () => {
machine.cleanup();
});

test('the daemon serves the kit 0.20.2 shell: the Inbox bell sits in the nav foot @offline', async ({
test('the daemon serves shell 0.3.1: the Inbox bell sits in the nav foot @offline', async ({
page,
}) => {
await page.goto(`${url}/`);
await expect(page.locator('meta[name="agentage-shell"]')).toHaveAttribute('content', '0.3.1');
const bell = page.locator('.foot [data-region="notices"] button.inboxbtn');
await expect(bell).toBeVisible();
await expect(bell).toHaveAttribute('aria-label', /^Inbox/);
Expand Down
29 changes: 21 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"prepublishOnly": "npm run verify"
},
"dependencies": {
"@agentage/apphost": "0.1.0",
"@agentage/extension": "0.20.2",
"@agentage/apphost": "0.2.1",
"@agentage/extension": "0.20.3",
"@electric-sql/pglite": "^0.5.16",
"@tailwindcss/postcss": "^4.3.5",
"chalk": "^6.0.0",
Expand Down
13 changes: 7 additions & 6 deletions src/core/kit-bundle.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { readFileSync, realpathSync } from 'node:fs';
import { createRequire } from 'node:module';
import { dirname, join } from 'node:path';
import { dirname } from 'node:path';
import { describe, expect, it } from 'vitest';
import { cliGate, fits } from './installer/compat.js';
import { kitVersion } from './kit-version.js';
Expand All @@ -9,10 +9,10 @@ const KIT = '@agentage/extension/package.json';
const kitDir = dirname(createRequire(import.meta.url).resolve(KIT));
const apphostJson = createRequire(import.meta.url).resolve('@agentage/apphost/package.json');

// The desktop and the deployed app host show one shell: the daemon serves the bundled kit's.
// The desktop and the deployed app host show one shell: the shell package that apphost serves.
describe('the bundled kit', () => {
it('is 0.20.2, and a kit-shaped ^0.20.0 range fits the cli', () => {
expect(kitVersion()).toBe('0.20.2');
it('is 0.20.3, and a kit-shaped ^0.20.0 range fits the cli', () => {
expect(kitVersion()).toBe('0.20.3');
expect(fits({ engine: '^0.20.0', kit: true }, cliGate())).toBe(true);
});

Expand All @@ -22,8 +22,9 @@ describe('the bundled kit', () => {
expect(realpathSync(fromApphost)).toBe(realpathSync(kitDir));
});

it('ships the shell whose nav foot holds the Inbox bell', () => {
const shell = readFileSync(join(kitDir, 'dist/shell/dist/shell.js'), 'utf8');
it('serves the shell package whose nav foot holds the Inbox bell', () => {
const shellJs = createRequire(apphostJson).resolve('@agentage/shell-dashboard/dist/shell.js');
const shell = readFileSync(shellJs, 'utf8');
const foot = shell.indexOf('className:"foot"');
expect(foot).toBeGreaterThan(-1);
expect(shell.indexOf('className:"ib inboxbtn"', foot)).toBeGreaterThan(foot);
Expand Down