d4faee3a1e
Branch-length batch covering tooling, the model layer, the Web App and the public surfaces. Highlights: - Changelog: a per-release `changelog/<version>/` tree, grouped by the surface each change touches, with a root CHANGELOG.md holding one line per release. - Dev startup: `scripts/dev-prebuild.mjs` serializes the skills+core prebuild behind a lock and keeps `pnpm install` current; `pnpm dev` runs server+web together. - AgentHub 0.3.3 -> 0.4.0: OmniMessage complete payloads carry one opaque `fidelity` object in place of item-level `signature`/`phase`, threaded verbatim through Trace, replay and resume; malformed classification adapted to the new error types. - Model layer: a model is always referenced by an explicit `(provider, model_id)` pair. The provider is never inferred, guessed or defaulted -- both the catalog inference and the unique-match config resolution are gone, and CLI, SDK, server routes and run_subagent all require the complete pair. Catalog gains the Qwen Token Plan, Qwen Pay-As-You-Go and Fireworks AI gateways, plus an expanded OpenRouter group. - Web App: catalog preset sync and per-group speed test on the Models page, positional slash commands, a markdown renderer, skill-library update reminders, and a vertically centred draft page whose upward menus size themselves to the room available. - Public surfaces: restructured READMEs, the penguin.ooo landing site and blog, refreshed benchmark results for both suites, and the demo videos playing on the landing page. Includes the fixes from a full review of the branch: 23 confirmed findings, among them a provider-inference bug that could send one vendor's API key to another vendor's endpoint, and an Escape handler that destroyed the composer's contents unrecoverably. Verified on the branch head: pnpm test (1127 passing, 7 packages), pnpm typecheck and pnpm format:check clean, Playwright e2e 14/14.
42 lines
1.6 KiB
TypeScript
42 lines
1.6 KiB
TypeScript
/**
|
|
* outdatedAgentIds unit tests: the skill-library update reminder's data source — Agents
|
|
* whose installed copy is strictly older than the library's version.
|
|
*/
|
|
import { describe, expect, it } from "vitest";
|
|
import { outdatedAgentIds } from "../src/features/skills/skills-page";
|
|
import type { InstalledMap } from "../src/features/skills/skills-page";
|
|
|
|
const installed: InstalledMap = new Map([
|
|
["stale_agent", new Map([["agenthub-dev", 1]])],
|
|
["current_agent", new Map([["agenthub-dev", 2]])],
|
|
["ahead_agent", new Map([["agenthub-dev", 3]])],
|
|
["other_agent", new Map([["penguin-cli", 1]])],
|
|
]);
|
|
const AGENTS = ["stale_agent", "current_agent", "ahead_agent", "other_agent", "empty_agent"];
|
|
|
|
describe("outdatedAgentIds", () => {
|
|
it("flags only strictly lower installed versions", () => {
|
|
expect(outdatedAgentIds(AGENTS, installed, "agenthub-dev", 2)).toEqual(["stale_agent"]);
|
|
});
|
|
|
|
it("ignores not-installed Agents (including ones with no snapshot at all)", () => {
|
|
// other_agent has a different skill installed; empty_agent never appears in the map.
|
|
expect(outdatedAgentIds(AGENTS, installed, "agenthub-dev", 99)).toEqual([
|
|
"stale_agent",
|
|
"current_agent",
|
|
"ahead_agent",
|
|
]);
|
|
expect(outdatedAgentIds(["other_agent", "empty_agent"], installed, "agenthub-dev", 99)).toEqual(
|
|
[],
|
|
);
|
|
});
|
|
|
|
it("a locally newer copy does not trigger the reminder", () => {
|
|
expect(outdatedAgentIds(["ahead_agent"], installed, "agenthub-dev", 2)).toEqual([]);
|
|
});
|
|
|
|
it("everything current -> no reminder", () => {
|
|
expect(outdatedAgentIds(AGENTS, installed, "agenthub-dev", 1)).toEqual([]);
|
|
});
|
|
});
|