@datatechsolutions/ui 2.11.81 → 2.11.82

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.
Files changed (57) hide show
  1. package/dist/astrlabe/contracts.d.mts +5 -0
  2. package/dist/astrlabe/contracts.d.ts +5 -0
  3. package/dist/astrlabe/index.d.mts +11 -83
  4. package/dist/astrlabe/index.d.ts +11 -83
  5. package/dist/astrlabe/index.js +175 -4777
  6. package/dist/astrlabe/index.js.map +1 -1
  7. package/dist/astrlabe/index.mjs +3 -4740
  8. package/dist/astrlabe/index.mjs.map +1 -1
  9. package/dist/astrlabe/workflow-canvas.d.mts +69 -5
  10. package/dist/astrlabe/workflow-canvas.d.ts +69 -5
  11. package/dist/chunk-6PBTB5ZX.js +165 -0
  12. package/dist/chunk-6PBTB5ZX.js.map +1 -0
  13. package/dist/chunk-HAZP5J67.mjs +4781 -0
  14. package/dist/chunk-HAZP5J67.mjs.map +1 -0
  15. package/dist/chunk-HZ4LOVHM.js +46 -0
  16. package/dist/chunk-HZ4LOVHM.js.map +1 -0
  17. package/dist/chunk-K4QJV3GC.js +4825 -0
  18. package/dist/chunk-K4QJV3GC.js.map +1 -0
  19. package/dist/chunk-UHHPBREK.mjs +135 -0
  20. package/dist/chunk-UHHPBREK.mjs.map +1 -0
  21. package/dist/chunk-ZJPNP2YW.mjs +44 -0
  22. package/dist/chunk-ZJPNP2YW.mjs.map +1 -0
  23. package/dist/{workflow-canvas-NSxfr5dy.d.ts → index-AioB90qq.d.mts} +2 -67
  24. package/dist/{workflow-canvas-D4928AfA.d.mts → index-D5ai0cGZ.d.ts} +2 -67
  25. package/dist/platform/index.d.mts +41 -0
  26. package/dist/platform/index.d.ts +41 -0
  27. package/dist/platform/index.js +237 -0
  28. package/dist/platform/index.js.map +1 -0
  29. package/dist/platform/index.mjs +109 -0
  30. package/dist/platform/index.mjs.map +1 -0
  31. package/dist/platform/pages/index.d.mts +272 -0
  32. package/dist/platform/pages/index.d.ts +272 -0
  33. package/dist/platform/pages/index.js +1793 -0
  34. package/dist/platform/pages/index.js.map +1 -0
  35. package/dist/platform/pages/index.mjs +1777 -0
  36. package/dist/platform/pages/index.mjs.map +1 -0
  37. package/dist/platform/rbac.d.mts +41 -0
  38. package/dist/platform/rbac.d.ts +41 -0
  39. package/dist/platform/rbac.js +13 -0
  40. package/dist/platform/rbac.js.map +1 -0
  41. package/dist/platform/rbac.mjs +4 -0
  42. package/dist/platform/rbac.mjs.map +1 -0
  43. package/dist/platform/utils/index.d.mts +32 -0
  44. package/dist/platform/utils/index.d.ts +32 -0
  45. package/dist/platform/utils/index.js +131 -0
  46. package/dist/platform/utils/index.js.map +1 -0
  47. package/dist/platform/utils/index.mjs +119 -0
  48. package/dist/platform/utils/index.mjs.map +1 -0
  49. package/dist/platform/windsock-admin-client.d.mts +57 -0
  50. package/dist/platform/windsock-admin-client.d.ts +57 -0
  51. package/dist/platform/windsock-admin-client.js +125 -0
  52. package/dist/platform/windsock-admin-client.js.map +1 -0
  53. package/dist/platform/windsock-admin-client.mjs +4 -0
  54. package/dist/platform/windsock-admin-client.mjs.map +1 -0
  55. package/dist/rule-form-F5jBOeqk.d.mts +79 -0
  56. package/dist/rule-form-F5jBOeqk.d.ts +79 -0
  57. package/package.json +27 -1
