Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
3e5bf2a
fix build packaging
dharan1007 Aug 17, 2026
a6f84c0
harden release scripts
dharan1007 Aug 17, 2026
b63caed
fix dependency-first planning
dharan1007 Aug 17, 2026
dd5079d
test dependency planning
dharan1007 Aug 17, 2026
d5badd3
make file mutations fail closed
dharan1007 Aug 17, 2026
80f23d5
test transactional patches
dharan1007 Aug 17, 2026
e333d77
make validation fail closed
dharan1007 Aug 17, 2026
51753c4
fix incremental scan semantics
dharan1007 Aug 17, 2026
36f9aba
fix model-specific provider caching
dharan1007 Aug 17, 2026
e862347
unify orchestrator state database
dharan1007 Aug 17, 2026
57e9671
fix persistent failure memory
dharan1007 Aug 17, 2026
7f85455
require evidence before agent success
dharan1007 Aug 17, 2026
18cf401
restore full agent checkpoints
dharan1007 Aug 17, 2026
3055929
make scans durable and graph-consistent
dharan1007 Aug 17, 2026
2cdf619
add release CI gate
dharan1007 Aug 17, 2026
817bb56
bound embedding retrieval memory
dharan1007 Aug 17, 2026
bde9950
use hybrid typed retrieval context
dharan1007 Aug 17, 2026
e66b616
fix session memory typing
dharan1007 Aug 17, 2026
66b4671
update CI action runtimes
dharan1007 Aug 17, 2026
dd8e421
modernize model capability registry
dharan1007 Aug 17, 2026
2412ce7
use current OpenAI Responses API
dharan1007 Aug 17, 2026
8aca71a
modernize Gemini models and embeddings
dharan1007 Aug 17, 2026
2657c8a
modernize Anthropic defaults
dharan1007 Aug 17, 2026
6228773
use verified model identifiers only
dharan1007 Aug 17, 2026
d62adc2
route models by semantic task role
dharan1007 Aug 17, 2026
8f8cc29
lock dashboard to loopback
dharan1007 Aug 17, 2026
b7f8b65
make command sandbox disposable and secret-safe
dharan1007 Aug 17, 2026
4432c4e
wire planner depth and remove overstated execution claim
dharan1007 Aug 17, 2026
1c7686d
add independent verification kernel
dharan1007 Aug 17, 2026
3bdaa17
fix semantic router task typing
dharan1007 Aug 17, 2026
588050e
add transactional change operation types
dharan1007 Aug 17, 2026
0b64323
restore parser types and add transaction metadata
dharan1007 Aug 17, 2026
3b3bbc8
migrate change history for transactional rollback
dharan1007 Aug 17, 2026
5c9e914
store operation-aware change transactions
dharan1007 Aug 17, 2026
15253b5
make rollback conflict-safe and operation-aware
dharan1007 Aug 17, 2026
547989c
make independent verification the completion authority
dharan1007 Aug 17, 2026
3ee0fd3
finish sandbox fail-closed hardening
dharan1007 Aug 17, 2026
8e83c90
make propagation graph-fresh and verification-gated
dharan1007 Aug 17, 2026
2a2d7d7
route chat through hardened agent runtime
dharan1007 Aug 17, 2026
3fbd51f
document verified production contract honestly
dharan1007 Aug 17, 2026
ef50270
document real security boundaries
dharan1007 Aug 17, 2026
52aa823
align environment template with runtime
dharan1007 Aug 17, 2026
945d9a3
test independent verification kernel
dharan1007 Aug 17, 2026
4cf9d9c
replace release guide with gated publish procedure
dharan1007 Aug 17, 2026
d75f383
align CLI copy with verified runtime
dharan1007 Aug 17, 2026
43fbeb6
make CLI signal handling terminate correctly
dharan1007 Aug 17, 2026
c34457e
preserve signal exit status while cleaning databases
dharan1007 Aug 17, 2026
c6e9859
route ask through verified AgentLoop
dharan1007 Aug 17, 2026
bef35d0
replace broken apply flow with verified downstream repair
dharan1007 Aug 17, 2026
0b0f88e
route fix through verified AgentLoop
dharan1007 Aug 17, 2026
0ebceef
make watch mode explicitly read-only
dharan1007 Aug 17, 2026
b31fad0
migrate all checkpoint resumes through verified AgentLoop
dharan1007 Aug 17, 2026
3dcf9e2
test model-specific provider isolation
dharan1007 Aug 17, 2026
141f72e
test durable project failure memory
dharan1007 Aug 17, 2026
940b983
test in-place change history migration
dharan1007 Aug 17, 2026
cac6673
remove shell interpolation from diagnostics
dharan1007 Aug 17, 2026
562ded3
report verified agent outcomes accurately
dharan1007 Aug 17, 2026
c5e45e9
prevent legacy mutation engines from returning to CLI
dharan1007 Aug 17, 2026
4450c19
bind AI cache entries to repository context and model config
dharan1007 Aug 17, 2026
507ce84
add production dependency security gate
dharan1007 Aug 17, 2026
81123ca
test dashboard loopback security boundary
dharan1007 Aug 17, 2026
fdd0886
test lexical retrieval without embeddings
dharan1007 Aug 17, 2026
04b6d09
fix(security): upgrade vulnerable production dependencies
dharan1007 Aug 21, 2026
9198dc4
chore: regenerate audited dependency lockfile
dharan1007 Aug 21, 2026
18f2ab1
chore: refresh lockfile with non-breaking audit fixes
dharan1007 Aug 21, 2026
d8f7432
fix(security): refresh audited dependency lockfile
github-actions[bot] Aug 21, 2026
daf4336
chore: remove temporary lockfile refresh workflow
dharan1007 Aug 21, 2026
455a600
chore: verify dependency remediation end to end
dharan1007 Aug 21, 2026
9b7504c
chore: record post-remediation verification evidence
github-actions[bot] Aug 21, 2026
350d43b
fix(cli): track readline closure without unsupported property
dharan1007 Aug 21, 2026
281f058
chore: rerun post-remediation verification after CLI fix
dharan1007 Aug 21, 2026
cffe28e
chore: record post-remediation verification evidence
github-actions[bot] Aug 21, 2026
eea023d
chore: capture failing verification assertions
dharan1007 Aug 21, 2026
727befb
chore: record post-remediation verification evidence
github-actions[bot] Aug 21, 2026
c3fd277
fix(retrieval): preserve lexical index without embeddings
dharan1007 Aug 21, 2026
ba9d7bf
fix(server): reject raw encoded traversal paths
dharan1007 Aug 21, 2026
ac9d14f
test(server): send traversal path without URL normalization
dharan1007 Aug 21, 2026
2f9ce20
feat(security): centralize project path and secret policy
dharan1007 Aug 21, 2026
cf4a3d4
fix(security): enforce secret-aware path policy in native tools
dharan1007 Aug 21, 2026
9e063ad
fix(rollback): revalidate root and symlink containment
dharan1007 Aug 21, 2026
00c5669
fix(risk): make semantic assessment fail safe
dharan1007 Aug 21, 2026
755e1f4
fix(verification): detect framework gates correctly
dharan1007 Aug 21, 2026
ca31454
fix(deploy): remove shell injection boundary
dharan1007 Aug 21, 2026
11d5913
fix(git): remove filename shell interpolation
dharan1007 Aug 21, 2026
cd912bf
fix(env): separate dependency inspection from installation
dharan1007 Aug 21, 2026
38c7684
fix(env): make initialization read only
dharan1007 Aug 21, 2026
0a0c8ad
feat(env): make dependency installation explicit
dharan1007 Aug 21, 2026
e101ab1
fix(orchestrator): bound queues and isolate provider failover
dharan1007 Aug 21, 2026
2a81776
fix(orchestrator): isolate traffic scheduling per project
dharan1007 Aug 21, 2026
978cc49
feat(models): route semantic roles to current frontier models
dharan1007 Aug 21, 2026
ef736ad
fix(provider): make OpenAI health checks authoritative
dharan1007 Aug 21, 2026
68aa37f
fix(provider): make Gemini health checks authoritative
dharan1007 Aug 21, 2026
51339f6
fix(graph): preserve case-sensitive filesystem identities
dharan1007 Aug 21, 2026
66c5272
chore: apply runtime contract remediation
dharan1007 Aug 21, 2026
0abeec2
feat(scanner): extract API clients and database contracts
dharan1007 Aug 21, 2026
43169de
fix(scanner): keep API call contract type local
dharan1007 Aug 21, 2026
3f4da3e
feat(scanner): persist extracted cross-layer contracts
dharan1007 Aug 21, 2026
af19d19
feat(sync): detect schema drift from persisted analyses
dharan1007 Aug 21, 2026
e4e8d01
feat(sync): compare persisted client calls with API contracts
dharan1007 Aug 21, 2026
5398e14
feat(sync): compare real TypeScript interface shapes
dharan1007 Aug 21, 2026
57b3e39
fix(sync): remove fake auto-fix path and wire persisted contracts
dharan1007 Aug 21, 2026
a32b71c
feat(agent): add atomic mutation transaction journal
dharan1007 Aug 21, 2026
eb67e53
feat(agent): implement verified transactional agent runtime
dharan1007 Aug 21, 2026
d786c2a
refactor(agent): make transactional runtime canonical
dharan1007 Aug 21, 2026
21950d5
test: cover path policy transactions graph and traffic safety
dharan1007 Aug 21, 2026
6f193bc
test: cover API and database contract extraction
dharan1007 Aug 21, 2026
0870153
feat(site): add minimal Codebase OS product website
dharan1007 Aug 21, 2026
d762a54
feat(site): add Codebase OS visual system
dharan1007 Aug 21, 2026
83dff50
feat(site): add lightweight interactions
dharan1007 Aug 21, 2026
795eab4
feat(site): add favicon
dharan1007 Aug 21, 2026
c361cb0
build(site): add deterministic static-site build
dharan1007 Aug 21, 2026
4f5274e
build(site): configure Vercel static deployment
dharan1007 Aug 21, 2026
2d8abf3
fix(site): remove unverified install and demo metrics
dharan1007 Aug 21, 2026
18d73ba
fix(site): make runtime trace schematic and evidence-safe
dharan1007 Aug 21, 2026
cc7f721
fix(ci): make OpenAI model discovery type-safe
dharan1007 Aug 21, 2026
4364a71
fix(ci): align deploy subprocess stdio types
dharan1007 Aug 21, 2026
1456f8b
fix(ci): keep provider failover retry alive until settled
dharan1007 Aug 21, 2026
cd48ddf
chore(ci): remove obsolete runtime remediation workflow
dharan1007 Aug 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 74 additions & 13 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,22 +1,83 @@
# AI Provider Keys (configure at least one)
# -----------------------------------------------------------------------------
# Codebase OS environment template
# Copy only the values you actually need into your local .env. Never commit keys.
# -----------------------------------------------------------------------------

