@xalia/agent 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc.json +11 -0
- package/README.md +56 -0
- package/dist/agent.js +238 -0
- package/dist/agentUtils.js +106 -0
- package/dist/chat.js +296 -0
- package/dist/dummyLLM.js +38 -0
- package/dist/files.js +115 -0
- package/dist/iplatform.js +2 -0
- package/dist/llm.js +2 -0
- package/dist/main.js +147 -0
- package/dist/mcpServerManager.js +278 -0
- package/dist/nodePlatform.js +61 -0
- package/dist/openAILLM.js +38 -0
- package/dist/openAILLMStreaming.js +431 -0
- package/dist/options.js +79 -0
- package/dist/prompt.js +83 -0
- package/dist/sudoMcpServerManager.js +183 -0
- package/dist/test/imageLoad.test.js +14 -0
- package/dist/test/mcpServerManager.test.js +71 -0
- package/dist/test/prompt.test.js +26 -0
- package/dist/test/sudoMcpServerManager.test.js +49 -0
- package/dist/tokenAuth.js +39 -0
- package/dist/tools.js +44 -0
- package/eslint.config.mjs +25 -0
- package/frog.png +0 -0
- package/package.json +42 -0
- package/scripts/git_message +31 -0
- package/scripts/git_wip +21 -0
- package/scripts/pr_message +18 -0
- package/scripts/pr_review +16 -0
- package/scripts/sudomcp_import +23 -0
- package/scripts/test_script +60 -0
- package/src/agent.ts +283 -0
- package/src/agentUtils.ts +198 -0
- package/src/chat.ts +346 -0
- package/src/dummyLLM.ts +50 -0
- package/src/files.ts +95 -0
- package/src/iplatform.ts +17 -0
- package/src/llm.ts +15 -0
- package/src/main.ts +187 -0
- package/src/mcpServerManager.ts +371 -0
- package/src/nodePlatform.ts +24 -0
- package/src/openAILLM.ts +51 -0
- package/src/openAILLMStreaming.ts +528 -0
- package/src/options.ts +103 -0
- package/src/prompt.ts +93 -0
- package/src/sudoMcpServerManager.ts +278 -0
- package/src/test/imageLoad.test.ts +14 -0
- package/src/test/mcpServerManager.test.ts +98 -0
- package/src/test/prompt.test.src +0 -0
- package/src/test/prompt.test.ts +26 -0
- package/src/test/sudoMcpServerManager.test.ts +65 -0
- package/src/tokenAuth.ts +50 -0
- package/src/tools.ts +57 -0
- package/test_data/background_test_profile.json +6 -0
- package/test_data/background_test_script.json +11 -0
- package/test_data/dummyllm_script_simplecalc.json +28 -0
- package/test_data/git_message_profile.json +4 -0
- package/test_data/git_wip_system.txt +5 -0
- package/test_data/pr_message_profile.json +4 -0
- package/test_data/pr_review_profile.json +4 -0
- package/test_data/prompt_simplecalc.txt +1 -0
- package/test_data/simplecalc_profile.json +4 -0
- package/test_data/sudomcp_import_profile.json +4 -0
- package/test_data/test_script_profile.json +8 -0
- package/tsconfig.json +13 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"index": 0,
|
4
|
+
"message": {
|
5
|
+
"role": "assistant",
|
6
|
+
"content": "I'll help you divide those numbers. Let me calculate 12341543 divided by 431234132.",
|
7
|
+
"tool_calls": [
|
8
|
+
{
|
9
|
+
"id": "toolu_017umizET2MjAC2ir5t4iiVR",
|
10
|
+
"type": "function",
|
11
|
+
"function": {
|
12
|
+
"name": "sudomcp_simplecalc__divide",
|
13
|
+
"arguments": "{\"a\": 12341543, \"b\": 431234132}"
|
14
|
+
}
|
15
|
+
}
|
16
|
+
]
|
17
|
+
},
|
18
|
+
"finish_reason": "tool_calls"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"index": 0,
|
22
|
+
"message": {
|
23
|
+
"role": "assistant",
|
24
|
+
"content": "The result of dividing 12341543 by 431234132 is approximately 0.0286 (or about 1/35)."
|
25
|
+
},
|
26
|
+
"finish_reason": "stop"
|
27
|
+
}
|
28
|
+
]
|
@@ -0,0 +1,4 @@
|
|
1
|
+
{
|
2
|
+
"system_prompt": "Scan a code diff and produce concise and accurate commit messages. The messages should be of the form:\n```\nfeat: added some feature\n```\nOR\n```\nfeat[component]: added some feature\n```\nand ideally be contained on a single line. Instead of `feat`, `fix`, `wip` and `chore` are acceptable tags. Look at file paths and directories for clues regarding which components are being modified. NEVER explain any intermediate steps. Output ONLY the raw message.\n",
|
3
|
+
"mcp_settings": {}
|
4
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
Your job is to look at WIP code changes and create a brief but informative description of:
|
2
|
+
- the high level code change being made
|
3
|
+
- the parts that have been completed
|
4
|
+
- suggestions for what should be tackled next
|
5
|
+
I will read the description on Monday morning to refresh my memory. I'll have forgotten some important details, but will still have the broad goals in mind (you can leverage this to keep the description short). I want to get the context back into my mind as quickly as possible.
|
@@ -0,0 +1,4 @@
|
|
1
|
+
{
|
2
|
+
"system_prompt": "Scan a set of git commits and generate a concise pull-request description. If the PR covers multiple concepts, include a bullet list of the form:\n```\n- [ ] Add some feature to some component\n...\n```\nLeave the checkbox empty so the user can fill it in when complete.\nNEVER explain any intermediate steps. Output ONLY the raw message.\n",
|
3
|
+
"mcp_settings": {}
|
4
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
What is 12341543 divided by 431234132?
|
@@ -0,0 +1,4 @@
|
|
1
|
+
{
|
2
|
+
"system_prompt": "Your job is to parse the public README of an mcp server code repository and extract the commands to run the server. You must then create a yaml \"sudomcp\" spec of the form:\n```\nname: mongodb-local\ntitle: MongoDB Local\ndescription: Interact with a local MongoDB instance (via connection string)\nlogo_url: \"https://github.com/sudobase-ai/mcp-servers/blob/master/mongodb-local/logo.png?raw=true\"\nconfig_schema:\n connection_string:\n type: string\n default: \"mongodb://localhost\"\nstdio_server_params:\n command: \"npx\"\n args:\n - \"-y\"\n - \"mongodb-mcp-server\"\n env:\n MDB_MCP_CONNECTION_STRING: $connection_string\n```\nThe above is for a mongodb MCP server, requiring an environment variable `MDB_MCP_CONNECTION_STRING`. The `config_schema` section determines the variables that are required from the user in order to populate the `args` or the `env` values. Each server will have its own configuration requirements and some servers will not require a `config_schema` section at all. The use of \"mcp\" in the name, title and description is redundant and should be avoided.\n\nDo not explain any intermediate steps or give any justification. Just output the yaml file directly so I can pipe it to a file. No ``` or similar notation.\n\n",
|
3
|
+
"mcp_settings": {"duckduckgo-search":["fetch_content"]}
|
4
|
+
}
|
package/tsconfig.json
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"target": "es2020",
|
4
|
+
"module": "NodeNext",
|
5
|
+
"moduleResolution": "NodeNext",
|
6
|
+
"resolveJsonModule": true,
|
7
|
+
"skipLibCheck": true,
|
8
|
+
"outDir": "dist",
|
9
|
+
"strict": true,
|
10
|
+
"esModuleInterop": true
|
11
|
+
},
|
12
|
+
"include": ["src/**/*.ts"],
|
13
|
+
}
|