@@ -0,0 +1,79 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ /**
4
+ * Rule editing types.
5
+ *
6
+ * Mirrors the shape the Rust `RuleExecutor`
7
+ * (`lambda-rs/crates/astrlabe-handlers/src/engine/executors/rule.rs`) reads
8
+ * from `astrlabe.agent_rules.condition` + `action`. The UI builder below
9
+ * writes exactly this shape, so round-tripping through the backend is a
10
+ * no-op.
11
+ */
12
+ type SimpleComparisonOperator = 'truthy' | 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains';
13
+ type RuleConditionOperator = SimpleComparisonOperator | 'regex_match' | 'threshold' | 'time_window' | 'boolean_expression';
14
+ type TimeWindow = {
15
+ startHour: number;
16
+ endHour: number;
17
+ startMinute?: number;
18
+ endMinute?: number;
19
+ /** 0 = Sunday, 6 = Saturday. Omit to match every day. */
20
+ daysOfWeek?: number[];
21
+ };
22
+ /**
23
+ * Canonical rule-condition shape. The executor branches on `operator`,
24
+ * so every form tree ultimately serializes to this.
25
+ */
26
+ type RuleCondition = {
27
+ operator: RuleConditionOperator;
28
+ /** Simple operators + regex_match + threshold + time_window */
29
+ field?: string;
30
+ /** Simple operators + threshold */
31
+ value?: string | number | boolean | null;
32
+ /** regex_match */
33
+ pattern?: string;
34
+ /** threshold — which direction `value` is compared in. */
35
+ comparison?: 'gt' | 'gte' | 'lt' | 'lte';
36
+ /** time_window */
37
+ timezone?: string;
38
+ windows?: TimeWindow[];
39
+ /** boolean_expression */
40
+ combinator?: 'and' | 'or';
41
+ operands?: RuleCondition[];
42
+ };
43
+ type RuleAction = {
44
+ type: string;
45
+ params?: Record<string, unknown>;
46
+ };
47
+ /** `agent_rules.status` free-form string — keep the UI picker aligned
48
+ * with the values the engine / audit trail recognizes today. */
49
+ declare const RULE_STATUS_OPTIONS: readonly ["draft", "active", "archived"];
50
+ type RuleStatus = (typeof RULE_STATUS_OPTIONS)[number];
51
+ declare const TIMEZONE_OPTIONS: readonly ["UTC", "America/Sao_Paulo", "America/New_York", "America/Los_Angeles", "Europe/London", "Europe/Lisbon"];
52
+
53
+ type RuleFormValue = {
54
+ ruleId?: string;
55
+ name: string;
56
+ description?: string;
57
+ enabled: boolean;
58
+ priority: number;
59
+ status?: RuleStatus;
60
+ validFrom?: string | null;
61
+ validUntil?: string | null;
62
+ tags?: string[];
63
+ condition: RuleCondition;
64
+ action: RuleAction;
65
+ };
66
+ type Props = {
67
+ value: RuleFormValue;
68
+ onChange: (next: RuleFormValue) => void;
69
+ };
70
+ /**
71
+ * Full-field rule editor used inside the create/edit modal. Composes the
72
+ * visual condition + action builders and exposes the schedule / tagging /
73
+ * lifecycle fields that the `agent_rules` entity has but the old JSON-
74
+ * textarea form never surfaced.
75
+ */
76
+ declare function RuleForm({ value, onChange }: Props): react_jsx_runtime.JSX.Element;
77
+ declare function defaultRuleForm(): RuleFormValue;
78
+
79
+ export { type RuleFormValue as R, TIMEZONE_OPTIONS as T, type RuleCondition as a, type RuleAction as b, RULE_STATUS_OPTIONS as c, type RuleConditionOperator as d, RuleForm as e, type RuleStatus as f, type TimeWindow as g, defaultRuleForm as h };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datatechsolutions/ui",
3
- "version": "2.11.81",
3
+ "version": "2.11.82",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -55,6 +55,31 @@
55
55
  "import": "./dist/brand/index.mjs",
56
56
  "require": "./dist/brand/index.js"
57
57
  },
58
+ "./platform": {
59
+ "types": "./dist/platform/index.d.ts",
60
+ "import": "./dist/platform/index.mjs",
61
+ "require": "./dist/platform/index.js"
62
+ },
63
+ "./platform/pages": {
64
+ "types": "./dist/platform/pages/index.d.ts",
65
+ "import": "./dist/platform/pages/index.mjs",
66
+ "require": "./dist/platform/pages/index.js"
67
+ },
68
+ "./platform/windsock-admin-client": {
69
+ "types": "./dist/platform/windsock-admin-client.d.ts",
70
+ "import": "./dist/platform/windsock-admin-client.mjs",
71
+ "require": "./dist/platform/windsock-admin-client.js"
72
+ },
73
+ "./platform/rbac": {
74
+ "types": "./dist/platform/rbac.d.ts",
75
+ "import": "./dist/platform/rbac.mjs",
76
+ "require": "./dist/platform/rbac.js"
77
+ },
78
+ "./platform/utils": {
79
+ "types": "./dist/platform/utils/index.d.ts",
80
+ "import": "./dist/platform/utils/index.mjs",
81
+ "require": "./dist/platform/utils/index.js"
82
+ },
58
83
  "./styles": "./src/styles/liquid-glass.css",
59
84
  "./styles/*": "./src/styles/*"
60
85
  },
@@ -97,6 +122,7 @@
97
122
  "lucide-react": ">=0.400",
98
123
  "react": ">=18",
99
124
  "react-dom": ">=18",
125
+ "react-router": ">=7",
100
126
  "react-transition-progress": ">=0",
101
127
  "zod": ">=3",
102
128
  "zustand": ">=5"