@pugi/sdk 0.1.0-alpha.10

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.
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ export declare const mcpTrustLevelSchema: z.ZodEnum<["verified", "community", "local", "untrusted"]>;
3
+ export type McpTrustLevel = z.infer<typeof mcpTrustLevelSchema>;
4
+ export declare const mcpServerConfigSchema: z.ZodObject<{
5
+ name: z.ZodString;
6
+ command: z.ZodOptional<z.ZodString>;
7
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
+ url: z.ZodOptional<z.ZodString>;
9
+ trust: z.ZodDefault<z.ZodEnum<["verified", "community", "local", "untrusted"]>>;
10
+ enabled: z.ZodDefault<z.ZodBoolean>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ name: string;
13
+ args: string[];
14
+ trust: "verified" | "community" | "local" | "untrusted";
15
+ enabled: boolean;
16
+ command?: string | undefined;
17
+ url?: string | undefined;
18
+ }, {
19
+ name: string;
20
+ command?: string | undefined;
21
+ args?: string[] | undefined;
22
+ url?: string | undefined;
23
+ trust?: "verified" | "community" | "local" | "untrusted" | undefined;
24
+ enabled?: boolean | undefined;
25
+ }>;
26
+ export type McpServerConfig = z.infer<typeof mcpServerConfigSchema>;
27
+ //# sourceMappingURL=mcp-schemas.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export const mcpTrustLevelSchema = z.enum(['verified', 'community', 'local', 'untrusted']);
3
+ export const mcpServerConfigSchema = z.object({
4
+ name: z.string().min(1),
5
+ command: z.string().min(1).optional(),
6
+ args: z.array(z.string()).default([]),
7
+ url: z.string().url().optional(),
8
+ trust: mcpTrustLevelSchema.default('untrusted'),
9
+ enabled: z.boolean().default(true),
10
+ });
11
+ //# sourceMappingURL=mcp-schemas.js.map
@@ -0,0 +1,65 @@
1
+ import { z } from 'zod';
2
+ export declare const permissionModeSchema: z.ZodEnum<["plan", "ask", "acceptEdits", "auto", "dontAsk", "bypassPermissions"]>;
3
+ export type PermissionMode = z.infer<typeof permissionModeSchema>;
4
+ export declare const permissionDecisionSchema: z.ZodDiscriminatedUnion<"decision", [z.ZodObject<{
5
+ decision: z.ZodLiteral<"allow">;
6
+ reason: z.ZodString;
7
+ source: z.ZodString;
8
+ expiresAt: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ reason: string;
11
+ decision: "allow";
12
+ source: string;
13
+ expiresAt?: string | undefined;
14
+ }, {
15
+ reason: string;
16
+ decision: "allow";
17
+ source: string;
18
+ expiresAt?: string | undefined;
19
+ }>, z.ZodObject<{
20
+ decision: z.ZodLiteral<"ask">;
21
+ reason: z.ZodString;
22
+ risk: z.ZodEnum<["low", "medium", "high"]>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ reason: string;
25
+ decision: "ask";
26
+ risk: "low" | "medium" | "high";
27
+ }, {
28
+ reason: string;
29
+ decision: "ask";
30
+ risk: "low" | "medium" | "high";
31
+ }>, z.ZodObject<{
32
+ decision: z.ZodLiteral<"deny">;
33
+ reason: z.ZodString;
34
+ source: z.ZodString;
35
+ }, "strip", z.ZodTypeAny, {
36
+ reason: string;
37
+ decision: "deny";
38
+ source: string;
39
+ }, {
40
+ reason: string;
41
+ decision: "deny";
42
+ source: string;
43
+ }>]>;
44
+ export type PermissionDecision = z.infer<typeof permissionDecisionSchema>;
45
+ export declare const permissionSettingsSchema: z.ZodObject<{
46
+ mode: z.ZodDefault<z.ZodEnum<["plan", "ask", "acceptEdits", "auto", "dontAsk", "bypassPermissions"]>>;
47
+ allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
48
+ deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
49
+ notAutomatic: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
50
+ codeforgeMode: z.ZodDefault<z.ZodBoolean>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ allow: string[];
53
+ deny: string[];
54
+ mode: "plan" | "ask" | "acceptEdits" | "auto" | "dontAsk" | "bypassPermissions";
55
+ notAutomatic: string[];
56
+ codeforgeMode: boolean;
57
+ }, {
58
+ allow?: string[] | undefined;
59
+ deny?: string[] | undefined;
60
+ mode?: "plan" | "ask" | "acceptEdits" | "auto" | "dontAsk" | "bypassPermissions" | undefined;
61
+ notAutomatic?: string[] | undefined;
62
+ codeforgeMode?: boolean | undefined;
63
+ }>;
64
+ export type PermissionSettings = z.infer<typeof permissionSettingsSchema>;
65
+ //# sourceMappingURL=permission-rules.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ export const permissionModeSchema = z.enum([
3
+ 'plan',
4
+ 'ask',
5
+ 'acceptEdits',
6
+ 'auto',
7
+ 'dontAsk',
8
+ 'bypassPermissions',
9
+ ]);
10
+ export const permissionDecisionSchema = z.discriminatedUnion('decision', [
11
+ z.object({
12
+ decision: z.literal('allow'),
13
+ reason: z.string().min(1),
14
+ source: z.string().min(1),
15
+ expiresAt: z.string().datetime().optional(),
16
+ }),
17
+ z.object({
18
+ decision: z.literal('ask'),
19
+ reason: z.string().min(1),
20
+ risk: z.enum(['low', 'medium', 'high']),
21
+ }),
22
+ z.object({
23
+ decision: z.literal('deny'),
24
+ reason: z.string().min(1),
25
+ source: z.string().min(1),
26
+ }),
27
+ ]);
28
+ export const permissionSettingsSchema = z.object({
29
+ mode: permissionModeSchema.default('auto'),
30
+ allow: z.array(z.string()).default([]),
31
+ deny: z.array(z.string()).default([]),
32
+ notAutomatic: z.array(z.string()).default([]),
33
+ codeforgeMode: z.boolean().default(false),
34
+ });
35
+ //# sourceMappingURL=permission-rules.js.map