# Provider credentials (configure one or more).
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GEMINI_API_KEY=
OPENROUTER_API_KEY=

# Default AI provider: openai | anthropic | gemini | openrouter | ollama
COS_DEFAULT_PROVIDER=anthropic
COS_DEFAULT_MODEL=claude-3-5-sonnet-20241022

# Ollama (local models)
# Ollama is credential-free by default.
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=codellama:34b

# Storage
COS_DATA_DIR=.cos
# Optional provider-wide generation-model overrides.
# OPENAI_MODEL=gpt-5.6
# ANTHROPIC_MODEL=claude-opus-4-1-20250805
# GEMINI_MODEL=gemini-3.5-flash

# Optional semantic-role overrides. These take precedence over provider defaults.
# COS_OPENAI_REASONING_HIGH_MODEL=gpt-5.6
# COS_OPENAI_REASONING_FAST_MODEL=gpt-5.6
# COS_ANTHROPIC_REASONING_HIGH_MODEL=claude-opus-4-1-20250805
# COS_ANTHROPIC_REASONING_FAST_MODEL=claude-sonnet-4-20250514
# COS_GEMINI_REASONING_HIGH_MODEL=gemini-3.5-flash
# COS_GEMINI_ANALYSIS_FAST_MODEL=gemini-3.6-flash

