@plures/praxis 1.2.41 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{chunk-BBP2F7TT.js → chunk-MJK3IYTJ.js} +123 -5
- package/dist/browser/{chunk-FCEH7WMH.js → chunk-N63K4KWS.js} +1 -1
- package/dist/browser/{engine-65QDGCAN.js → engine-YIEGSX7U.js} +1 -1
- package/dist/browser/index.d.ts +2 -2
- package/dist/browser/index.js +10 -5
- package/dist/browser/integrations/svelte.d.ts +2 -2
- package/dist/browser/integrations/svelte.js +2 -2
- package/dist/browser/{reactive-engine.svelte-Cqd8Mod2.d.ts → reactive-engine.svelte-DjynI82A.d.ts} +83 -4
- package/dist/node/chunk-2IUFZBH3.js +87 -0
- package/dist/node/{chunk-WZ6B3LZ6.js → chunk-7CSWBDFL.js} +3 -56
- package/dist/node/{chunk-32YFEEML.js → chunk-7M3HV4XR.js} +4 -4
- package/dist/node/{chunk-PTH6MD6P.js → chunk-FWOXU4MM.js} +1 -1
- package/dist/node/{chunk-BBP2F7TT.js → chunk-KMJWAFZV.js} +128 -5
- package/dist/node/chunk-PGVSB6NR.js +59 -0
- package/dist/node/cli/index.cjs +1078 -211
- package/dist/node/cli/index.js +21 -2
- package/dist/node/cloud/index.d.cts +1 -1
- package/dist/node/cloud/index.d.ts +1 -1
- package/dist/node/{engine-7CXQV6RC.js → engine-FEN5IYZ5.js} +1 -1
- package/dist/node/index.cjs +1633 -59
- package/dist/node/index.d.cts +769 -5
- package/dist/node/index.d.ts +769 -5
- package/dist/node/index.js +1375 -45
- package/dist/node/integrations/svelte.cjs +123 -5
- package/dist/node/integrations/svelte.d.cts +3 -3
- package/dist/node/integrations/svelte.d.ts +3 -3
- package/dist/node/integrations/svelte.js +3 -3
- package/dist/node/{protocol-BocKczNv.d.ts → protocol-DcyGMmWY.d.cts} +7 -0
- package/dist/node/{protocol-BocKczNv.d.cts → protocol-DcyGMmWY.d.ts} +7 -0
- package/dist/node/{reactive-engine.svelte-CGe8SpVE.d.cts → reactive-engine.svelte-Cg0Yc2Hs.d.cts} +90 -6
- package/dist/node/{reactive-engine.svelte-D-xTDxT5.d.ts → reactive-engine.svelte-DekxqFu0.d.ts} +90 -6
- package/dist/node/{reverse-W7THPV45.js → reverse-YD3CWIGM.js} +3 -2
- package/dist/node/rules-4DAJ4Z4N.js +7 -0
- package/dist/node/server-SYZPDULV.js +361 -0
- package/dist/node/{validate-EN3M4FUR.js → validate-TQGVIG7G.js} +4 -3
- package/package.json +29 -3
- package/src/__tests__/engine-v2.test.ts +532 -0
- package/src/__tests__/expectations.test.ts +364 -0
- package/src/__tests__/factory.test.ts +426 -0
- package/src/__tests__/mcp-server.test.ts +310 -0
- package/src/__tests__/project.test.ts +396 -0
- package/src/cli/index.ts +28 -0
- package/src/core/completeness.ts +274 -0
- package/src/core/engine.ts +47 -5
- package/src/core/pluresdb/store.ts +9 -3
- package/src/core/protocol.ts +7 -0
- package/src/core/rule-result.ts +130 -0
- package/src/core/rules.ts +12 -5
- package/src/core/ui-rules.ts +340 -0
- package/src/expectations/expectations.ts +471 -0
- package/src/expectations/index.ts +29 -0
- package/src/expectations/types.ts +95 -0
- package/src/factory/factory.ts +634 -0
- package/src/factory/index.ts +27 -0
- package/src/factory/types.ts +64 -0
- package/src/index.ts +84 -0
- package/src/mcp/index.ts +33 -0
- package/src/mcp/server.ts +485 -0
- package/src/mcp/types.ts +161 -0
- package/src/project/index.ts +31 -0
- package/src/project/project.ts +423 -0
- package/src/project/types.ts +87 -0
- package/src/vite/completeness-plugin.ts +72 -0
- /package/dist/node/{chunk-R2PSBPKQ.js → chunk-TEMFJOIH.js} +0 -0
package/dist/node/cli/index.js
CHANGED
|
@@ -687,6 +687,25 @@ cloudCmd.command("usage").description("View cloud usage metrics").action(async (
|
|
|
687
687
|
process.exit(1);
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
|
+
program.command("mcp").description("Start the Praxis MCP server (Model Context Protocol) for AI assistant integration").option("--name <name>", "Server name", "@plures/praxis").option("--version <version>", "Server version", "1.0.0").action(async (options) => {
|
|
691
|
+
try {
|
|
692
|
+
const { createPraxisMcpServer } = await import("../server-SYZPDULV.js");
|
|
693
|
+
const { PraxisRegistry } = await import("../rules-4DAJ4Z4N.js");
|
|
694
|
+
const registry = new PraxisRegistry({
|
|
695
|
+
compliance: { enabled: false }
|
|
696
|
+
});
|
|
697
|
+
const server = createPraxisMcpServer({
|
|
698
|
+
name: options.name,
|
|
699
|
+
version: options.version,
|
|
700
|
+
initialContext: {},
|
|
701
|
+
registry
|
|
702
|
+
});
|
|
703
|
+
await server.start();
|
|
704
|
+
} catch (error) {
|
|
705
|
+
console.error("Error starting MCP server:", error);
|
|
706
|
+
process.exit(1);
|
|
707
|
+
}
|
|
708
|
+
});
|
|
690
709
|
program.command("verify <type>").description("Verify project implementation (e.g., implementation)").option("-d, --detailed", "Show detailed analysis").action(async (type, options) => {
|
|
691
710
|
try {
|
|
692
711
|
const { verify } = await import("../verify-7VZRP2WS.js");
|
|
@@ -698,7 +717,7 @@ program.command("verify <type>").description("Verify project implementation (e.g
|
|
|
698
717
|
});
|
|
699
718
|
program.command("validate").description("Validate contract coverage for rules and constraints").option("--output <format>", "Output format (console, json, sarif)", "console").option("--strict", "Exit with error if contracts are missing", false).option("--registry <path>", "Path to registry module").option("--tests", "Check for tests for each rule/constraint", true).option("--spec", "Check for specs for each rule/constraint", true).option("--emit-facts", "Emit ContractMissing facts JSON payload", false).option("--gap-output <file>", "Write contract-gap payload to file").option("--ledger <dir>", "Write logic ledger snapshots to directory").option("--author <name>", "Author name for ledger entries", "system").action(async (options) => {
|
|
700
719
|
try {
|
|
701
|
-
const { validateCommand } = await import("../validate-
|
|
720
|
+
const { validateCommand } = await import("../validate-TQGVIG7G.js");
|
|
702
721
|
await validateCommand(options);
|
|
703
722
|
} catch (error) {
|
|
704
723
|
console.error("Error validating contracts:", error);
|
|
@@ -707,7 +726,7 @@ program.command("validate").description("Validate contract coverage for rules an
|
|
|
707
726
|
});
|
|
708
727
|
program.command("reverse").description("Reverse engineer contracts from existing codebase").option("-d, --dir <path>", "Root directory to scan", process.cwd()).option("--ai <provider>", "AI provider (none, github-copilot, openai, auto)", "none").option("-o, --output <dir>", "Output directory for contracts", "./contracts").option("--ledger", "Write to logic ledger", false).option("--dry-run", "Dry run mode (no files written)", false).option("-i, --interactive", "Interactive mode (prompt for each)", false).option("--confidence <threshold>", "Confidence threshold (0.0-1.0)", "0.7").option("--limit <n>", "Max number of rules to process").option("--author <name>", "Author name for ledger entries", "reverse-engineer").option("--format <format>", "Output format (json, yaml)", "json").action(async (options) => {
|
|
709
728
|
try {
|
|
710
|
-
const { reverseCommand } = await import("../reverse-
|
|
729
|
+
const { reverseCommand } = await import("../reverse-YD3CWIGM.js");
|
|
711
730
|
await reverseCommand(options);
|
|
712
731
|
} catch (error) {
|
|
713
732
|
console.error("Error reverse engineering contracts:", error);
|