@handlebar/governance-schema 0.0.6-dev.6 → 0.0.6-dev.8
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/audit/events.base.d.ts +1 -5
- package/dist/audit/events.d.ts +28 -193
- package/dist/audit/events.llm.d.ts +7 -11
- package/dist/audit/events.tools.d.ts +162 -0
- package/dist/audit/governance-actions.d.ts +22 -0
- package/dist/audit/index.d.ts +2 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3337 -2098
- package/dist/policies.d.ts +19 -0
- package/dist/rules/common.d.ts +5 -10
- package/dist/rules/condition.d.ts +1337 -19
- package/dist/rules/custom.d.ts +8 -7
- package/dist/rules/effects.d.ts +18 -11
- package/dist/rules/enduser.d.ts +17 -15
- package/dist/rules/index.d.ts +8 -7
- package/dist/rules/metrics.d.ts +62 -24
- package/dist/rules/rule.d.ts +1599 -23
- package/dist/rules/signals.d.ts +79 -44
- package/dist/rules/time.d.ts +55 -27
- package/dist/rules/tools.d.ts +58 -64
- package/package.json +1 -1
package/dist/rules/signals.d.ts
CHANGED
|
@@ -1,44 +1,79 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
from: "
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const RequireSubjectConditionSchema: z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"requireSubject">;
|
|
4
|
+
subjectType: z.ZodString;
|
|
5
|
+
idSystem: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
export type RequireSubjectCondition = z.infer<typeof RequireSubjectConditionSchema>;
|
|
8
|
+
export declare const SignalBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
from: z.ZodLiteral<"enduserId">;
|
|
10
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
11
|
+
from: z.ZodLiteral<"enduserTag">;
|
|
12
|
+
tag: z.ZodString;
|
|
13
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
14
|
+
from: z.ZodLiteral<"toolName">;
|
|
15
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
16
|
+
from: z.ZodLiteral<"toolTag">;
|
|
17
|
+
tag: z.ZodString;
|
|
18
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
19
|
+
from: z.ZodLiteral<"toolArg">;
|
|
20
|
+
path: z.ZodString;
|
|
21
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
22
|
+
from: z.ZodLiteral<"subject">;
|
|
23
|
+
subjectType: z.ZodString;
|
|
24
|
+
role: z.ZodOptional<z.ZodString>;
|
|
25
|
+
field: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
idSystem: "idSystem";
|
|
27
|
+
id: "id";
|
|
28
|
+
}>>;
|
|
29
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
30
|
+
from: z.ZodLiteral<"const">;
|
|
31
|
+
value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
|
|
32
|
+
}, z.core.$strict>], "from">;
|
|
33
|
+
export type SignalBinding = z.infer<typeof SignalBindingSchema>;
|
|
34
|
+
export declare const SignalConditionSchema: z.ZodObject<{
|
|
35
|
+
kind: z.ZodLiteral<"signal">;
|
|
36
|
+
key: z.ZodString;
|
|
37
|
+
args: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
+
from: z.ZodLiteral<"enduserId">;
|
|
39
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
40
|
+
from: z.ZodLiteral<"enduserTag">;
|
|
41
|
+
tag: z.ZodString;
|
|
42
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
+
from: z.ZodLiteral<"toolName">;
|
|
44
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
45
|
+
from: z.ZodLiteral<"toolTag">;
|
|
46
|
+
tag: z.ZodString;
|
|
47
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
48
|
+
from: z.ZodLiteral<"toolArg">;
|
|
49
|
+
path: z.ZodString;
|
|
50
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
51
|
+
from: z.ZodLiteral<"subject">;
|
|
52
|
+
subjectType: z.ZodString;
|
|
53
|
+
role: z.ZodOptional<z.ZodString>;
|
|
54
|
+
field: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
idSystem: "idSystem";
|
|
56
|
+
id: "id";
|
|
57
|
+
}>>;
|
|
58
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
59
|
+
from: z.ZodLiteral<"const">;
|
|
60
|
+
value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
|
|
61
|
+
}, z.core.$strict>], "from">>;
|
|
62
|
+
op: z.ZodEnum<{
|
|
63
|
+
in: "in";
|
|
64
|
+
gt: "gt";
|
|
65
|
+
gte: "gte";
|
|
66
|
+
lt: "lt";
|
|
67
|
+
lte: "lte";
|
|
68
|
+
eq: "eq";
|
|
69
|
+
neq: "neq";
|
|
70
|
+
nin: "nin";
|
|
71
|
+
}>;
|
|
72
|
+
value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
|
|
73
|
+
onMissing: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
allow: "allow";
|
|
75
|
+
block: "block";
|
|
76
|
+
hitl: "hitl";
|
|
77
|
+
}>>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
export type SignalCondition = z.infer<typeof SignalConditionSchema>;
|
package/dist/rules/time.d.ts
CHANGED
|
@@ -1,28 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const DaySchema: z.ZodEnum<{
|
|
3
|
+
mon: "mon";
|
|
4
|
+
tue: "tue";
|
|
5
|
+
wed: "wed";
|
|
6
|
+
thu: "thu";
|
|
7
|
+
fri: "fri";
|
|
8
|
+
sat: "sat";
|
|
9
|
+
sun: "sun";
|
|
10
|
+
}>;
|
|
11
|
+
export type Day = z.infer<typeof DaySchema>;
|
|
12
|
+
export declare const TimeGateConditionSchema: z.ZodObject<{
|
|
13
|
+
kind: z.ZodLiteral<"timeGate">;
|
|
14
|
+
timezone: z.ZodObject<{
|
|
15
|
+
source: z.ZodLiteral<"enduserTag">;
|
|
16
|
+
tag: z.ZodString;
|
|
17
|
+
fallback: z.ZodOptional<z.ZodLiteral<"org">>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
20
|
+
days: z.ZodArray<z.ZodEnum<{
|
|
21
|
+
mon: "mon";
|
|
22
|
+
tue: "tue";
|
|
23
|
+
wed: "wed";
|
|
24
|
+
thu: "thu";
|
|
25
|
+
fri: "fri";
|
|
26
|
+
sat: "sat";
|
|
27
|
+
sun: "sun";
|
|
28
|
+
}>>;
|
|
29
|
+
start: z.ZodString;
|
|
30
|
+
end: z.ZodString;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export type TimeGateCondition = z.infer<typeof TimeGateConditionSchema>;
|
|
34
|
+
declare const ExecutionTimeScopeSchema: z.ZodEnum<{
|
|
35
|
+
tool: "tool";
|
|
36
|
+
total: "total";
|
|
37
|
+
}>;
|
|
38
|
+
export type ExecutionTimeScope = z.infer<typeof ExecutionTimeScopeSchema>;
|
|
39
|
+
export declare const ExecutionTimeConditionSchema: z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"executionTime">;
|
|
41
|
+
scope: z.ZodEnum<{
|
|
42
|
+
tool: "tool";
|
|
43
|
+
total: "total";
|
|
12
44
|
}>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export type ExecutionTimeCondition =
|
|
24
|
-
|
|
25
|
-
scope: ExecutionTimeScope;
|
|
26
|
-
op: "gt" | "gte" | "lt" | "lte" | "eq" | "neq";
|
|
27
|
-
ms: number;
|
|
28
|
-
};
|
|
45
|
+
op: z.ZodEnum<{
|
|
46
|
+
gt: "gt";
|
|
47
|
+
gte: "gte";
|
|
48
|
+
lt: "lt";
|
|
49
|
+
lte: "lte";
|
|
50
|
+
eq: "eq";
|
|
51
|
+
neq: "neq";
|
|
52
|
+
}>;
|
|
53
|
+
ms: z.ZodNumber;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
export type ExecutionTimeCondition = z.infer<typeof ExecutionTimeConditionSchema>;
|
|
56
|
+
export {};
|
package/dist/rules/tools.d.ts
CHANGED
|
@@ -1,64 +1,58 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
*/
|
|
60
|
-
export type MaxCallsCondition = {
|
|
61
|
-
kind: "maxCalls";
|
|
62
|
-
selector: MaxCallsSelector;
|
|
63
|
-
max: number;
|
|
64
|
-
};
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ToolNameConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"toolName">;
|
|
4
|
+
op: z.ZodEnum<{
|
|
5
|
+
eq: "eq";
|
|
6
|
+
neq: "neq";
|
|
7
|
+
contains: "contains";
|
|
8
|
+
startsWith: "startsWith";
|
|
9
|
+
endsWith: "endsWith";
|
|
10
|
+
glob: "glob";
|
|
11
|
+
}>;
|
|
12
|
+
value: z.ZodString;
|
|
13
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"toolName">;
|
|
15
|
+
op: z.ZodLiteral<"in">;
|
|
16
|
+
value: z.ZodArray<z.ZodString>;
|
|
17
|
+
}, z.core.$strict>], "op">;
|
|
18
|
+
export type ToolNameCondition = z.infer<typeof ToolNameConditionSchema>;
|
|
19
|
+
export declare const ToolTagConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"toolTag">;
|
|
21
|
+
op: z.ZodLiteral<"has">;
|
|
22
|
+
tag: z.ZodString;
|
|
23
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"toolTag">;
|
|
25
|
+
op: z.ZodLiteral<"anyOf">;
|
|
26
|
+
tags: z.ZodArray<z.ZodString>;
|
|
27
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"toolTag">;
|
|
29
|
+
op: z.ZodLiteral<"allOf">;
|
|
30
|
+
tags: z.ZodArray<z.ZodString>;
|
|
31
|
+
}, z.core.$strict>], "op">;
|
|
32
|
+
export type ToolTagCondition = z.infer<typeof ToolTagConditionSchema>;
|
|
33
|
+
export declare const SequenceConditionSchema: z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"sequence">;
|
|
35
|
+
mustHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
|
+
mustNotHaveCalled: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export type SequenceCondition = z.infer<typeof SequenceConditionSchema>;
|
|
39
|
+
export declare const MaxCallsSelectorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
40
|
+
by: z.ZodLiteral<"toolName">;
|
|
41
|
+
patterns: z.ZodArray<z.ZodString>;
|
|
42
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
+
by: z.ZodLiteral<"toolTag">;
|
|
44
|
+
tags: z.ZodArray<z.ZodString>;
|
|
45
|
+
}, z.core.$strict>], "by">;
|
|
46
|
+
export type MaxCallsSelector = z.infer<typeof MaxCallsSelectorSchema>;
|
|
47
|
+
export declare const MaxCallsConditionSchema: z.ZodObject<{
|
|
48
|
+
kind: z.ZodLiteral<"maxCalls">;
|
|
49
|
+
selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
50
|
+
by: z.ZodLiteral<"toolName">;
|
|
51
|
+
patterns: z.ZodArray<z.ZodString>;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
by: z.ZodLiteral<"toolTag">;
|
|
54
|
+
tags: z.ZodArray<z.ZodString>;
|
|
55
|
+
}, z.core.$strict>], "by">;
|
|
56
|
+
max: z.ZodNumber;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
export type MaxCallsCondition = z.infer<typeof MaxCallsConditionSchema>;
|