mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-10-01 20:33:50 +00:00
Merge master; OpenFleet keeps its name, PR 177's rental descriptor becomes OpenRental
PR 177 shipped a second OpenFleet under the same slug: a published listing of OpenAgent profiles and ipfile swarms with CoinPay rental offers. Anthony ruled that OpenFleet means the human-controlled fleet and the record of who spawned whom, so the rental contract is renamed OpenRental (slug openrental, catalogs family, group noun listing): docs/openrental.md, logicsrc-openrental.schema.json with type logicsrc.openrental and scope kind listing, fixtures/openrental, createOpenRental and OpenRental* types in the SDK, the openrental validator kind. Minor bumps because an export moved: @logicsrc/schemas 0.2.0, @logicsrc/validators 0.2.0, @logicsrc/sdk 0.2.0. The discovery contract test now covers openfleet, openrental and openwall, one per family, and accepts a landing-page link in llms.txt. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZV4zJ2pDZLNN3kE5jFCmV
This commit is contained in:
commit
68f3151699
35 changed files with 2068 additions and 14 deletions
31
apps/logicsrc-web/contract/spec-discovery.contract.test.ts
Normal file
31
apps/logicsrc-web/contract/spec-discovery.contract.test.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { describe, expect, it, vi } from "vitest";
|
||||
import { familyOfSpec } from "../src/lib/specs";
|
||||
import { listDocs, readDoc } from "../src/lib/docs";
|
||||
import { GET as llms } from "../src/app/llms.txt/route";
|
||||
import { GET as llmsFull } from "../src/app/llms-full.txt/route";
|
||||
import sitemap from "../src/app/sitemap";
|
||||
|
||||
// Spec discovery must work even when the optional blog database is offline.
|
||||
vi.mock("../src/lib/supabase", () => ({ publicClient: () => { throw new Error("offline"); } }));
|
||||
|
||||
describe.each([
|
||||
{ slug: "openfleet", name: "OpenFleet", family: "process" },
|
||||
{ slug: "openrental", name: "OpenRental", family: "catalogs" },
|
||||
{ slug: "openwall", name: "OpenWall", family: "people" }
|
||||
])("$name public discovery", ({ slug, name, family }) => {
|
||||
it("serves the specification through its family and docs index", () => {
|
||||
expect(familyOfSpec(slug)?.slug).toBe(family);
|
||||
expect(listDocs()).toContainEqual(expect.objectContaining({ slug, title: name }));
|
||||
expect(readDoc(slug)).toMatch(/Status: \*{0,2}0\.1/);
|
||||
});
|
||||
|
||||
it("includes a reachable docs URL and the full contract in the LLM feeds", async () => {
|
||||
expect(await llms().text()).toMatch(new RegExp(`\\[${name}\\]\\(https://[^)]+/docs/${slug}\\)`));
|
||||
expect(await llmsFull().text()).toContain(readDoc(slug)!.trim());
|
||||
});
|
||||
|
||||
it("includes the docs route in the sitemap without a blog connection", async () => {
|
||||
const entries = await sitemap();
|
||||
expect(entries.some((entry) => new URL(entry.url).pathname === `/docs/${slug}`)).toBe(true);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue