Agent Executor (AX) is Google's open agentic orchestration runtime
Go
Change bucket var name and bump substrate version. (#224)
Junjie Wang09beb2d12bc2
diff --git a/go.mod b/go.modindex a12de5e..1db6840 100644--- a/go.mod+++ b/go.mod@@ -5,7 +5,7 @@ go 1.26.3require (charm.land/huh/v2 v2.0.3charm.land/lipgloss/v2 v2.0.3- github.com/agent-substrate/substrate v0.0.0-20260622205654-fe93d160a1df+ github.com/agent-substrate/substrate v0.0.0-20260629215754-fe48750deb27github.com/google/uuid v1.6.0github.com/jackc/pgx/v5 v5.10.0github.com/spf13/cobra v1.10.2diff --git a/go.sum b/go.sumindex c45b504..e99620c 100644--- a/go.sum+++ b/go.sum@@ -10,8 +10,8 @@ cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBcloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=-github.com/agent-substrate/substrate v0.0.0-20260622205654-fe93d160a1df h1:Qq7cujws6kbtE/ykSlCBcZQWlpK/HQQZcmbUjJbWiUs=-github.com/agent-substrate/substrate v0.0.0-20260622205654-fe93d160a1df/go.mod h1:TgdtEUV6iaflJTwmS8ONiGsyyJD+5okPZj2H6mM8WlA=+github.com/agent-substrate/substrate v0.0.0-20260629215754-fe48750deb27 h1:REbnncRlgoNQYIHMRm9Gu/3KQReTPQVWRn6A5jZM/GQ=+github.com/agent-substrate/substrate v0.0.0-20260629215754-fe48750deb27/go.mod h1:2ri5mTz714LWinayPQG1d4G/kMuzbqvRXlrUrpc7N9Y=github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o=diff --git a/hack/install-ax.sh b/hack/install-ax.shindex ffe0717..45360f0 100755--- a/hack/install-ax.sh+++ b/hack/install-ax.sh@@ -192,12 +192,12 @@ deploy_ax_server() {echo "Error: GEMINI_API_KEY environment variable must be set" >&2exit 1fi- if [[ -z "${BUCKET_NAME:-}" ]]; then- echo "Error: BUCKET_NAME environment variable must be set" >&2+ if [[ -z "${AX_SNAPSHOTS_BUCKET:-}" ]]; then+ echo "Error: AX_SNAPSHOTS_BUCKET environment variable must be set" >&2exit 1fi- echo "Using GCS Bucket: ${BUCKET_NAME}"+ echo "Using GCS Bucket: ${AX_SNAPSHOTS_BUCKET}"# Build and push the images, capturing their digest-pinned references.local ax_image ateom_image@@ -216,7 +216,7 @@ deploy_ax_server() {# Render the manifest and apply it.if ! sed -e "s|\${GEMINI_API_KEY}|${GEMINI_API_KEY}|g" \- -e "s|\${BUCKET_NAME}|${BUCKET_NAME}|g" \+ -e "s|\${AX_SNAPSHOTS_BUCKET}|${AX_SNAPSHOTS_BUCKET}|g" \-e "s|\${AX_IMAGE}|${ax_image}|g" \-e "s|\${ATEOM_IMAGE}|${ateom_image}|g" \-e "s|\${POSTGRES_PASSWORD}|${pg_password}|g" \diff --git a/internal/harness/mocks_test.go b/internal/harness/mocks_test.goindex d2e3a78..e7ba8e1 100644--- a/internal/harness/mocks_test.go+++ b/internal/harness/mocks_test.go@@ -50,29 +50,33 @@ type mockControlServer struct {resumeNilActor bool // when true, ResumeActor returns a nil Actor}+func (f *mockControlServer) CreateAtespace(_ context.Context, req *ateapipb.CreateAtespaceRequest) (*ateapipb.CreateAtespaceResponse, error) {+ return &ateapipb.CreateAtespaceResponse{Atespace: &ateapipb.Atespace{Name: req.GetName()}}, nil+}+func (f *mockControlServer) CreateActor(_ context.Context, req *ateapipb.CreateActorRequest) (*ateapipb.CreateActorResponse, error) {f.mu.Lock()- f.createCalls = append(f.createCalls, req.GetActorId())+ f.createCalls = append(f.createCalls, req.GetActorRef().GetName())f.mu.Unlock()if f.createErr != nil {return nil, f.createErr}- return &ateapipb.CreateActorResponse{Actor: &ateapipb.Actor{ActorId: req.GetActorId()}}, nil+ return &ateapipb.CreateActorResponse{Actor: &ateapipb.Actor{ActorId: req.GetActorRef().GetName()}}, nil}func (f *mockControlServer) ResumeActor(_ context.Context, req *ateapipb.ResumeActorRequest) (*ateapipb.ResumeActorResponse, error) {f.mu.Lock()- f.resumeCalls = append(f.resumeCalls, req.GetActorId())+ f.resumeCalls = append(f.resumeCalls, req.GetActorRef().GetName())f.mu.Unlock()if f.resumeNilActor {return &ateapipb.ResumeActorResponse{}, nil}- return &ateapipb.ResumeActorResponse{Actor: &ateapipb.Actor{ActorId: req.GetActorId(), AteomPodIp: f.resumeIP}}, nil+ return &ateapipb.ResumeActorResponse{Actor: &ateapipb.Actor{ActorId: req.GetActorRef().GetName(), AteomPodIp: f.resumeIP}}, nil}func (f *mockControlServer) SuspendActor(_ context.Context, req *ateapipb.SuspendActorRequest) (*ateapipb.SuspendActorResponse, error) {f.mu.Lock()- f.suspendCalls = append(f.suspendCalls, req.GetActorId())+ f.suspendCalls = append(f.suspendCalls, req.GetActorRef().GetName())f.mu.Unlock()return &ateapipb.SuspendActorResponse{}, nil}diff --git a/internal/k8s/ate/client.go b/internal/k8s/ate/client.goindex 6a71004..81a5c06 100644--- a/internal/k8s/ate/client.go+++ b/internal/k8s/ate/client.go@@ -21,7 +21,9 @@ import ("github.com/agent-substrate/substrate/pkg/proto/ateapipb""google.golang.org/grpc"+ "google.golang.org/grpc/codes""google.golang.org/grpc/credentials/insecure"+ "google.golang.org/grpc/status")type Client struct {@@ -58,8 +60,12 @@ func NewClient(ns, template, target string, opts ...grpc.DialOption) (*Client, e// CreateActor creates a new actor.func (c *Client) CreateActor(ctx context.Context, id string) (*ateapipb.CreateActorResponse, error) {client := ateapipb.NewControlClient(c.conn)+ // TODO(wjjclaud): Configure atespace in manifests instead of reusing the namespace.+ if _, err := client.CreateAtespace(ctx, &ateapipb.CreateAtespaceRequest{Name: c.namespace}); err != nil && status.Code(err) != codes.AlreadyExists {+ return nil, fmt.Errorf("error when calling Control.CreateAtespace: %w", err)+ }resp, err := client.CreateActor(ctx, &ateapipb.CreateActorRequest{- ActorId: id,+ ActorRef: &ateapipb.ActorRef{Atespace: c.namespace, Name: id},ActorTemplateNamespace: c.namespace,ActorTemplateName: c.template,})@@ -74,7 +80,7 @@ func (c *Client) CreateActor(ctx context.Context, id string) (*ateapipb.CreateAcfunc (c *Client) ResumeActor(ctx context.Context, id string) (*ateapipb.ResumeActorResponse, error) {client := ateapipb.NewControlClient(c.conn)resp, err := client.ResumeActor(ctx, &ateapipb.ResumeActorRequest{- ActorId: id,+ ActorRef: &ateapipb.ActorRef{Atespace: c.namespace, Name: id},})if err != nil {return nil, fmt.Errorf("error when calling Control.ResumeActor: %w", err)@@ -86,7 +92,7 @@ func (c *Client) ResumeActor(ctx context.Context, id string) (*ateapipb.ResumeAcfunc (c *Client) SuspendActor(ctx context.Context, id string) (*ateapipb.SuspendActorResponse, error) {client := ateapipb.NewControlClient(c.conn)resp, err := client.SuspendActor(ctx, &ateapipb.SuspendActorRequest{- ActorId: id,+ ActorRef: &ateapipb.ActorRef{Atespace: c.namespace, Name: id},})if err != nil {return nil, fmt.Errorf("error when calling Control.SuspendActor: %w", err)diff --git a/manifests/README.md b/manifests/README.mdindex 8f39378..1e193d4 100644--- a/manifests/README.md+++ b/manifests/README.md@@ -18,7 +18,7 @@ The target Kubernetes cluster is assumed to have### 1. Build and Deploy> [!NOTE]-> Do not manually edit `manifests/ax-deployment.yaml`. The installation script automatically injects your `${GEMINI_API_KEY}`, `${BUCKET_NAME}`, and the built `${AX_IMAGE}` and `${ATEOM_IMAGE}` references during deployment.+> Do not manually edit `manifests/ax-deployment.yaml`. The installation script automatically injects your `${GEMINI_API_KEY}`, `${AX_SNAPSHOTS_BUCKET}`, and the built `${AX_IMAGE}` and `${ATEOM_IMAGE}` references during deployment.The installation script builds the required images and applies the resolvedmanifests to your cluster:@@ -59,7 +59,7 @@ gcloud auth configure-docker # set up the gcr.io credential helper```bashexport PROJECT_ID="ax-substrate" # Your GCP project IDexport GEMINI_API_KEY="your-api-key"-export BUCKET_NAME="snapshot-substrate-test-$PROJECT_ID"+export AX_SNAPSHOTS_BUCKET="snapshot-substrate-test-$PROJECT_ID"./hack/install-ax.sh --deploy-ax-server```diff --git a/manifests/ax-deployment.yaml b/manifests/ax-deployment.yamlindex 1ff2304..eb71bf1 100644--- a/manifests/ax-deployment.yaml+++ b/manifests/ax-deployment.yaml@@ -68,7 +68,7 @@ spec:- name: AX_HARNESS_WORKDIRvalue: "/ax"snapshotsConfig:- location: gs://${BUCKET_NAME}/antigravity/+ location: gs://${AX_SNAPSHOTS_BUCKET}/antigravity/---# ---------------------------------------------------------------------------