Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
e028baa
added agentic features from gitlab
RebelOfDeath Sep 6, 2026
76b55db
[Feature]: Add Docker Compose setup for local development on non-GPU …
RebelOfDeath Sep 7, 2026
deba605
Test database service and ignore hygiene
myildirim19 Sep 10, 2026
d35dce3
Migrate Python agent to agent-client-protocol 0.12 on stable v1
myildirim19 Sep 10, 2026
038dbfc
Fetch agent profile once per auth instead of per message
myildirim19 Sep 10, 2026
52c93cf
feat(acp): route authenticated agents through backend relay
cemgungor1 Sep 10, 2026
34a4a2c
fix: use the configured allowlisted tools in code4me-agent and return…
cemgungor1 Sep 10, 2026
1005403
Merge pull request #2 from AISE-TUDelft/fix
myildirim19 Sep 11, 2026
82013f6
feat: managed agent policy backend and schema
myildirim19 Sep 11, 2026
af06212
feat: managed agent runtime with policy enforcement
myildirim19 Sep 11, 2026
a84c355
chore: runtime packaging, docs and dev compose defaults
myildirim19 Sep 11, 2026
28840d5
chore:temp version file
myildirim19 Sep 11, 2026
ec9d04a
fix: raise err on email delivery failure
cemgungor1 Sep 11, 2026
bfde7da
fix: use legacy mode for MCP tool clients
cemgungor1 Sep 11, 2026
54f9a21
fix: use correct .env
cemgungor1 Sep 11, 2026
959397f
Feat/ab study agent assignments (#3)
cemgungor1 Sep 12, 2026
3184717
feat: Add approval prompts for Code4Me edits
cemgungor1 Sep 13, 2026
c1bfc8f
fix: backend launch info for agents
cemgungor1 Sep 13, 2026
99d5ae1
fix: model performance analytics
cemgungor1 Sep 14, 2026
ad3555e
feat: add agent telemetry dashboard
cemgungor1 Sep 14, 2026
a1515e0
feat: agent study telemetry metrics
cemgungor1 Sep 14, 2026
63aa356
fix: propagate upstream rate limits correctly
cemgungor1 Sep 14, 2026
b994abe
approval policy forwarding
cemgungor1 Sep 14, 2026
c35a75f
keep view hash in sync
cemgungor1 Sep 14, 2026
9567cb3
for test
cemgungor1 Sep 18, 2026
952f651
clean
cemgungor1 Sep 18, 2026
f8d00d0
hotfix
myildirim19 Sep 18, 2026
c70dc87
research studies
cemgungor1 Sep 18, 2026
509bb4c
test(research): task05 bootstrap/session/telemetry HTTP contract
myildirim19 Sep 18, 2026
6bab164
cleanup
myildirim19 Sep 18, 2026
cc095bb
test(research): task07 validation matrix, browser-found defect fix
myildirim19 Sep 18, 2026
fa6a025
feat(research): task09 allowlisted telemetry adapter seam + Codex BYO…
myildirim19 Sep 18, 2026
60b4c14
fix(security): production-readiness hardening from the final audit
myildirim19 Sep 18, 2026
693a2b3
feat(security): enforce the study privacy policy at ingestion; authen…
myildirim19 Sep 19, 2026
713c7e1
feat(research): scope kill-switch reads, add a reproducible OpenAPI e…
myildirim19 Sep 19, 2026
08d5797
fix(e2e): tolerate a missing workspace root; wire the OpenAPI check t…
myildirim19 Sep 19, 2026
d55d23b
feat(dev-seed): create the provider connection and verify approval op…
myildirim19 Sep 19, 2026
79b1361
fix(deps): make a fresh test environment installable
myildirim19 Sep 19, 2026
feffcd4
fix(research): refuse a study whose profile runtime is not managed
myildirim19 Sep 19, 2026
157337d
revert(research): drop the study-creation runtime guard
myildirim19 Sep 19, 2026
318dbe0
fix(research): make the frozen study policy the content authority
myildirim19 Sep 19, 2026
b06812c
feat(research): carry canonical research attribution through managed …
myildirim19 Sep 19, 2026
2591add
fix(telemetry): propagate canonical ACKs and authenticate receipt sub…
myildirim19 Sep 19, 2026
d2fd413
feat(research): bind qualification to artifacts and validate executab…
myildirim19 Sep 19, 2026
bd56bd2
feat(research): give study clone a profile-selection completion path
myildirim19 Sep 19, 2026
a89eb6c
fix(research): validate study session policy and separate liveness fr…
myildirim19 Sep 19, 2026
6f8a4f6
feat(research): add the researcher release catalogue
myildirim19 Sep 19, 2026
7c0a73e
feat(research): expose study-owner participant coverage
myildirim19 Sep 19, 2026
78f1cf9
chore(research): drop stale assignment docs and record vocabulary dec…
myildirim19 Sep 19, 2026
016ed04
feat(website): author studies with validated policies and release cat…
myildirim19 Sep 19, 2026
5747b14
feat(website): show study participant coverage to the study owner
myildirim19 Sep 19, 2026
cdbf1e4
chore(website): remove the dead assignment flow and label legacy comp…
myildirim19 Sep 19, 2026
8f1a4e9
fix(website): clear pre-existing lint errors blocking the build
myildirim19 Sep 19, 2026
68c7449
feat(research): execution-pinned participant releases
myildirim19 Sep 21, 2026
8dff36a
test(research): cover explicit local subset participant preparation
myildirim19 Sep 21, 2026
f042add
combine changes
cemgungor1 Sep 21, 2026
59a0867
feat(research): add qualified agent release registry
cemgungor1 Sep 22, 2026
cf33eda
feat(research): enforce pinned bootstrap artifacts
cemgungor1 Sep 22, 2026
d8b5c36
feat(research): add canonical telemetry ingestion
cemgungor1 Sep 22, 2026
041d37c
feat(telemetry): add ACP proxy normalization
cemgungor1 Sep 22, 2026
ace36c5
feat(release): package and verify participant runtimes
cemgungor1 Sep 22, 2026
50ac952
feat(admin): add research control plane
cemgungor1 Sep 22, 2026
42bb90a
feat(research): add study lifecycle controls
cemgungor1 Sep 22, 2026
0e29cb5
test(e2e): cover research participant workflow
cemgungor1 Sep 22, 2026
8b2c880
feat(release): document and harden runtime operations
cemgungor1 Sep 22, 2026
c5e75e2
finalize remaining compatibility contracts
cemgungor1 Sep 22, 2026
51bcd66
fix(telemetry): collect, dedupe and surface telemetry correctly
Sep 23, 2026
5091203
feat(telemetry): end-to-end traceability (trace/span/parent, run bind…
Sep 23, 2026
074309d
fix(telemetry): don't 500 when all store flags are off or models error
Sep 24, 2026
48b9928
build(docker): keep e2e outputs and CUDA wheels out of the CPU image
myildirim19 Sep 24, 2026
fb9319e
feat(classic): add a switch that refuses the classic model endpoints
myildirim19 Sep 24, 2026
3444aec
feat(classic): serve the default classic models through OpenRouter
myildirim19 Sep 24, 2026
e5c5144
test(e2e): cover provider-backed classic completion and chat
myildirim19 Sep 24, 2026
dea4cb6
feat(telemetry): record permission decisions and compute edit acceptance
Sep 24, 2026
c3a7e81
fix(telemetry): include context and schema byte counts in canonical m…
Sep 24, 2026
5e93102
fix(analytics): surface trace linkage and real metrics in run timeline
Sep 24, 2026
5057135
Merge branch 'classic-provider-default' into feat/acp-login-refresh
myildirim19 Sep 24, 2026
59fb891
feat(research): study analytics API, telemetry privacy fixes and prof…
myildirim19 Sep 25, 2026
59b255b
feat(website): research UI overhaul
myildirim19 Sep 25, 2026
77d8412
test(e2e): follow the study workspace tabs and cover participant dash…
myildirim19 Sep 25, 2026
0e96c20
Merge origin/gt_telemetry into research-ui-overhaul
myildirim19 Sep 25, 2026
2f2db11
fix(telemetry): keep legacy self-report writes and gap-free relay seq…
myildirim19 Sep 25, 2026
f039155
fix(analytics): count each permission decision once, and only real ones
myildirim19 Sep 25, 2026
03a3135
fix(telemetry): leave out every permission decision no one made
myildirim19 Sep 25, 2026
03e9fa0
Merge branch 'feat/acp-login-refresh' into test_draft
myildirim19 Sep 25, 2026
631326e
Merge branch 'research-ui-overhaul' into test_draft
myildirim19 Sep 25, 2026
2b49d77
Merge branch 'research-ui-overhaul-gt-telemetry' into test_draft
myildirim19 Sep 25, 2026
6fb58e9
fix(e2e): name the research session when send_message creates the run
myildirim19 Sep 25, 2026
59df927
Merge branch 'fix/e2e-send-message-research-session' into test_draft
myildirim19 Sep 25, 2026
5e691c6
feat(agent): make the bundled ACP agent a capable coding agent
myildirim19 Sep 25, 2026
eb9f6de
fix: address the test_draft review findings
myildirim19 Sep 25, 2026
1ee79d2
test(e2e): port the stashed coverage and provision prerequisites
myildirim19 Sep 25, 2026
9b9b15d
feat(research): meter Goose and built-in arms against per-participant…
myildirim19 Sep 26, 2026
2efc901
Merge branch 'feat/participant-budgets' into test_draft
myildirim19 Sep 26, 2026
fcaabf4
Feat/release plugin (#4)
cemgungor1 Sep 26, 2026
6d19a4a
feat(agent): add the tier 1 and 2 harness upgrades and per-profile co…
myildirim19 Sep 26, 2026
2533273
Merge branch 'feat/agent-harness-tiers' into test_draft
myildirim19 Sep 26, 2026
c6907ec
fix(agent): recognise Windows runner names in test summaries and use …
myildirim19 Sep 26, 2026
687cd00
feat(privacy): let users opt out of data collection and erase their data
myildirim19 Sep 27, 2026
c9580d8
feat(website): add the Privacy & data page
myildirim19 Sep 27, 2026
5916379
Merge branch 'feat/privacy-controls' into test_draft
myildirim19 Sep 27, 2026
d30a2d4
Validate BYOA agent sessions and telemetry
ceylin-ece Sep 27, 2026
9ff5452
fix(research): keep sessions and events intact in production and add …
myildirim19 Sep 27, 2026
b3f2a08
Merge branch 'test_draft' into agent_telemetry_session_validation
myildirim19 Sep 27, 2026
f2b424c
fix(research): adapt the BYOA agent validation to test_draft and fix …
myildirim19 Sep 27, 2026
1990b3d
Merge branch 'agent_telemetry_session_validation' into test_draft
myildirim19 Sep 27, 2026
21ff46c
remove google auth
cemgungor1 Sep 30, 2026
421f794
Rewrite landing page: researcher focus, JetBrains theme, neutral feat…
Oct 1, 2026
dcc142e
new plugin workflow
cemgungor1 Oct 3, 2026
f07f558
feat(workflow): preserve download URLs in preparation recipe for assi…
myildirim19 Oct 3, 2026
506de11
feat(release): make runtime signing opt-in and accept only canonical …
myildirim19 Oct 3, 2026
60b19eb
fix(workflow): name the repository when publishing the runtime release
myildirim19 Oct 3, 2026
703fa48
fix(e2e): reach the stub provider on Linux runners and run the stack …
myildirim19 Oct 3, 2026
dfe9d5f
chore(workflow): remove the OpenAPI contract workflow; the backend su…
myildirim19 Oct 3, 2026
a57b72b
Merge branch 'feat/plugin' into test_draft
myildirim19 Oct 3, 2026
7471625
feat(research): pilot feedback features and pre-deployment fixes
myildirim19 Oct 4, 2026
52aff33
Merge branch 'feat/pilot-feedback' into test_draft
myildirim19 Oct 4, 2026
46c953f
fix(agent): verify HTTPS backends in the packaged runtime
myildirim19 Oct 7, 2026
2200f98
feat(agents): send OpenCode its session and user-agent headers
myildirim19 Oct 7, 2026
57bf574
Merge branch 'fix/agent-tls-opencode' into test_draft
myildirim19 Oct 7, 2026
2d4c270
Merge pull request #7 from AISE-TUDelft/landing_page
myildirim19 Oct 7, 2026
0beb026
feat(website): archive the first-generation analytics pages
myildirim19 Oct 7, 2026
a84a010
fix(agent): name the agent in User-Agent on every backend call
myildirim19 Oct 9, 2026
58c5e92
feat(agent): harden the tool loop for long headless runs
myildirim19 Oct 9, 2026
e86e955
feat(benchmarks): add a self-contained SWE-bench harness for the pack…
myildirim19 Oct 9, 2026
785908b
Merge branch 'feat/swebench-harness' into test_draft
myildirim19 Oct 9, 2026
6b72f9e
fix(e2e): install a pinned Goose so the full layer can run on CI
myildirim19 Oct 9, 2026
17108d3
Merge branch 'fix/e2e-ci-goose' into test_draft
myildirim19 Oct 9, 2026
abe015f
feat(agent): replace the command allowlist with a blocked-command list
myildirim19 Oct 10, 2026
530f0d9
Merge branch 'feat/command-denylist' into test_draft
myildirim19 Oct 10, 2026
1ad6f01
feat(agent): send configured extra request fields on direct model calls
myildirim19 Oct 14, 2026
cd14657
feat(benchmarks): run SWE-rebench under the leaderboard's protocol vi…
myildirim19 Oct 14, 2026
e82a952
fix logout issues
cemgungor1 Oct 15, 2026
e19593c
fix logout issues2
cemgungor1 Oct 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 20 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
venv/
**/__pycache__/
*.pyc
*.egg-info/

# Git
.git
Expand All @@ -13,20 +14,38 @@ node_modules
src/website/node_modules

# Local caches and data
.env
**/.env
.cache
.hypothesis
.coverage
secrets

# Project data directories
# Project data directories (and database dumps written by the backup service)
backups/
Data
.data

data/

# Build and test outputs. The e2e harness runs on the host; e2e/runs alone
# used to add ~4 GB to every image.
build/
dist/
e2e/runs/
e2e/.cache/
e2e/.venv/
e2e/.browser-venv/
**/.pytest_cache
**/.ruff_cache

# Docker files
Dockerfile*
docker-compose*.yml

# Development-only scripts (e.g. the guarded research-study seeder) must never
# be baked into the server image.
scripts/dev/

# OS
.DS_Store
91 changes: 0 additions & 91 deletions .env

This file was deleted.

179 changes: 179 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
# Example environment variables for the agent subsystem.
#
# PLACEHOLDER VALUES ONLY — never commit a real credential to this file.
# Copy the entries you need into your own `.env` (which is gitignored for real
# values) and fill them in there.
#
# This file documents only the agent-specific variables added by the agent
# subsystem. See README.md for the base platform's configuration (database,
# Redis, Celery, email, model serving).


# ─── Upstream LLM provider ───────────────────────────────────────────────────
#
# Per merge decision 6 there is no hardcoded provider. Each `agent_profile` row
# names its own `base_url` + `api_key_ref` + `model`, and the only requirement
# is that the endpoint speaks the OpenAI-compatible chat-completions wire
# format. Ollama, Groq, OpenRouter, vLLM and OpenAI all qualify.
#
# Keys are NEVER stored in the database. A profile stores `api_key_ref`, the
# *name* of an environment variable, and the key is read from the environment
# at request time — so dumping the profile table cannot leak a credential.

# Fallback upstream, used when a profile leaves `base_url` empty.
# Defaults to a local Ollama instance, which needs no key and costs nothing.
AGENT_UPSTREAM_BASE_URL=http://localhost:11434/v1

# Fallback API key, used when a profile leaves `api_key_ref` empty.
# Safe to leave blank for local providers that don't authenticate.
AGENT_UPSTREAM_API_KEY=

# Per-provider keys. Create one variable per provider you use and point the
# matching profile's `api_key_ref` at its name. The seeded default profiles
# reference OLLAMA_API_KEY, AGENT_UPSTREAM_API_KEY and OPENAI_API_KEY.
OLLAMA_API_KEY=
OPENAI_API_KEY=your_openai_api_key_here
GROQ_API_KEY=your_groq_api_key_here
OPENROUTER_API_KEY=your_openrouter_api_key_here


# ─── Codex Responses API ─────────────────────────────────────────────────────
#
# Codex speaks OpenAI's proprietary Responses API rather than chat-completions,
# so it is handled as a special-cased normalization path. When a Codex profile
# targets a non-OpenAI base_url, the proprietary fields are rewritten; when it
# targets OpenAI, the payload is forwarded largely as-is.

# Optional operator override for reasoning effort, e.g. to cap cost.
# Valid values: low | medium | high. Leave blank to let Codex decide (with a
# clamp applied for models that reject its default).
AGENT_REASONING_EFFORT=

# Optional positive output-token cap for Codex Responses requests routed to a
# non-OpenAI provider. Leave blank to preserve the agent's requested budget.
AGENT_RESPONSES_MAX_OUTPUT_TOKENS=

# ─── Research inference gateway and participant budgets ──────────────────────
#
# Goose and built-in study arms spend from the study's provider connection
# (the env var named by its `secret_ref`) through a metered relay. Every call
# reserves its worst-case cost before it is forwarded and settles the actual
# usage afterwards. Defaults are conservative; all values are optional.

# Global per-call output cap (tokens); the injected max_tokens never exceeds it.
INFERENCE_OUTPUT_TOKEN_CEILING=8192
# Below this affordable output cap a call is refused (402) instead of sent.
INFERENCE_MIN_OUTPUT_TOKENS=256
# Multiplier on the byte-based prompt estimate (>= 1.0).
INFERENCE_INPUT_ESTIMATE_SAFETY=1.5
# Estimator constants.
INFERENCE_INPUT_BYTES_PER_TOKEN=3
INFERENCE_PER_MESSAGE_TOKEN_OVERHEAD=4
# A hold older than this is charged in full by the next reservation (seconds).
INFERENCE_RESERVATION_DEADLINE_SECONDS=900
# Wall-clock cap on one streamed response (seconds; keep below the deadline
# minus the 120 s upstream timeout).
INFERENCE_STREAM_TOTAL_TIMEOUT_SECONDS=600
# Lifetime of the inference capability handed to Goose (seconds). Goose reads
# it once per process; liveness, budget and revocation are re-checked per call.
INFERENCE_CAPABILITY_TTL_SECONDS=604800
# The metered relay paths get a per-IP floor of 20000 requests/hour unless
# MAX_REQUEST_RATE_PER_HOUR_CONFIG names them, e.g.
# MAX_REQUEST_RATE_PER_HOUR_CONFIG={"/api/research/inference/v1/chat/completions": 50000}


# ─── Production inventory (docker-compose.prod.yml) ──────────────────────────
#
# The application reads `.env` through `env_file`; the compose file additionally
# asserts the secrets below with `${VAR:?}` so `docker compose up` fails fast
# instead of a participant discovering a dead research plane. Everything the
# backend requires (no default in Code4meV2Config) is listed; values here are
# placeholders.

# --- Secrets the research plane cannot run without --------------------------
# HMAC key for bootstrap manifests and session/inference capabilities. Read at
# request time; a missing/blank value makes every bootstrap answer 503 and the
# server refuses to start (except under TEST_MODE). Generate with:
# python3 -c 'import secrets; print(secrets.token_urlsafe(48))'
BOOTSTRAP_SIGNING_SECRET=replace-with-a-long-random-secret
# Redis `requirepass` (auth tokens, sessions, ACP grants live there).
REDIS_PASSWORD=replace-with-a-long-random-password
# The https:// origin participants use; becomes CORS_ALLOWED_ORIGINS and the
# website's compiled backend host (the same origin, nginx proxies /api/).
PUBLIC_ORIGIN=https://study.example.org

# --- Database / cache / broker (compose overrides the hosts and ports) -------
DB_NAME=code4meV2
DB_USER=postgres
DB_PASSWORD=replace-me
DB_POOL_SIZE=10
DB_MAX_OVERFLOW=20
DB_POOL_TIMEOUT=30
DB_POOL_RECYCLE=1800
# Host port Postgres is bound to on 127.0.0.1 (backups, psql); never public.
DB_HOST_PORT=5432
# Only used outside compose (the compose file sets the container hosts/ports).
DB_HOST=localhost
DB_PORT=5432
REDIS_HOST=localhost
REDIS_PORT=6379
CELERY_BROKER_HOST=localhost
CELERY_BROKER_PORT=6379

# --- Server ------------------------------------------------------------------
SERVER_HOST=0.0.0.0
SERVER_PORT=8008
SERVER_VERSION_ID=1
# Uvicorn workers; assignment/session/receipt authority lives in Postgres.
CODE4ME_WEB_WORKERS=2
# Comma-separated proxies whose X-Forwarded-For is trusted (rate limiting and
# uvicorn); the compose sets "*" because only nginx can reach the backend.
FORWARDED_ALLOW_IPS=127.0.0.1
# Secure cookies (set by the compose; keep false for plain-HTTP local stacks).
COOKIE_SECURE=false
# Grace after a session ended during which its late events are still stored.
TELEMETRY_LATE_EVENT_GRACE_SECONDS=900
# Serve the classic completion/chat rows (provider-backed by default).
CLASSIC_MODELS_ENABLED=true
PRELOAD_MODELS=false

# --- Tokens / rate limits ----------------------------------------------------
AUTHENTICATION_TOKEN_EXPIRES_IN_SECONDS=86400
SESSION_TOKEN_EXPIRES_IN_SECONDS=86400
EMAIL_VERIFICATION_TOKEN_EXPIRES_IN_SECONDS=86400
RESET_PASSWORD_TOKEN_EXPIRES_IN_SECONDS=900
TOKEN_HOOK_ACTIVATION_IN_SECONDS=60
# Per client (real address behind nginx) per path per hour. Research-plane
# paths (sessions, telemetry batches, bootstrap) and the inference relay get a
# 20000/h floor regardless; override a path with MAX_REQUEST_RATE_PER_HOUR_CONFIG.
DEFAULT_MAX_REQUEST_RATE_PER_HOUR=1000
MAX_REQUEST_RATE_PER_HOUR_CONFIG={}

# --- Email (verification / password reset) -----------------------------------
EMAIL_HOST=smtp.example.org
EMAIL_PORT=587
EMAIL_USERNAME=noreply@example.org
EMAIL_PASSWORD=replace-me
EMAIL_USE_TLS=true
EMAIL_FROM=noreply@example.org
VERIFICATION_URL=https://study.example.org/verify
RESET_PASSWORD_URL=https://study.example.org/reset-password

# --- Website / misc required by the configuration model ----------------------
WEBSITE_HOST=website
WEBSITE_PORT=80
# Required by the config model even when pgAdmin is not deployed.
PGADMIN_HOST=localhost
PGADMIN_PORT=5050
PGADMIN_DEFAULT_EMAIL=admin@example.org
PGADMIN_DEFAULT_PASSWORD=replace-me

# --- Backups (backup service) ------------------------------------------------
BACKUP_DIR=./backups
BACKUP_RETENTION_DAYS=14
BACKUP_INTERVAL_SECONDS=86400
# Optional off-host copy, run with the dump path as $1, e.g.
# rclone copy "$1" remote:code4me-backups
BACKUP_OFFHOST_CMD=
# Host port for the website/nginx container (80 behind an external TLS edge).
HTTP_PORT=80
Loading
Loading