Skip to content

Commit 93eec0a

Browse files
author
Bas Alberts
committed
add release files list
1 parent 7b3cb23 commit 93eec0a

File tree

2 files changed

+189
-0
lines changed

2 files changed

+189
-0
lines changed

release.txt

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# .ignore files
2+
./.gitignore
3+
./.dockerignore
4+
5+
# release tooling
6+
./release.txt
7+
./release_tools/copy_files.py
8+
./release_tools/publish_docker.py
9+
10+
# license
11+
./LICENSE
12+
13+
# deps
14+
./requirements.txt
15+
16+
# docker
17+
./docker/run.sh
18+
19+
# docs
20+
./README.md
21+
./taskflows/GRAMMAR.md
22+
23+
# logs
24+
./logs/ABOUT
25+
26+
# code
27+
./main.py
28+
./agent.py
29+
./capi.py
30+
./mcp_utils.py
31+
./env_utils.py
32+
./render_utils.py
33+
./shell_utils.py
34+
./yaml_parser.py
35+
36+
# prompts
37+
./prompts/examples/example_prompt.yaml
38+
39+
# taskflows
40+
./taskflows/CVE-2023-2283/CVE-2023-2283.yaml
41+
./taskflows/examples/example_reusable_prompt.yaml
42+
./taskflows/examples/echo.yaml
43+
./taskflows/examples/example.yaml
44+
./taskflows/examples/example_inputs.yaml
45+
./taskflows/examples/example_repeat_prompt.yaml
46+
./taskflows/examples/example_repeat_prompt_dictionary.yaml
47+
./taskflows/examples/example_reusable_taskflows.yaml
48+
./taskflows/examples/example_large_list_result_iter.yaml
49+
./taskflows/examples/example_repeat_prompt_async.yaml
50+
./taskflows/examples/single_step_taskflow.yaml
51+
./taskflows/examples/example_triage_taskflow.yaml
52+
./taskflows/examples/example_globals.yaml
53+
54+
# toolboxes
55+
## github official
56+
./toolboxes/github_official.yaml
57+
## echo
58+
./toolboxes/echo.yaml
59+
./mcp_servers/echo/echo.py
60+
## memcache
61+
./toolboxes/memcache.yaml
62+
./mcp_servers/memcache/memcache.py
63+
./mcp_servers/memcache/memcache_backend/__init__.py
64+
./mcp_servers/memcache/memcache_backend/backend.py
65+
./mcp_servers/memcache/memcache_backend/dictionary_file.py
66+
./mcp_servers/memcache/memcache_backend/sql_models.py
67+
./mcp_servers/memcache/memcache_backend/sqlite.py
68+
## logbook
69+
./toolboxes/logbook.yaml
70+
./mcp_servers/logbook/logbook.py
71+
## codeql
72+
./toolboxes/codeql.yaml
73+
./mcp_servers/codeql/mcp_server.py
74+
./mcp_servers/codeql/client.py
75+
./mcp_servers/codeql/queries/README.md
76+
./mcp_servers/codeql/queries/mcp-js/relative_to_absolute.ql
77+
./mcp_servers/codeql/queries/mcp-js/qlpack.yml
78+
./mcp_servers/codeql/queries/mcp-js/absolute_to_relative.ql
79+
./mcp_servers/codeql/queries/mcp-js/definition_location_for_function.ql
80+
./mcp_servers/codeql/queries/mcp-js/call_graph_from.ql
81+
./mcp_servers/codeql/queries/mcp-js/locations.qll
82+
./mcp_servers/codeql/queries/mcp-js/call_graph_to.ql
83+
./mcp_servers/codeql/queries/mcp-cpp/stmt_location.ql
84+
./mcp_servers/codeql/queries/mcp-cpp/declaration_location_for_variable.ql
85+
./mcp_servers/codeql/queries/mcp-cpp/relative_to_absolute.ql
86+
./mcp_servers/codeql/queries/mcp-cpp/call_graph_from_to.ql
87+
./mcp_servers/codeql/queries/mcp-cpp/qlpack.yml
88+
./mcp_servers/codeql/queries/mcp-cpp/absolute_to_relative.ql
89+
./mcp_servers/codeql/queries/mcp-cpp/codeql-pack.lock.yml
90+
./mcp_servers/codeql/queries/mcp-cpp/definition_location_for_function.ql
91+
./mcp_servers/codeql/queries/mcp-cpp/call_graph_from.ql
92+
./mcp_servers/codeql/queries/mcp-cpp/list_functions.ql
93+
./mcp_servers/codeql/queries/mcp-cpp/locations.qll
94+
./mcp_servers/codeql/queries/mcp-cpp/call_graph_to.ql
95+
./mcp_servers/codeql/jsonrpyc/LICENSE
96+
./mcp_servers/codeql/jsonrpyc/__meta__.py
97+
./mcp_servers/codeql/jsonrpyc/__init__.py
98+
./mcp_servers/codeql/jsonrpyc/py.typed
99+
100+
# personalities
101+
./personalities/assistant.yaml
102+
./personalities/c_auditer.yaml
103+
./personalities/examples/fruit_expert.yaml
104+
./personalities/examples/echo.yaml
105+
./personalities/examples/banana_expert.yaml
106+
./personalities/examples/orange_expert.yaml
107+
./personalities/examples/example_triage_agent.yaml
108+
./personalities/examples/apple_expert.yaml

