@harness-control/protocol 0.4.6 → 0.4.7
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/bin/conformance.js +0 -0
- package/dist/mcp-review.d.ts +39 -0
- package/dist/mcp-review.js +13 -0
- package/package.json +1 -1
package/dist/bin/conformance.js
CHANGED
|
File without changes
|
package/dist/mcp-review.d.ts
CHANGED
|
@@ -3,11 +3,34 @@ import { z } from "zod";
|
|
|
3
3
|
export declare const MCP_REVIEW_META_KEY = "io.harness-control/review-v1";
|
|
4
4
|
export declare const MCP_REVIEW_MAX_ACTION_BYTES: number;
|
|
5
5
|
export declare const MCP_REVIEW_MAX_REQUEST_ID_LENGTH = 256;
|
|
6
|
+
export declare const mcpDelegatedReviewSubjectSchema: z.ZodObject<{
|
|
7
|
+
operation_id: z.ZodString;
|
|
8
|
+
tool_name: z.ZodString;
|
|
9
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
10
|
+
binding: z.ZodString;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export type McpDelegatedReviewSubject = z.infer<typeof mcpDelegatedReviewSubjectSchema>;
|
|
13
|
+
export declare const mcpDelegatedReviewRequestSchema: z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"delegated">;
|
|
15
|
+
input_request_id: z.ZodString;
|
|
16
|
+
subject: z.ZodObject<{
|
|
17
|
+
operation_id: z.ZodString;
|
|
18
|
+
tool_name: z.ZodString;
|
|
19
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
20
|
+
binding: z.ZodString;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
}, z.core.$strict>;
|
|
6
23
|
export declare const mcpReviewActionSchema: z.ZodObject<{
|
|
7
24
|
kind: z.ZodLiteral<"mcp_tool">;
|
|
8
25
|
attachment_name: z.ZodString;
|
|
9
26
|
tool_name: z.ZodString;
|
|
10
27
|
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
28
|
+
delegated_subject: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
operation_id: z.ZodString;
|
|
30
|
+
tool_name: z.ZodString;
|
|
31
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
32
|
+
binding: z.ZodString;
|
|
33
|
+
}, z.core.$strict>>;
|
|
11
34
|
}, z.core.$strict>;
|
|
12
35
|
export type McpReviewAction = z.infer<typeof mcpReviewActionSchema>;
|
|
13
36
|
export declare function mcpReviewActionBytes(json: string): Uint8Array;
|
|
@@ -37,6 +60,12 @@ export declare function createMcpReviewContract(): {
|
|
|
37
60
|
attachment_name: z.ZodString;
|
|
38
61
|
tool_name: z.ZodString;
|
|
39
62
|
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
63
|
+
delegated_subject: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
operation_id: z.ZodString;
|
|
65
|
+
tool_name: z.ZodString;
|
|
66
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
67
|
+
binding: z.ZodString;
|
|
68
|
+
}, z.core.$strict>>;
|
|
40
69
|
}, z.core.$strict>>;
|
|
41
70
|
grant: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
42
71
|
request_id: z.ZodString;
|
|
@@ -49,6 +78,16 @@ export declare function createMcpReviewContract(): {
|
|
|
49
78
|
argument: z.ZodString;
|
|
50
79
|
values: z.ZodArray<z.ZodString>;
|
|
51
80
|
}, z.core.$strict>], "kind">>;
|
|
81
|
+
delegated_request: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"delegated">;
|
|
83
|
+
input_request_id: z.ZodString;
|
|
84
|
+
subject: z.ZodObject<{
|
|
85
|
+
operation_id: z.ZodString;
|
|
86
|
+
tool_name: z.ZodString;
|
|
87
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
88
|
+
binding: z.ZodString;
|
|
89
|
+
}, z.core.$strict>;
|
|
90
|
+
}, z.core.$strict>>;
|
|
52
91
|
};
|
|
53
92
|
};
|
|
54
93
|
//# sourceMappingURL=mcp-review.d.ts.map
|
package/dist/mcp-review.js
CHANGED
|
@@ -3,9 +3,21 @@ import { z } from "zod";
|
|
|
3
3
|
export const MCP_REVIEW_META_KEY = "io.harness-control/review-v1";
|
|
4
4
|
export const MCP_REVIEW_MAX_ACTION_BYTES = 64 * 1024;
|
|
5
5
|
export const MCP_REVIEW_MAX_REQUEST_ID_LENGTH = 256;
|
|
6
|
+
export const mcpDelegatedReviewSubjectSchema = z.object({
|
|
7
|
+
operation_id: z.string().min(1).max(256),
|
|
8
|
+
tool_name: z.string().min(1),
|
|
9
|
+
arguments: z.record(z.string(), z.json()),
|
|
10
|
+
binding: z.string().min(1).max(MCP_REVIEW_MAX_ACTION_BYTES),
|
|
11
|
+
}).strict();
|
|
12
|
+
export const mcpDelegatedReviewRequestSchema = z.object({
|
|
13
|
+
kind: z.literal("delegated"),
|
|
14
|
+
input_request_id: z.string().min(1).max(MCP_REVIEW_MAX_REQUEST_ID_LENGTH),
|
|
15
|
+
subject: mcpDelegatedReviewSubjectSchema,
|
|
16
|
+
}).strict();
|
|
6
17
|
export const mcpReviewActionSchema = z.object({
|
|
7
18
|
kind: z.literal("mcp_tool"), attachment_name: z.string().min(1),
|
|
8
19
|
tool_name: z.string().min(1), arguments: z.record(z.string(), z.json()),
|
|
20
|
+
delegated_subject: mcpDelegatedReviewSubjectSchema.optional(),
|
|
9
21
|
}).strict();
|
|
10
22
|
export function mcpReviewActionBytes(json) {
|
|
11
23
|
const bytes = new TextEncoder().encode(json);
|
|
@@ -39,6 +51,7 @@ export function createMcpReviewContract() {
|
|
|
39
51
|
return { version: 1, metadata_key: MCP_REVIEW_META_KEY, max_action_bytes: MCP_REVIEW_MAX_ACTION_BYTES,
|
|
40
52
|
hashing: "sha256-exact-utf8-lowercase-hex", schemas: {
|
|
41
53
|
action: z.toJSONSchema(mcpReviewActionSchema), grant: z.toJSONSchema(mcpReviewGrantSchema), policy: z.toJSONSchema(mcpReviewPolicySchema),
|
|
54
|
+
delegated_request: z.toJSONSchema(mcpDelegatedReviewRequestSchema),
|
|
42
55
|
} };
|
|
43
56
|
}
|
|
44
57
|
//# sourceMappingURL=mcp-review.js.map
|