File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ Autonomous agents fail at scale without shared meaning:
2828** Protocol-Commons** fixes this with a global action language:
2929canonical verbs + JSON Schemas + strict validation.
3030
31- If agents can’t agree on what actions mean → ** nothing works** .
32-
31+ ** If agents can’t agree on what actions mean → nothing works.**
3332
3433---
3534## Real verbs. Real receipts.
@@ -87,19 +86,18 @@ npx cl-validate examples/v1.0.0/commons/summarize/request.json
8786** Programmatic usage**
8887```
8988import Ajv from "ajv";
90- import req from "@commandlayer/protocol-commons/schemas/v1.0.0/commons/analyze/requests/analyze.request.schema.json";
89+ import analyzeRequest from "@commandlayer/protocol-commons/schemas/v1.0.0/commons/analyze/requests/analyze.request.schema.json";
9190
9291const ajv = new Ajv({ strict: true });
93- const validate = ajv.compile(req );
92+ const validate = ajv.compile(analyzeRequest );
9493
95- console.log(validate( {
94+ const input = {
9695 verb: "analyze",
9796 content: "CommandLayer defines semantics."
98- }));
99-
97+ };
10098
10199console.log(validate(input)); // true or false
102- console.log(validate.errors); // schema-aligned diagnostics if invalid
100+ console.log(validate.errors); // diagnostics if invalid
103101```
104102
105103## What Commons enables
@@ -423,3 +421,4 @@ CommandLayer follows a clean separation of concerns:
423421
424422
425423
424+
You can’t perform that action at this time.
0 commit comments