|
1 | | -.PHONY: dev-edge-create dev-run-edge build test lint fix-lint codegen crds clean certs dev-setup run-dex run-hub run-hub-static run-hub-embedded run-hub-embedded-static run-hub-standalone run-hub-embedded-graphql run-kcp dev-login dev-login-static dev-create-workload dev dev-infra dev-run-kcp path boilerplate verify-boilerplate verify-codegen ldflags tools docker-build docker-build-hub docker-build-agent docker-build-dex docker-build-dev-agent load-dev-agent-image docker-push-dex verify help-dev dev-status dev-clean-hooks helm-build-local helm-push-local helm-clean build-quickstart-provider build-quickstart-provider-portal build-kuery-provider build-kuery-provider-portal run-provider-kuery kuery-db-up kuery-db-down install-provider-kuery init-provider-kuery uninstall-provider-kuery run-provider-quickstart install-provider-quickstart init-provider-quickstart uninstall-provider-quickstart build-infrastructure-provider build-infrastructure-provider-portal codegen-infrastructure-provider run-provider-infrastructure install-provider-infrastructure init-provider-infrastructure uninstall-provider-infrastructure build-app-studio-provider build-app-studio-provider-portal codegen-app-studio-provider app-studio-db-up app-studio-db-down run-provider-app-studio install-provider-app-studio init-provider-app-studio uninstall-provider-app-studio build-code-provider build-code-provider-portal codegen-code-provider run-provider-code install-provider-code init-provider-code uninstall-provider-code build-databricks-provider build-databricks-provider-portal codegen-databricks-provider run-provider-databricks install-provider-databricks init-provider-databricks uninstall-provider-databricks dev-kro-up dev-kro-down dev-kro-seed dev-kro-register-self e2e-infrastructure portal-provider-symlinks build-mcp-provider-portal build-kubernetes-edges-provider-portal build-server-edges-provider-portal e2e-provider e2e-provider-flags e2e-provider-all |
| 1 | +.PHONY: dev-edge-create dev-run-edge build test lint fix-lint codegen crds clean certs dev-setup run-dex run-hub run-hub-static run-hub-embedded run-hub-embedded-static run-hub-standalone run-hub-embedded-graphql run-kcp dev-login dev-login-static dev-create-workload dev dev-infra dev-run-kcp path boilerplate verify-boilerplate verify-codegen ldflags tools docker-build docker-build-hub docker-build-agent docker-build-dex docker-build-dev-agent load-dev-agent-image docker-push-dex verify help-dev dev-status dev-clean-hooks helm-build-local helm-push-local helm-clean build-quickstart-provider build-quickstart-provider-portal build-kuery-provider build-kuery-provider-portal run-provider-kuery kuery-db-up kuery-db-down install-provider-kuery init-provider-kuery uninstall-provider-kuery run-provider-quickstart install-provider-quickstart init-provider-quickstart uninstall-provider-quickstart build-infrastructure-provider build-infrastructure-provider-portal codegen-infrastructure-provider run-provider-infrastructure install-provider-infrastructure init-provider-infrastructure uninstall-provider-infrastructure build-app-studio-provider build-app-studio-provider-portal codegen-app-studio-provider app-studio-db-up app-studio-db-down run-provider-app-studio install-provider-app-studio init-provider-app-studio uninstall-provider-app-studio build-agents-provider build-agents-provider-portal codegen-agents-provider run-provider-agents install-provider-agents init-provider-agents uninstall-provider-agents build-code-provider build-code-provider-portal codegen-code-provider run-provider-code install-provider-code init-provider-code uninstall-provider-code build-databricks-provider build-databricks-provider-portal codegen-databricks-provider run-provider-databricks install-provider-databricks init-provider-databricks uninstall-provider-databricks dev-kro-up dev-kro-down dev-kro-seed dev-kro-register-self e2e-infrastructure portal-provider-symlinks build-mcp-provider-portal build-kubernetes-edges-provider-portal build-server-edges-provider-portal e2e-provider e2e-provider-flags e2e-provider-all |
2 | 2 |
|
3 | 3 | BINDIR ?= bin |
4 | 4 | GOFLAGS ?= |
@@ -139,6 +139,12 @@ build-app-studio-provider-portal: ## Build the App Studio provider's micro-front |
139 | 139 | build-app-studio-provider: build-app-studio-provider-portal ## Build the App Studio provider binary (portal embedded) |
140 | 140 | cd providers/app-studio && go build $(GOFLAGS) -o $(CURDIR)/$(BINDIR)/app-studio-provider . |
141 | 141 |
|
| 142 | +build-agents-provider-portal: ## Build the agents provider's micro-frontend (Vite + TS → portal/dist) |
| 143 | + cd providers/agents/portal && npm install --no-audit --no-fund && npm run build |
| 144 | + |
| 145 | +build-agents-provider: build-agents-provider-portal ## Build the agents provider binary (portal embedded) |
| 146 | + cd providers/agents && go build $(GOFLAGS) -o $(CURDIR)/$(BINDIR)/agents-provider . |
| 147 | + |
142 | 148 | build-code-provider-portal: ## Build the code provider's micro-frontend (Vite + Vue → portal/dist) |
143 | 149 | cd providers/code/portal && npm install --no-audit --no-fund && npm run build |
144 | 150 |
|
@@ -182,12 +188,25 @@ codegen-code-provider: $(CONTROLLER_GEN) $(KCP_APIGEN_GEN) ## Codegen for the co |
182 | 188 | $(CURDIR)/$(CONTROLLER_GEN) crd paths="./apis/..." \ |
183 | 189 | output:crd:artifacts:config=$(CURDIR)/providers/code/config/crds |
184 | 190 | ./$(KCP_APIGEN_GEN) --input-dir providers/code/config/crds --output-dir providers/code/config/kcp |
185 | | - @for r in connections repositories repositorycommits repositorycheckouts deploykeys collaborators packages; do \ |
| 191 | + @for r in connections repositories repositorycommits repositorycheckouts repositorybuildstatuses deploykeys collaborators packages; do \ |
186 | 192 | cp providers/code/config/kcp/apiresourceschema-$$r.code.kedge.faros.sh.yaml \ |
187 | 193 | providers/code/deploy/chart/files/schemas/$$r.code.kedge.faros.sh.yaml; \ |
188 | 194 | done |
189 | 195 | ./hack/ensure-boilerplate.sh |
190 | 196 |
|
| 197 | +codegen-agents-provider: $(CONTROLLER_GEN) $(KCP_APIGEN_GEN) ## Codegen for the agents provider's local API (+ chart schemas) |
| 198 | + @mkdir -p providers/agents/config/crds providers/agents/config/kcp providers/agents/deploy/chart/files/schemas |
| 199 | + cd providers/agents && \ |
| 200 | + $(CURDIR)/$(CONTROLLER_GEN) object paths="./apis/..." && \ |
| 201 | + $(CURDIR)/$(CONTROLLER_GEN) crd paths="./apis/..." \ |
| 202 | + output:crd:artifacts:config=$(CURDIR)/providers/agents/config/crds |
| 203 | + ./$(KCP_APIGEN_GEN) --input-dir providers/agents/config/crds --output-dir providers/agents/config/kcp |
| 204 | + @for r in agents connections agentschedules agenttriggers agentruns; do \ |
| 205 | + cp providers/agents/config/kcp/apiresourceschema-$$r.agents.kedge.faros.sh.yaml \ |
| 206 | + providers/agents/deploy/chart/files/schemas/$$r.agents.kedge.faros.sh.yaml; \ |
| 207 | + done |
| 208 | + ./hack/ensure-boilerplate.sh |
| 209 | + |
191 | 210 | codegen-app-studio-provider: $(CONTROLLER_GEN) $(KCP_APIGEN_GEN) ## Codegen for the App Studio provider's local API (+ manifest + chart schema) |
192 | 211 | @mkdir -p providers/app-studio/config/crds providers/app-studio/config/kcp providers/app-studio/deploy/chart/files/schemas |
193 | 212 | cd providers/app-studio && \ |
@@ -902,6 +921,20 @@ APP_STUDIO_POSTGRES_USER ?= appstudio |
902 | 921 | APP_STUDIO_POSTGRES_PASSWORD ?= appstudio |
903 | 922 | APP_STUDIO_POSTGRES_DB ?= appstudio |
904 | 923 |
|
| 924 | +# --- agents provider (long-running personal AI agents) --- |
| 925 | +AGENTS_PORT ?= 8087 |
| 926 | +AGENTS_HUB_URL ?= https://localhost:9443 |
| 927 | +AGENTS_TOKEN ?= $(STATIC_AUTH_TOKEN) |
| 928 | +AGENTS_KCP_KUBECONFIG ?= $(KCP_DATA_DIR)/admin.kubeconfig |
| 929 | +AGENTS_KCP_SERVER ?= https://localhost:6443 |
| 930 | +AGENTS_WORKSPACE_PATH ?= root:kedge:providers:agents |
| 931 | +AGENTS_PROVIDER_KUBECONFIG ?= $(KCP_DATA_DIR)/agents-provider.kubeconfig |
| 932 | +AGENTS_SCHEMAS_DIR ?= providers/agents/deploy/chart/files/schemas |
| 933 | +AGENTS_MANIFEST ?= providers/agents/manifest.yaml |
| 934 | +AGENTS_PROVIDER_MANIFEST ?= providers/agents/provider.yaml |
| 935 | +# Postgres store backend is not wired yet; dev runs use the in-memory store. |
| 936 | +AGENTS_IN_MEMORY_STORE ?= true |
| 937 | + |
905 | 938 | ## Run the infrastructure provider binary locally. Heartbeats to the hub on |
906 | 939 | ## $(KROMC_HUB_URL); TLS verification skipped (dev cert is self-signed). |
907 | 940 | ## KRO_KUBECONFIG is left unset by default → provider serves the baked-in |
@@ -1129,6 +1162,67 @@ uninstall-provider-app-studio: ## Delete App Studio CatalogEntry |
1129 | 1162 | --insecure-skip-tls-verify \ |
1130 | 1163 | delete -f $(APP_STUDIO_MANIFEST) -f $(APP_STUDIO_PROVIDER_MANIFEST) |
1131 | 1164 |
|
| 1165 | +## --- agents provider dev targets (mirror app-studio; in-memory store) --- |
| 1166 | + |
| 1167 | +run-provider-agents: build-agents-provider ## Run the agents provider (requires: make run-hub-embedded-static + make install-provider-agents + make init-provider-agents) |
| 1168 | + @echo "Starting agents provider on :$(AGENTS_PORT)" |
| 1169 | + @echo " hub: $(AGENTS_HUB_URL)" |
| 1170 | + @echo " store: in-memory (non-durable; Postgres backend not wired yet)" |
| 1171 | + @# Auto-source providers/agents/.env (gitignored) for local overrides. |
| 1172 | + set -a; [ -f providers/agents/.env ] && . ./providers/agents/.env || true; set +a; \ |
| 1173 | + PORT=$(AGENTS_PORT) \ |
| 1174 | + KEDGE_HUB_URL=$(AGENTS_HUB_URL) \ |
| 1175 | + KEDGE_HUB_TOKEN=$(AGENTS_TOKEN) \ |
| 1176 | + KEDGE_HUB_INSECURE=true \ |
| 1177 | + KEDGE_PROVIDER_NAME=agents \ |
| 1178 | + KEDGE_PROVIDER_KUBECONFIG=$${KEDGE_PROVIDER_KUBECONFIG:-$$( for f in "$(AGENTS_PROVIDER_KUBECONFIG)" "$(AGENTS_KCP_KUBECONFIG)" "$(CURDIR)/tilt-frontproxy.kubeconfig"; do [ -f "$$f" ] && echo "$$f" && break; done )} \ |
| 1179 | + AGENTS_IN_MEMORY_STORE=$(AGENTS_IN_MEMORY_STORE) \ |
| 1180 | + $(BINDIR)/agents-provider |
| 1181 | + |
| 1182 | +install-provider-agents: ## Apply agents Provider + CatalogEntry into root:kedge:providers |
| 1183 | + @test -f $(AGENTS_KCP_KUBECONFIG) || { \ |
| 1184 | + echo "kubeconfig not found at $(AGENTS_KCP_KUBECONFIG)"; \ |
| 1185 | + echo "start the hub first with: make run-hub-embedded-static"; \ |
| 1186 | + exit 1; \ |
| 1187 | + } |
| 1188 | + kubectl --kubeconfig=$(AGENTS_KCP_KUBECONFIG) \ |
| 1189 | + --server=$(AGENTS_KCP_SERVER)/clusters/root:kedge:system:providers \ |
| 1190 | + --insecure-skip-tls-verify \ |
| 1191 | + apply -f $(AGENTS_PROVIDER_MANIFEST) -f $(AGENTS_MANIFEST) |
| 1192 | + |
| 1193 | +init-provider-agents: build-agents-provider ## Bootstrap agents APIExport + write dev provider kubeconfig |
| 1194 | + @test -f $(AGENTS_KCP_KUBECONFIG) || { \ |
| 1195 | + echo "kubeconfig not found at $(AGENTS_KCP_KUBECONFIG)"; \ |
| 1196 | + echo "start the hub first with: make run-hub-embedded-static"; \ |
| 1197 | + exit 1; \ |
| 1198 | + } |
| 1199 | + @echo "Reading provider-token from $(AGENTS_WORKSPACE_PATH) and writing $(AGENTS_PROVIDER_KUBECONFIG)" |
| 1200 | + @TOKEN=$$(kubectl --kubeconfig=$(AGENTS_KCP_KUBECONFIG) \ |
| 1201 | + --server=$(AGENTS_KCP_SERVER)/clusters/$(AGENTS_WORKSPACE_PATH) \ |
| 1202 | + --insecure-skip-tls-verify \ |
| 1203 | + get secret -n default provider-token -o jsonpath='{.data.token}' | base64 -d); \ |
| 1204 | + test -n "$$TOKEN" || { echo "provider-token Secret empty — wait for the Provider controller to provision the workspace"; exit 1; }; \ |
| 1205 | + mkdir -p $(KCP_DATA_DIR); \ |
| 1206 | + printf 'apiVersion: v1\nkind: Config\nclusters:\n- name: kedge\n cluster:\n server: %s\n insecure-skip-tls-verify: true\ncontexts:\n- name: kedge\n context:\n cluster: kedge\n user: kedge\ncurrent-context: kedge\nusers:\n- name: kedge\n user:\n token: %s\n' \ |
| 1207 | + "$(AGENTS_KCP_SERVER)/clusters/$(AGENTS_WORKSPACE_PATH)" "$$TOKEN" \ |
| 1208 | + > $(AGENTS_PROVIDER_KUBECONFIG) |
| 1209 | + @echo "Running agents-provider init (creates APIExport + schemas + endpoint slice + bind grant)" |
| 1210 | + KEDGE_PROVIDER_KUBECONFIG=$(AGENTS_PROVIDER_KUBECONFIG) \ |
| 1211 | + AGENTS_WORKSPACE_PATH=$(AGENTS_WORKSPACE_PATH) \ |
| 1212 | + KEDGE_SCHEMAS_DIR=$(AGENTS_SCHEMAS_DIR) \ |
| 1213 | + $(BINDIR)/agents-provider init |
| 1214 | + |
| 1215 | +uninstall-provider-agents: ## Delete the agents CatalogEntry + Provider |
| 1216 | + @test -f $(AGENTS_KCP_KUBECONFIG) || { \ |
| 1217 | + echo "kubeconfig not found at $(AGENTS_KCP_KUBECONFIG)"; \ |
| 1218 | + echo "start the hub first with: make run-hub-embedded-static"; \ |
| 1219 | + exit 1; \ |
| 1220 | + } |
| 1221 | + -kubectl --kubeconfig=$(AGENTS_KCP_KUBECONFIG) \ |
| 1222 | + --server=$(AGENTS_KCP_SERVER)/clusters/root:kedge:system:providers \ |
| 1223 | + --insecure-skip-tls-verify \ |
| 1224 | + delete -f $(AGENTS_MANIFEST) -f $(AGENTS_PROVIDER_MANIFEST) |
| 1225 | + |
1132 | 1226 | # --- Dev agent image (template-native development mode) --- |
1133 | 1227 | # The static control binary an init container injects into any dev-mode |
1134 | 1228 | # component (docs/app-studio-template-sandboxes.md §2). Scratch image, |
|
0 commit comments