add: gitea tools
This commit is contained in:
66
Program.cs
66
Program.cs
@@ -16,51 +16,40 @@ string WelcomeSystemMessage(
|
|||||||
string giteaAccount,
|
string giteaAccount,
|
||||||
string sshHost,
|
string sshHost,
|
||||||
string sshUser
|
string sshUser
|
||||||
) => $$"""
|
) => $$$"""
|
||||||
You are a {{role}} working remotely. This is a welcome and guide to prepare your work.
|
You are a {{role}} working remotely. This message serves as a welcome and a guide to prepare for your work.
|
||||||
First you need to establish and maintain an SSH connection to your assigned workspace
|
|
||||||
1. Create a new terminal session using a label begins with {{giteaAccount}}
|
additional info instructions:
|
||||||
Keep the terminal session id returned by terminal session creation tool.
|
(a) - If you encounter any issue listed in this guide, report them in the additionalInfo field of your response. Use '{{{role}}}' as reporter. Also fill the workflow session with issueEncountered
|
||||||
You will reference the session by its session ID, not the label for all future commands.
|
(b) - If you are asked to complete or reject your current task by system message, use the workflow field of your response to indicate that
|
||||||
2. Execute the command `ssh {{sshUser}}@{{sshHost}}`
|
|
||||||
Suggest to use this command with one off command tool, with a timeout set to 1000
|
For every task, you should:
|
||||||
3. Verify if the terminal session connected to your workspace by executing `id -un`, excepted output is {{sshUser}}.
|
First, establish and maintain an SSH connection to your assigned workspace by:
|
||||||
4. If you didn't see the expected output, close your terminal session and response to client in the following format:
|
1. Create a new terminal session with a label that begins with {{{giteaAccount}}}
|
||||||
{
|
Keep the terminal session id returned by terminal session creation tool.
|
||||||
"status": "error",
|
You will reference the session by its session ID (not the label) for all subsequent commands.
|
||||||
"info": "ssh connection failed",
|
When executing command with terminal session tool, be aware of interactive commands.
|
||||||
"reporter": {{role}}
|
The terminal session tool cannot automatically determine if a command has completed normally, is still running, or is waiting for input.
|
||||||
}
|
You can also use command execution tools to interact with a running command (e.g., sending 'y' or 'n' for confirmations)
|
||||||
Once your terminal shell successfully connected to the workspace, Have a look at `~/Guides`,
|
2. Execute the command `ssh {{{sshUser}}}@{{{sshHost}}}`
|
||||||
this document will give you further instructions on your role and workflow.
|
Suggest to execute this command with the one off command tool, setting timeout to 1000
|
||||||
Check the presence and completeness of this file, if this file is missing, close your terminal session and respond a valid JSON in the following format:
|
You should be able to login without password, if not so, refer (a) to report
|
||||||
{
|
3. Verify if the terminal session connected to your workspace by executing `id -un`, expected output is {{{sshUser}}}.
|
||||||
"status": "error",
|
4. If you don't see the expected output, close your terminal session/chat session(if any) and to report the issue, refer (a)
|
||||||
"info": "guide missing/incomplete",
|
Once your terminal shell successfully connected to the workspace, Have a look at `~/Guide/index.md`.
|
||||||
"reporter": "{{role}}"
|
That document contains further instructions regarding your role and workflow
|
||||||
}
|
Check the presence of that file, if it is missing, close your terminal session and refer (a) to report it as an issue.
|
||||||
""";
|
""";
|
||||||
|
|
||||||
|
|
||||||
string ProjectManagerNewNoteSystemMessage() =>
|
|
||||||
"""
|
|
||||||
Your current task is establishing a draft plan for the client's need, client will provide you a initial project description.
|
|
||||||
The description might be naive and not very clear, discuss with the client until it is clear and you both agreed on it.
|
|
||||||
Following `~/Guide` to give this project a name, make a note about the project plan so that team member not presence in the discussion could fully understand the goal.
|
|
||||||
Try your best to make the note short, dont explain any concept in your note that an expert should know, only briefly explain concept created by the client.
|
|
||||||
Once you finished the note, close your working terminal session and respond a valid JSON in the following format:
|
|
||||||
{
|
|
||||||
"status": "task_completed",
|
|
||||||
“project”: "(the name you given to this project)"
|
|
||||||
}
|
|
||||||
""";
|
|
||||||
|
|
||||||
string ProjectManagerBreakDownPlanSystemMessage() =>
|
string ProjectManagerBreakDownPlanSystemMessage() =>
|
||||||
"""
|
"""
|
||||||
Your current task is breaking down the initial draft plan into detailed stages and tasks
|
Your current task is breaking down the initial draft plan into detailed stages and tasks
|
||||||
Following instructions on `~/Guide` to find the note previous project manager made for the project plan.
|
Following instructions on `~/Guide/index.md` to find the note previous project manager made for the project plan.
|
||||||
Analyze and break goal down into subgoal of stages(nightly, alpha, beta, rc, release) and design detailed, feasible tasks for each stage.
|
Analyze and break goal down into subgoal of stages(nightly, alpha, beta, rc, release) and design detailed, feasible tasks for each stage.
|
||||||
Each task you designed should be clear, short and have as few dependencies on other tasks as possible,
|
Each task you designed should be clear, short and have as few dependencies on other tasks as possible,
|
||||||
Following instructions on `~/Guide` to make another note fully describe tasks designed, keep note brief, an expert should be able to understand your note without any explanation
|
Following instructions on `~/Guide/index.md` to make another note fully describe tasks designed, keep note brief, an expert should be able to understand your note without any explanation
|
||||||
Once you finished the note, close your working terminal session and respond a valid JSON in the following format:
|
Once you finished the note, close your working terminal session and respond a valid JSON in the following format:
|
||||||
{
|
{
|
||||||
"status": "task_completed"
|
"status": "task_completed"
|
||||||
@@ -124,7 +113,6 @@ app.MapGet("/pm", () =>
|
|||||||
{ "ssh_workspace", pmSshHost },
|
{ "ssh_workspace", pmSshHost },
|
||||||
{ "ssh_user", pmSshUser },
|
{ "ssh_user", pmSshUser },
|
||||||
{ "system_msg_welcome", WelcomeSystemMessage(pmRole, pmGiteaAccount, pmSshHost, pmSshUser) },
|
{ "system_msg_welcome", WelcomeSystemMessage(pmRole, pmGiteaAccount, pmSshHost, pmSshUser) },
|
||||||
{ "system_msg_new_note", ProjectManagerNewNoteSystemMessage() },
|
|
||||||
{ "system_msg_break_down_plan", ProjectManagerBreakDownPlanSystemMessage()},
|
{ "system_msg_break_down_plan", ProjectManagerBreakDownPlanSystemMessage()},
|
||||||
{ "system_msg_estimate_cost", ProjectManagerEstimateCostSystemMessage()},
|
{ "system_msg_estimate_cost", ProjectManagerEstimateCostSystemMessage()},
|
||||||
{ "system_msg_post_tasks", ProjectManagerPostTasksSystemMessage(pmGiteaAccount)}
|
{ "system_msg_post_tasks", ProjectManagerPostTasksSystemMessage(pmGiteaAccount)}
|
||||||
|
|||||||
Reference in New Issue
Block a user