mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-14 14:57:28 +00:00
Implement OpenSpec artifacts and SDK contracts
This commit is contained in:
parent
1aa67367b8
commit
17942eef57
16 changed files with 486 additions and 21 deletions
31
packages/sdk/src/index.test.ts
Normal file
31
packages/sdk/src/index.test.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { createAgentSwarmSession, createTask } from "./index.js";
|
||||
|
||||
describe("LogicSRC SDK contract helpers", () => {
|
||||
it("creates task documents with LogicSRC defaults", () => {
|
||||
expect(createTask({
|
||||
title: "Document SDK",
|
||||
description: "Add SDK contract helpers.",
|
||||
board: "/docs",
|
||||
creator_did: "did:example:alice"
|
||||
})).toMatchObject({
|
||||
type: "logicsrc.task",
|
||||
version: "0.1",
|
||||
status: "draft"
|
||||
});
|
||||
});
|
||||
|
||||
it("creates AgentSwarm session documents", () => {
|
||||
expect(createAgentSwarmSession({
|
||||
repo: "profullstack/logicsrc",
|
||||
agents: ["reproduce", "patch"],
|
||||
yolo: true,
|
||||
openspec: true
|
||||
})).toMatchObject({
|
||||
type: "logicsrc.agentswarm.session",
|
||||
mode: "yolo",
|
||||
openspec_compatible: true,
|
||||
slave_agents: ["reproduce", "patch"]
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue