Skip to content

Commit f00e3f8

Browse files
markturanskyclaude
andcommitted
feat(api): session messages, gRPC watch, agent plugins, checkins, auth, rh-trex-ai v0.0.25, kind-login
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 163d0f3 commit f00e3f8

262 files changed

Lines changed: 38261 additions & 1557 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 292 additions & 38 deletions
Large diffs are not rendered by default.

components/ambient-api-server/Dockerfile.openapi

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
FROM registry.access.redhat.com/ubi9/ubi:9.7
1+
FROM docker.io/openapitools/openapi-generator-cli:v7.16.0
22

3-
# Install Java (to run openapi-generator), Go (for gofmt), and git
4-
RUN dnf install -y java-17-openjdk-headless go-toolset git && dnf clean all
5-
6-
# Download openapi-generator-cli JAR
7-
RUN curl -L -o /usr/local/bin/openapi-generator-cli.jar \
8-
https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.16.0/openapi-generator-cli-7.16.0.jar
3+
RUN apt-get update
4+
RUN apt-get install -y make sudo git golang-1.21
95

106
RUN mkdir -p /local
117
COPY . /local
128

9+
ENV PATH="/ambient/bin:/usr/lib/go-1.21/bin/:${PATH}"
10+
ENV GOPATH="/ambient"
11+
ENV GOBIN /usr/lib/go-1.21/bin/
12+
ENV CGO_ENABLED=0
13+
1314
WORKDIR /local
1415

15-
RUN java -jar /usr/local/bin/openapi-generator-cli.jar generate -i /local/openapi/openapi.yaml -g go -o /local/pkg/api/openapi
16+
RUN bash /usr/local/bin/docker-entrypoint.sh generate -i /local/openapi/openapi.yaml -g go -o /local/pkg/api/openapi
1617
RUN rm /local/pkg/api/openapi/go.mod /local/pkg/api/openapi/go.sum
1718
RUN rm -rf /local/pkg/api/openapi/test
1819
RUN rm -rf /local/pkg/api/openapi/git_push.sh

components/ambient-api-server/cmd/ambient-api-server/environments/e_development.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ func (e *DevEnvImpl) OverrideDatabase(c *pkgenv.Database) error {
1919

2020
func (e *DevEnvImpl) OverrideConfig(c *config.ApplicationConfig) error {
2121
c.Server.CORSAllowedHeaders = []string{"X-Ambient-Project"}
22-
c.Server.JwkCertFile = "secrets/kind-jwks.json"
23-
c.Server.JwkCertURL = ""
22+
c.Auth.JwkCertFile = "secrets/kind-jwks.json"
23+
c.Auth.JwkCertURL = ""
2424
c.Auth.EnableJWT = false
2525
return nil
2626
}

components/ambient-api-server/cmd/ambient-api-server/environments/e_integration_testing.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func (e *IntegrationTestingEnvImpl) OverrideConfig(c *config.ApplicationConfig)
3333
}
3434

3535
func (e *IntegrationTestingEnvImpl) OverrideServices(s *pkgenv.Services) error {
36+
s.SetService("RBACMiddleware", nil)
3637
return nil
3738
}
3839

components/ambient-api-server/cmd/ambient-api-server/environments/e_production.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ func (e *ProductionEnvImpl) OverrideDatabase(c *pkgenv.Database) error {
1919

2020
func (e *ProductionEnvImpl) OverrideConfig(c *config.ApplicationConfig) error {
2121
c.Server.CORSAllowedHeaders = []string{"X-Ambient-Project"}
22-
c.Server.JwkCertURL = "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/certs"
23-
c.Server.JwkCertFile = ""
2422
c.Auth.JwkCertURL = "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/certs"
23+
c.Auth.JwkCertFile = ""
2524
return nil
2625
}
2726

@@ -39,8 +38,7 @@ func (e *ProductionEnvImpl) OverrideClients(c *pkgenv.Clients) error {
3938

4039
func (e *ProductionEnvImpl) Flags() map[string]string {
4140
return map[string]string{
42-
"v": "1",
43-
"debug": "false",
44-
"enable-mock": "true",
41+
"v": "1",
42+
"debug": "false",
4543
}
4644
}

components/ambient-api-server/cmd/ambient-api-server/main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ import (
1818
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/projects"
1919
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/sessions"
2020
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/users"
21+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/agents"
22+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/rbac"
23+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/roles"
24+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/roleBindings"
25+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/sessionCheckIns"
26+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/projectDocuments"
27+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/agentMessages"
28+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/aGUIEvents"
29+
_ "github.com/ambient-code/platform/components/ambient-api-server/plugins/ui"
2130
)
2231

2332
func main() {

components/ambient-api-server/go.mod

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ go 1.24.0
55
toolchain go1.24.9
66

77
require (
8-
github.com/go-gormigrate/gormigrate/v2 v2.0.0
8+
github.com/go-gormigrate/gormigrate/v2 v2.1.5
99
github.com/golang/glog v1.2.5
1010
github.com/gorilla/mux v1.7.3
1111
github.com/onsi/gomega v1.27.1
1212
github.com/openshift-online/ocm-sdk-go v0.1.334
13-
github.com/openshift-online/rh-trex-ai v0.0.19 // v0.0.14→v0.0.19: gRPC TLS support, JWT audience validation fix, OpenAPI generator improvements
13+
github.com/openshift-online/rh-trex-ai v0.0.25
1414
github.com/spf13/pflag v1.0.6
1515
google.golang.org/grpc v1.75.1
1616
google.golang.org/protobuf v1.36.11
1717
gopkg.in/resty.v1 v1.12.0
18-
gorm.io/gorm v1.20.5
18+
gorm.io/gorm v1.31.1
1919
)
2020

2121
require (
@@ -54,16 +54,13 @@ require (
5454
github.com/gorilla/css v1.0.0 // indirect
5555
github.com/gorilla/handlers v1.4.2 // indirect
5656
github.com/inconshreveable/mousetrap v1.1.0 // indirect
57-
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
58-
github.com/jackc/pgconn v1.14.3 // indirect
59-
github.com/jackc/pgio v1.0.0 // indirect
6057
github.com/jackc/pgpassfile v1.0.0 // indirect
61-
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
62-
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
63-
github.com/jackc/pgtype v1.14.0 // indirect
58+
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
6459
github.com/jackc/pgx/v4 v4.18.2 // indirect
60+
github.com/jackc/pgx/v5 v5.6.0 // indirect
61+
github.com/jackc/puddle/v2 v2.2.2 // indirect
6562
github.com/jinzhu/inflection v1.0.0 // indirect
66-
github.com/jinzhu/now v1.1.1 // indirect
63+
github.com/jinzhu/now v1.1.5 // indirect
6764
github.com/json-iterator/go v1.1.12 // indirect
6865
github.com/klauspost/compress v1.18.0 // indirect
6966
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
@@ -113,12 +110,13 @@ require (
113110
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
114111
golang.org/x/crypto v0.45.0 // indirect
115112
golang.org/x/net v0.47.0 // indirect
113+
golang.org/x/sync v0.18.0 // indirect
116114
golang.org/x/sys v0.40.0 // indirect
117115
golang.org/x/text v0.31.0 // indirect
118116
golang.org/x/time v0.3.0 // indirect
119117
google.golang.org/genproto/googleapis/api v0.0.0-20251014184007-4626949a642f // indirect
120118
google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f // indirect
121119
gopkg.in/yaml.v2 v2.4.0 // indirect
122120
gopkg.in/yaml.v3 v3.0.1 // indirect
123-
gorm.io/driver/postgres v1.0.5 // indirect
121+
gorm.io/driver/postgres v1.6.0 // indirect
124122
)

0 commit comments

Comments
 (0)