Skip to content

Commit 585f99d

Browse files
juicewcodejuicew
andauthored
feat(admin): import Agent Gateway HTTP tools from OpenAPI (#7923) (#8297)
* feat(admin): import Agent Gateway HTTP tools from OpenAPI Add Admin preview and publication for Agent Gateway mcp.httpTools plans generated from an explicitly selected OpenAPI 3.0.x subset. - add /agent-gateway/openapi/preview and /apply with plugin-edit and exact namespace checks; preview is read-only, apply locks the target rule, revalidates the revision and publishes only selected items - generate bounded GET/POST plans from literal paths, query parameters and flat JSON bodies; reject unsupported schemas, media types, parameters and OpenAPI 3.1 with per-operation diagnostics - verify mapped divide/springCloud routes and reconcile allowedTools, result filters and per-source ownership - persist Admin-only provenance in agent_gateway_import and add RuleMapper.selectByIdForUpdate - widen rule.handle and operation_record_log.context for MySQL/OceanBase, widen H2 rule.handle to CLOB, and bind Oracle CLOB columns through OracleClobStringTypeHandler - document the contract in docs/agent-gateway-openapi-import.md * resolve conflict * fix(admin): enforce the Agent Gateway tool budget before import publication Apply now computes the merged httpTools set from the current rule plus the selected additions, updates and removals, and rejects a selection above the runtime limit of 16 with a specific diagnostic before any provenance or rule write. --------- Co-authored-by: juicew <[email protected]>
1 parent 6222cf6 commit 585f99d

34 files changed

Lines changed: 2569 additions & 10 deletions

‎db/init/mysql/schema.sql‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ DROP TABLE IF EXISTS `operation_record_log`;
318318
CREATE TABLE `operation_record_log` (
319319
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
320320
`color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'log color',
321-
`context` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'log context',
321+
`context` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'log context',
322322
`operator` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'operator [user or app]]',
323323
`operation_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'operation time',
324324
`operation_type` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'update' COMMENT 'operation type:create/update/delete/register...',
@@ -1748,7 +1748,7 @@ CREATE TABLE `rule` (
17481748
`match_restful` tinyint(0) NOT NULL COMMENT 'whether to match restful(0 cache, 1 not cache)',
17491749
`namespace_id` varchar(50) NOT NULL COMMENT 'namespace id',
17501750
`sort_code` int(0) NOT NULL COMMENT 'sort',
1751-
`handle` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'processing logic (here for different plug-ins, there will be different fields to identify different processes, all data in JSON format is stored)',
1751+
`handle` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'processing logic (here for different plug-ins, there will be different fields to identify different processes, all data in JSON format is stored)',
17521752
`date_created` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'create time',
17531753
`date_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT 'update time',
17541754
PRIMARY KEY (`id`) USING BTREE
@@ -2536,6 +2536,21 @@ CREATE TABLE `app_auth_request` (
25362536
CREATE UNIQUE INDEX uk_app_auth_request ON `app_auth_request` (caller_key, namespace_id, request_id);
25372537
CREATE INDEX idx_app_auth_request_auth ON `app_auth_request` (auth_id);
25382538

2539+
-- ----------------------------
2540+
-- Table structure for agent_gateway_import
2541+
-- ----------------------------
2542+
DROP TABLE IF EXISTS `agent_gateway_import`;
2543+
CREATE TABLE `agent_gateway_import` (
2544+
`id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'primary key id',
2545+
`rule_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'target agent gateway rule id',
2546+
`namespace_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'namespace id',
2547+
`manifest` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'per-source import ownership manifest',
2548+
`date_created` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'create time',
2549+
`date_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT 'update time',
2550+
PRIMARY KEY (`id`) USING BTREE
2551+
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic COMMENT 'agent gateway openapi import ownership';
2552+
CREATE UNIQUE INDEX uk_agent_gateway_import_rule ON `agent_gateway_import` (`rule_id`);
2553+
25392554
-- app auth lifecycle button resources
25402555
INSERT INTO `resource` (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status, date_created, date_updated) VALUES ('1953048313980116921', '1346777766301888512', 'SHENYU.BUTTON.AUTHEN.LIFECYCLE.APPLY', '', '', '', 2, 21, '', 1, 0, 'system:authen:lifecycleApply', 1, '2026-10-20 00:00:00', '2026-10-20 00:00:00');
25412556
INSERT INTO `resource` (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status, date_created, date_updated) VALUES ('1953048313980116922', '1346777766301888512', 'SHENYU.BUTTON.AUTHEN.LIFECYCLE.RESULT', '', '', '', 2, 22, '', 1, 0, 'system:authen:lifecycleResult', 1, '2026-10-20 00:00:00', '2026-10-20 00:00:00');

‎db/init/oracle/schema.sql‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3549,6 +3549,19 @@ CREATE TABLE app_auth_request
35493549
);
35503550
CREATE INDEX idx_app_auth_request_auth ON app_auth_request (auth_id);
35513551

3552+
-- Admin-only import ownership; no runtime synchronization or backend credentials.
3553+
CREATE TABLE agent_gateway_import
3554+
(
3555+
id VARCHAR2(128) not null,
3556+
rule_id VARCHAR2(128) not null,
3557+
namespace_id VARCHAR2(50) not null,
3558+
manifest CLOB not null,
3559+
date_created timestamp(3) default SYSDATE not null,
3560+
date_updated timestamp(3) default SYSDATE not null,
3561+
CONSTRAINT pk_agent_gateway_import PRIMARY KEY (id),
3562+
CONSTRAINT uk_agent_gateway_import_rule UNIQUE (rule_id)
3563+
);
3564+
35523565
-- app auth lifecycle button resources
35533566
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status, date_created, date_updated) VALUES ('1953048313980116921', '1346777766301888512', 'SHENYU.BUTTON.AUTHEN.LIFECYCLE.APPLY', '', '', '', 2, 21, '', 1, 0, 'system:authen:lifecycleApply', 1, TO_DATE('2026-10-20 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-10-20 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'));
35543567
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status, date_created, date_updated) VALUES ('1953048313980116922', '1346777766301888512', 'SHENYU.BUTTON.AUTHEN.LIFECYCLE.RESULT', '', '', '', 2, 22, '', 1, 0, 'system:authen:lifecycleResult', 1, TO_DATE('2026-10-20 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-10-20 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'));

‎db/init/pg/create-table.sql‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3000,6 +3000,20 @@ CREATE TABLE "public"."app_auth_request" (
30003000
CREATE UNIQUE INDEX "uk_app_auth_request" ON "public"."app_auth_request" USING btree ("caller_key", "namespace_id", "request_id");
30013001
CREATE INDEX "idx_app_auth_request_auth" ON "public"."app_auth_request" USING btree ("auth_id");
30023002

3003+
-- Admin-only import ownership; no runtime synchronization or backend credentials.
3004+
DROP TABLE IF EXISTS "public"."agent_gateway_import";
3005+
CREATE TABLE "public"."agent_gateway_import" (
3006+
"id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
3007+
"rule_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
3008+
"namespace_id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
3009+
"manifest" text COLLATE "pg_catalog"."default" NOT NULL,
3010+
"date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
3011+
"date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
3012+
PRIMARY KEY ("id")
3013+
)
3014+
;
3015+
CREATE UNIQUE INDEX "uk_agent_gateway_import_rule" ON "public"."agent_gateway_import" USING btree ("rule_id");
3016+
30033017
-- app auth lifecycle button resources
30043018
INSERT INTO "public"."resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status, date_created, date_updated) VALUES ('1953048313980116921', '1346777766301888512', 'SHENYU.BUTTON.AUTHEN.LIFECYCLE.APPLY', '', '', '', 2, 21, '', 1, 0, 'system:authen:lifecycleApply', 1, '2026-10-20 00:00:00', '2026-10-20 00:00:00');
30053019
INSERT INTO "public"."resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status, date_created, date_updated) VALUES ('1953048313980116922', '1346777766301888512', 'SHENYU.BUTTON.AUTHEN.LIFECYCLE.RESULT', '', '', '', 2, 22, '', 1, 0, 'system:authen:lifecycleResult', 1, '2026-10-20 00:00:00', '2026-10-20 00:00:00');

‎db/upgrade/2.7.2-upgrade-2.7.3-h2.sql‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@ CREATE UNIQUE INDEX uk_instance_info_identity ON instance_info (namespace_id, in
5151
-- Preserve complete API-debug request headers.
5252
ALTER TABLE mock_request_record ALTER COLUMN header CLOB;
5353

54+
-- Agent Gateway OpenAPI import ownership: Admin-only provenance, never synchronized to gateways.
55+
-- Stop Admin writers and back up rule before this one-time migration: handle expands to CLOB.
56+
CREATE TABLE agent_gateway_import (
57+
id VARCHAR(128) NOT NULL PRIMARY KEY,
58+
rule_id VARCHAR(128) NOT NULL,
59+
namespace_id VARCHAR(50) NOT NULL,
60+
manifest CLOB NOT NULL,
61+
date_created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
62+
date_updated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
63+
);
64+
CREATE UNIQUE INDEX uk_agent_gateway_import_rule ON agent_gateway_import (rule_id);
65+
ALTER TABLE rule ALTER COLUMN handle CLOB;
66+
5467
CREATE TABLE IF NOT EXISTS registration_fencing_target (
5568
id VARCHAR(128) NOT NULL PRIMARY KEY,
5669
date_created TIMESTAMP NOT NULL,

‎db/upgrade/2.7.2-upgrade-2.7.3-mysql.sql‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@ CREATE UNIQUE INDEX uk_instance_info_identity ON instance_info (namespace_id, in
5050
-- Stop Admin writers and back up mock_request_record before the one-time migration.
5151
ALTER TABLE mock_request_record MODIFY COLUMN header TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'the request param in header';
5252

53+
-- Agent Gateway OpenAPI import ownership: Admin-only provenance, never synchronized to gateways.
54+
-- Stop Admin writers and back up rule before this one-time migration: handle expands to MEDIUMTEXT.
55+
CREATE TABLE `agent_gateway_import` (
56+
`id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'primary key id',
57+
`rule_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'target agent gateway rule id',
58+
`namespace_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'namespace id',
59+
`manifest` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'per-source import ownership manifest',
60+
`date_created` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'create time',
61+
`date_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT 'update time',
62+
PRIMARY KEY (`id`) USING BTREE
63+
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic COMMENT 'agent gateway openapi import ownership';
64+
CREATE UNIQUE INDEX uk_agent_gateway_import_rule ON `agent_gateway_import` (`rule_id`);
65+
ALTER TABLE `rule` MODIFY COLUMN `handle` MEDIUMTEXT;
66+
-- Rule update events snapshot the full handle into operation_record_log.context.
67+
ALTER TABLE `operation_record_log` MODIFY COLUMN `context` MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'log context';
68+
5369
CREATE TABLE IF NOT EXISTS `registration_fencing_target` (
5470
`id` varchar(128) NOT NULL,
5571
`date_created` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),

‎db/upgrade/2.7.2-upgrade-2.7.3-ob.sql‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@ CREATE UNIQUE INDEX uk_instance_info_identity ON instance_info (namespace_id, in
5050
-- Stop Admin writers and back up mock_request_record before the one-time migration.
5151
ALTER TABLE mock_request_record MODIFY COLUMN header TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'the request param in header';
5252

53+
-- Agent Gateway OpenAPI import ownership: Admin-only provenance, never synchronized to gateways.
54+
-- Stop Admin writers and back up rule before this one-time migration: handle expands to MEDIUMTEXT.
55+
CREATE TABLE agent_gateway_import (
56+
id varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'primary key id',
57+
rule_id varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'target agent gateway rule id',
58+
namespace_id varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'namespace id',
59+
manifest mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'per-source import ownership manifest',
60+
date_created timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'create time',
61+
date_updated timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT 'update time',
62+
PRIMARY KEY (id) USING BTREE
63+
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic COMMENT 'agent gateway openapi import ownership';
64+
CREATE UNIQUE INDEX uk_agent_gateway_import_rule ON agent_gateway_import (rule_id);
65+
ALTER TABLE `rule` MODIFY COLUMN `handle` MEDIUMTEXT;
66+
-- Rule update events snapshot the full handle into operation_record_log.context.
67+
ALTER TABLE `operation_record_log` MODIFY COLUMN `context` MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'log context';
68+
5369

5470
CREATE TABLE IF NOT EXISTS `registration_fencing_target` (
5571
`id` varchar(128) NOT NULL,

‎db/upgrade/2.7.2-upgrade-2.7.3-og.sql‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ CREATE UNIQUE INDEX uk_instance_info_identity ON instance_info (namespace_id, in
5252
-- Stop Admin writers and back up mock_request_record before the one-time migration.
5353
ALTER TABLE public.mock_request_record ALTER COLUMN header TYPE TEXT;
5454

55+
-- Agent Gateway OpenAPI import ownership: Admin-only provenance, never synchronized to gateways.
56+
CREATE TABLE "public"."agent_gateway_import" (
57+
"id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
58+
"rule_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
59+
"namespace_id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
60+
"manifest" text COLLATE "pg_catalog"."default" NOT NULL,
61+
"date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
62+
"date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
63+
PRIMARY KEY ("id")
64+
);
65+
CREATE UNIQUE INDEX "uk_agent_gateway_import_rule" ON "public"."agent_gateway_import" USING btree ("rule_id");
66+
5567

5668
CREATE TABLE IF NOT EXISTS registration_fencing_target (
5769
id varchar(128) NOT NULL PRIMARY KEY,

‎db/upgrade/2.7.2-upgrade-2.7.3-oracle.sql‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ ALTER TABLE mock_request_record RENAME COLUMN header_clob TO header;
5757
ALTER TABLE mock_request_record MODIFY header DEFAULT EMPTY_CLOB() NOT NULL;
5858
COMMENT ON COLUMN mock_request_record.header IS 'the request param in header';
5959

60+
-- Agent Gateway OpenAPI import ownership: Admin-only provenance, never synchronized to gateways.
61+
CREATE TABLE agent_gateway_import
62+
(
63+
id VARCHAR2(128) not null,
64+
rule_id VARCHAR2(128) not null,
65+
namespace_id VARCHAR2(50) not null,
66+
manifest CLOB not null,
67+
date_created timestamp(3) default SYSDATE not null,
68+
date_updated timestamp(3) default SYSDATE not null,
69+
CONSTRAINT pk_agent_gateway_import PRIMARY KEY (id),
70+
CONSTRAINT uk_agent_gateway_import_rule UNIQUE (rule_id)
71+
);
72+
6073

6174
CREATE TABLE registration_fencing_target (
6275
id varchar2(128) NOT NULL,

‎db/upgrade/2.7.2-upgrade-2.7.3-pg.sql‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ CREATE UNIQUE INDEX uk_instance_info_identity ON instance_info (namespace_id, in
5252
-- Stop Admin writers and back up mock_request_record before the one-time migration.
5353
ALTER TABLE public.mock_request_record ALTER COLUMN header TYPE TEXT;
5454

55+
-- Agent Gateway OpenAPI import ownership: Admin-only provenance, never synchronized to gateways.
56+
CREATE TABLE "public"."agent_gateway_import" (
57+
"id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
58+
"rule_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
59+
"namespace_id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
60+
"manifest" text COLLATE "pg_catalog"."default" NOT NULL,
61+
"date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
62+
"date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
63+
PRIMARY KEY ("id")
64+
);
65+
CREATE UNIQUE INDEX "uk_agent_gateway_import_rule" ON "public"."agent_gateway_import" USING btree ("rule_id");
66+
5567

5668
CREATE TABLE IF NOT EXISTS "public"."registration_fencing_target" (
5769
"id" varchar(128) NOT NULL PRIMARY KEY,

‎db/upgrade/upgrade-guide.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@
44
55
## To Shenyu Users
66

7+
### Agent Gateway OpenAPI import provenance in 2.7.3
8+
9+
The `2.7.2-upgrade-2.7.3-<dialect>.sql` scripts add the Admin-only
10+
`agent_gateway_import` table and widen `rule.handle` to `CLOB` (H2) and
11+
`MEDIUMTEXT` (MySQL/OceanBase); PostgreSQL/openGauss already use unlimited
12+
`TEXT` and Oracle already uses `CLOB`. The same MySQL/OceanBase scripts widen
13+
`operation_record_log.context` to `MEDIUMTEXT`, because a rule update snapshots
14+
the complete handle into the operation log. Generated `mcp.httpTools` plans and
15+
the per-rule import manifest can exceed the previous H2 `VARCHAR(1024)` and
16+
MySQL `TEXT` (65,535-byte) limits, so existing deployments must run this
17+
migration before calling `POST /agent-gateway/openapi/preview` or `/apply`.
18+
19+
Stop Admin writers and back up `rule` before applying the script. The table
20+
stores one row per target Agent Gateway rule with all source ownership maps.
21+
It is Admin-only bookkeeping: it is never synchronized to gateways and is not
22+
read on the request path. Deleting a target rule does not cascade to this table
23+
(there is no foreign key, matching the existing Admin storage style), so remove
24+
orphan rows manually if a rule is retired and its ID will not be reused.
25+
Fresh installations create the table and the wide column directly; an existing
26+
persistent H2 database requires `2.7.2-upgrade-2.7.3-h2.sql`. No gateway change
27+
is required.
28+
729
### API-debug request headers in 2.7.3
830

931
Stop Admin writers and back up `mock_request_record` before applying the

0 commit comments

Comments
 (0)