-
Notifications
You must be signed in to change notification settings - Fork 0
feat(task): add new service task_manager #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
proto/agentic_mesh_protocol/task_manager/v1/task_manager_dto.proto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| // Copyright 2025 DigitalKin Inc. | ||
| // | ||
| // Licensed under the GNU General Public License, Version 3.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // https://www.gnu.org/licenses/gpl-3.0.html | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package agentic_mesh_protocol.task_manager.v1; | ||
|
|
||
| import "agentic_mesh_protocol/task_manager/v1/task_manager_message.proto"; | ||
| import "buf/validate/validate.proto"; | ||
|
|
||
| // SendSignalsRequest | ||
| // Request to send signals to tasks (create, stop, etc.). | ||
| // The action field on each task determines the signal type. | ||
| // | ||
| // Fields: | ||
| // - tasks: List of tasks with their signal action. | ||
| message SendSignalsRequest { | ||
| // tasks is the list of tasks with their signal action. | ||
| repeated Task tasks = 1 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).repeated.min_items = 1 | ||
| ]; | ||
| } | ||
|
|
||
| // SendSignalsResponse | ||
| // Response after sending signals to tasks. | ||
| // | ||
| // Fields: | ||
| // - success: Whether the operation was successful. | ||
| // - tasks: Tasks with updated state after signal processing. | ||
| message SendSignalsResponse { | ||
| // success indicates whether the operation was successful. | ||
| bool success = 1 [(buf.validate.field).required = true]; | ||
| // tasks is the list of tasks with updated state. | ||
| repeated Task tasks = 2 [(buf.validate.field).required = true]; | ||
| } | ||
|
|
||
| // ListHeartbeatsRequest | ||
| // Request to list heartbeats for one or more tasks. | ||
| // | ||
| // Fields: | ||
| // - task_ids: List of task identifiers to get heartbeats for. | ||
| message ListHeartbeatsRequest { | ||
| // task_ids is the list of task identifiers to get heartbeats for. | ||
| repeated string task_ids = 1 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).repeated.min_items = 1, | ||
| (buf.validate.field).repeated.items.cel = { | ||
| id: "task_id_length" | ||
| expression: "this.size() >= 1" | ||
| message: "task_id must be at least 1 characters long" | ||
| } | ||
| ]; | ||
| } | ||
|
|
||
| // ListHeartbeatsResponse | ||
| // Response containing tasks with their current state. | ||
| // | ||
| // Fields: | ||
| // - tasks: Tasks with their current status. | ||
| // - total_count: Total number of tasks available. | ||
| message ListHeartbeatsResponse { | ||
| // total_count is the total number of tasks available. | ||
| int32 total_count = 1 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).int32.gte = 0 | ||
| ]; | ||
| // tasks is the list of tasks with their current status. | ||
| repeated Task tasks = 2 [(buf.validate.field).required = true]; | ||
| } | ||
|
|
||
| // GetSignalsRequest | ||
| // Request to retrieve pending signals for a task. | ||
| // Used by task executors to poll for signals. | ||
| // | ||
| // Fields: | ||
| // - task_id: Task to check for signals. | ||
| message GetSignalsRequest { | ||
| // bulk query for task_ids' signals. | ||
| repeated string task_ids = 1 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).repeated.min_items = 1 | ||
| ]; | ||
| } | ||
|
|
||
| // GetSignalsResponse | ||
| // Response containing tasks with pending signals. | ||
| // | ||
| // Fields: | ||
| // - tasks: Tasks with their pending signal state. | ||
| message GetSignalsResponse { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. validation |
||
| // tasks is the list of tasks with pending signal state. | ||
| repeated Task tasks = 1 [(buf.validate.field).required = true]; | ||
| } | ||
115 changes: 115 additions & 0 deletions
115
proto/agentic_mesh_protocol/task_manager/v1/task_manager_message.proto
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. _messages au lieu de _message pour le nom du fichier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| // Copyright 2025 DigitalKin Inc. | ||
| // | ||
| // Licensed under the GNU General Public License, Version 3.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // https://www.gnu.org/licenses/gpl-3.0.html | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package agentic_mesh_protocol.task_manager.v1; | ||
|
|
||
| import "buf/validate/validate.proto"; | ||
| import "google/protobuf/struct.proto"; | ||
| import "google/protobuf/timestamp.proto"; | ||
|
|
||
| // Task | ||
| // Represents a unit of work dispatched to a module. | ||
| // Includes full task state, signaling, and error info. | ||
| // | ||
| // Fields: | ||
| // - task_id: Unique identifier of the task. | ||
| // - mission_id: Mission this task belongs to. | ||
| // - setup_id: Setup configuration to use. | ||
| // - setup_version_id: Setup version to use. | ||
| // - status: Current lifecycle status. | ||
| // - action: Latest signal action type. | ||
| // - created_at: When the task was created. | ||
| // - heartbeat_at: When the task sent its last heartbeat. | ||
| // - payload: Optional structured payload. | ||
| message Task { | ||
| // task_id is the unique identifier of the task. | ||
| string task_id = 1 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).cel = { | ||
| id: "task_id_length" | ||
| expression: "this.size() >= 1" | ||
| message: "task_id must be at least 1 characters long" | ||
| } | ||
| ]; | ||
| // mission_id is the mission this task belongs to. | ||
| string mission_id = 2 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).cel = { | ||
| id: "mission_id_prefix" | ||
| expression: "this.startsWith('missions:')" | ||
| message: "mission_id must start with 'missions:'" | ||
| }, | ||
| (buf.validate.field).cel = { | ||
| id: "mission_id_length" | ||
| expression: "this.size() >= 10" | ||
| message: "mission_id must be at least 1 characters long" | ||
| } | ||
| ]; | ||
| // setup_id is the setup configuration to use. | ||
| string setup_id = 3 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).cel = { | ||
| id: "setup_id_prefix" | ||
| expression: "this.startsWith('setups:')" | ||
| message: "setup_id must start with 'setups:'" | ||
| }, | ||
| (buf.validate.field).cel = { | ||
| id: "setup_id_length" | ||
| expression: "this.size() >= 8" | ||
| message: "setup_id must be at least 1 characters long" | ||
| } | ||
| ]; | ||
| // setup_version_id is the setup version to use. | ||
| string setup_version_id = 4 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).cel = { | ||
| id: "setup_version_id_prefix" | ||
| expression: "this.startsWith('setup_versions:')" | ||
| message: "setup_version_id must start with 'setup_versions:'" | ||
| }, | ||
| (buf.validate.field).cel = { | ||
| id: "setup_version_id_length" | ||
| expression: "this.size() >= 16" | ||
| message: "setup_version_id must be at least 1 characters long" | ||
| } | ||
| ]; | ||
| // action is the latest signal action type. | ||
| string action = 5 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).cel = { | ||
| id: "action_length" | ||
| expression: "this.size() >= 1" | ||
| message: "action must be at least 1 characters long" | ||
| } | ||
| ]; | ||
| // cancellation_reason is the reason for cancellation. | ||
| string cancellation_reason = 6 [ | ||
| (buf.validate.field).required = true, | ||
| (buf.validate.field).cel = { | ||
| id: "cancellation_reason_length" | ||
| expression: "this.size() >= 1" | ||
| message: "action must be at least 1 characters long" | ||
| } | ||
| ]; | ||
| // created_at is when the task was created. | ||
| google.protobuf.Timestamp created_at = 7 [ | ||
| (buf.validate.field).required = true | ||
| ]; | ||
| // heartbeat_at is when the task last sent a heartbeat. | ||
| optional google.protobuf.Timestamp heartbeat_at = 8; | ||
| // payload is an optional structured payload. | ||
| optional google.protobuf.Struct payload = 9; | ||
| } |
35 changes: 35 additions & 0 deletions
35
proto/agentic_mesh_protocol/task_manager/v1/task_manager_service.proto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // Copyright 2025 DigitalKin Inc. | ||
| // | ||
| // Licensed under the GNU General Public License, Version 3.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // https://www.gnu.org/licenses/gpl-3.0.html | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package agentic_mesh_protocol.task_manager.v1; | ||
|
|
||
| import "agentic_mesh_protocol/task_manager/v1/task_manager_dto.proto"; | ||
|
|
||
| // TaskManagerService provides task orchestration | ||
| // and monitoring for the agentic mesh. | ||
| service TaskManagerService { | ||
| // SendSignals sends signals to tasks (create, stop, etc.). | ||
| rpc SendSignals(SendSignalsRequest) | ||
| returns (SendSignalsResponse); | ||
|
|
||
| // ListHeartbeats retrieves heartbeats for a task. | ||
| rpc ListHeartbeats(ListHeartbeatsRequest) | ||
| returns (ListHeartbeatsResponse); | ||
|
|
||
| // GetSignals retrieves pending signals for a task. | ||
| rpc GetSignals(GetSignalsRequest) | ||
| returns (GetSignalsResponse); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(buf.validate.field).required = true,
Il faut indiquer que c'est obligatoire pour les champs necessaires pour les request/response.