@adhd/agent-core-policy 2.1.0
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/drizzle/0000_sleepy_bullseye.sql +16 -0
- package/drizzle/0001_pale_marvel_zombies.sql +11 -0
- package/drizzle/0002_category_policy_inheritance.sql +22 -0
- package/drizzle/meta/0000_snapshot.json +119 -0
- package/drizzle/meta/0001_snapshot.json +186 -0
- package/drizzle/meta/0002_snapshot.json +274 -0
- package/drizzle/meta/_journal.json +27 -0
- package/package.json +53 -0
- package/src/db/client.d.ts +7 -0
- package/src/db/client.d.ts.map +1 -0
- package/src/db/client.js +18 -0
- package/src/db/client.js.map +1 -0
- package/src/db/migrate-runner.d.ts +30 -0
- package/src/db/migrate-runner.d.ts.map +1 -0
- package/src/db/migrate-runner.js +34 -0
- package/src/db/migrate-runner.js.map +1 -0
- package/src/db/migrate.d.ts +9 -0
- package/src/db/migrate.d.ts.map +1 -0
- package/src/db/migrate.js +13 -0
- package/src/db/migrate.js.map +1 -0
- package/src/db/schema.d.ts +383 -0
- package/src/db/schema.d.ts.map +1 -0
- package/src/db/schema.js +139 -0
- package/src/db/schema.js.map +1 -0
- package/src/index.d.ts +14 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +20 -0
- package/src/index.js.map +1 -0
- package/src/plugin/index.d.ts +24 -0
- package/src/plugin/index.d.ts.map +1 -0
- package/src/plugin/index.js +140 -0
- package/src/plugin/index.js.map +1 -0
- package/src/plugin/rate-policy.d.ts +34 -0
- package/src/plugin/rate-policy.d.ts.map +1 -0
- package/src/plugin/rate-policy.js +36 -0
- package/src/plugin/rate-policy.js.map +1 -0
- package/src/seed/index.d.ts +39 -0
- package/src/seed/index.d.ts.map +1 -0
- package/src/seed/index.js +62 -0
- package/src/seed/index.js.map +1 -0
- package/src/seed/policy-templates.d.ts +45 -0
- package/src/seed/policy-templates.d.ts.map +1 -0
- package/src/seed/policy-templates.js +189 -0
- package/src/seed/policy-templates.js.map +1 -0
- package/src/seed/policy-types.d.ts +19 -0
- package/src/seed/policy-types.d.ts.map +1 -0
- package/src/seed/policy-types.js +44 -0
- package/src/seed/policy-types.js.map +1 -0
- package/src/store/agent-policy-store.d.ts +172 -0
- package/src/store/agent-policy-store.d.ts.map +1 -0
- package/src/store/agent-policy-store.js +241 -0
- package/src/store/agent-policy-store.js.map +1 -0
- package/src/store/policy-template-store.d.ts +72 -0
- package/src/store/policy-template-store.d.ts.map +1 -0
- package/src/store/policy-template-store.js +118 -0
- package/src/store/policy-template-store.js.map +1 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
CREATE TABLE `policy_policy_templates` (
|
|
2
|
+
`slug` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`type` text NOT NULL,
|
|
4
|
+
`description` text NOT NULL,
|
|
5
|
+
`rules` text NOT NULL,
|
|
6
|
+
`enforcement` text NOT NULL,
|
|
7
|
+
`version` integer DEFAULT 1 NOT NULL,
|
|
8
|
+
`is_system` integer DEFAULT false NOT NULL,
|
|
9
|
+
FOREIGN KEY (`type`) REFERENCES `policy_policy_types`(`slug`) ON UPDATE no action ON DELETE no action
|
|
10
|
+
);
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
CREATE INDEX `idx_policy_templates_type` ON `policy_policy_templates` (`type`);--> statement-breakpoint
|
|
13
|
+
CREATE TABLE `policy_policy_types` (
|
|
14
|
+
`slug` text PRIMARY KEY NOT NULL,
|
|
15
|
+
`description` text NOT NULL
|
|
16
|
+
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
CREATE TABLE `policy_agent_policies` (
|
|
2
|
+
`agent_slug` text NOT NULL,
|
|
3
|
+
`policy_slug` text NOT NULL,
|
|
4
|
+
`override_config` text,
|
|
5
|
+
`is_mandatory` integer DEFAULT false NOT NULL,
|
|
6
|
+
`inherited_from` text,
|
|
7
|
+
PRIMARY KEY(`agent_slug`, `policy_slug`),
|
|
8
|
+
FOREIGN KEY (`policy_slug`) REFERENCES `policy_policy_templates`(`slug`) ON UPDATE no action ON DELETE no action
|
|
9
|
+
);
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
CREATE INDEX `idx_agent_policies_agent_slug` ON `policy_agent_policies` (`agent_slug`);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
-- policy-inheritance: lazy category→policy attachment tables
|
|
2
|
+
-- Decision 1 (decisions.md): LAZY resolution at query time — no fanout trigger.
|
|
3
|
+
-- `category_slug` and `agent_slug` are logical cross-package references (plain text,
|
|
4
|
+
-- no SQLite FK to cross-prefix tables). [Decision 0]
|
|
5
|
+
|
|
6
|
+
CREATE TABLE `policy_category_policies` (
|
|
7
|
+
`category_slug` text NOT NULL,
|
|
8
|
+
`policy_slug` text NOT NULL,
|
|
9
|
+
`is_mandatory` integer DEFAULT false NOT NULL,
|
|
10
|
+
PRIMARY KEY(`category_slug`, `policy_slug`),
|
|
11
|
+
FOREIGN KEY (`policy_slug`) REFERENCES `policy_policy_templates`(`slug`) ON UPDATE no action ON DELETE no action
|
|
12
|
+
);
|
|
13
|
+
--> statement-breakpoint
|
|
14
|
+
CREATE INDEX `idx_category_policies_category_slug` ON `policy_category_policies` (`category_slug`);
|
|
15
|
+
--> statement-breakpoint
|
|
16
|
+
CREATE TABLE `policy_agent_categories` (
|
|
17
|
+
`agent_slug` text NOT NULL,
|
|
18
|
+
`category_slug` text NOT NULL,
|
|
19
|
+
PRIMARY KEY(`agent_slug`, `category_slug`)
|
|
20
|
+
);
|
|
21
|
+
--> statement-breakpoint
|
|
22
|
+
CREATE INDEX `idx_agent_categories_agent_slug` ON `policy_agent_categories` (`agent_slug`);
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "19c38021-4fca-40a2-b462-f6677e3be347",
|
|
5
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
|
+
"tables": {
|
|
7
|
+
"policy_policy_templates": {
|
|
8
|
+
"name": "policy_policy_templates",
|
|
9
|
+
"columns": {
|
|
10
|
+
"slug": {
|
|
11
|
+
"name": "slug",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"type": {
|
|
18
|
+
"name": "type",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"description": {
|
|
25
|
+
"name": "description",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"rules": {
|
|
32
|
+
"name": "rules",
|
|
33
|
+
"type": "text",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false
|
|
37
|
+
},
|
|
38
|
+
"enforcement": {
|
|
39
|
+
"name": "enforcement",
|
|
40
|
+
"type": "text",
|
|
41
|
+
"primaryKey": false,
|
|
42
|
+
"notNull": true,
|
|
43
|
+
"autoincrement": false
|
|
44
|
+
},
|
|
45
|
+
"version": {
|
|
46
|
+
"name": "version",
|
|
47
|
+
"type": "integer",
|
|
48
|
+
"primaryKey": false,
|
|
49
|
+
"notNull": true,
|
|
50
|
+
"autoincrement": false,
|
|
51
|
+
"default": 1
|
|
52
|
+
},
|
|
53
|
+
"is_system": {
|
|
54
|
+
"name": "is_system",
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"primaryKey": false,
|
|
57
|
+
"notNull": true,
|
|
58
|
+
"autoincrement": false,
|
|
59
|
+
"default": false
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"indexes": {
|
|
63
|
+
"idx_policy_templates_type": {
|
|
64
|
+
"name": "idx_policy_templates_type",
|
|
65
|
+
"columns": ["type"],
|
|
66
|
+
"isUnique": false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"foreignKeys": {
|
|
70
|
+
"policy_policy_templates_type_policy_policy_types_slug_fk": {
|
|
71
|
+
"name": "policy_policy_templates_type_policy_policy_types_slug_fk",
|
|
72
|
+
"tableFrom": "policy_policy_templates",
|
|
73
|
+
"tableTo": "policy_policy_types",
|
|
74
|
+
"columnsFrom": ["type"],
|
|
75
|
+
"columnsTo": ["slug"],
|
|
76
|
+
"onDelete": "no action",
|
|
77
|
+
"onUpdate": "no action"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"compositePrimaryKeys": {},
|
|
81
|
+
"uniqueConstraints": {},
|
|
82
|
+
"checkConstraints": {}
|
|
83
|
+
},
|
|
84
|
+
"policy_policy_types": {
|
|
85
|
+
"name": "policy_policy_types",
|
|
86
|
+
"columns": {
|
|
87
|
+
"slug": {
|
|
88
|
+
"name": "slug",
|
|
89
|
+
"type": "text",
|
|
90
|
+
"primaryKey": true,
|
|
91
|
+
"notNull": true,
|
|
92
|
+
"autoincrement": false
|
|
93
|
+
},
|
|
94
|
+
"description": {
|
|
95
|
+
"name": "description",
|
|
96
|
+
"type": "text",
|
|
97
|
+
"primaryKey": false,
|
|
98
|
+
"notNull": true,
|
|
99
|
+
"autoincrement": false
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"indexes": {},
|
|
103
|
+
"foreignKeys": {},
|
|
104
|
+
"compositePrimaryKeys": {},
|
|
105
|
+
"uniqueConstraints": {},
|
|
106
|
+
"checkConstraints": {}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"views": {},
|
|
110
|
+
"enums": {},
|
|
111
|
+
"_meta": {
|
|
112
|
+
"schemas": {},
|
|
113
|
+
"tables": {},
|
|
114
|
+
"columns": {}
|
|
115
|
+
},
|
|
116
|
+
"internal": {
|
|
117
|
+
"indexes": {}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "f9de07b8-bd31-4852-b9db-f6d77c07639d",
|
|
5
|
+
"prevId": "19c38021-4fca-40a2-b462-f6677e3be347",
|
|
6
|
+
"tables": {
|
|
7
|
+
"policy_agent_policies": {
|
|
8
|
+
"name": "policy_agent_policies",
|
|
9
|
+
"columns": {
|
|
10
|
+
"agent_slug": {
|
|
11
|
+
"name": "agent_slug",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": false,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"policy_slug": {
|
|
18
|
+
"name": "policy_slug",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"override_config": {
|
|
25
|
+
"name": "override_config",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": false,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"is_mandatory": {
|
|
32
|
+
"name": "is_mandatory",
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false,
|
|
37
|
+
"default": false
|
|
38
|
+
},
|
|
39
|
+
"inherited_from": {
|
|
40
|
+
"name": "inherited_from",
|
|
41
|
+
"type": "text",
|
|
42
|
+
"primaryKey": false,
|
|
43
|
+
"notNull": false,
|
|
44
|
+
"autoincrement": false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"indexes": {
|
|
48
|
+
"idx_agent_policies_agent_slug": {
|
|
49
|
+
"name": "idx_agent_policies_agent_slug",
|
|
50
|
+
"columns": ["agent_slug"],
|
|
51
|
+
"isUnique": false
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"foreignKeys": {
|
|
55
|
+
"policy_agent_policies_policy_slug_policy_policy_templates_slug_fk": {
|
|
56
|
+
"name": "policy_agent_policies_policy_slug_policy_policy_templates_slug_fk",
|
|
57
|
+
"tableFrom": "policy_agent_policies",
|
|
58
|
+
"tableTo": "policy_policy_templates",
|
|
59
|
+
"columnsFrom": ["policy_slug"],
|
|
60
|
+
"columnsTo": ["slug"],
|
|
61
|
+
"onDelete": "no action",
|
|
62
|
+
"onUpdate": "no action"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"compositePrimaryKeys": {
|
|
66
|
+
"policy_agent_policies_agent_slug_policy_slug_pk": {
|
|
67
|
+
"columns": ["agent_slug", "policy_slug"],
|
|
68
|
+
"name": "policy_agent_policies_agent_slug_policy_slug_pk"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"uniqueConstraints": {},
|
|
72
|
+
"checkConstraints": {}
|
|
73
|
+
},
|
|
74
|
+
"policy_policy_templates": {
|
|
75
|
+
"name": "policy_policy_templates",
|
|
76
|
+
"columns": {
|
|
77
|
+
"slug": {
|
|
78
|
+
"name": "slug",
|
|
79
|
+
"type": "text",
|
|
80
|
+
"primaryKey": true,
|
|
81
|
+
"notNull": true,
|
|
82
|
+
"autoincrement": false
|
|
83
|
+
},
|
|
84
|
+
"type": {
|
|
85
|
+
"name": "type",
|
|
86
|
+
"type": "text",
|
|
87
|
+
"primaryKey": false,
|
|
88
|
+
"notNull": true,
|
|
89
|
+
"autoincrement": false
|
|
90
|
+
},
|
|
91
|
+
"description": {
|
|
92
|
+
"name": "description",
|
|
93
|
+
"type": "text",
|
|
94
|
+
"primaryKey": false,
|
|
95
|
+
"notNull": true,
|
|
96
|
+
"autoincrement": false
|
|
97
|
+
},
|
|
98
|
+
"rules": {
|
|
99
|
+
"name": "rules",
|
|
100
|
+
"type": "text",
|
|
101
|
+
"primaryKey": false,
|
|
102
|
+
"notNull": true,
|
|
103
|
+
"autoincrement": false
|
|
104
|
+
},
|
|
105
|
+
"enforcement": {
|
|
106
|
+
"name": "enforcement",
|
|
107
|
+
"type": "text",
|
|
108
|
+
"primaryKey": false,
|
|
109
|
+
"notNull": true,
|
|
110
|
+
"autoincrement": false
|
|
111
|
+
},
|
|
112
|
+
"version": {
|
|
113
|
+
"name": "version",
|
|
114
|
+
"type": "integer",
|
|
115
|
+
"primaryKey": false,
|
|
116
|
+
"notNull": true,
|
|
117
|
+
"autoincrement": false,
|
|
118
|
+
"default": 1
|
|
119
|
+
},
|
|
120
|
+
"is_system": {
|
|
121
|
+
"name": "is_system",
|
|
122
|
+
"type": "integer",
|
|
123
|
+
"primaryKey": false,
|
|
124
|
+
"notNull": true,
|
|
125
|
+
"autoincrement": false,
|
|
126
|
+
"default": false
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"indexes": {
|
|
130
|
+
"idx_policy_templates_type": {
|
|
131
|
+
"name": "idx_policy_templates_type",
|
|
132
|
+
"columns": ["type"],
|
|
133
|
+
"isUnique": false
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"foreignKeys": {
|
|
137
|
+
"policy_policy_templates_type_policy_policy_types_slug_fk": {
|
|
138
|
+
"name": "policy_policy_templates_type_policy_policy_types_slug_fk",
|
|
139
|
+
"tableFrom": "policy_policy_templates",
|
|
140
|
+
"tableTo": "policy_policy_types",
|
|
141
|
+
"columnsFrom": ["type"],
|
|
142
|
+
"columnsTo": ["slug"],
|
|
143
|
+
"onDelete": "no action",
|
|
144
|
+
"onUpdate": "no action"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"compositePrimaryKeys": {},
|
|
148
|
+
"uniqueConstraints": {},
|
|
149
|
+
"checkConstraints": {}
|
|
150
|
+
},
|
|
151
|
+
"policy_policy_types": {
|
|
152
|
+
"name": "policy_policy_types",
|
|
153
|
+
"columns": {
|
|
154
|
+
"slug": {
|
|
155
|
+
"name": "slug",
|
|
156
|
+
"type": "text",
|
|
157
|
+
"primaryKey": true,
|
|
158
|
+
"notNull": true,
|
|
159
|
+
"autoincrement": false
|
|
160
|
+
},
|
|
161
|
+
"description": {
|
|
162
|
+
"name": "description",
|
|
163
|
+
"type": "text",
|
|
164
|
+
"primaryKey": false,
|
|
165
|
+
"notNull": true,
|
|
166
|
+
"autoincrement": false
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"indexes": {},
|
|
170
|
+
"foreignKeys": {},
|
|
171
|
+
"compositePrimaryKeys": {},
|
|
172
|
+
"uniqueConstraints": {},
|
|
173
|
+
"checkConstraints": {}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"views": {},
|
|
177
|
+
"enums": {},
|
|
178
|
+
"_meta": {
|
|
179
|
+
"schemas": {},
|
|
180
|
+
"tables": {},
|
|
181
|
+
"columns": {}
|
|
182
|
+
},
|
|
183
|
+
"internal": {
|
|
184
|
+
"indexes": {}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "a3b7c1d2-e4f5-6789-abcd-ef1234567890",
|
|
5
|
+
"prevId": "f9de07b8-bd31-4852-b9db-f6d77c07639d",
|
|
6
|
+
"tables": {
|
|
7
|
+
"policy_agent_policies": {
|
|
8
|
+
"name": "policy_agent_policies",
|
|
9
|
+
"columns": {
|
|
10
|
+
"agent_slug": {
|
|
11
|
+
"name": "agent_slug",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": false,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"policy_slug": {
|
|
18
|
+
"name": "policy_slug",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"override_config": {
|
|
25
|
+
"name": "override_config",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": false,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"is_mandatory": {
|
|
32
|
+
"name": "is_mandatory",
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false,
|
|
37
|
+
"default": false
|
|
38
|
+
},
|
|
39
|
+
"inherited_from": {
|
|
40
|
+
"name": "inherited_from",
|
|
41
|
+
"type": "text",
|
|
42
|
+
"primaryKey": false,
|
|
43
|
+
"notNull": false,
|
|
44
|
+
"autoincrement": false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"indexes": {
|
|
48
|
+
"idx_agent_policies_agent_slug": {
|
|
49
|
+
"name": "idx_agent_policies_agent_slug",
|
|
50
|
+
"columns": ["agent_slug"],
|
|
51
|
+
"isUnique": false
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"foreignKeys": {
|
|
55
|
+
"policy_agent_policies_policy_slug_policy_policy_templates_slug_fk": {
|
|
56
|
+
"name": "policy_agent_policies_policy_slug_policy_policy_templates_slug_fk",
|
|
57
|
+
"tableFrom": "policy_agent_policies",
|
|
58
|
+
"tableTo": "policy_policy_templates",
|
|
59
|
+
"columnsFrom": ["policy_slug"],
|
|
60
|
+
"columnsTo": ["slug"],
|
|
61
|
+
"onDelete": "no action",
|
|
62
|
+
"onUpdate": "no action"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"compositePrimaryKeys": {
|
|
66
|
+
"policy_agent_policies_agent_slug_policy_slug_pk": {
|
|
67
|
+
"columns": ["agent_slug", "policy_slug"],
|
|
68
|
+
"name": "policy_agent_policies_agent_slug_policy_slug_pk"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"uniqueConstraints": {},
|
|
72
|
+
"checkConstraints": {}
|
|
73
|
+
},
|
|
74
|
+
"policy_policy_templates": {
|
|
75
|
+
"name": "policy_policy_templates",
|
|
76
|
+
"columns": {
|
|
77
|
+
"slug": {
|
|
78
|
+
"name": "slug",
|
|
79
|
+
"type": "text",
|
|
80
|
+
"primaryKey": true,
|
|
81
|
+
"notNull": true,
|
|
82
|
+
"autoincrement": false
|
|
83
|
+
},
|
|
84
|
+
"type": {
|
|
85
|
+
"name": "type",
|
|
86
|
+
"type": "text",
|
|
87
|
+
"primaryKey": false,
|
|
88
|
+
"notNull": true,
|
|
89
|
+
"autoincrement": false
|
|
90
|
+
},
|
|
91
|
+
"description": {
|
|
92
|
+
"name": "description",
|
|
93
|
+
"type": "text",
|
|
94
|
+
"primaryKey": false,
|
|
95
|
+
"notNull": true,
|
|
96
|
+
"autoincrement": false
|
|
97
|
+
},
|
|
98
|
+
"rules": {
|
|
99
|
+
"name": "rules",
|
|
100
|
+
"type": "text",
|
|
101
|
+
"primaryKey": false,
|
|
102
|
+
"notNull": true,
|
|
103
|
+
"autoincrement": false
|
|
104
|
+
},
|
|
105
|
+
"enforcement": {
|
|
106
|
+
"name": "enforcement",
|
|
107
|
+
"type": "text",
|
|
108
|
+
"primaryKey": false,
|
|
109
|
+
"notNull": true,
|
|
110
|
+
"autoincrement": false
|
|
111
|
+
},
|
|
112
|
+
"version": {
|
|
113
|
+
"name": "version",
|
|
114
|
+
"type": "integer",
|
|
115
|
+
"primaryKey": false,
|
|
116
|
+
"notNull": true,
|
|
117
|
+
"autoincrement": false,
|
|
118
|
+
"default": 1
|
|
119
|
+
},
|
|
120
|
+
"is_system": {
|
|
121
|
+
"name": "is_system",
|
|
122
|
+
"type": "integer",
|
|
123
|
+
"primaryKey": false,
|
|
124
|
+
"notNull": true,
|
|
125
|
+
"autoincrement": false,
|
|
126
|
+
"default": false
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"indexes": {
|
|
130
|
+
"idx_policy_templates_type": {
|
|
131
|
+
"name": "idx_policy_templates_type",
|
|
132
|
+
"columns": ["type"],
|
|
133
|
+
"isUnique": false
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"foreignKeys": {
|
|
137
|
+
"policy_policy_templates_type_policy_policy_types_slug_fk": {
|
|
138
|
+
"name": "policy_policy_templates_type_policy_policy_types_slug_fk",
|
|
139
|
+
"tableFrom": "policy_policy_templates",
|
|
140
|
+
"tableTo": "policy_policy_types",
|
|
141
|
+
"columnsFrom": ["type"],
|
|
142
|
+
"columnsTo": ["slug"],
|
|
143
|
+
"onDelete": "no action",
|
|
144
|
+
"onUpdate": "no action"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"compositePrimaryKeys": {},
|
|
148
|
+
"uniqueConstraints": {},
|
|
149
|
+
"checkConstraints": {}
|
|
150
|
+
},
|
|
151
|
+
"policy_policy_types": {
|
|
152
|
+
"name": "policy_policy_types",
|
|
153
|
+
"columns": {
|
|
154
|
+
"slug": {
|
|
155
|
+
"name": "slug",
|
|
156
|
+
"type": "text",
|
|
157
|
+
"primaryKey": true,
|
|
158
|
+
"notNull": true,
|
|
159
|
+
"autoincrement": false
|
|
160
|
+
},
|
|
161
|
+
"description": {
|
|
162
|
+
"name": "description",
|
|
163
|
+
"type": "text",
|
|
164
|
+
"primaryKey": false,
|
|
165
|
+
"notNull": true,
|
|
166
|
+
"autoincrement": false
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"indexes": {},
|
|
170
|
+
"foreignKeys": {},
|
|
171
|
+
"compositePrimaryKeys": {},
|
|
172
|
+
"uniqueConstraints": {},
|
|
173
|
+
"checkConstraints": {}
|
|
174
|
+
},
|
|
175
|
+
"policy_category_policies": {
|
|
176
|
+
"name": "policy_category_policies",
|
|
177
|
+
"columns": {
|
|
178
|
+
"category_slug": {
|
|
179
|
+
"name": "category_slug",
|
|
180
|
+
"type": "text",
|
|
181
|
+
"primaryKey": false,
|
|
182
|
+
"notNull": true,
|
|
183
|
+
"autoincrement": false
|
|
184
|
+
},
|
|
185
|
+
"policy_slug": {
|
|
186
|
+
"name": "policy_slug",
|
|
187
|
+
"type": "text",
|
|
188
|
+
"primaryKey": false,
|
|
189
|
+
"notNull": true,
|
|
190
|
+
"autoincrement": false
|
|
191
|
+
},
|
|
192
|
+
"is_mandatory": {
|
|
193
|
+
"name": "is_mandatory",
|
|
194
|
+
"type": "integer",
|
|
195
|
+
"primaryKey": false,
|
|
196
|
+
"notNull": true,
|
|
197
|
+
"autoincrement": false,
|
|
198
|
+
"default": false
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"indexes": {
|
|
202
|
+
"idx_category_policies_category_slug": {
|
|
203
|
+
"name": "idx_category_policies_category_slug",
|
|
204
|
+
"columns": ["category_slug"],
|
|
205
|
+
"isUnique": false
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"foreignKeys": {
|
|
209
|
+
"policy_category_policies_policy_slug_policy_policy_templates_slug_fk": {
|
|
210
|
+
"name": "policy_category_policies_policy_slug_policy_policy_templates_slug_fk",
|
|
211
|
+
"tableFrom": "policy_category_policies",
|
|
212
|
+
"tableTo": "policy_policy_templates",
|
|
213
|
+
"columnsFrom": ["policy_slug"],
|
|
214
|
+
"columnsTo": ["slug"],
|
|
215
|
+
"onDelete": "no action",
|
|
216
|
+
"onUpdate": "no action"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"compositePrimaryKeys": {
|
|
220
|
+
"policy_category_policies_category_slug_policy_slug_pk": {
|
|
221
|
+
"columns": ["category_slug", "policy_slug"],
|
|
222
|
+
"name": "policy_category_policies_category_slug_policy_slug_pk"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"uniqueConstraints": {},
|
|
226
|
+
"checkConstraints": {}
|
|
227
|
+
},
|
|
228
|
+
"policy_agent_categories": {
|
|
229
|
+
"name": "policy_agent_categories",
|
|
230
|
+
"columns": {
|
|
231
|
+
"agent_slug": {
|
|
232
|
+
"name": "agent_slug",
|
|
233
|
+
"type": "text",
|
|
234
|
+
"primaryKey": false,
|
|
235
|
+
"notNull": true,
|
|
236
|
+
"autoincrement": false
|
|
237
|
+
},
|
|
238
|
+
"category_slug": {
|
|
239
|
+
"name": "category_slug",
|
|
240
|
+
"type": "text",
|
|
241
|
+
"primaryKey": false,
|
|
242
|
+
"notNull": true,
|
|
243
|
+
"autoincrement": false
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"indexes": {
|
|
247
|
+
"idx_agent_categories_agent_slug": {
|
|
248
|
+
"name": "idx_agent_categories_agent_slug",
|
|
249
|
+
"columns": ["agent_slug"],
|
|
250
|
+
"isUnique": false
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"foreignKeys": {},
|
|
254
|
+
"compositePrimaryKeys": {
|
|
255
|
+
"policy_agent_categories_agent_slug_category_slug_pk": {
|
|
256
|
+
"columns": ["agent_slug", "category_slug"],
|
|
257
|
+
"name": "policy_agent_categories_agent_slug_category_slug_pk"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"uniqueConstraints": {},
|
|
261
|
+
"checkConstraints": {}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"views": {},
|
|
265
|
+
"enums": {},
|
|
266
|
+
"_meta": {
|
|
267
|
+
"schemas": {},
|
|
268
|
+
"tables": {},
|
|
269
|
+
"columns": {}
|
|
270
|
+
},
|
|
271
|
+
"internal": {
|
|
272
|
+
"indexes": {}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "7",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"idx": 0,
|
|
7
|
+
"version": "6",
|
|
8
|
+
"when": 1782256884532,
|
|
9
|
+
"tag": "0000_sleepy_bullseye",
|
|
10
|
+
"breakpoints": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"idx": 1,
|
|
14
|
+
"version": "6",
|
|
15
|
+
"when": 1782257258414,
|
|
16
|
+
"tag": "0001_pale_marvel_zombies",
|
|
17
|
+
"breakpoints": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"idx": 2,
|
|
21
|
+
"version": "6",
|
|
22
|
+
"when": 1782350000000,
|
|
23
|
+
"tag": "0002_category_policy_inheritance",
|
|
24
|
+
"breakpoints": true
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|