release_tools/copy_files.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import os
2+
import shutil
3+
import sys
4+
import subprocess
5+
6+
def read_file_list(list_path):
7+
"""
8+
Reads a file containing file paths, ignoring empty lines and lines starting with '#'.
9+
Returns a list of relative file paths.
10+
"""
11+
with open(list_path, "r") as f:
12+
lines = [line.strip() for line in f]
13+
return [line for line in lines if line and not line.startswith("#")]
14+
15+
def copy_files(file_list, dest_dir):
16+
"""
17+
Copy files listed in file_list to dest_dir, preserving their relative paths.
18+
19+
:param file_list: List of file paths (relative to current working directory)
20+
:param dest_dir: Destination directory where files will be copied
21+
"""
22+
for rel_path in file_list:
23+
abs_src = os.path.abspath(rel_path)
24+
abs_dest = os.path.abspath(os.path.join(dest_dir, rel_path))
25+
os.makedirs(os.path.dirname(abs_dest), exist_ok=True)
26+
shutil.copy2(abs_src, abs_dest)
27+
print(f"Copied {abs_src} -> {abs_dest}")
28+
29+
def ensure_git_repo(dest_dir):
30+
"""
31+
Initializes a git repository in dest_dir if it's not already a git repo.
32+
Sets the main branch to 'main'.
33+
"""
34+
git_dir = os.path.join(dest_dir, ".git")
35+
if not os.path.isdir(git_dir):
36+
try:
37+
subprocess.run(["git", "init", "-b", "main"], cwd=dest_dir, check=True)
38+
print(f"Initialized new git repository in {dest_dir} with 'main' as the default branch")
39+
except subprocess.CalledProcessError as e:
40+
print(f"Failed to initialize git repository in {dest_dir}: {e}")
41+
sys.exit(1)
42+
else:
43+
# Ensure main branch exists and is checked out
44+
try:
45+
branches = subprocess.check_output(["git", "branch"], cwd=dest_dir, text=True)
46+
if "main" not in branches:
47+
subprocess.run(["git", "checkout", "-b", "main"], cwd=dest_dir, check=True)
48+
print("Created and switched to 'main' branch.")
49+
else:
50+
subprocess.run(["git", "checkout", "main"], cwd=dest_dir, check=True)
51+
print("Switched to 'main' branch.")
52+
except subprocess.CalledProcessError as e:
53+
print(f"Failed to ensure 'main' branch in {dest_dir}: {e}")
54+
sys.exit(1)
55+
56+
def git_add_files(file_list, dest_dir):
57+
"""
58+
Runs 'git add' on each file in file_list within dest_dir.
59+
"""
60+
cwd = os.getcwd()
61+
os.chdir(dest_dir)
62+
try:
63+
for rel_path in file_list:
64+
try:
65+
subprocess.run(["git", "add", "-f", rel_path], check=True)
66+
print(f"git add {rel_path}")
67+
except subprocess.CalledProcessError as e:
68+
print(f"Failed to git add {rel_path}: {e}")
69+
finally:
70+
os.chdir(cwd)
71+
72+
if __name__ == "__main__":
73+
if len(sys.argv) != 3:
74+
print("Usage: python copy_files.py <file_list.txt> <dest_dir>")
75+
sys.exit(1)
76+
file_list_path = sys.argv[1]
77+
dest_dir = sys.argv[2]
78+
file_list = read_file_list(file_list_path)
79+
copy_files(file_list, dest_dir)
80+
ensure_git_repo(dest_dir)
81+
git_add_files(file_list, dest_dir)

0 commit comments

Comments
 (0)