@handlebar/governance-schema 0.0.6-dev.1 → 0.0.6-dev.2

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.
@@ -48,6 +48,27 @@ export type ToolTagCondition = {
48
48
  op: "allOf";
49
49
  tags: string[];
50
50
  };
51
+ /**
52
+ * Match on arbitrary tags assigned to the enduser.
53
+ * "enduser" in this context means the users of a Handlebar user.
54
+ * - has: existence AND truthiness of the tag. E.g. "has:tier" would be false if "tier=0", "tier=false", or no "tier" tag exists.
55
+ * - hasValue: tag exists and has an exact given value
56
+ */
57
+ export type EndUserTagCondition = {
58
+ kind: "enduserTag";
59
+ op: "has";
60
+ tag: string;
61
+ } | {
62
+ kind: "enduserTag";
63
+ op: "hasValue";
64
+ tag: string;
65
+ value: string;
66
+ } | {
67
+ kind: "enduserTag";
68
+ op: "hasValueAny";
69
+ tag: string;
70
+ values: string[];
71
+ };
51
72
  /**
52
73
  * Scope for execution time measurement.
53
74
  * - "tool": the single tool call duration
@@ -118,4 +139,4 @@ export type NotCondition = {
118
139
  /**
119
140
  * The full condition algebra supported by the rule engine.
120
141
  */
121
- export type RuleCondition = ToolNameCondition | ToolTagCondition | ExecutionTimeCondition | SequenceCondition | MaxCallsCondition | CustomFunctionCondition | AndCondition | OrCondition | NotCondition;
142
+ export type RuleCondition = ToolNameCondition | ToolTagCondition | EndUserTagCondition | ExecutionTimeCondition | SequenceCondition | MaxCallsCondition | CustomFunctionCondition | AndCondition | OrCondition | NotCondition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handlebar/governance-schema",
3
- "version": "0.0.6-dev.1",
3
+ "version": "0.0.6-dev.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",