# Embedding model overrides.
# OPENAI_EMBEDDING_MODEL=text-embedding-3-small
# GEMINI_EMBEDDING_MODEL=gemini-embedding-2

# Provider/account rate controls. Set these to the actual limits of your account.
# OPENAI_RPM=50
# OPENAI_TPM=30000
# OPENAI_MAX_CONCURRENCY=5
# ANTHROPIC_RPM=40
# ANTHROPIC_TPM=30000
# ANTHROPIC_MAX_CONCURRENCY=3
# GEMINI_RPM=50
# GEMINI_TPM=100000
# GEMINI_MAX_CONCURRENCY=3

# Conservative context limits can be overridden when your configured model/account
# has a verified different limit.
# OPENAI_CONTEXT_WINDOW=128000
# OPENAI_MAX_OUTPUT_TOKENS=32000
# ANTHROPIC_CONTEXT_WINDOW=200000
# ANTHROPIC_MAX_OUTPUT_TOKENS=8192
# GEMINI_CONTEXT_WINDOW=128000
# GEMINI_MAX_OUTPUT_TOKENS=8192

# Logging / dashboard.
COS_LOG_LEVEL=info
# COS_DASHBOARD_PORT=3000

# Sandbox resource limits.
# COS_SANDBOX_CPUS=1.0
# COS_SANDBOX_MEMORY=2g
# COS_SANDBOX_TIMEOUT_MS=300000
# COS_SANDBOX_MAX_OUTPUT_BYTES=2000000

