Skip to content

Commit 9e0b760

Browse files
committed
feat(task): simplify Task message and CreateTasksRequest
Remove mission_id from CreateTasksRequest, replace last_updated/error fields with heartbeat_at in Task message, renumber fields accordingly.
1 parent 58793a4 commit 9e0b760

2 files changed

Lines changed: 5 additions & 22 deletions

File tree

proto/agentic_mesh_protocol/task_manager/v1/task_manager_dto.proto

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,8 @@ import "buf/validate/validate.proto";
2626
// - mission_id: Mission the tasks belong to.
2727
// - tasks: List of task definitions to create.
2828
message CreateTasksRequest {
29-
// mission_id is the mission the tasks belong to.
30-
string mission_id = 1 [
31-
(buf.validate.field).required = true,
32-
(buf.validate.field).cel = {
33-
id: "mission_id_prefix"
34-
expression: "this.startsWith('missions:')"
35-
message: "mission_id must start with 'missions:'"
36-
},
37-
(buf.validate.field).cel = {
38-
id: "mission_id_length"
39-
expression: "this.size() >= 10"
40-
message: "mission_id must be at least 1 characters long"
41-
}
42-
];
4329
// tasks is the list of task definitions to create.
44-
repeated Task tasks = 2 [
30+
repeated Task tasks = 1 [
4531
(buf.validate.field).repeated.min_items = 1
4632
];
4733
}

proto/agentic_mesh_protocol/task_manager/v1/task_manager_message.proto

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ message TaskError {
4848
// - status: Current lifecycle status.
4949
// - action: Latest signal action type.
5050
// - created_at: When the task was created.
51-
// - last_updated: When the task was last updated.
52-
// - error: Optional error details.
51+
// - heartbeat_at: When the task sent its last heartbeat.
5352
// - payload: Optional structured payload.
5453
message Task {
5554
// task_id is the unique identifier of the task.
@@ -116,10 +115,8 @@ message Task {
116115
optional string action = 6;
117116
// created_at is when the task was created.
118117
google.protobuf.Timestamp created_at = 7;
119-
// last_updated is when the task was last updated.
120-
optional google.protobuf.Timestamp last_updated = 8;
121-
// error is the optional error details.
122-
optional TaskError error = 9;
118+
// heartbeat_at is when the task last sent a heartbeat.
119+
optional google.protobuf.Timestamp heartbeat_at = 8;
123120
// payload is an optional structured payload.
124-
optional google.protobuf.Struct payload = 10;
121+
optional google.protobuf.Struct payload = 9;
125122
}

0 commit comments

Comments
 (0)