Changelog, dev startup, README, AgentHub 0.4.0, model catalog, and landing site (#7)
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.
This commit is contained in:
@@ -56,7 +56,7 @@ type RunInput = { prompt: string; signal?: AbortSignal; approve?: ApproveFn };
|
||||
/** Builds a SubagentRunner from a run implementation (spawn arguments observed via a spy). */
|
||||
function runnerOf(
|
||||
run: (input: RunInput) => AsyncGenerator<OmniMessage>,
|
||||
spawnSpy?: (input: { agentId?: string; modelId?: string }) => void,
|
||||
spawnSpy?: (input: { agentId?: string; modelId?: string; provider?: string }) => void,
|
||||
): SubagentRunner {
|
||||
return {
|
||||
async spawn(input) {
|
||||
@@ -136,7 +136,8 @@ afterEach(() => {
|
||||
|
||||
describe("run_subagent tool (foreground)", () => {
|
||||
it("forwards stamped child messages and mirrors child text as its own output deltas", async () => {
|
||||
const seen: Array<{ prompt?: string; agentId?: string; modelId?: string }> = [];
|
||||
const seen: Array<{ prompt?: string; agentId?: string; modelId?: string; provider?: string }> =
|
||||
[];
|
||||
const runner = runnerOf(
|
||||
async function* (input) {
|
||||
seen[0] = { ...seen[0], prompt: input.prompt };
|
||||
@@ -150,7 +151,10 @@ describe("run_subagent tool (foreground)", () => {
|
||||
const { services } = makeServices(runner);
|
||||
const tool = createSubagentTool(DEF, services);
|
||||
const { out, result } = await collectWithReturn(
|
||||
tool.execute({ prompt: "world", agent_id: "researcher", model_id: "m1" }, CTX),
|
||||
tool.execute(
|
||||
{ prompt: "world", agent_id: "researcher", model_id: "m1", provider: "p1" },
|
||||
CTX,
|
||||
),
|
||||
);
|
||||
|
||||
// Child session messages pass through verbatim (with origin).
|
||||
@@ -163,7 +167,49 @@ describe("run_subagent tool (foreground)", () => {
|
||||
expect(result?.stopReason).toBe("completed");
|
||||
// The model is free to choose the agent and model (spawn arguments); the prompt is
|
||||
// handed to run.
|
||||
expect(seen[0]).toEqual({ prompt: "world", agentId: "researcher", modelId: "m1" });
|
||||
expect(seen[0]).toEqual({
|
||||
prompt: "world",
|
||||
agentId: "researcher",
|
||||
modelId: "m1",
|
||||
provider: "p1",
|
||||
});
|
||||
});
|
||||
|
||||
it("rejects half a model reference in either direction, and never spawns", async () => {
|
||||
// A model is referenced by the (provider, model_id) pair; the tool refuses half of one
|
||||
// rather than letting the session layer guess a group for a bare upstream id.
|
||||
for (const args of [
|
||||
{ prompt: "x", model_id: "m1" },
|
||||
{ prompt: "x", provider: "p1" },
|
||||
]) {
|
||||
const spawned: unknown[] = [];
|
||||
const runner = runnerOf(
|
||||
async function* () {},
|
||||
(input) => spawned.push(input),
|
||||
);
|
||||
const { services } = makeServices(runner);
|
||||
const tool = createSubagentTool(DEF, services);
|
||||
const { out, result } = await collectWithReturn(tool.execute(args, CTX));
|
||||
expect(result?.stopReason).toBe("failed");
|
||||
expect(ownDeltas(out)).toContain("must be given together");
|
||||
expect(spawned).toHaveLength(0);
|
||||
}
|
||||
});
|
||||
|
||||
it("uses the Project default model when neither half of the reference is given", async () => {
|
||||
const seen: Array<{ modelId?: string; provider?: string }> = [];
|
||||
const runner = runnerOf(
|
||||
async function* () {
|
||||
yield withOrigin(partialText("delta", "ok"), HOP);
|
||||
},
|
||||
(input) => seen.push(input),
|
||||
);
|
||||
const { services } = makeServices(runner);
|
||||
const tool = createSubagentTool(DEF, services);
|
||||
const { result } = await collectWithReturn(tool.execute({ prompt: "x" }, CTX));
|
||||
expect(result?.stopReason).toBe("completed");
|
||||
expect(seen[0]?.modelId).toBeUndefined();
|
||||
expect(seen[0]?.provider).toBeUndefined();
|
||||
});
|
||||
|
||||
it("does not mirror deeper-nested (origin.length > 1) text into its own output", async () => {
|
||||
|
||||
Reference in New Issue
Block a user