From 8f1a398d02df6fa1518b0ce8508cfc04a04e1008 Mon Sep 17 00:00:00 2001 From: ysyneu Date: Mon, 29 Jun 2026 17:05:34 +0800 Subject: [PATCH 1/2] feat: rename A2A instructions field --- models_gen.go | 12 +++++------ openapi/openapi.en.json | 45 +++++++++++++++++++++-------------------- openapi/openapi.zh.json | 45 +++++++++++++++++++++-------------------- 3 files changed, 52 insertions(+), 50 deletions(-) diff --git a/models_gen.go b/models_gen.go index 85ba36e..1bfe8bc 100644 --- a/models_gen.go +++ b/models_gen.go @@ -188,8 +188,8 @@ type A2aAgentCreateRequest struct { AuthType string `json:"auth_type,omitempty" toon:"auth_type,omitempty"` // URL of the remote agent card. CardURL string `json:"card_url,omitempty" toon:"card_url,omitempty"` - // Agent description. - Description string `json:"description,omitempty" toon:"description,omitempty"` + // Invocation instructions included in AI SRE's system prompt to decide when to call this A2A agent. Must be nonblank. + Instructions string `json:"instructions,omitempty" toon:"instructions,omitempty"` // JSON OAuth metadata; reserved for per_user_oauth. OauthMetadata string `json:"oauth_metadata,omitempty" toon:"oauth_metadata,omitempty"` // JSON secret schema; required when auth_mode=per_user_secret. @@ -240,8 +240,8 @@ type A2aAgentItem struct { CreatedAt TimestampMilli `json:"created_at" toon:"created_at"` // Member ID that created the agent. CreatedBy int64 `json:"created_by" toon:"created_by"` - // Agent description. - Description string `json:"description" toon:"description"` + // Invocation instructions included in AI SRE's system prompt to decide when to call this A2A agent. + Instructions string `json:"instructions" toon:"instructions"` // JSON-encoded OAuth metadata (per_user_oauth mode). OauthMetadata string `json:"oauth_metadata" toon:"oauth_metadata"` // JSON-encoded secret schema (per_user_secret mode). @@ -292,8 +292,8 @@ type A2aAgentUpdateRequest struct { AuthType *string `json:"auth_type,omitempty" toon:"auth_type,omitempty"` // New card URL. Omit to leave unchanged. CardURL *string `json:"card_url,omitempty" toon:"card_url,omitempty"` - // New description. Omit to leave unchanged. - Description *string `json:"description,omitempty" toon:"description,omitempty"` + // New invocation instructions. Omit to leave unchanged; when supplied, must be nonblank. + Instructions *string `json:"instructions,omitempty" toon:"instructions,omitempty"` // New JSON OAuth metadata. OauthMetadata *string `json:"oauth_metadata,omitempty" toon:"oauth_metadata,omitempty"` // New JSON secret schema. diff --git a/openapi/openapi.en.json b/openapi/openapi.en.json index 084e110..ef7f5ec 100644 --- a/openapi/openapi.en.json +++ b/openapi/openapi.en.json @@ -21762,7 +21762,8 @@ "card_url": "https://agents.example.com/deploy-bot/card", "auth_type": "bearer", "streaming": true, - "team_id": 0 + "team_id": 0, + "instructions": "Use when deployment pipelines need inspection or rollback advice." } } } @@ -21819,7 +21820,6 @@ "team_id": 0, "can_edit": true, "agent_name": "deploy-bot", - "description": "Remote agent that inspects deployment pipelines.", "card_url": "https://agents.example.com/deploy-bot/card", "auth_type": "bearer", "streaming": true, @@ -21834,7 +21834,8 @@ "auth_mode": "shared", "created_by": 80011, "created_at": 1716960000000, - "updated_at": 1717046400000 + "updated_at": 1717046400000, + "instructions": "Remote agent that inspects deployment pipelines." } ], "total": 1 @@ -21921,7 +21922,6 @@ "team_id": 0, "can_edit": true, "agent_name": "deploy-bot", - "description": "Remote agent that inspects deployment pipelines.", "card_url": "https://agents.example.com/deploy-bot/card", "auth_type": "bearer", "streaming": true, @@ -21936,7 +21936,8 @@ "auth_mode": "shared", "created_by": 80011, "created_at": 1716960000000, - "updated_at": 1717046400000 + "updated_at": 1717046400000, + "instructions": "Remote agent that inspects deployment pipelines." } } } @@ -22043,7 +22044,7 @@ }, "example": { "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "description": "Inspects deployment pipelines and proposes rollbacks." + "instructions": "Inspect deployment pipelines and propose rollback steps." } } } @@ -40420,10 +40421,6 @@ "type": "string", "description": "Agent display name." }, - "description": { - "type": "string", - "description": "Agent description." - }, "card_url": { "type": "string", "description": "URL of the remote agent card." @@ -40501,6 +40498,10 @@ "type": "integer", "format": "int64", "description": "Last update time. Unix timestamp in milliseconds." + }, + "instructions": { + "type": "string", + "description": "Invocation instructions included in AI SRE's system prompt to decide when to call this A2A agent." } }, "required": [ @@ -40509,7 +40510,7 @@ "team_id", "can_edit", "agent_name", - "description", + "instructions", "card_url", "auth_type", "streaming", @@ -40537,13 +40538,6 @@ "description": "New display name. Omit to leave unchanged.", "maxLength": 128 }, - "description": { - "type": [ - "string", - "null" - ], - "description": "New description. Omit to leave unchanged." - }, "card_url": { "type": [ "string", @@ -40600,6 +40594,13 @@ "null" ], "description": "New JSON OAuth metadata." + }, + "instructions": { + "type": [ + "string", + "null" + ], + "description": "New invocation instructions. Omit to leave unchanged; when supplied, must be nonblank." } }, "required": [ @@ -40615,10 +40616,6 @@ "description": "Agent display name.", "maxLength": 128 }, - "description": { - "type": "string", - "description": "Agent description." - }, "card_url": { "type": "string", "description": "URL of the remote agent card." @@ -40654,6 +40651,10 @@ "oauth_metadata": { "type": "string", "description": "JSON OAuth metadata; reserved for per_user_oauth." + }, + "instructions": { + "type": "string", + "description": "Invocation instructions included in AI SRE's system prompt to decide when to call this A2A agent. Must be nonblank." } }, "required": [ diff --git a/openapi/openapi.zh.json b/openapi/openapi.zh.json index 078a2e1..d61ed05 100644 --- a/openapi/openapi.zh.json +++ b/openapi/openapi.zh.json @@ -21754,7 +21754,8 @@ "card_url": "https://agents.example.com/deploy-bot/card", "auth_type": "bearer", "streaming": true, - "team_id": 0 + "team_id": 0, + "instructions": "当需要检查部署流水线或给出回滚建议时使用。" } } } @@ -21811,7 +21812,6 @@ "team_id": 0, "can_edit": true, "agent_name": "deploy-bot", - "description": "Remote agent that inspects deployment pipelines.", "card_url": "https://agents.example.com/deploy-bot/card", "auth_type": "bearer", "streaming": true, @@ -21826,7 +21826,8 @@ "auth_mode": "shared", "created_by": 80011, "created_at": 1716960000000, - "updated_at": 1717046400000 + "updated_at": 1717046400000, + "instructions": "Remote agent that inspects deployment pipelines." } ], "total": 1 @@ -21913,7 +21914,6 @@ "team_id": 0, "can_edit": true, "agent_name": "deploy-bot", - "description": "Remote agent that inspects deployment pipelines.", "card_url": "https://agents.example.com/deploy-bot/card", "auth_type": "bearer", "streaming": true, @@ -21928,7 +21928,8 @@ "auth_mode": "shared", "created_by": 80011, "created_at": 1716960000000, - "updated_at": 1717046400000 + "updated_at": 1717046400000, + "instructions": "Remote agent that inspects deployment pipelines." } } } @@ -22035,7 +22036,7 @@ }, "example": { "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D", - "description": "Inspects deployment pipelines and proposes rollbacks." + "instructions": "检查部署流水线并给出回滚步骤。" } } } @@ -40411,10 +40412,6 @@ "type": "string", "description": "智能体显示名称。" }, - "description": { - "type": "string", - "description": "智能体描述。" - }, "card_url": { "type": "string", "description": "远程智能体卡片的 URL。" @@ -40492,6 +40489,10 @@ "type": "integer", "format": "int64", "description": "最近更新时间,Unix 毫秒时间戳。" + }, + "instructions": { + "type": "string", + "description": "调用说明,会进入 AI SRE 的系统提示词,用于判断何时调用此 A2A 智能体。" } }, "required": [ @@ -40500,7 +40501,7 @@ "team_id", "can_edit", "agent_name", - "description", + "instructions", "card_url", "auth_type", "streaming", @@ -40528,13 +40529,6 @@ "description": "新的显示名称。省略则不变。", "maxLength": 128 }, - "description": { - "type": [ - "string", - "null" - ], - "description": "新的描述。省略则不变。" - }, "card_url": { "type": [ "string", @@ -40591,6 +40585,13 @@ "null" ], "description": "新的 JSON OAuth 元数据。" + }, + "instructions": { + "type": [ + "string", + "null" + ], + "description": "新的调用说明。省略则不变;传入时不能为空。" } }, "required": [ @@ -40606,10 +40607,6 @@ "description": "智能体显示名称。", "maxLength": 128 }, - "description": { - "type": "string", - "description": "智能体描述。" - }, "card_url": { "type": "string", "description": "远程智能体卡片的 URL。" @@ -40645,6 +40642,10 @@ "oauth_metadata": { "type": "string", "description": "JSON OAuth 元数据;为 per_user_oauth 预留。" + }, + "instructions": { + "type": "string", + "description": "调用说明,会进入 AI SRE 的系统提示词,用于判断何时调用此 A2A 智能体。不能为空。" } }, "required": [ From 04a0bfaf665d497f406f185f4c2e9659f8664cf1 Mon Sep 17 00:00:00 2001 From: ysyneu Date: Mon, 29 Jun 2026 17:19:12 +0800 Subject: [PATCH 2/2] fix: require A2A instructions in OpenAPI --- openapi/openapi.en.json | 1 + openapi/openapi.zh.json | 1 + 2 files changed, 2 insertions(+) diff --git a/openapi/openapi.en.json b/openapi/openapi.en.json index ef7f5ec..5af8f61 100644 --- a/openapi/openapi.en.json +++ b/openapi/openapi.en.json @@ -40659,6 +40659,7 @@ }, "required": [ "agent_name", + "instructions", "card_url" ] }, diff --git a/openapi/openapi.zh.json b/openapi/openapi.zh.json index d61ed05..18eae80 100644 --- a/openapi/openapi.zh.json +++ b/openapi/openapi.zh.json @@ -40650,6 +40650,7 @@ }, "required": [ "agent_name", + "instructions", "card_url" ] },