# Language-specific Docker image overrides.
# COS_SANDBOX_NODE_IMAGE=node:20-bookworm-slim
# COS_SANDBOX_PYTHON_IMAGE=python:3.12-slim
# COS_SANDBOX_GO_IMAGE=golang:1.24-bookworm
# COS_SANDBOX_RUST_IMAGE=rust:1-bookworm
# COS_SANDBOX_MAVEN_IMAGE=maven:3.9-eclipse-temurin-21
# COS_SANDBOX_GRADLE_IMAGE=gradle:8-jdk21
# COS_SANDBOX_JAVA_IMAGE=eclipse-temurin:21-jdk
# COS_SANDBOX_DOTNET_IMAGE=mcr.microsoft.com/dotnet/sdk:8.0
# COS_SANDBOX_BUN_IMAGE=oven/bun:1
# COS_SANDBOX_SWIFT_IMAGE=swift:6.0-bookworm
# COS_SANDBOX_DART_IMAGE=dart:stable
# Flutter has no Codebase OS default image. Pin a reviewed image explicitly:
# COS_SANDBOX_FLUTTER_IMAGE=

# By default the sandbox does NOT inherit application environment variables.
# Explicitly list non-secret variables a build/test truly needs.
# COS_SANDBOX_ENV_ALLOW=NODE_ENV,FEATURE_FLAG_FOR_TESTS

# Environment Orchestration
COS_DOCKER_SOCKET=/var/run/docker.sock
COS_AUTO_RESOLVE_PORTS=true
COS_AUTO_RESOLVE_RUNTIMES=true
# Native host execution is disabled when Docker is unavailable. This is a
# reduced-isolation escape hatch and should remain off for untrusted repositories.
# COS_ALLOW_NATIVE_SANDBOX=1
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches:
- main
- agent/**
pull_request:
branches:
- main

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
verify:
name: Verify Node 20
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: 20
cache: npm

- name: Install locked dependencies
run: npm ci

- name: Typecheck, build and tests
run: npm run verify

- name: Verify publish payload
run: npm pack --dry-run
85 changes: 85 additions & 0 deletions .github/workflows/post-remediation-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Post-remediation verification

# Emit focused failure excerpts for the repository audit.
on:
push:
branches:
- agent/production-hardening
paths:
- .github/workflows/post-remediation-verify.yml

permissions:
contents: write

jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: agent/production-hardening

- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: 20
cache: npm

- name: Run full post-remediation verification and record evidence
shell: bash
run: |
set +e
npm ci > /tmp/npm-ci.log 2>&1
CI_EXIT=$?

VERIFY_EXIT=99
if [ "$CI_EXIT" -eq 0 ]; then
npm run verify > /tmp/verify.log 2>&1
VERIFY_EXIT=$?
else
printf '%s\n' 'Skipped because npm ci failed.' > /tmp/verify.log
fi

AUDIT_EXIT=99
if [ "$CI_EXIT" -eq 0 ]; then
npm audit --omit=dev --audit-level=high > /tmp/audit.log 2>&1
AUDIT_EXIT=$?
else
printf '%s\n' 'Skipped because npm ci failed.' > /tmp/audit.log
fi

PACK_EXIT=99
if [ "$CI_EXIT" -eq 0 ]; then
npm pack --dry-run > /tmp/pack.log 2>&1
PACK_EXIT=$?
else
printf '%s\n' 'Skipped because npm ci failed.' > /tmp/pack.log
fi

{
echo "commit=$(git rev-parse HEAD)"
echo "node=$(node --version)"
echo "npm=$(npm --version)"
echo "npm_ci_exit=$CI_EXIT"
echo "verify_exit=$VERIFY_EXIT"
echo "audit_exit=$AUDIT_EXIT"
echo "pack_exit=$PACK_EXIT"
echo "--- npm ci tail ---"
tail -n 20 /tmp/npm-ci.log
echo "--- failing test excerpts ---"
grep -n -B 8 -A 20 '^not ok' /tmp/verify.log || true
echo "--- verify tail ---"
tail -n 60 /tmp/verify.log
echo "--- audit tail ---"
tail -n 30 /tmp/audit.log
echo "--- pack tail ---"
tail -n 20 /tmp/pack.log
} > .post-remediation-verification.txt

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -- .post-remediation-verification.txt
git commit -m "chore: record post-remediation verification evidence"
git push origin HEAD:agent/production-hardening
39 changes: 39 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Security

on:
push:
branches:
- main
- agent/**
pull_request:
branches:
- main

permissions:
contents: read

concurrency:
group: security-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
dependency-audit:
name: Production dependency audit
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: 20
cache: npm

- name: Install locked dependencies
run: npm ci

- name: Reject high or critical production dependency advisories
run: npm audit --omit=dev --audit-level=high
Loading
Loading