lurqrun 0.1.4 → 0.1.6
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/README.md +5 -3
- package/dist/bin/lurq.js +9391 -3813
- package/dist/bin/lurq.js.map +1 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +9386 -3808
- package/dist/index.js.map +1 -1
- package/drizzle/0034_uneven_thunderbird.sql +1 -0
- package/drizzle/0037_subscription_seats.sql +1 -0
- package/drizzle/0038_symbol_offsets.sql +2 -0
- package/drizzle/0039_mcp_runtime_scans.sql +80 -0
- package/drizzle/0040_subscription_overage_and_interval.sql +4 -0
- package/drizzle/0041_account_email.sql +38 -0
- package/drizzle/0042_alert_channels.sql +21 -0
- package/drizzle/meta/0034_snapshot.json +8 -8
- package/drizzle/meta/0035_snapshot.json +10 -153
- package/drizzle/meta/0036_snapshot.json +2876 -0
- package/drizzle/meta/0037_snapshot.json +2883 -0
- package/drizzle/meta/0038_snapshot.json +2895 -0
- package/drizzle/meta/0039_snapshot.json +3501 -0
- package/drizzle/meta/0040_snapshot.json +3527 -0
- package/drizzle/meta/0041_snapshot.json +3824 -0
- package/drizzle/meta/0042_snapshot.json +3960 -0
- package/drizzle/meta/_journal.json +52 -3
- package/package.json +16 -6
- package/templates/skill-instructions.md +5 -0
- /package/drizzle/{0034_api_key_scopes.sql → 0035_api_key_scopes.sql} +0 -0
- /package/drizzle/{0035_policy_audit.sql → 0036_policy_audit.sql} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "discovery_queue" ADD COLUMN "attempts" integer DEFAULT 0 NOT NULL;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "subscriptions" ADD COLUMN "seats" integer DEFAULT 1 NOT NULL;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
CREATE TABLE "mcp_change_events" (
|
|
2
|
+
"id" serial PRIMARY KEY NOT NULL,
|
|
3
|
+
"deployment_id" integer NOT NULL,
|
|
4
|
+
"owner_id" text NOT NULL,
|
|
5
|
+
"from_hash" text NOT NULL,
|
|
6
|
+
"to_hash" text NOT NULL,
|
|
7
|
+
"severity" text NOT NULL,
|
|
8
|
+
"summary" text NOT NULL,
|
|
9
|
+
"diff" jsonb NOT NULL,
|
|
10
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
11
|
+
"acknowledged_at" timestamp with time zone
|
|
12
|
+
);
|
|
13
|
+
--> statement-breakpoint
|
|
14
|
+
CREATE TABLE "mcp_contracts" (
|
|
15
|
+
"content_hash" text PRIMARY KEY NOT NULL,
|
|
16
|
+
"contract_hash" text NOT NULL,
|
|
17
|
+
"tools" jsonb NOT NULL,
|
|
18
|
+
"prompts" jsonb NOT NULL,
|
|
19
|
+
"resource_templates" jsonb NOT NULL,
|
|
20
|
+
"instructions" text,
|
|
21
|
+
"tool_count" integer NOT NULL,
|
|
22
|
+
"bytes" integer NOT NULL,
|
|
23
|
+
"analysis" jsonb NOT NULL,
|
|
24
|
+
"analyzer_version" text NOT NULL,
|
|
25
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
26
|
+
);
|
|
27
|
+
--> statement-breakpoint
|
|
28
|
+
CREATE TABLE "mcp_deployments" (
|
|
29
|
+
"id" serial PRIMARY KEY NOT NULL,
|
|
30
|
+
"owner_id" text NOT NULL,
|
|
31
|
+
"server_key" text NOT NULL,
|
|
32
|
+
"config_fingerprint" text NOT NULL,
|
|
33
|
+
"alias" text NOT NULL,
|
|
34
|
+
"registry" text NOT NULL,
|
|
35
|
+
"package_name" text,
|
|
36
|
+
"transport" text NOT NULL,
|
|
37
|
+
"server_name" text,
|
|
38
|
+
"server_version" text,
|
|
39
|
+
"last_status" text NOT NULL,
|
|
40
|
+
"last_error" text,
|
|
41
|
+
"last_content_hash" text,
|
|
42
|
+
"worst_severity" text,
|
|
43
|
+
"first_seen_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
44
|
+
"last_scanned_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
45
|
+
"last_changed_at" timestamp with time zone
|
|
46
|
+
);
|
|
47
|
+
--> statement-breakpoint
|
|
48
|
+
CREATE TABLE "mcp_observations" (
|
|
49
|
+
"id" serial PRIMARY KEY NOT NULL,
|
|
50
|
+
"deployment_id" integer NOT NULL,
|
|
51
|
+
"owner_id" text NOT NULL,
|
|
52
|
+
"status" text NOT NULL,
|
|
53
|
+
"content_hash" text,
|
|
54
|
+
"server_version" text,
|
|
55
|
+
"error" text,
|
|
56
|
+
"source" text NOT NULL,
|
|
57
|
+
"scan_count" integer DEFAULT 1 NOT NULL,
|
|
58
|
+
"first_seen_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
59
|
+
"last_seen_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
60
|
+
);
|
|
61
|
+
--> statement-breakpoint
|
|
62
|
+
CREATE TABLE "mcp_public_reports" (
|
|
63
|
+
"registry" text NOT NULL,
|
|
64
|
+
"package_name" text NOT NULL,
|
|
65
|
+
"version" text NOT NULL,
|
|
66
|
+
"content_hash" text NOT NULL,
|
|
67
|
+
"owner_id" text NOT NULL,
|
|
68
|
+
"reported_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
69
|
+
CONSTRAINT "mcp_public_reports_registry_package_name_version_content_hash_owner_id_pk" PRIMARY KEY("registry","package_name","version","content_hash","owner_id")
|
|
70
|
+
);
|
|
71
|
+
--> statement-breakpoint
|
|
72
|
+
ALTER TABLE "mcp_change_events" ADD CONSTRAINT "mcp_change_events_deployment_id_mcp_deployments_id_fk" FOREIGN KEY ("deployment_id") REFERENCES "public"."mcp_deployments"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
73
|
+
ALTER TABLE "mcp_observations" ADD CONSTRAINT "mcp_observations_deployment_id_mcp_deployments_id_fk" FOREIGN KEY ("deployment_id") REFERENCES "public"."mcp_deployments"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
74
|
+
CREATE UNIQUE INDEX "mcp_change_events_pair_idx" ON "mcp_change_events" USING btree ("deployment_id","from_hash","to_hash");--> statement-breakpoint
|
|
75
|
+
CREATE INDEX "mcp_change_events_owner_idx" ON "mcp_change_events" USING btree ("owner_id","created_at");--> statement-breakpoint
|
|
76
|
+
CREATE INDEX "mcp_contracts_contract_idx" ON "mcp_contracts" USING btree ("contract_hash");--> statement-breakpoint
|
|
77
|
+
CREATE UNIQUE INDEX "mcp_deployments_identity_idx" ON "mcp_deployments" USING btree ("owner_id","server_key","config_fingerprint");--> statement-breakpoint
|
|
78
|
+
CREATE INDEX "mcp_deployments_owner_idx" ON "mcp_deployments" USING btree ("owner_id","last_scanned_at");--> statement-breakpoint
|
|
79
|
+
CREATE INDEX "mcp_observations_deployment_idx" ON "mcp_observations" USING btree ("deployment_id","first_seen_at");--> statement-breakpoint
|
|
80
|
+
CREATE INDEX "mcp_public_reports_version_idx" ON "mcp_public_reports" USING btree ("registry","package_name","version");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
ALTER TABLE "subscriptions" ADD COLUMN "overage_enabled" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "subscriptions" ADD COLUMN "overage_month" text;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "subscriptions" ADD COLUMN "overage_reported" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
|
|
4
|
+
ALTER TABLE "subscriptions" ADD COLUMN "billing_interval" text;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
CREATE TABLE "notification_deliveries" (
|
|
2
|
+
"id" serial PRIMARY KEY NOT NULL,
|
|
3
|
+
"owner_id" text NOT NULL,
|
|
4
|
+
"kind" text NOT NULL,
|
|
5
|
+
"status" text NOT NULL,
|
|
6
|
+
"idempotency_key" text NOT NULL,
|
|
7
|
+
"attempts" integer DEFAULT 0 NOT NULL,
|
|
8
|
+
"error" text,
|
|
9
|
+
"provider_id" text,
|
|
10
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
11
|
+
"sent_at" timestamp with time zone,
|
|
12
|
+
CONSTRAINT "notification_deliveries_idempotency_key_unique" UNIQUE("idempotency_key")
|
|
13
|
+
);
|
|
14
|
+
--> statement-breakpoint
|
|
15
|
+
CREATE TABLE "notification_items" (
|
|
16
|
+
"item_key" text PRIMARY KEY NOT NULL,
|
|
17
|
+
"owner_id" text NOT NULL,
|
|
18
|
+
"delivery_id" integer NOT NULL,
|
|
19
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
20
|
+
);
|
|
21
|
+
--> statement-breakpoint
|
|
22
|
+
CREATE TABLE "notification_preferences" (
|
|
23
|
+
"owner_id" text PRIMARY KEY NOT NULL,
|
|
24
|
+
"urgent_email" boolean DEFAULT true NOT NULL,
|
|
25
|
+
"weekly_digest" boolean DEFAULT false NOT NULL,
|
|
26
|
+
"unsubscribe_token" text NOT NULL,
|
|
27
|
+
"last_digest_at" timestamp with time zone,
|
|
28
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
29
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
30
|
+
CONSTRAINT "notification_preferences_unsubscribe_token_unique" UNIQUE("unsubscribe_token")
|
|
31
|
+
);
|
|
32
|
+
--> statement-breakpoint
|
|
33
|
+
ALTER TABLE "notification_items" ADD CONSTRAINT "notification_items_delivery_id_notification_deliveries_id_fk" FOREIGN KEY ("delivery_id") REFERENCES "public"."notification_deliveries"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
34
|
+
CREATE INDEX "notification_deliveries_owner_idx" ON "notification_deliveries" USING btree ("owner_id","kind","created_at");--> statement-breakpoint
|
|
35
|
+
CREATE INDEX "notification_deliveries_status_idx" ON "notification_deliveries" USING btree ("status","created_at");--> statement-breakpoint
|
|
36
|
+
CREATE INDEX "notification_items_delivery_idx" ON "notification_items" USING btree ("delivery_id");--> statement-breakpoint
|
|
37
|
+
CREATE INDEX "mcp_change_events_created_idx" ON "mcp_change_events" USING btree ("created_at");--> statement-breakpoint
|
|
38
|
+
CREATE INDEX "repo_alerts_created_idx" ON "repo_alerts" USING btree ("created_at");
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
CREATE TABLE "notification_channels" (
|
|
2
|
+
"id" serial PRIMARY KEY NOT NULL,
|
|
3
|
+
"owner_id" text NOT NULL,
|
|
4
|
+
"kind" text NOT NULL,
|
|
5
|
+
"label" text,
|
|
6
|
+
"url_ciphertext" text NOT NULL,
|
|
7
|
+
"url_hint" text NOT NULL,
|
|
8
|
+
"signing_secret_ciphertext" text,
|
|
9
|
+
"min_severity" text DEFAULT 'high' NOT NULL,
|
|
10
|
+
"enabled" boolean DEFAULT true NOT NULL,
|
|
11
|
+
"consecutive_failures" integer DEFAULT 0 NOT NULL,
|
|
12
|
+
"disabled_reason" text,
|
|
13
|
+
"last_delivered_at" timestamp with time zone,
|
|
14
|
+
"last_error" text,
|
|
15
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
16
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
17
|
+
"deleted_at" timestamp with time zone
|
|
18
|
+
);
|
|
19
|
+
--> statement-breakpoint
|
|
20
|
+
ALTER TABLE "notification_deliveries" ADD COLUMN "channel_id" integer;--> statement-breakpoint
|
|
21
|
+
CREATE INDEX "notification_channels_owner_idx" ON "notification_channels" USING btree ("owner_id");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "57b8801b-4880-4918-ad54-6107f62a4f24",
|
|
3
3
|
"prevId": "970832f8-fcae-4e0f-8ca8-70e665ef6efd",
|
|
4
4
|
"version": "7",
|
|
5
5
|
"dialect": "postgresql",
|
|
@@ -45,13 +45,6 @@
|
|
|
45
45
|
"notNull": true,
|
|
46
46
|
"default": "'free'"
|
|
47
47
|
},
|
|
48
|
-
"scopes": {
|
|
49
|
-
"name": "scopes",
|
|
50
|
-
"type": "text[]",
|
|
51
|
-
"primaryKey": false,
|
|
52
|
-
"notNull": true,
|
|
53
|
-
"default": "'{}'::text[]"
|
|
54
|
-
},
|
|
55
48
|
"created_at": {
|
|
56
49
|
"name": "created_at",
|
|
57
50
|
"type": "timestamp with time zone",
|
|
@@ -553,6 +546,13 @@
|
|
|
553
546
|
"notNull": true,
|
|
554
547
|
"default": "'pending'"
|
|
555
548
|
},
|
|
549
|
+
"attempts": {
|
|
550
|
+
"name": "attempts",
|
|
551
|
+
"type": "integer",
|
|
552
|
+
"primaryKey": false,
|
|
553
|
+
"notNull": true,
|
|
554
|
+
"default": 0
|
|
555
|
+
},
|
|
556
556
|
"discovered_at": {
|
|
557
557
|
"name": "discovered_at",
|
|
558
558
|
"type": "timestamp with time zone",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
3
|
-
"prevId": "
|
|
2
|
+
"id": "2f9ffcd2-4bc8-48b4-8c0a-51b73f713218",
|
|
3
|
+
"prevId": "57b8801b-4880-4918-ad54-6107f62a4f24",
|
|
4
4
|
"version": "7",
|
|
5
5
|
"dialect": "postgresql",
|
|
6
6
|
"tables": {
|
|
@@ -553,6 +553,13 @@
|
|
|
553
553
|
"notNull": true,
|
|
554
554
|
"default": "'pending'"
|
|
555
555
|
},
|
|
556
|
+
"attempts": {
|
|
557
|
+
"name": "attempts",
|
|
558
|
+
"type": "integer",
|
|
559
|
+
"primaryKey": false,
|
|
560
|
+
"notNull": true,
|
|
561
|
+
"default": 0
|
|
562
|
+
},
|
|
556
563
|
"discovered_at": {
|
|
557
564
|
"name": "discovered_at",
|
|
558
565
|
"type": "timestamp with time zone",
|
|
@@ -1420,84 +1427,6 @@
|
|
|
1420
1427
|
"checkConstraints": {},
|
|
1421
1428
|
"isRLSEnabled": false
|
|
1422
1429
|
},
|
|
1423
|
-
"public.policy_decisions": {
|
|
1424
|
-
"name": "policy_decisions",
|
|
1425
|
-
"schema": "",
|
|
1426
|
-
"columns": {
|
|
1427
|
-
"id": {
|
|
1428
|
-
"name": "id",
|
|
1429
|
-
"type": "serial",
|
|
1430
|
-
"primaryKey": true,
|
|
1431
|
-
"notNull": true
|
|
1432
|
-
},
|
|
1433
|
-
"owner_id": {
|
|
1434
|
-
"name": "owner_id",
|
|
1435
|
-
"type": "text",
|
|
1436
|
-
"primaryKey": false,
|
|
1437
|
-
"notNull": true
|
|
1438
|
-
},
|
|
1439
|
-
"package_name": {
|
|
1440
|
-
"name": "package_name",
|
|
1441
|
-
"type": "text",
|
|
1442
|
-
"primaryKey": false,
|
|
1443
|
-
"notNull": true
|
|
1444
|
-
},
|
|
1445
|
-
"rule": {
|
|
1446
|
-
"name": "rule",
|
|
1447
|
-
"type": "text",
|
|
1448
|
-
"primaryKey": false,
|
|
1449
|
-
"notNull": true
|
|
1450
|
-
},
|
|
1451
|
-
"action": {
|
|
1452
|
-
"name": "action",
|
|
1453
|
-
"type": "text",
|
|
1454
|
-
"primaryKey": false,
|
|
1455
|
-
"notNull": true
|
|
1456
|
-
},
|
|
1457
|
-
"tool": {
|
|
1458
|
-
"name": "tool",
|
|
1459
|
-
"type": "text",
|
|
1460
|
-
"primaryKey": false,
|
|
1461
|
-
"notNull": true
|
|
1462
|
-
},
|
|
1463
|
-
"created_at": {
|
|
1464
|
-
"name": "created_at",
|
|
1465
|
-
"type": "timestamp with time zone",
|
|
1466
|
-
"primaryKey": false,
|
|
1467
|
-
"notNull": true,
|
|
1468
|
-
"default": "now()"
|
|
1469
|
-
}
|
|
1470
|
-
},
|
|
1471
|
-
"indexes": {
|
|
1472
|
-
"policy_decisions_owner_idx": {
|
|
1473
|
-
"name": "policy_decisions_owner_idx",
|
|
1474
|
-
"columns": [
|
|
1475
|
-
{
|
|
1476
|
-
"expression": "owner_id",
|
|
1477
|
-
"isExpression": false,
|
|
1478
|
-
"asc": true,
|
|
1479
|
-
"nulls": "last"
|
|
1480
|
-
},
|
|
1481
|
-
{
|
|
1482
|
-
"expression": "created_at",
|
|
1483
|
-
"isExpression": false,
|
|
1484
|
-
"asc": true,
|
|
1485
|
-
"nulls": "last"
|
|
1486
|
-
}
|
|
1487
|
-
],
|
|
1488
|
-
"isUnique": false,
|
|
1489
|
-
"concurrently": false,
|
|
1490
|
-
"method": "btree",
|
|
1491
|
-
"with": {}
|
|
1492
|
-
}
|
|
1493
|
-
},
|
|
1494
|
-
"foreignKeys": {},
|
|
1495
|
-
"compositePrimaryKeys": {},
|
|
1496
|
-
"uniqueConstraints": {},
|
|
1497
|
-
"policies": {},
|
|
1498
|
-
"checkConstraints": {},
|
|
1499
|
-
"isRLSEnabled": false
|
|
1500
|
-
},
|
|
1501
1430
|
"public.recommendation_outcomes": {
|
|
1502
1431
|
"name": "recommendation_outcomes",
|
|
1503
1432
|
"schema": "",
|
|
@@ -1968,78 +1897,6 @@
|
|
|
1968
1897
|
"checkConstraints": {},
|
|
1969
1898
|
"isRLSEnabled": false
|
|
1970
1899
|
},
|
|
1971
|
-
"public.selection_policy_changes": {
|
|
1972
|
-
"name": "selection_policy_changes",
|
|
1973
|
-
"schema": "",
|
|
1974
|
-
"columns": {
|
|
1975
|
-
"id": {
|
|
1976
|
-
"name": "id",
|
|
1977
|
-
"type": "serial",
|
|
1978
|
-
"primaryKey": true,
|
|
1979
|
-
"notNull": true
|
|
1980
|
-
},
|
|
1981
|
-
"owner_id": {
|
|
1982
|
-
"name": "owner_id",
|
|
1983
|
-
"type": "text",
|
|
1984
|
-
"primaryKey": false,
|
|
1985
|
-
"notNull": true
|
|
1986
|
-
},
|
|
1987
|
-
"actor": {
|
|
1988
|
-
"name": "actor",
|
|
1989
|
-
"type": "text",
|
|
1990
|
-
"primaryKey": false,
|
|
1991
|
-
"notNull": true
|
|
1992
|
-
},
|
|
1993
|
-
"before": {
|
|
1994
|
-
"name": "before",
|
|
1995
|
-
"type": "jsonb",
|
|
1996
|
-
"primaryKey": false,
|
|
1997
|
-
"notNull": true
|
|
1998
|
-
},
|
|
1999
|
-
"after": {
|
|
2000
|
-
"name": "after",
|
|
2001
|
-
"type": "jsonb",
|
|
2002
|
-
"primaryKey": false,
|
|
2003
|
-
"notNull": true
|
|
2004
|
-
},
|
|
2005
|
-
"created_at": {
|
|
2006
|
-
"name": "created_at",
|
|
2007
|
-
"type": "timestamp with time zone",
|
|
2008
|
-
"primaryKey": false,
|
|
2009
|
-
"notNull": true,
|
|
2010
|
-
"default": "now()"
|
|
2011
|
-
}
|
|
2012
|
-
},
|
|
2013
|
-
"indexes": {
|
|
2014
|
-
"selection_policy_changes_owner_idx": {
|
|
2015
|
-
"name": "selection_policy_changes_owner_idx",
|
|
2016
|
-
"columns": [
|
|
2017
|
-
{
|
|
2018
|
-
"expression": "owner_id",
|
|
2019
|
-
"isExpression": false,
|
|
2020
|
-
"asc": true,
|
|
2021
|
-
"nulls": "last"
|
|
2022
|
-
},
|
|
2023
|
-
{
|
|
2024
|
-
"expression": "created_at",
|
|
2025
|
-
"isExpression": false,
|
|
2026
|
-
"asc": true,
|
|
2027
|
-
"nulls": "last"
|
|
2028
|
-
}
|
|
2029
|
-
],
|
|
2030
|
-
"isUnique": false,
|
|
2031
|
-
"concurrently": false,
|
|
2032
|
-
"method": "btree",
|
|
2033
|
-
"with": {}
|
|
2034
|
-
}
|
|
2035
|
-
},
|
|
2036
|
-
"foreignKeys": {},
|
|
2037
|
-
"compositePrimaryKeys": {},
|
|
2038
|
-
"uniqueConstraints": {},
|
|
2039
|
-
"policies": {},
|
|
2040
|
-
"checkConstraints": {},
|
|
2041
|
-
"isRLSEnabled": false
|
|
2042
|
-
},
|
|
2043
1900
|
"public.stack_resolutions": {
|
|
2044
1901
|
"name": "stack_resolutions",
|
|
2045
1902
|
"schema": "",
|
|
@@ -2866,4 +2723,4 @@
|
|
|
2866
2723
|
"schemas": {},
|
|
2867
2724
|
"tables": {}
|
|
2868
2725
|
}
|
|
2869
|
-
}
|
|
2726
|
+
}
|