@praxis-ai/praxis 0.1.3 → 0.1.5
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/agentCore/index.d.ts +11 -3
- package/dist/applicationLayer/applicationRuntime.js +7 -1
- package/dist/basetool/authoring.d.ts +2 -0
- package/dist/basetool/authoring.js +2 -0
- package/dist/basetool/catalog.d.ts +1 -1
- package/dist/basetool/catalog.js +86 -4
- package/dist/basetool/core/index.d.ts +4 -2
- package/dist/basetool/core/index.js +8 -0
- package/dist/basetool/core/mcpCompletions.d.ts +2 -0
- package/dist/basetool/core/mcpCompletions.js +70 -0
- package/dist/basetool/core/mcpPrompts.d.ts +2 -0
- package/dist/basetool/core/mcpPrompts.js +48 -0
- package/dist/basetool/core/mcpResources.js +41 -5
- package/dist/basetool/profiles.js +15 -1
- package/dist/basetool/registry.d.ts +1 -1
- package/dist/basetool/supportCatalog.js +23 -6
- package/dist/runtimeImplementation/praxisRuntimeKernel.js +1696 -1499
- package/dist/runtimeImplementation/runtime.execEngine/baseToolApprovalScope.js +11 -0
- package/dist/runtimeImplementation/runtime.execEngine/baseToolExecutorPortFactory.js +13 -1
- package/dist/runtimeImplementation/runtime.execEngine/baseToolPolicyAdjudicator.js +14 -0
- package/dist/runtimeImplementation/runtime.execEngine/mcpRuntimeAdapter.d.ts +27 -0
- package/dist/runtimeImplementation/runtime.execEngine/mcpRuntimeAdapter.js +648 -56
- package/dist/runtimeImplementation/runtime.execEngine/promptContextAssembly.d.ts +1 -0
- package/dist/runtimeImplementation/runtime.execEngine/promptContextAssembly.js +18 -0
- package/dist/runtimeImplementation/runtime.mcpPlane/index.d.ts +20 -7
- package/dist/runtimeImplementation/runtime.mcpPlane/index.js +105 -89
- package/dist/toolBase/catalog.d.ts +24 -0
- package/dist/toolBase/catalog.js +41 -3
- package/dist/toolBase/profiles.d.ts +3 -3
- package/dist/toolBase/profiles.js +2 -0
- package/dist/toolBase/types.d.ts +1 -1
- package/examples/raxode-mcp-plus-ten-server.config.json +229 -0
- package/examples/scripts/README.md +8 -2
- package/examples/scripts/mcp-plus-native-smoke.ts +1296 -0
- package/package.json +4 -2
- package/raxode-tui/dist/raxode-cli/backend/agents/codingAgent/prompts/tool-use.md +1 -1
- package/raxode-tui/dist/raxode-cli/backend/application/mcpConfig.d.ts +9 -0
- package/raxode-tui/dist/raxode-cli/backend/application/mcpConfig.js +65 -0
- package/raxode-tui/dist/raxode-cli/backend/application/mcpReadinessSummary.d.ts +28 -0
- package/raxode-tui/dist/raxode-cli/backend/application/mcpReadinessSummary.js +57 -0
- package/raxode-tui/dist/raxode-cli/backend/application/runtimeReadiness.d.ts +5 -1
- package/raxode-tui/dist/raxode-cli/backend/application/runtimeReadiness.js +40 -0
- package/raxode-tui/dist/raxode-cli/backend/application/stdioApplicationServer.js +6 -0
- package/raxode-tui/dist/raxode-cli/backend/directApplicationBackend.d.ts +4 -0
- package/raxode-tui/dist/raxode-cli/backend/directApplicationBackend.js +14 -0
- package/raxode-tui/dist/raxode-cli/backend/raxodeBackend.d.ts +1 -1
- package/raxode-tui/dist/raxode-cli/backend/raxodeBackend.js +16 -1
- package/raxode-tui/dist/raxode-cli/contracts.d.ts +1 -0
- package/raxode-tui/dist/raxode-cli/frontend/bridge/readiness.js +24 -0
- package/raxode-tui/dist/raxode-cli/frontend/tui/app/direct-tui.js +35 -0
- package/raxode-tui/dist/raxode-cli/frontend/tui/cli/raxode-cli.d.ts +2 -0
- package/raxode-tui/dist/raxode-cli/frontend/tui/cli/raxode-cli.js +8 -0
- package/raxode-tui/dist/raxode-cli/frontend/tui/config/raxode-config.d.ts +31 -0
- package/raxode-tui/dist/raxode-cli/frontend/tui/config/raxode-config.js +129 -0
- package/raxode-tui/dist/raxode-cli/index.d.ts +1 -0
- package/raxode-tui/package.json +1 -1
|
@@ -116,6 +116,17 @@ export function createBaseToolApprovalScope(input) {
|
|
|
116
116
|
const key = `${normalize(text(args.serverId)) || "default"}:${normalize(text(args.operation)) || "unknown-operation"}:${normalize(text(args.uri)) || "*"}`;
|
|
117
117
|
return scope(toolId, "mcp", key);
|
|
118
118
|
}
|
|
119
|
+
if (toolId === "mcp.prompts") {
|
|
120
|
+
const key = `${normalize(text(args.serverId)) || "default"}:${normalize(text(args.operation)) || "unknown-operation"}:${normalize(text(args.name)) || "*"}`;
|
|
121
|
+
return scope(toolId, "mcp", key);
|
|
122
|
+
}
|
|
123
|
+
if (toolId === "mcp.completions") {
|
|
124
|
+
const argument = args.argument;
|
|
125
|
+
const argumentName = typeof argument === "object" && argument !== null && !Array.isArray(argument)
|
|
126
|
+
? normalize(text(argument.name)) || "unknown-argument"
|
|
127
|
+
: "unknown-argument";
|
|
128
|
+
return scope(toolId, "mcp", `${normalize(text(args.serverId)) || "default"}:${argumentName}`);
|
|
129
|
+
}
|
|
119
130
|
if (toolId === "skill.load") {
|
|
120
131
|
const key = normalize(text(args.name)) || normalize(text(args.path)) || "unknown-skill";
|
|
121
132
|
return scope(toolId, "registered-source", key);
|
|
@@ -645,9 +645,13 @@ function createMcpExecutor(context) {
|
|
|
645
645
|
"call",
|
|
646
646
|
"stream",
|
|
647
647
|
"listResources",
|
|
648
|
+
"listResourceTemplates",
|
|
648
649
|
"readResource",
|
|
650
|
+
"subscribe",
|
|
651
|
+
"unsubscribe",
|
|
649
652
|
"listPrompts",
|
|
650
653
|
"getPrompt",
|
|
654
|
+
"complete",
|
|
651
655
|
"setRoots",
|
|
652
656
|
"reportProgress",
|
|
653
657
|
"createSamplingMessage",
|
|
@@ -656,12 +660,16 @@ function createMcpExecutor(context) {
|
|
|
656
660
|
]);
|
|
657
661
|
const callTool = base.callTool ?? base.call;
|
|
658
662
|
const streamTool = base.streamTool ?? base.stream;
|
|
659
|
-
|
|
663
|
+
const namespace = {
|
|
660
664
|
...base,
|
|
661
665
|
...(callTool === undefined ? {} : { call: callTool, callTool }),
|
|
662
666
|
...(streamTool === undefined ? {} : { stream: streamTool, streamTool }),
|
|
663
667
|
...(context.adapters?.mcp ?? {}),
|
|
664
668
|
};
|
|
669
|
+
if (configured?.shutdown !== undefined && namespace.__praxisRuntimeOwnedShutdown === undefined) {
|
|
670
|
+
namespace.__praxisRuntimeOwnedShutdown = configured.shutdown;
|
|
671
|
+
}
|
|
672
|
+
return namespace;
|
|
665
673
|
}
|
|
666
674
|
export function listRuntimeBaseToolImplementedPortPaths(context = {}) {
|
|
667
675
|
const ports = new Set(baseToolExecutorPortFactoryDescriptor.implementedAdapters);
|
|
@@ -672,9 +680,13 @@ export function listRuntimeBaseToolImplementedPortPaths(context = {}) {
|
|
|
672
680
|
"mcp.callTool",
|
|
673
681
|
"mcp.listTools",
|
|
674
682
|
"mcp.listResources",
|
|
683
|
+
"mcp.listResourceTemplates",
|
|
675
684
|
"mcp.readResource",
|
|
685
|
+
"mcp.subscribe",
|
|
686
|
+
"mcp.unsubscribe",
|
|
676
687
|
"mcp.listPrompts",
|
|
677
688
|
"mcp.getPrompt",
|
|
689
|
+
"mcp.complete",
|
|
678
690
|
"mcp.setRoots",
|
|
679
691
|
"mcp.reportProgress",
|
|
680
692
|
"mcp.createSamplingMessage",
|
|
@@ -115,6 +115,20 @@ const toolCells = {
|
|
|
115
115
|
standard: { risk: "risky", human: "once", agent: "afterFirstHuman" },
|
|
116
116
|
restricted: { risk: "dangerous", human: "always", agent: "never" },
|
|
117
117
|
},
|
|
118
|
+
"mcp.prompts": {
|
|
119
|
+
bapr: { risk: "none", human: "never", agent: "never" },
|
|
120
|
+
yolo: { risk: "safe", human: "never", agent: "never" },
|
|
121
|
+
permissive: { risk: "safe", human: "never", agent: "never" },
|
|
122
|
+
standard: { risk: "risky", human: "once", agent: "afterFirstHuman" },
|
|
123
|
+
restricted: { risk: "dangerous", human: "always", agent: "never" },
|
|
124
|
+
},
|
|
125
|
+
"mcp.completions": {
|
|
126
|
+
bapr: { risk: "none", human: "never", agent: "never" },
|
|
127
|
+
yolo: { risk: "safe", human: "never", agent: "never" },
|
|
128
|
+
permissive: { risk: "safe", human: "never", agent: "never" },
|
|
129
|
+
standard: { risk: "risky", human: "once", agent: "afterFirstHuman" },
|
|
130
|
+
restricted: { risk: "dangerous", human: "always", agent: "never" },
|
|
131
|
+
},
|
|
118
132
|
"process.kill": {
|
|
119
133
|
bapr: { risk: "none", human: "never", agent: "never" },
|
|
120
134
|
yolo: { risk: "safe", human: "never", agent: "never" },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BaseToolExecutorPort } from "../../basetool/types.js";
|
|
2
|
+
type JsonObject = Record<string, unknown>;
|
|
2
3
|
export type McpRuntimeTransportKind = "stdio" | "http" | "sse";
|
|
3
4
|
export type McpRuntimeServerProfile = {
|
|
4
5
|
serverId: string;
|
|
@@ -17,7 +18,33 @@ export type McpRuntimeServerProfile = {
|
|
|
17
18
|
headers?: Readonly<Record<string, string>>;
|
|
18
19
|
timeoutMs?: number;
|
|
19
20
|
};
|
|
21
|
+
export type McpRuntimeRoot = {
|
|
22
|
+
uri: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
_meta?: Readonly<Record<string, unknown>>;
|
|
25
|
+
};
|
|
26
|
+
export type McpRuntimeHostRequest = {
|
|
27
|
+
serverId: string;
|
|
28
|
+
connectionId: string;
|
|
29
|
+
method: string;
|
|
30
|
+
requestId?: string | number | null;
|
|
31
|
+
params: JsonObject;
|
|
32
|
+
};
|
|
33
|
+
export type McpRuntimeHostNotification = {
|
|
34
|
+
serverId: string;
|
|
35
|
+
connectionId: string;
|
|
36
|
+
method: string;
|
|
37
|
+
params: JsonObject;
|
|
38
|
+
};
|
|
39
|
+
export type McpRuntimeHostHooks = {
|
|
40
|
+
listRoots?: (request: McpRuntimeHostRequest) => Promise<readonly McpRuntimeRoot[]> | readonly McpRuntimeRoot[];
|
|
41
|
+
createSamplingMessage?: (request: McpRuntimeHostRequest) => Promise<unknown> | unknown;
|
|
42
|
+
elicit?: (request: McpRuntimeHostRequest) => Promise<unknown> | unknown;
|
|
43
|
+
onNotification?: (notification: McpRuntimeHostNotification) => Promise<void> | void;
|
|
44
|
+
};
|
|
20
45
|
export type McpRuntimeAdapterOptions = {
|
|
21
46
|
servers: readonly McpRuntimeServerProfile[];
|
|
47
|
+
host?: McpRuntimeHostHooks;
|
|
22
48
|
};
|
|
23
49
|
export declare function createMcpRuntimeAdapter(options: McpRuntimeAdapterOptions): NonNullable<BaseToolExecutorPort["mcp"]>;
|
|
50
|
+
export {};
|