Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
48e428b
manage kg specs
aredenba-rh May 20, 2026
fcdbe4d
minor edits to specs; github issues created
aredenba-rh May 20, 2026
d48c322
feat(management): add workspace mode lifecycle (#643) (#680)
aredenba-rh May 20, 2026
75d58e5
feat(management): expose knowledge graph workspace status projection …
aredenba-rh May 20, 2026
9cee053
feat(management): implement actionable bootstrap readiness validation…
aredenba-rh May 20, 2026
c305a44
feat(management): add workspace validate and transition commands (#683)
aredenba-rh May 20, 2026
584c3ef
feat(management): persist mutation log run metadata on sync runs (#684)
aredenba-rh May 20, 2026
60ce34f
feat(graph): wire mutation apply metrics into lifecycle events (#685)
aredenba-rh May 20, 2026
d50c238
test(extraction): add bounded-context architecture guardrails scaffol…
aredenba-rh May 20, 2026
9f91318
feat(extraction): add scoped agent session lifecycle service (#687)
aredenba-rh May 20, 2026
56b9ba7
feat(extraction): add skill resolution engine with KG overrides (#688)
aredenba-rh May 20, 2026
a75608d
feat(extraction): implement clear-chat reset with session archival (#…
aredenba-rh May 20, 2026
a73fa36
feat(management): add data-source commit reference projection (#690)
aredenba-rh May 20, 2026
296aff3
feat(ingestion): resolve baseline and tracked head at sync start (#691)
aredenba-rh May 26, 2026
8ebe204
feat(ingestion): short-circuit sync when no new commit exists (#692)
aredenba-rh May 20, 2026
3c71c93
feat(management): add baseline-vs-head diff summary endpoint (#693)
aredenba-rh May 20, 2026
2dc62ca
feat(dev-ui): add collapsed diff-summary panel for data sources (#694)
aredenba-rh May 20, 2026
5e7a5fd
feat(management): add commit-refresh actions for data sources (#675) …
aredenba-rh May 20, 2026
6b11bbc
chore(skills): add parallel blocker-question protocol (#696)
aredenba-rh May 20, 2026
9d1e9eb
feat(extraction): ship mode-specific prompt bundles and skill packs (…
aredenba-rh May 20, 2026
3f1da32
feat(extraction): add bootstrap capabilities intake dual-path flow (#…
aredenba-rh May 20, 2026
b11d559
feat(extraction): package workload runtime context and skills mounts …
aredenba-rh May 20, 2026
faca1c1
feat(dev-ui): enrich schema inspector with type metadata badges (#670…
aredenba-rh May 20, 2026
6b6d32e
feat(management): add extraction run-control APIs for sync lifecycle …
aredenba-rh May 20, 2026
9282149
feat(dev-ui): add extraction telemetry dashboard metrics (#672) (#702)
aredenba-rh May 20, 2026
94bac2d
feat(management): add KG maintenance scheduling and run history (#703)
aredenba-rh May 20, 2026
fc5b7a2
feat(dev-ui): add manual mutation assistant and live graph inspector …
aredenba-rh May 20, 2026
565d100
feat(dev-ui): switch KG row actions to manage/query/delete (#705)
aredenba-rh May 20, 2026
4bf50f8
feat(dev-ui): add mode-aware knowledge graph manage workspace page (#…
aredenba-rh May 20, 2026
8a258cf
feat(dev-ui): add conversation-first extraction workspace tabs (#707)
aredenba-rh May 20, 2026
4afcea0
feat(management): add KG-scoped mutation log browser data and UI (#708)
aredenba-rh May 20, 2026
c3c7dbe
feat(ui): add bootstrap progress checklist and diagnostics panel (#66…
aredenba-rh May 20, 2026
b005da7
test(ui): lock commit-hash status cues on data source cards (#664) (#…
aredenba-rh May 20, 2026
d669483
test(ui): lock maintenance readiness cues to commit-diff semantics (#…
aredenba-rh May 20, 2026
47f78e8
feat(ui): add shared conversation panel with session resume and clear…
aredenba-rh May 20, 2026
6e961de
feat(workflow): add section-wave subagent orchestration prompts (#713)
aredenba-rh May 20, 2026
1f6f8f3
feat(extraction): add sticky runtime and ephemeral worker adapters (#…
aredenba-rh May 20, 2026
581d7d1
harden ingestion credential handling and add end-to-end flow validati…
aredenba-rh May 20, 2026
cbe4485
test-integration fixes
aredenba-rh May 21, 2026
9842046
kg-manage-experience
aredenba-rh May 22, 2026
200d1b4
feat(dev-ui): add KG manage workspace overview parity (#722) (#726)
aredenba-rh May 22, 2026
b5af3b1
feat(extraction): wire runtime credential injection for extraction wo…
aredenba-rh May 22, 2026
1d9530c
feat(extraction): add session history views with run-level metrics re…
aredenba-rh May 22, 2026
cef63a1
feat(management): persist canonical schema via graph type definitions…
aredenba-rh May 22, 2026
bb655db
feat(dev-ui): KG Manage accessibility and state contracts (#725) (#729)
aredenba-rh May 22, 2026
bd226ec
feat(extraction): add docker/podman-backed workload runtime adapters …
aredenba-rh May 22, 2026
c77aa8a
feat(manage-ui): harden MutationLogs step with scoped ordering and pr…
aredenba-rh May 22, 2026
55c8e1e
feat(manage-ui): unify graph management operations in-place (#720)
aredenba-rh May 22, 2026
9f81a7c
feat(management): add per-run mutation entry previews (#721)
aredenba-rh May 22, 2026
6867e0a
feat(extraction): wire outbox workers to runtime factory adapters (#716)
aredenba-rh May 22, 2026
dcdc1a1
feat(management): enforce graph-native canonical schema source (#718)
aredenba-rh May 22, 2026
15045ec
feat(data-sources): align onboarding with k-extract add-another flow …
aredenba-rh May 22, 2026
5cae3a9
fix(data-sources): modernize KG selector styling in add-source dialog
aredenba-rh May 22, 2026
bdeabf7
feat(ui): add KG-scoped data source onboarding flow
aredenba-rh May 26, 2026
cbc709e
feat(sync): add ingest-only pipeline and ingested status for KG onboa…
aredenba-rh May 27, 2026
781fa38
fix(ingestion): unblock SyncStarted handler shadowed import crash
aredenba-rh May 28, 2026
1c21207
feat(ui): align KG data sources page with k-extract phase1 layout
aredenba-rh May 28, 2026
e0001b8
feat(data-sources): persist prepare metadata and bulk actions on KG page
aredenba-rh May 28, 2026
3012df5
feat(ui): align KG manage workspace with k-extract project hub
aredenba-rh May 29, 2026
81e0595
docs(extraction): sticky session chat specs (#738) (#743)
aredenba-rh May 29, 2026
95cb9ad
feat(extraction): add streaming chat turn service and NDJSON endpoint…
aredenba-rh May 29, 2026
8dfb95c
feat(ui): wire Graph Management Assistant to streaming chat API (#745)
aredenba-rh May 29, 2026
687004b
feat(extraction): add Claude Agent SDK sticky session runtime (#742) …
aredenba-rh May 29, 2026
e747966
feat(extraction): use Vertex AI and proactive runtime warmup
aredenba-rh May 29, 2026
7c9c767
fix(iam): pin stable Keycloak user IDs for dev alice and bob
aredenba-rh May 29, 2026
bbd91e9
fix(extraction): enable Vertex chat in sticky containers with host ADC
aredenba-rh May 29, 2026
2f0b6f5
refactor(ui): rename workspace hub Design phase to Graph Management
aredenba-rh May 29, 2026
9f7a04e
repair env/api.env
aredenba-rh May 29, 2026
e6a9305
fix(extraction): materialize JobPackages into sticky assistant workspace
aredenba-rh May 29, 2026
4dde3a7
fix(ingestion): report total branch files instead of changeset size
aredenba-rh May 31, 2026
8df2591
fix(ui): keep data sources table visible during sync polling
aredenba-rh Jun 1, 2026
85e5716
fix(ui): constrain KG manage workspace to max-w-7xl
aredenba-rh Jun 1, 2026
a5daa9c
feat(management): detect missing prepared JobPackage archives
aredenba-rh Jun 1, 2026
be91d2a
fix(extraction): reuse healthy sticky runtime and defer chat persistence
aredenba-rh Jun 1, 2026
d478495
refactor(dev-ui): align graph management artifacts panel with k-extra…
aredenba-rh Jun 1, 2026
2072434
feat(agent-runtime): stream intermediate thinking lines during SDK turns
aredenba-rh Jun 1, 2026
cfad11f
fix(extraction): materialize non-empty prepared sources for agent wor…
aredenba-rh Jun 1, 2026
444c2eb
perf(ingestion): parallelize prepare sync processing
aredenba-rh Jun 1, 2026
a34a7ea
feat(ui): add entity and relationship schema artifacts to graph manag…
aredenba-rh Jun 1, 2026
ab37405
fix(extraction): improve live thinking stream and raise sticky turn t…
aredenba-rh Jun 3, 2026
8babd8d
fix(extraction): flush live thinking stream and raise sticky agent ma…
aredenba-rh Jun 3, 2026
dd0be37
fix(agent-runtime): capture streamed SDK replies after tool-heavy turns
aredenba-rh Jun 3, 2026
6056518
fix(agent-runtime): fail empty SDK turns instead of fake success reply
aredenba-rh Jun 3, 2026
d3895d4
fix(agent-runtime): stop heartbeat from cancelling SDK message reads
aredenba-rh Jun 3, 2026
8f084bf
feat(extraction): add schema authoring tools and skills for graph ass…
aredenba-rh Jun 3, 2026
db44c10
feat(manage-kg): load design artifacts from DB and persist agent grap…
aredenba-rh Jun 3, 2026
9bd5df7
fix(dev-ui): focus new URL field when adding data source rows
aredenba-rh Jun 3, 2026
cf73af8
fix(dev-ui): stop phantom footer scroll on graph management page
aredenba-rh Jun 3, 2026
2481918
fix(dev-ui): remove outer scroll on graph management step
aredenba-rh Jun 3, 2026
376813b
fix(extraction): sign workload tokens as JWTs for sticky session auth
aredenba-rh Jun 3, 2026
4517fe4
fix(dev-ui): eliminate phantom page scroll below app shell
aredenba-rh Jun 3, 2026
022bfc1
feat(manage-kg): improve GMA chat UX and repository workspace paths
aredenba-rh Jun 3, 2026
1058404
fix(dev-ui): sync pnpm lockfile for markdown chat dependencies
aredenba-rh Jun 3, 2026
f4e3aef
fix(dev-ui): compact schema entities panel on graph management
aredenba-rh Jun 3, 2026
4687527
fix(dev-ui): auto-grow GMA composer to fit full draft message
aredenba-rh Jun 3, 2026
86765c6
fix(dev-ui): tighten graph management layout and mode controls
aredenba-rh Jun 3, 2026
d8c9073
feat(management): support prepopulated relationship types
aredenba-rh Jun 3, 2026
43f5e4e
fix(dev-ui): preserve scroll positions on graph management updates
aredenba-rh Jun 3, 2026
6734182
feat(extraction): equip GMA for instance prepopulation and longer turns
aredenba-rh Jun 3, 2026
2f041de
feat(extraction): add GMA bulk prepopulation and strict mutation pref…
aredenba-rh Jun 4, 2026
1ee4415
feat(graph): bidirectional relationship pairs with twin edge instance…
aredenba-rh Jun 5, 2026
825b0c2
feat(extraction): allow one-hour GMA sticky turn timeout (#760)
aredenba-rh Jun 5, 2026
e7824f7
feat(extraction): complete GMA bootstrap guidance and runtime improve…
aredenba-rh Jun 5, 2026
0859188
feat(extraction): default GMA to execute-first prepopulation via gene…
aredenba-rh Jun 5, 2026
d51f70c
feat(extraction): require entities-first script-driven prepopulation
aredenba-rh Jun 5, 2026
ae18502
feat(extraction): streamline GMA prepopulation and fix writable works…
aredenba-rh Jun 5, 2026
1856330
feat(graph): make source_path optional on node and edge CREATE
aredenba-rh Jun 5, 2026
7ff7727
refactor(extraction): drop --source-path from JSONL converters
aredenba-rh Jun 5, 2026
b5d6f99
fix(extraction): grant GMA agent write access to sticky session works…
aredenba-rh Jun 5, 2026
fa8b3ef
feat(extraction): strengthen GMA prepopulation templates and readiness
aredenba-rh Jun 5, 2026
f9cff14
fix(management): report true design artifact instance counts
aredenba-rh Jun 5, 2026
ba8f1d6
fix(management): show bidirectional relationships as one design-artif…
aredenba-rh Jun 6, 2026
d632287
feat(extraction): add job sets UI, orchestration, and phase3 workspac…
aredenba-rh Jun 6, 2026
9fe1569
agent session service
aredenba-rh Jun 9, 2026
9dc8eae
feat(extraction): run extraction jobs via agentic-ci sandboxes
aredenba-rh Jun 11, 2026
85bb993
fix(extraction): remove stale sticky containers before session restart
aredenba-rh Jun 11, 2026
39c1a79
refactor(extraction): drop unused repo skills mount from sticky runtime
aredenba-rh Jun 11, 2026
39d4028
feat(extraction): let GMA save extraction job sets via workload tools
aredenba-rh Jun 11, 2026
40ea110
feat(extraction): require exhaustive per-instance job set descriptions
aredenba-rh Jun 12, 2026
bccf1b7
feat(extraction): template per-instance job descriptions by property …
aredenba-rh Jun 12, 2026
05612f2
fix(ui): keep job status visible during extraction polling refresh
aredenba-rh Jun 12, 2026
1a99164
feat(extraction): job set controls, live activity, and agentic-ci fixes
aredenba-rh Jun 12, 2026
1d91598
feat(extraction): materialize job workdirs and gate on applied mutations
aredenba-rh Jun 12, 2026
7ad79e9
docs(extraction): require explicit IGNORE lines in per-instance descr…
aredenba-rh Jun 12, 2026
8b72781
fix(extraction): default 20 workers and tighten job-set authoring
aredenba-rh Jun 12, 2026
67cc547
fix(extraction): hydrate missing JobPackages before workspace materia…
aredenba-rh Jun 12, 2026
a86d892
feat(extraction): archive jobs, schema-driven GMA, and fix GitHub pre…
aredenba-rh Jun 12, 2026
710fc55
feat(dev): add backup/restore and harden GMA prepopulation against gr…
aredenba-rh Jun 13, 2026
ad08a82
feat(extraction): streamline GMA prepopulation with run_scanner and a…
aredenba-rh Jun 14, 2026
24be9c5
feat(extraction): allow GMA DELETE mutations and archive sessions as …
aredenba-rh Jun 14, 2026
2a46a3b
feat(extraction): document unique edge labels for GMA and record turn…
aredenba-rh Jun 14, 2026
14e1fd5
feat(extraction): pre-seed job context and reduce agent discovery ove…
aredenba-rh Jun 14, 2026
16a561a
feat(extraction): add one-off mutations mode and graph writes history UI
aredenba-rh Jun 14, 2026
2897324
refactor(dev-ui): remove session pointers from graph management
aredenba-rh Jun 14, 2026
fd006a3
Dont show #RelationshipTypes x2.. show real count
aredenba-rh Jun 14, 2026
5ca0f42
feat(extraction,dev-ui): speed bulk GMA mutations and improve manage …
aredenba-rh Jun 14, 2026
53ab5cd
feat(dev-ui): improve schema entity/relationship browsing in graph ma…
aredenba-rh Jun 14, 2026
e452e43
feat(gma): per-mode sticky sessions with explicit start/end lifecycle
aredenba-rh Jun 14, 2026
96f3340
kg-backups
aredenba-rh Jun 14, 2026
fe56f75
feat(extraction): harden sticky runtimes and add OpenShell sandbox ba…
aredenba-rh Jun 14, 2026
2526ed6
feat(extraction): OpenShell worker sandboxes, GMA inference routing, …
aredenba-rh Jun 15, 2026
9ff91a3
fix(extraction): gateway import, job event filters, and archived stat…
aredenba-rh Jun 16, 2026
8d95716
fix(extraction): release DB sessions during sandbox runs and scale wo…
aredenba-rh Jun 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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ src/dev-ui/.output/

certs/
.instances/
.kartograph/backups/
.kartograph/kg-backups/

# Demo web interface (not for production)
demo-web/
Expand Down
23 changes: 22 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,30 @@ must be triggered explicitly.
**Standard (single developer):**
```bash
make dev # starts all services: Postgres, SpiceDB, Keycloak, API, Dev UI
make down # tears everything down
make down # stops containers; Postgres data volume is preserved
```

**Dev data backup / restore** (knowledge graphs, ontology, graph data, IAM, SpiceDB):

```bash
make dev-backup # snapshot DBs to .kartograph/backups/<timestamp>/
make dev-backup-list # list available snapshots
make dev-restore # restore the latest snapshot (prompts for confirmation)
make dev-restore BACKUP=2026-06-12T20-10-33Z
make dev-repair-age-graphs # fix corrupt AGE graphs without full DB restore
```

For isolated instances, set the compose project name:

```bash
COMPOSE_PROJECT=kg-my-feature ./scripts/dev-data-backup.sh backup
COMPOSE_PROJECT=kg-my-feature ./scripts/dev-data-backup.sh restore latest --yes
```

Avoid `docker compose down -v` unless you intend to wipe volumes. After a
restore, if the dev UI shows an empty tenant, delete `~/.kartograph/token.json`
and sign in again.

**Isolated instance (agents / worktrees):**

When working in a worktree or running multiple instances in parallel,
Expand Down
35 changes: 34 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ certs:
.PHONY: dev
dev: certs
@echo "🧰 [Development] Starting application containers..."
@./scripts/cleanup-openshell-sandboxes.sh
docker compose -f compose.yaml -f compose.dev.yaml --profile build-only build agent-runtime
docker compose -f compose.yaml build
docker compose -f compose.yaml -f compose.dev.yaml --profile ui up -d
HOST_UID=$$(id -u) HOST_GID=$$(id -g) docker compose -f compose.yaml -f compose.dev.yaml --profile ui up -d
@echo "Done."
@echo "----------------------------"
@echo "API Root: http://localhost:8000"
Expand All @@ -35,6 +37,37 @@ dev: certs
.PHONY: down
down:
docker compose -f compose.yaml -f compose.dev.yaml down
@echo "Stopping Graph Management sticky, worker, and extraction job containers..."
-@docker ps -aq --filter name=kartograph-sticky- | xargs -r docker rm -f
-@docker ps -aq --filter name=kartograph-worker- | xargs -r docker rm -f
-@docker ps -aq --filter name=kartograph-extract- | xargs -r docker rm -f
-@./scripts/cleanup-openshell-sandboxes.sh

.PHONY: dev-backup dev-restore dev-backup-list dev-repair-age-graphs
dev-backup:
@./scripts/dev-data-backup.sh backup

dev-restore:
@./scripts/dev-data-backup.sh restore $(or $(BACKUP),latest)

dev-backup-list:
@./scripts/dev-data-backup.sh list

dev-repair-age-graphs:
@./scripts/dev-data-backup.sh repair

.PHONY: kg-backup kg-restore kg-backup-list
kg-backup:
@test -n "$(KG_ID)" || (echo "Usage: make kg-backup KG_ID=<knowledge-graph-id>" && exit 1)
@./scripts/kg-data-backup.sh capture "$(KG_ID)"

kg-restore:
@test -n "$(KG_ID)" || (echo "Usage: make kg-restore KG_ID=<knowledge-graph-id> [BACKUP=latest] [YES=1] [REPLACE=1]" && exit 1)
@./scripts/kg-data-backup.sh restore "$(KG_ID)" $(or $(BACKUP),latest) $(if $(YES),--yes,) $(if $(REPLACE),--replace,)

kg-backup-list:
@test -n "$(KG_ID)" || (echo "Usage: make kg-backup-list KG_ID=<knowledge-graph-id>" && exit 1)
@./scripts/kg-data-backup.sh list "$(KG_ID)"


.PHONY: run
Expand Down
77 changes: 73 additions & 4 deletions compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,85 @@
# Development overrides for compose.yaml
services:
agent-runtime:
build:
context: ./src/agent-runtime
dockerfile: Dockerfile
image: kartograph-agent-runtime:dev
profiles: [ "build-only" ]

api:
# Run as root in dev to handle host file permissions (any umask)
user: "${UID}:${GID}"
# Root required for Docker-out-of-Docker via mounted /var/run/docker.sock in dev
user: "0:0"
environment:
UV_CACHE_DIR: /tmp/uv-cache
HOST_UID: ${HOST_UID}
HOST_GID: ${HOST_GID}
KARTOGRAPH_EXTRACTION_RUNTIME_CONTAINER_ENGINE: auto
KARTOGRAPH_EXTRACTION_RUNTIME_CONTAINER_NETWORK: kartograph_kartograph
KARTOGRAPH_EXTRACTION_RUNTIME_STICKY_IMAGE: kartograph-agent-runtime:dev
KARTOGRAPH_EXTRACTION_RUNTIME_API_BASE_URL: http://api:8000
KARTOGRAPH_EXTRACTION_RUNTIME_WORKLOAD_TOKEN_SIGNING_KEY: kartograph-dev-workload-token-signing-key
KARTOGRAPH_EXTRACTION_RUNTIME_JOB_PACKAGE_WORK_DIR: /tmp/kartograph/job_packages
KARTOGRAPH_EXTRACTION_RUNTIME_CONTAINER_RUN_UID: ${HOST_UID}
KARTOGRAPH_EXTRACTION_RUNTIME_CONTAINER_RUN_GID: ${HOST_GID}
KARTOGRAPH_EXTRACTION_RUNTIME_STICKY_TURN_TIMEOUT_SECONDS: "3600"
KARTOGRAPH_EXTRACTION_RUNTIME_STICKY_MAX_TURNS: "500"
KARTOGRAPH_EXTRACTION_RUNTIME_CONTAINER_HARDENING_ENABLED: "true"
## Docker (Track A):
# KARTOGRAPH_EXTRACTION_RUNTIME_BACKEND: container
# KARTOGRAPH_EXTRACTION_RUNTIME_JOB_RUNNER: agentic_ci
## OpenShell (Track B): uncomment backend/job_runner after `openshell gateway add` on the host
KARTOGRAPH_EXTRACTION_RUNTIME_BACKEND: openshell
KARTOGRAPH_EXTRACTION_RUNTIME_JOB_RUNNER: openshell
## End Track A / Track B selection
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_GATEWAY_URL: https://host.docker.internal:17670
# Forwards run inside this container; bind to 127.0.0.1 here, not on the host.
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_RUNTIME_HOST: 127.0.0.1
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_API_BASE_URL: http://host.docker.internal:8000
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_POLICY_DIR: /etc/openshell/policies
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_GATEWAY_NAME: openshell
# OpenShell CLI in the API container reads host gateway registration + mTLS from here
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_XDG_CONFIG_HOME: /root/.config
# Host gateway must listen beyond localhost — in ~/.config/openshell/gateway.toml:
# bind_address = "0.0.0.0:17670"
# then: systemctl --user restart openshell-gateway
KARTOGRAPH_EXTRACTION_RUNTIME_AGENTIC_CI_IMAGE: ghcr.io/opendatahub-io/ai-helpers:latest
# OpenShell extraction jobs use agentic-ci claude-sandbox (not ai-helpers or sticky runtime).
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_EXTRACTION_IMAGE: quay.io/aipcc/agentic-ci/claude-sandbox:latest
KARTOGRAPH_EXTRACTION_RUNTIME_AGENTIC_CI_HARNESS: claude-code
KARTOGRAPH_EXTRACTION_RUNTIME_EXTRACTION_JOB_WORK_DIR: /tmp/kartograph/extraction_jobs
# Vertex AI for Claude Agent SDK in sticky assistant containers
CLAUDE_CODE_USE_VERTEX: "1"
ANTHROPIC_VERTEX_PROJECT_ID: itpc-gcp-hcm-pe-eng-claude
CLOUD_ML_REGION: us-east5
KARTOGRAPH_GCLOUD_CONFIG_MOUNT: ${HOME}/.config/gcloud
volumes:
# Mount the entire app directory (minus venv) for hot-reload
- ./src/api:/app:z
- /app/.venv
# Shared with sibling sticky containers launched via the host Docker socket
- /tmp/kartograph/job_packages:/tmp/kartograph/job_packages
- /tmp/kartograph/extraction_jobs:/tmp/kartograph/extraction_jobs
# gcloud ADC for Vertex-backed agentic-ci extraction job containers
- ${HOME}/.config/gcloud:${HOME}/.config/gcloud:ro,z
# Allow API process to launch sibling extraction runtime containers locally
- /var/run/docker.sock:/var/run/docker.sock
# Docker/Podman CLI from host (required for container runtime backend)
- ${DOCKER_BIN:-/usr/bin/docker}:/usr/bin/docker:ro
# OpenShell CLI + mTLS config (host gateway; API container invokes openshell subprocess)
- /usr/bin/openshell:/usr/bin/openshell:ro
- ${HOME}/.config/openshell:/root/.config/openshell:ro,z
# forward start -d writes PID/state here; read-only parent mount hangs the CLI
- openshell-forwards:/root/.config/openshell/forwards
# OpenShell policy templates (Phase 3) when backend=openshell
- ./src/api/extraction/infrastructure/openshell/policies:/etc/openshell/policies:ro,z
extra_hosts:
- "host.docker.internal:host-gateway"
command:
- /bin/bash
- -c
- |
uv run fastapi dev main.py --host 0.0.0.0 --port 8000
uv sync --frozen && uv run alembic upgrade head && uv run fastapi dev main.py --host 0.0.0.0 --port 8000

dev-ui:
build:
Expand All @@ -30,7 +96,10 @@ services:
- /app/.output
environment:
- HOST=0.0.0.0
command: ["pnpm", "run", "dev"]
command: [ "pnpm", "run", "dev" ]
ports:
- "3000:3000"
- "24678:24678"

volumes:
openshell-forwards:
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ services:
- ./certs:/certs:ro
# Mount host CA bundle (supports multiple OS types via env var)
# Default fallback order: RHEL/Fedora -> Debian/Ubuntu -> macOS
- ${HOST_CA_BUNDLE:-/etc/pki/tls/certs/ca-bundle.crt}:/etc/ssl/certs/ca-bundle.crt:ro
- ${HOST_CA_BUNDLE:-/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem}:/etc/ssl/certs/ca-bundle.crt:ro
tty: true
extra_hosts:
- "localhost:host-gateway"
Expand Down
36 changes: 36 additions & 0 deletions deploy/apps/kartograph/base/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,44 @@ spec:
secretKeyRef:
name: kartograph-sso-client-swagger-docs
key: client_id
- name: KARTOGRAPH_EXTRACTION_RUNTIME_BACKEND
valueFrom:
configMapKeyRef:
name: kartograph-config
key: KARTOGRAPH_EXTRACTION_RUNTIME_BACKEND
optional: true
- name: KARTOGRAPH_EXTRACTION_RUNTIME_API_BASE_URL
valueFrom:
configMapKeyRef:
name: kartograph-config
key: KARTOGRAPH_EXTRACTION_RUNTIME_API_BASE_URL
optional: true
- name: KARTOGRAPH_EXTRACTION_RUNTIME_CONTAINER_HARDENING_ENABLED
valueFrom:
configMapKeyRef:
name: kartograph-config
key: KARTOGRAPH_EXTRACTION_RUNTIME_CONTAINER_HARDENING_ENABLED
optional: true
- name: KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_POLICY_DIR
valueFrom:
configMapKeyRef:
name: kartograph-config
key: KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_POLICY_DIR
optional: true
- name: KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_POLICY_ENFORCEMENT
valueFrom:
configMapKeyRef:
name: kartograph-config
key: KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_POLICY_ENFORCEMENT
optional: true

volumeMounts:
- name: spicedb-ca
mountPath: /etc/spicedb-ca
readOnly: true
- name: openshell-policies
mountPath: /etc/openshell/policies
readOnly: true
livenessProbe:
httpGet:
path: /health
Expand Down Expand Up @@ -190,3 +223,6 @@ spec:
items:
- key: service-ca.crt
path: service-ca.crt
- name: openshell-policies
configMap:
name: kartograph-openshell-policies
9 changes: 9 additions & 0 deletions deploy/apps/kartograph/base/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,12 @@ data:
DEV_UI_KEYCLOAK_URL: "http://keycloak:8080"
DEV_UI_KEYCLOAK_REALM: "kartograph"
DEV_UI_KEYCLOAK_CLIENT_ID: "kartograph-ui"
# Extraction runtime (container backend with Phase 0 hardening; switch to openshell in overlay)
KARTOGRAPH_EXTRACTION_RUNTIME_BACKEND: "container"
KARTOGRAPH_EXTRACTION_RUNTIME_CONTAINER_NETWORK: "kartograph"
KARTOGRAPH_EXTRACTION_RUNTIME_API_BASE_URL: "http://kartograph-api:8000"
KARTOGRAPH_EXTRACTION_RUNTIME_AGENTIC_CI_API_BASE_URL: "http://kartograph-api:8000"
KARTOGRAPH_EXTRACTION_RUNTIME_CONTAINER_HARDENING_ENABLED: "true"
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_POLICY_DIR: "/etc/openshell/policies"
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_POLICY_ENFORCEMENT: "hard_requirement"
KARTOGRAPH_EXTRACTION_RUNTIME_OPENSHELL_RUNTIME_HOST: "127.0.0.1"
2 changes: 2 additions & 0 deletions deploy/apps/kartograph/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ resources:
- configmap.yaml
- spicedb-schema-configmap.yaml
- spicedb-ca-configmap.yaml
- networkpolicy-sticky-runtime.yaml
- openshell-policies-configmap.yaml

commonLabels:
app.kubernetes.io/name: kartograph
Expand Down
33 changes: 33 additions & 0 deletions deploy/apps/kartograph/base/networkpolicy-sticky-runtime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: kartograph-sticky-runtime-egress
labels:
app.kubernetes.io/component: sticky-runtime
spec:
podSelector:
matchLabels:
kartograph.runtime.kind: sticky
policyTypes:
- Egress
egress:
# Kartograph workload API (in-cluster DNS name)
- to:
- podSelector:
matchLabels:
app.kubernetes.io/component: api
ports:
- protocol: TCP
port: 8000
# DNS resolution inside the cluster
- to:
- namespaceSelector: {}
ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
# Vertex / Anthropic inference via OpenShell inference.local routing when enabled
- ports:
- protocol: TCP
port: 443
76 changes: 76 additions & 0 deletions deploy/apps/kartograph/base/openshell-policies-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kartograph-openshell-policies
labels:
app.kubernetes.io/component: openshell
data:
gma-sticky-base.yaml: |
version: 1
name: gma-sticky-base
enforcement: hard_requirement
endpoints:
- "kartograph-api:8000:read-write"
- "inference.local:443:read-write"
- "aiplatform.googleapis.com:443:read-write"
- "*.aiplatform.googleapis.com:443:read-write"
- "oauth2.googleapis.com:443:read-write"
l7_allowed_paths:
- "/extraction/workloads/*"
gma-initial-schema-design.yaml: |
version: 1
name: gma-initial-schema-design
enforcement: hard_requirement
endpoints:
- "kartograph-api:8000:read-write"
- "inference.local:443:read-write"
- "aiplatform.googleapis.com:443:read-write"
- "*.aiplatform.googleapis.com:443:read-write"
- "oauth2.googleapis.com:443:read-write"
l7_allowed_paths:
- "/extraction/workloads/schema/*"
- "/extraction/workloads/graph/*"
gma-extraction-jobs.yaml: |
version: 1
name: gma-extraction-jobs
enforcement: hard_requirement
endpoints:
- "kartograph-api:8000:read-write"
- "inference.local:443:read-write"
- "aiplatform.googleapis.com:443:read-write"
- "*.aiplatform.googleapis.com:443:read-write"
- "oauth2.googleapis.com:443:read-write"
l7_allowed_paths:
- "/extraction/workloads/jobs/*"
- "/extraction/workloads/schema/*"
- "/extraction/workloads/graph/*"
gma-one-off-mutations.yaml: |
version: 1
name: gma-one-off-mutations
enforcement: hard_requirement
endpoints:
- "kartograph-api:8000:read-write"
- "inference.local:443:read-write"
- "aiplatform.googleapis.com:443:read-write"
- "*.aiplatform.googleapis.com:443:read-write"
- "oauth2.googleapis.com:443:read-write"
l7_allowed_paths:
- "/extraction/workloads/mutations/*"
- "/extraction/workloads/graph/*"
extraction-job.yaml: |
version: 1
name: extraction-job
enforcement: hard_requirement
endpoints:
- "kartograph-api:8000:read-write"
- "inference.local:443:read-write"
- "github.com:443:full"
- "*.github.com:443:full"
- "pypi.org:443:read-only"
- "files.pythonhosted.org:443:read-only"
- "aiplatform.googleapis.com:443:read-write"
- "*.aiplatform.googleapis.com:443:read-write"
- "oauth2.googleapis.com:443:read-write"
- "api.anthropic.com:443:read-write"
l7_allowed_paths:
- "/extraction/workloads/*"
Loading
Loading