diff --git a/apps/logicsrc-web/contract/openfleet-discovery.contract.test.ts b/apps/logicsrc-web/contract/openfleet-discovery.contract.test.ts index 72d2e53..17d915f 100644 --- a/apps/logicsrc-web/contract/openfleet-discovery.contract.test.ts +++ b/apps/logicsrc-web/contract/openfleet-discovery.contract.test.ts @@ -8,20 +8,23 @@ 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("OpenFleet public discovery", () => { - it("serves the specification through the process family and docs index", () => { - expect(familyOfSpec("openfleet")?.slug).toBe("process"); - expect(listDocs()).toContainEqual(expect.objectContaining({ slug: "openfleet", title: "OpenFleet" })); - expect(readDoc("openfleet")).toContain('"provider": "coinpay"'); +describe.each([ + { slug: "openfleet", name: "OpenFleet", family: "process" }, + { 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)).toContain("0.1 draft"); }); it("includes a reachable docs URL and the full contract in the LLM feeds", async () => { - expect(await llms().text()).toMatch(/\[OpenFleet\]\(https:\/\/[^)]+\/docs\/openfleet\)/); - expect(await llmsFull().text()).toContain(readDoc("openfleet")!.trim()); + 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/openfleet")).toBe(true); + expect(entries.some((entry) => new URL(entry.url).pathname === `/docs/${slug}`)).toBe(true); }); }); diff --git a/package-lock.json b/package-lock.json index 1908a61..e6ab6cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8947,7 +8947,7 @@ }, "packages/cli": { "name": "@logicsrc/cli", - "version": "0.2.0", + "version": "0.2.1", "dependencies": { "@fission-ai/openspec": "^1.13.0", "@logicsrc/account-core": "file:../account-core", @@ -9063,12 +9063,13 @@ }, "packages/schemas": { "name": "@logicsrc/schemas", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT" }, "packages/sdk": { "name": "@logicsrc/sdk", "version": "0.1.0", + "license": "MIT", "devDependencies": { "vitest": "^4.0.8" } @@ -9087,10 +9088,10 @@ }, "packages/validators": { "name": "@logicsrc/validators", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "dependencies": { - "@logicsrc/schemas": "^0.1.0", + "@logicsrc/schemas": "^0.1.1", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "yaml": "^2.8.1" diff --git a/packages/cli/package.json b/packages/cli/package.json index e0820b3..3484500 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@logicsrc/cli", - "version": "0.2.0", + "version": "0.2.1", "description": "LogicSRC CLI: every LogicSRC standard and tool as one command.", "type": "module", "main": "./dist/index.js", diff --git a/packages/schemas/README.md b/packages/schemas/README.md index 27c4db8..2ea1af9 100644 --- a/packages/schemas/README.md +++ b/packages/schemas/README.md @@ -15,6 +15,9 @@ Schema families include: sender-side audience jobs and private delivery events. Fixtures are in `fixtures/openwall`. See `docs/openwall.md` for consent, routing, and runtime requirements beyond structural validation; no OpenWall delivery runtime ships. +- **OpenFleet draft** — the `openfleet` export describes fleets of OpenAgent + profiles and OpenSwarm file-key references, with metadata and CoinPay rental + offers. `@logicsrc/validators` also checks membership and rental references. ## Install diff --git a/packages/schemas/package.json b/packages/schemas/package.json index 671b762..0c4621a 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -1,7 +1,7 @@ { "name": "@logicsrc/schemas", - "version": "0.1.0", - "description": "LogicSRC JSON schemas for tasks, agents, runs, events, plugins, the AgentAd ad standard, the OpenOntology knowledge contracts, the OpenContext context plane, the OpenCreds credential vault, and OpenFleet membership and rental offers.", + "version": "0.1.1", + "description": "LogicSRC JSON schemas for tasks, agents, runs, events, plugins, the AgentAd ad standard, the OpenOntology knowledge contracts, the OpenContext context plane, the OpenCreds credential vault, OpenFleet membership and rental offers, and the OpenWall messaging proposal.", "license": "MIT", "type": "module", "repository": { diff --git a/packages/sdk/README.md b/packages/sdk/README.md new file mode 100644 index 0000000..375b59d --- /dev/null +++ b/packages/sdk/README.md @@ -0,0 +1,34 @@ +# @logicsrc/sdk + +LogicSRC contract types and constructors for tasks, AgentSwarm sessions and +OpenFleet descriptors. These helpers construct documents; they do not start +agents, resolve remote identities or initiate payments. + +```sh +npm install @logicsrc/sdk @logicsrc/validators +``` + +```ts +import { createOpenFleet } from "@logicsrc/sdk"; +import { validate } from "@logicsrc/validators"; + +const fleet = createOpenFleet({ + id: "https://example.com/fleets/research", + name: "Research", + owner_did: "operator.coinpay", + members: [{ + kind: "openagent", + id: "analyst.coinpay", + url: "https://example.com/agents/analyst.json" + }] +}); + +const result = validate("openfleet", fleet); +if (!result.ok) throw new Error(JSON.stringify(result.errors)); +``` + +Use `@logicsrc/validators` 0.1.1 or newer for OpenFleet validation. See the +[OpenFleet specification](https://logicsrc.com/docs/openfleet) for member +bindings, exact decimal rental rates and CoinPay settlement metadata. + +MIT © Profullstack, Inc. diff --git a/packages/sdk/package.json b/packages/sdk/package.json index cc18e02..b895a2a 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -11,5 +11,19 @@ }, "devDependencies": { "vitest": "^4.0.8" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/profullstack/logicsrc.git", + "directory": "packages/sdk" + }, + "homepage": "https://github.com/profullstack/logicsrc/tree/master/packages/sdk", + "files": [ + "dist", + "!dist/*.test.*" + ], + "publishConfig": { + "access": "public" } } diff --git a/packages/validators/package.json b/packages/validators/package.json index 78dcb9f..e7e5c28 100644 --- a/packages/validators/package.json +++ b/packages/validators/package.json @@ -1,6 +1,6 @@ { "name": "@logicsrc/validators", - "version": "0.1.0", + "version": "0.1.1", "description": "LogicSRC schema validation helpers.", "type": "module", "main": "./dist/index.js", @@ -11,10 +11,10 @@ "scripts": { "build": "tsc -p tsconfig.json", "test": "vitest run src", - "validate:fixtures": "node dist/cli.js task ../schemas/fixtures/task.yaml && node dist/cli.js agent ../schemas/fixtures/agent.yaml && node dist/cli.js agentad-ad ../schemas/fixtures/agentad-ad.yaml && node dist/cli.js agentad-placement ../schemas/fixtures/agentad-placement.yaml && node dist/cli.js repo ../schemas/fixtures/repo.yaml && node dist/cli.js pull-request ../schemas/fixtures/pull-request.yaml && node dist/cli.js openontology-manifest ../schemas/fixtures/openontology/valid/manifest.json && node dist/cli.js openontology-claim ../schemas/fixtures/openontology/valid/claim-relationship.json && node dist/cli.js openontology-changeset ../schemas/fixtures/openontology/valid/changeset.json && node dist/cli.js opencontext-manifest ../schemas/fixtures/opencontext/valid/manifest.json && node dist/cli.js opencontext-object ../schemas/fixtures/opencontext/valid/object-policy.json && node dist/cli.js opencontext-bundle ../schemas/fixtures/opencontext/valid/bundle.json && node dist/cli.js opencontext-decision ../schemas/fixtures/opencontext/valid/decision.json && node dist/cli.js opencontext-role ../schemas/fixtures/opencontext/valid/role.json && node dist/cli.js opencontext-provenance ../schemas/fixtures/opencontext/valid/provenance.json && node dist/cli.js opencontext-diagnostic ../schemas/fixtures/opencontext/valid/diagnostic.json && node dist/cli.js opencontext-audit-event ../schemas/fixtures/opencontext/valid/audit-event.json && node dist/cli.js openfleet ../schemas/fixtures/openfleet/mixed.json" + "validate:fixtures": "node dist/cli.js task ../schemas/fixtures/task.yaml && node dist/cli.js agent ../schemas/fixtures/agent.yaml && node dist/cli.js agentad-ad ../schemas/fixtures/agentad-ad.yaml && node dist/cli.js agentad-placement ../schemas/fixtures/agentad-placement.yaml && node dist/cli.js repo ../schemas/fixtures/repo.yaml && node dist/cli.js pull-request ../schemas/fixtures/pull-request.yaml && node dist/cli.js openontology-manifest ../schemas/fixtures/openontology/valid/manifest.json && node dist/cli.js openontology-claim ../schemas/fixtures/openontology/valid/claim-relationship.json && node dist/cli.js openontology-changeset ../schemas/fixtures/openontology/valid/changeset.json && node dist/cli.js opencontext-manifest ../schemas/fixtures/opencontext/valid/manifest.json && node dist/cli.js opencontext-object ../schemas/fixtures/opencontext/valid/object-policy.json && node dist/cli.js opencontext-bundle ../schemas/fixtures/opencontext/valid/bundle.json && node dist/cli.js opencontext-decision ../schemas/fixtures/opencontext/valid/decision.json && node dist/cli.js opencontext-role ../schemas/fixtures/opencontext/valid/role.json && node dist/cli.js opencontext-provenance ../schemas/fixtures/opencontext/valid/provenance.json && node dist/cli.js opencontext-diagnostic ../schemas/fixtures/opencontext/valid/diagnostic.json && node dist/cli.js opencontext-audit-event ../schemas/fixtures/opencontext/valid/audit-event.json && node dist/cli.js openfleet ../schemas/fixtures/openfleet/mixed.json && node dist/cli.js openwall-message ../schemas/fixtures/openwall/broadcast.json && node dist/cli.js openwall-message ../schemas/fixtures/openwall/direct.json && node dist/cli.js openwall-message ../schemas/fixtures/openwall/announcement.json && node dist/cli.js openwall-receipt ../schemas/fixtures/openwall/receipt-accepted.json && node dist/cli.js openwall-receipt ../schemas/fixtures/openwall/receipt-retrying.json" }, "dependencies": { - "@logicsrc/schemas": "^0.1.0", + "@logicsrc/schemas": "^0.1.1", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "yaml": "^2.8.1"