@inference-gateway/adl-cli 0.47.1 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +188 -69
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ _A command-line interface for generating enterprise-ready A2A (Agent-to-Agent) s
|
|
|
33
33
|
- [Sandbox Environments](#sandbox-environments)
|
|
34
34
|
- [Enterprise Features](#enterprise-features)
|
|
35
35
|
- [Artifacts Support](#artifacts-support)
|
|
36
|
+
- [Telemetry](#telemetry)
|
|
36
37
|
- [GitHub Issue Templates](#github-issue-templates)
|
|
37
38
|
- [Examples](#examples)
|
|
38
39
|
- [Template System & Architecture](#template-system--architecture)
|
|
@@ -64,6 +65,7 @@ The ADL CLI helps you build enterprise-ready A2A agents quickly by generating co
|
|
|
64
65
|
- 🎣 **Post-Generation Hooks** - Customize build, format, and test commands after generation
|
|
65
66
|
- 🤖 **Multi-Provider AI** - OpenAI, Anthropic, Google, Groq, Mistral, DeepSeek, Cohere, Cloudflare, Moonshot, Ollama, Ollama Cloud, and Nvidia support
|
|
66
67
|
- 📁 **Artifacts Support** - Integrated filesystem and MinIO object storage for artifact management
|
|
68
|
+
- 📡 **OpenTelemetry Instrumentation** - Opt-in tracing and metrics via `spec.telemetry.enabled` (Go and TypeScript)
|
|
67
69
|
|
|
68
70
|
## Installation
|
|
69
71
|
|
|
@@ -275,7 +277,7 @@ The init command supports extensive configuration options:
|
|
|
275
277
|
**Go Options:**
|
|
276
278
|
|
|
277
279
|
- `--go-module` - Go module path (e.g., `github.com/user/project`)
|
|
278
|
-
- `--go-version` - Go version (e.g., `1.26.
|
|
280
|
+
- `--go-version` - Go version (e.g., `1.26.4`)
|
|
279
281
|
|
|
280
282
|
**Rust Options:**
|
|
281
283
|
|
|
@@ -289,8 +291,9 @@ The init command supports extensive configuration options:
|
|
|
289
291
|
|
|
290
292
|
**Environment Options:**
|
|
291
293
|
|
|
292
|
-
- `--flox` - Enable Flox environment
|
|
293
294
|
- `--devcontainer` - Enable DevContainer environment
|
|
295
|
+
- `--docker-compose` - Enable Docker Compose environment
|
|
296
|
+
- `--flox` - Enable Flox environment
|
|
294
297
|
|
|
295
298
|
**Pipeline / AI Options (declarative, written into the manifest as `false` by default):**
|
|
296
299
|
|
|
@@ -302,6 +305,10 @@ The init command supports extensive configuration options:
|
|
|
302
305
|
- `--ci` - Sets `spec.scm.ci: true` (generate CI workflow on `adl generate`)
|
|
303
306
|
- `--cd` - Sets `spec.scm.cd: true` (generate CD pipeline + semantic-release on `adl generate`)
|
|
304
307
|
|
|
308
|
+
**Deployment Options:**
|
|
309
|
+
|
|
310
|
+
- `--deployment` - Deployment type (`kubernetes`, `cloudrun`, `vercel`, `cloudflare` (TypeScript-only); defaults to empty for no deployment)
|
|
311
|
+
|
|
305
312
|
### Generate Command
|
|
306
313
|
|
|
307
314
|
```bash
|
|
@@ -331,7 +338,10 @@ adl generate --file agent.yaml --output ./test-my-agent --deployment cloudrun --
|
|
|
331
338
|
| `--overwrite` | Overwrite existing files (respects .adl-ignore) |
|
|
332
339
|
| `--ci` | Generate CI workflow configuration (GitHub Actions). Overrides `spec.scm.ci`. |
|
|
333
340
|
| `--cd` | Generate CD pipeline configuration with semantic-release. Overrides `spec.scm.cd`. |
|
|
334
|
-
| `--deployment` | Generate deployment configuration (`kubernetes`, `cloudrun`)
|
|
341
|
+
| `--deployment` | Generate deployment configuration (`kubernetes`, `cloudrun`, `vercel`, `cloudflare` (TypeScript-only)) |
|
|
342
|
+
| `--devcontainer` | Enable DevContainer environment |
|
|
343
|
+
| `--flox` | Enable Flox environment |
|
|
344
|
+
| `--offline` | Skip the skills registry; require every non-bare skill to already be in the local cache |
|
|
335
345
|
|
|
336
346
|
> **Declarative equivalents:** `--ci` and `--cd` are mirrored by `spec.scm.ci`
|
|
337
347
|
> and `spec.scm.cd`. The CLI flag is OR'd on top of the manifest value (passing
|
|
@@ -473,7 +483,7 @@ spec:
|
|
|
473
483
|
language:
|
|
474
484
|
go:
|
|
475
485
|
module: "github.com/example/weather-agent"
|
|
476
|
-
version: "1.26.
|
|
486
|
+
version: "1.26.4"
|
|
477
487
|
acronyms: # Optional: Custom acronyms for better code generation
|
|
478
488
|
- api
|
|
479
489
|
- json
|
|
@@ -496,6 +506,7 @@ The complete ADL schema includes:
|
|
|
496
506
|
- **scm**: Source control management configuration (GitHub, GitLab)
|
|
497
507
|
- **sandbox**: Development environment configuration (Flox, DevContainer)
|
|
498
508
|
- **deployment**: Platform-specific deployment configuration (Kubernetes, Cloud Run)
|
|
509
|
+
- **telemetry**: OpenTelemetry instrumentation toggle (see [Telemetry](#telemetry))
|
|
499
510
|
|
|
500
511
|
### Complete ADL Example
|
|
501
512
|
|
|
@@ -602,7 +613,7 @@ spec:
|
|
|
602
613
|
language:
|
|
603
614
|
go:
|
|
604
615
|
module: "github.com/company/advanced-agent"
|
|
605
|
-
version: "1.26.
|
|
616
|
+
version: "1.26.4"
|
|
606
617
|
scm:
|
|
607
618
|
provider: github
|
|
608
619
|
url: "https://github.com/company/advanced-agent"
|
|
@@ -674,7 +685,7 @@ spec:
|
|
|
674
685
|
language:
|
|
675
686
|
go:
|
|
676
687
|
module: github.com/example/agent
|
|
677
|
-
version: "1.26.
|
|
688
|
+
version: "1.26.4"
|
|
678
689
|
vendor:
|
|
679
690
|
deps:
|
|
680
691
|
- github.com/google/uuid@v1.6.0
|
|
@@ -770,7 +781,7 @@ Worked example per backend:
|
|
|
770
781
|
# Flox: pin deno + kubectl + terraform alongside the Go toolchain
|
|
771
782
|
spec:
|
|
772
783
|
language:
|
|
773
|
-
go: { module: github.com/example/agent, version: "1.26.
|
|
784
|
+
go: { module: github.com/example/agent, version: "1.26.4" }
|
|
774
785
|
development:
|
|
775
786
|
sandbox:
|
|
776
787
|
flox:
|
|
@@ -785,7 +796,7 @@ spec:
|
|
|
785
796
|
# Devcontainer: same deps, rendered as an apt-packages feature
|
|
786
797
|
spec:
|
|
787
798
|
language:
|
|
788
|
-
go: { module: github.com/example/agent, version: "1.26.
|
|
799
|
+
go: { module: github.com/example/agent, version: "1.26.4" }
|
|
789
800
|
development:
|
|
790
801
|
sandbox:
|
|
791
802
|
devcontainer:
|
|
@@ -970,6 +981,8 @@ Resolution precedence at runtime: **env > compile-time literal > built-in defaul
|
|
|
970
981
|
|
|
971
982
|
## Service Injection & Configuration Management
|
|
972
983
|
|
|
984
|
+
> **Note:** The code examples in this section are **illustrative** - they show the conceptual shape of the generated code but may not match the exact output of the current templates. For the authoritative generated output, refer to the Go templates in `internal/templates/languages/go/` (config.go.tmpl, service.go.tmpl, tool.go.tmpl, main.go.tmpl).
|
|
985
|
+
|
|
973
986
|
The ADL CLI provides a sophisticated service injection system with structured configuration management. This system improves testability, separation of concerns, and provides type-safe configuration with environment variable mapping.
|
|
974
987
|
|
|
975
988
|
### Structured Service System
|
|
@@ -1021,15 +1034,14 @@ The configuration system generates type-safe structs with automatic environment
|
|
|
1021
1034
|
|
|
1022
1035
|
**Generated Configuration (`config/config.go`):**
|
|
1023
1036
|
|
|
1037
|
+
> Illustrative example - see `internal/templates/languages/go/config.go.tmpl` for the actual template. The `Config` struct is generated dynamically from `spec.config` entries; the `Environment` field shown below is not generated by the template.
|
|
1038
|
+
|
|
1024
1039
|
```go
|
|
1025
1040
|
type Config struct {
|
|
1026
|
-
//
|
|
1027
|
-
Environment string `env:"ENVIRONMENT"`
|
|
1028
|
-
|
|
1029
|
-
// A2A configuration
|
|
1041
|
+
// A2A configuration (all A2A_ prefixed vars)
|
|
1030
1042
|
A2A serverConfig.Config `env:",prefix=A2A_"`
|
|
1031
1043
|
|
|
1032
|
-
// Custom configuration sections
|
|
1044
|
+
// Custom configuration sections (one per spec.config entry, excluding "tools")
|
|
1033
1045
|
Cache CacheConfig `env:",prefix=CACHE_"`
|
|
1034
1046
|
GoogleCalendar GoogleCalendarConfig `env:",prefix=GOOGLE_CALENDAR_"`
|
|
1035
1047
|
}
|
|
@@ -1090,33 +1102,40 @@ spec:
|
|
|
1090
1102
|
required: [recipient]
|
|
1091
1103
|
```
|
|
1092
1104
|
|
|
1093
|
-
**Generated
|
|
1105
|
+
**Generated Tool Code:**
|
|
1106
|
+
|
|
1107
|
+
> Illustrative example - see `internal/templates/languages/go/tool.go.tmpl` for the actual template. Generated tools live under `tools/`, not `skills/`.
|
|
1094
1108
|
|
|
1095
1109
|
```go
|
|
1096
|
-
type
|
|
1110
|
+
type ExportReportTool struct {
|
|
1097
1111
|
logger *zap.Logger
|
|
1098
1112
|
database database.DatabaseService
|
|
1099
1113
|
email *config.EmailConfig // Type-safe access to email config only
|
|
1100
1114
|
}
|
|
1101
1115
|
|
|
1102
|
-
func
|
|
1116
|
+
func NewExportReportTool(
|
|
1103
1117
|
logger *zap.Logger,
|
|
1104
1118
|
database database.DatabaseService,
|
|
1105
1119
|
email *config.EmailConfig,
|
|
1106
1120
|
) server.Tool {
|
|
1107
|
-
|
|
1121
|
+
tool := &ExportReportTool{
|
|
1108
1122
|
logger: logger,
|
|
1109
1123
|
database: database,
|
|
1110
1124
|
email: email,
|
|
1111
1125
|
}
|
|
1112
|
-
|
|
1126
|
+
return server.NewBasicTool(
|
|
1127
|
+
"export_report",
|
|
1128
|
+
"Export data and email report",
|
|
1129
|
+
map[string]any{ /* schema */ },
|
|
1130
|
+
tool.ExportReportHandler,
|
|
1131
|
+
)
|
|
1113
1132
|
}
|
|
1114
1133
|
|
|
1115
|
-
func (
|
|
1134
|
+
func (t *ExportReportTool) ExportReportHandler(ctx context.Context, args map[string]any) (string, error) {
|
|
1116
1135
|
// Direct access to email config subsection
|
|
1117
|
-
apiKey :=
|
|
1118
|
-
fromAddress :=
|
|
1119
|
-
provider :=
|
|
1136
|
+
apiKey := t.email.APIKey
|
|
1137
|
+
fromAddress := t.email.FromAddress
|
|
1138
|
+
provider := t.email.Provider
|
|
1120
1139
|
|
|
1121
1140
|
// ... implementation
|
|
1122
1141
|
}
|
|
@@ -1124,10 +1143,12 @@ func (s *ExportReportSkill) ExportReportHandler(ctx context.Context, args map[st
|
|
|
1124
1143
|
|
|
1125
1144
|
**Main Registration:**
|
|
1126
1145
|
|
|
1146
|
+
> Illustrative example - see `internal/templates/languages/go/main.go.tmpl` for the actual template.
|
|
1147
|
+
|
|
1127
1148
|
```go
|
|
1128
1149
|
// In main.go - config subsection is passed directly
|
|
1129
|
-
|
|
1130
|
-
toolBox.AddTool(
|
|
1150
|
+
exportReportTool := tools.NewExportReportTool(l, databaseSvc, &cfg.Email)
|
|
1151
|
+
toolBox.AddTool(exportReportTool)
|
|
1131
1152
|
```
|
|
1132
1153
|
|
|
1133
1154
|
**Benefits of Config Subsection Injection:**
|
|
@@ -1191,24 +1212,23 @@ Each service generates a package with interface and factory:
|
|
|
1191
1212
|
|
|
1192
1213
|
**Example `internal/googleCalendar/googleCalendar.go`:**
|
|
1193
1214
|
|
|
1215
|
+
> Illustrative example - see `internal/templates/languages/go/service.go.tmpl` for the actual template.
|
|
1216
|
+
|
|
1194
1217
|
```go
|
|
1195
1218
|
type CalendarService interface {
|
|
1196
|
-
// TODO: Define
|
|
1197
|
-
|
|
1198
|
-
|
|
1219
|
+
// TODO: Define the methods for CalendarService service
|
|
1220
|
+
// Example:
|
|
1221
|
+
// SomeMethod(ctx context.Context, param string) error
|
|
1199
1222
|
}
|
|
1200
1223
|
|
|
1201
|
-
type
|
|
1202
|
-
|
|
1203
|
-
config *config.Config
|
|
1224
|
+
type calendarServiceImpl struct {
|
|
1225
|
+
// TODO: Add fields needed for this service
|
|
1204
1226
|
}
|
|
1205
1227
|
|
|
1206
1228
|
func NewCalendarService(logger *zap.Logger, cfg *config.Config) (CalendarService, error) {
|
|
1207
|
-
// TODO: Implement CalendarService
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
config: cfg,
|
|
1211
|
-
}, nil
|
|
1229
|
+
// TODO: Implement constructor logic for CalendarService
|
|
1230
|
+
logger.Info("initializing CalendarService service")
|
|
1231
|
+
return &calendarServiceImpl{}, nil
|
|
1212
1232
|
}
|
|
1213
1233
|
```
|
|
1214
1234
|
|
|
@@ -1216,21 +1236,29 @@ func NewCalendarService(logger *zap.Logger, cfg *config.Config) (CalendarService
|
|
|
1216
1236
|
|
|
1217
1237
|
Skills automatically receive injected services as constructor parameters:
|
|
1218
1238
|
|
|
1219
|
-
**Example `
|
|
1239
|
+
**Example `tools/create_event.go`:**
|
|
1240
|
+
|
|
1241
|
+
> Illustrative example - see `internal/templates/languages/go/tool.go.tmpl` for the actual template. Generated tools live under `tools/`, not `skills/`.
|
|
1220
1242
|
|
|
1221
1243
|
```go
|
|
1222
|
-
type
|
|
1223
|
-
logger
|
|
1224
|
-
calendar
|
|
1225
|
-
cache
|
|
1244
|
+
type CreateEventTool struct {
|
|
1245
|
+
logger *zap.Logger
|
|
1246
|
+
calendar googleCalendar.CalendarService
|
|
1247
|
+
cache cache.CacheRepository
|
|
1226
1248
|
}
|
|
1227
1249
|
|
|
1228
|
-
func
|
|
1229
|
-
|
|
1250
|
+
func NewCreateEventTool(logger *zap.Logger, calendar googleCalendar.CalendarService, cache cache.CacheRepository) server.Tool {
|
|
1251
|
+
tool := &CreateEventTool{
|
|
1230
1252
|
logger: logger,
|
|
1231
1253
|
calendar: calendar,
|
|
1232
1254
|
cache: cache,
|
|
1233
1255
|
}
|
|
1256
|
+
return server.NewBasicTool(
|
|
1257
|
+
"create_event",
|
|
1258
|
+
"Create a new calendar event",
|
|
1259
|
+
map[string]any{ /* schema */ },
|
|
1260
|
+
tool.CreateEventHandler,
|
|
1261
|
+
)
|
|
1234
1262
|
}
|
|
1235
1263
|
```
|
|
1236
1264
|
|
|
@@ -1293,9 +1321,7 @@ my-go-agent/
|
|
|
1293
1321
|
│ └── refactor_request.md # Refactoring request template
|
|
1294
1322
|
├── .releaserc.yaml # Semantic-release configuration (with --cd flag)
|
|
1295
1323
|
├── k8s/
|
|
1296
|
-
│ └── deployment.yaml # Kubernetes deployment manifest
|
|
1297
|
-
├── cloudrun/
|
|
1298
|
-
│ └── deploy.sh # CloudRun deployment script (with --deployment cloudrun)
|
|
1324
|
+
│ └── deployment.yaml # Kubernetes deployment manifest (with --deployment kubernetes)
|
|
1299
1325
|
├── .flox/ # Generated when sandbox: flox
|
|
1300
1326
|
│ ├── env/manifest.toml
|
|
1301
1327
|
│ ├── env.json
|
|
@@ -1334,9 +1360,7 @@ my-rust-agent/
|
|
|
1334
1360
|
│ └── cd.yml # GitHub Actions CD workflow (with --cd flag)
|
|
1335
1361
|
├── .releaserc.yaml # Semantic-release configuration (with --cd flag)
|
|
1336
1362
|
├── k8s/
|
|
1337
|
-
│ └── deployment.yaml # Kubernetes deployment
|
|
1338
|
-
├── cloudrun/
|
|
1339
|
-
│ └── deploy.sh # CloudRun deployment script (with --deployment cloudrun)
|
|
1363
|
+
│ └── deployment.yaml # Kubernetes deployment (with --deployment kubernetes)
|
|
1340
1364
|
├── CLAUDE.md # AI assistant instructions (spec.development.ai.orchestrators.claudecode.enabled: true)
|
|
1341
1365
|
└── README.md # Documentation
|
|
1342
1366
|
```
|
|
@@ -1384,7 +1408,7 @@ All projects include these essential files regardless of language:
|
|
|
1384
1408
|
- **`.well-known/agent-card.json`** - A2A agent discovery and capabilities manifest
|
|
1385
1409
|
- **`Taskfile.yml`** - Unified task runner configuration for build, test, lint, run
|
|
1386
1410
|
- **`Dockerfile`** - Language-optimized container configuration
|
|
1387
|
-
- **`k8s/deployment.yaml`** - Kubernetes deployment manifest
|
|
1411
|
+
- **`k8s/deployment.yaml`** - Kubernetes deployment manifest (only when `spec.deployment.type: kubernetes`)
|
|
1388
1412
|
- **`deploy` task in `Taskfile.yml`** - CloudRun deployment task (when using `--deployment cloudrun`)
|
|
1389
1413
|
- **`.adl-ignore`** - Protects user implementations from overwrite
|
|
1390
1414
|
- **CI Workflows** - When using `--ci` flag, generates GitHub Actions workflows:
|
|
@@ -1811,6 +1835,28 @@ Configure storage via environment variables (see generated README for A2A*ARTIFA
|
|
|
1811
1835
|
- `examples/go-agent-artifacts-filesystem.yaml` - Filesystem storage example
|
|
1812
1836
|
- `examples/go-agent-artifacts-minio.yaml` - MinIO storage example
|
|
1813
1837
|
|
|
1838
|
+
## Telemetry
|
|
1839
|
+
|
|
1840
|
+
Enable OpenTelemetry instrumentation for the generated agent:
|
|
1841
|
+
|
|
1842
|
+
```yaml
|
|
1843
|
+
spec:
|
|
1844
|
+
telemetry:
|
|
1845
|
+
enabled: true
|
|
1846
|
+
```
|
|
1847
|
+
|
|
1848
|
+
The manifest field is a single on/off switch - exporter endpoints, ports, and sampling stay runtime concerns configured via environment variables in the generated `.env.example`:
|
|
1849
|
+
|
|
1850
|
+
- **Go**: pulls the OpenTelemetry runtime dependencies into `go.mod`, generates `tools/telemetry.go` (each built-in tool call becomes its own span with `infer.tool.call.id`/`infer.session.id` attributes), and surfaces `A2A_TELEMETRY_ENABLE`, `A2A_TELEMETRY_METRICS_PORT`/`_HOST`, `A2A_TELEMETRY_TRACE_ENABLE`/`_ENDPOINT`/`_HEADERS` in `.env.example`.
|
|
1851
|
+
- **TypeScript**: wires the ADK's `createTelemetryProvider` into `src/index.ts` (no extra npm dependencies) and surfaces `TELEMETRY_ENABLE` plus the standard `OTEL_EXPORTER_OTLP_*` / `OTEL_SERVICE_*` variables in `.env.example`.
|
|
1852
|
+
|
|
1853
|
+
> **Note:** Telemetry generation currently supports Go and TypeScript only; Rust agents ignore `spec.telemetry`.
|
|
1854
|
+
|
|
1855
|
+
**Examples:**
|
|
1856
|
+
|
|
1857
|
+
- `examples/go-agent-telemetry.yaml` - Go agent with metrics server, OTLP traces, and per-tool-call spans
|
|
1858
|
+
- `examples/typescript-agent-telemetry.yaml` - TypeScript agent with ADK-provided OTel wiring
|
|
1859
|
+
|
|
1814
1860
|
## GitHub Issue Templates
|
|
1815
1861
|
|
|
1816
1862
|
The ADL CLI can automatically generate GitHub issue templates for your agent projects, providing standardized forms for bug reports, feature requests, and refactoring tasks:
|
|
@@ -1879,25 +1925,25 @@ adl validate examples/cloudrun-ghcr-agent.yaml
|
|
|
1879
1925
|
adl generate --file examples/go-agent.yaml --output ./test-go-agent
|
|
1880
1926
|
adl generate --file examples/rust-agent.yaml --output ./test-rust-agent
|
|
1881
1927
|
adl generate --file examples/typescript-agent.yaml --output ./test-typescript-agent
|
|
1882
|
-
adl generate --file examples/github-app-agent.yaml --output ./test-github-app-agent --cd
|
|
1883
1928
|
adl generate --file examples/cloudrun-agent.yaml --output ./test-cloudrun-agent --deployment cloudrun
|
|
1884
1929
|
adl generate --file examples/cloudrun-ghcr-agent.yaml --output ./test-ghcr-agent --deployment cloudrun
|
|
1885
1930
|
|
|
1886
1931
|
# Generate with CI/CD pipeline
|
|
1887
|
-
adl generate --file examples/
|
|
1932
|
+
adl generate --file examples/go-agent.yaml --output ./enterprise-agent --ci --cd
|
|
1888
1933
|
adl generate --file examples/cloudrun-agent.yaml --output ./cloudrun-enterprise --deployment cloudrun --cd
|
|
1889
1934
|
```
|
|
1890
1935
|
|
|
1891
1936
|
**Example ADL Files:**
|
|
1892
1937
|
|
|
1893
|
-
- `go-agent.yaml` -
|
|
1894
|
-
- `rust-agent.yaml` - Rust agent with
|
|
1938
|
+
- `go-agent.yaml` - Go agent with services, tools, and an orchestration skill
|
|
1939
|
+
- `rust-agent.yaml` - Minimal Rust agent built with the Rust ADK
|
|
1895
1940
|
- `typescript-agent.yaml` - Minimal TypeScript agent built with the TypeScript ADK
|
|
1896
1941
|
- `typescript-agent-tools.yaml` - TypeScript agent with tools, services, and dependency injection
|
|
1897
1942
|
- `typescript-agent-ai.yaml` - AI-powered TypeScript agent with LLM-driven tools
|
|
1898
|
-
- `
|
|
1899
|
-
- `cloudrun-agent.yaml` -
|
|
1900
|
-
|
|
1943
|
+
- `cloudrun-agent.yaml` - Cloud Run deployment with Google Container Registry
|
|
1944
|
+
- `cloudrun-ghcr-agent.yaml` - Cloud Run deployment with GitHub Container Registry
|
|
1945
|
+
|
|
1946
|
+
See [`examples/README.md`](examples/README.md) for the full catalog of all 18 example manifests.
|
|
1901
1947
|
|
|
1902
1948
|
## Template System & Architecture
|
|
1903
1949
|
|
|
@@ -1924,25 +1970,89 @@ Each language has its own file mapping that determines what gets generated:
|
|
|
1924
1970
|
**Go Projects:**
|
|
1925
1971
|
|
|
1926
1972
|
- `main.go` → Go main server setup
|
|
1973
|
+
- `config/config.go` → Application configuration
|
|
1974
|
+
- `internal/logger/logger.go` → Structured logging
|
|
1975
|
+
- `internal/{service}/{service}.go` → Service implementation per ADL service
|
|
1927
1976
|
- `tools/{toolname}.go` → Individual function-call tool implementations
|
|
1977
|
+
- `tools/{builtin}.go` + `tools/{builtin}_test.go` → Reserved built-in tool implementations (read, bash, write, edit, fetch)
|
|
1978
|
+
- `tools/telemetry.go` → OpenTelemetry instrumentation (when telemetry enabled and built-in tools present)
|
|
1928
1979
|
- `skills/{skillid}/SKILL.md` → Markdown skill playbooks (loaded into system prompt at runtime)
|
|
1929
1980
|
- `go.mod` → Go module configuration
|
|
1930
|
-
-
|
|
1981
|
+
- `Dockerfile` → Container image
|
|
1982
|
+
- `.dockerignore` → Docker build exclusions
|
|
1983
|
+
- `.gitignore`, `.gitattributes`, `.editorconfig` → Repository configuration
|
|
1984
|
+
- `README.md`, `LICENSE` → Project documentation
|
|
1985
|
+
- `Taskfile.yml` → Development task runner
|
|
1986
|
+
- `.well-known/agent-card.json` → A2A capabilities manifest
|
|
1987
|
+
- `k8s/deployment.yaml` → Kubernetes deployment (only when `spec.deployment.type: kubernetes`)
|
|
1988
|
+
- `vercel.json`, `.vercel/project.json` → Vercel deployment (only when `spec.deployment.type: vercel`)
|
|
1989
|
+
- `docker-compose.yaml`, `.env.example` → Docker Compose sandbox (conditional on sandbox config)
|
|
1990
|
+
- `.flox/` → Flox reproducible environment (conditional)
|
|
1991
|
+
- `.devcontainer/` → Devcontainer configuration (conditional)
|
|
1992
|
+
- `CLAUDE.md`, `GEMINI.md`, `AGENTS.md` → AI assistant documentation (conditional on AI toggles)
|
|
1993
|
+
- `.github/ISSUE_TEMPLATE/*.md` → GitHub issue templates (conditional on SCM config)
|
|
1994
|
+
- `.github/dependabot.yml` → Dependabot configuration (conditional on SCM config)
|
|
1995
|
+
- CI workflow (`.github/workflows/ci.go.yaml`) → Conditional on SCM CI toggle
|
|
1996
|
+
- CD workflow (`.github/workflows/cd.yaml`) → Conditional on SCM CD toggle
|
|
1997
|
+
- AI agent workflows (`.github/workflows/ai-*.yaml`) → Conditional on AI orchestrator toggles
|
|
1931
1998
|
|
|
1932
1999
|
**Rust Projects:**
|
|
1933
2000
|
|
|
1934
2001
|
- `src/main.rs` → Rust main application
|
|
1935
2002
|
- `src/tools/{toolname}.rs` → Tool descriptor + handler
|
|
2003
|
+
- `src/tools/{builtin}.rs` → Reserved built-in tool implementations (read, bash, write, edit, fetch)
|
|
1936
2004
|
- `src/tools/mod.rs` → Module declarations
|
|
1937
2005
|
- `skills/{skillid}/SKILL.md` → Markdown skill playbooks
|
|
1938
2006
|
- `Cargo.toml` → Rust package configuration
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
2007
|
+
- `Dockerfile` → Container image
|
|
2008
|
+
- `.dockerignore` → Docker build exclusions
|
|
2009
|
+
- `.gitignore`, `.gitattributes`, `.editorconfig` → Repository configuration
|
|
2010
|
+
- `README.md`, `LICENSE` → Project documentation
|
|
2011
|
+
- `Taskfile.yml` → Development task runner
|
|
2012
|
+
- `.well-known/agent-card.json` → A2A capabilities manifest
|
|
2013
|
+
- `k8s/deployment.yaml` → Kubernetes deployment (only when `spec.deployment.type: kubernetes`)
|
|
2014
|
+
- `vercel.json`, `.vercel/project.json` → Vercel deployment (only when `spec.deployment.type: vercel`)
|
|
2015
|
+
- `docker-compose.yaml`, `.env.example` → Docker Compose sandbox (conditional on sandbox config)
|
|
2016
|
+
- `.flox/` → Flox reproducible environment (conditional)
|
|
2017
|
+
- `.devcontainer/` → Devcontainer configuration (conditional)
|
|
2018
|
+
- `CLAUDE.md`, `GEMINI.md`, `AGENTS.md` → AI assistant documentation (conditional on AI toggles)
|
|
2019
|
+
- `.github/ISSUE_TEMPLATE/*.md` → GitHub issue templates (conditional on SCM config)
|
|
2020
|
+
- `.github/dependabot.yml` → Dependabot configuration (conditional on SCM config)
|
|
2021
|
+
- CI workflow (`.github/workflows/ci.rust.yaml`) → Conditional on SCM CI toggle
|
|
2022
|
+
- CD workflow (`.github/workflows/cd.yaml`) → Conditional on SCM CD toggle
|
|
2023
|
+
- AI agent workflows (`.github/workflows/ai-*.yaml`) → Conditional on AI orchestrator toggles
|
|
2024
|
+
|
|
2025
|
+
**TypeScript Projects:**
|
|
2026
|
+
|
|
2027
|
+
- `src/index.ts` → TypeScript main application
|
|
2028
|
+
- `src/config.ts` → Application configuration
|
|
2029
|
+
- `src/logger.ts` → Structured logging
|
|
2030
|
+
- `src/services/{service}.ts` → Service implementation per ADL service
|
|
2031
|
+
- `src/tools/{toolname}.ts` → Individual function-call tool implementations
|
|
2032
|
+
- `src/tools/index.ts` → Tool module barrel export
|
|
2033
|
+
- `src/worker.ts` → Cloudflare Worker entrypoint (only when `spec.deployment.type: cloudflare`)
|
|
2034
|
+
- `skills/{skillid}/SKILL.md` → Markdown skill playbooks
|
|
2035
|
+
- `package.json` → Node.js package configuration
|
|
2036
|
+
- `pnpm-workspace.yaml` → pnpm workspace configuration
|
|
2037
|
+
- `tsconfig.json` → TypeScript compiler configuration
|
|
2038
|
+
- `Dockerfile` → Container image
|
|
2039
|
+
- `.dockerignore` → Docker build exclusions
|
|
2040
|
+
- `.gitignore`, `.gitattributes`, `.editorconfig` → Repository configuration
|
|
2041
|
+
- `README.md`, `LICENSE` → Project documentation
|
|
1942
2042
|
- `Taskfile.yml` → Development task runner
|
|
1943
|
-
- `.well-known/agent-card.json` → A2A capabilities manifest
|
|
1944
|
-
- `
|
|
1945
|
-
-
|
|
2043
|
+
- `.well-known/agent-card.json` → A2A capabilities manifest
|
|
2044
|
+
- `wrangler.toml` → Cloudflare Workers configuration (only when `spec.deployment.type: cloudflare`)
|
|
2045
|
+
- `k8s/deployment.yaml` → Kubernetes deployment (only when `spec.deployment.type: kubernetes`)
|
|
2046
|
+
- `vercel.json`, `.vercel/project.json` → Vercel deployment (only when `spec.deployment.type: vercel`)
|
|
2047
|
+
- `docker-compose.yaml`, `.env.example` → Docker Compose sandbox (conditional on sandbox config)
|
|
2048
|
+
- `.flox/` → Flox reproducible environment (conditional)
|
|
2049
|
+
- `.devcontainer/` → Devcontainer configuration (conditional)
|
|
2050
|
+
- `CLAUDE.md`, `GEMINI.md`, `AGENTS.md` → AI assistant documentation (conditional on AI toggles)
|
|
2051
|
+
- `.github/ISSUE_TEMPLATE/*.md` → GitHub issue templates (conditional on SCM config)
|
|
2052
|
+
- `.github/dependabot.yml` → Dependabot configuration (conditional on SCM config)
|
|
2053
|
+
- CI workflow (`.github/workflows/ci.typescript.yaml`) → Conditional on SCM CI toggle
|
|
2054
|
+
- CD workflow (`.github/workflows/cd.yaml`) → Conditional on SCM CD toggle
|
|
2055
|
+
- AI agent workflows (`.github/workflows/ai-*.yaml`) → Conditional on AI orchestrator toggles
|
|
1946
2056
|
|
|
1947
2057
|
### Template Context
|
|
1948
2058
|
|
|
@@ -1950,13 +2060,22 @@ All templates receive a rich context object:
|
|
|
1950
2060
|
|
|
1951
2061
|
```go
|
|
1952
2062
|
type Context struct {
|
|
1953
|
-
ADL
|
|
1954
|
-
Metadata
|
|
1955
|
-
Language
|
|
2063
|
+
ADL *schema.ADL // Complete ADL configuration
|
|
2064
|
+
Metadata schema.GeneratedMetadata // Generation metadata (CLI version, timestamp, template, ADL file)
|
|
2065
|
+
Language string // Detected language (go, rust, typescript)
|
|
2066
|
+
GenerateCI bool // Whether to generate CI workflows
|
|
2067
|
+
GenerateCD bool // Whether to generate CD workflows
|
|
2068
|
+
EnableAI bool // Whether AI assistant features are enabled
|
|
2069
|
+
AIToggles schema.AIAgentToggles // Per-agent AI toggles (Claude Code, Codex, Gemini, OpenCode, Infer)
|
|
2070
|
+
GenerateCommand string // The CLI command used to generate the project
|
|
2071
|
+
Skills []SkillView // Resolved skill metadata (frontmatter only)
|
|
2072
|
+
BuiltinConfigs schema.ResolvedBuiltinConfigs // Decoded config for reserved built-in tools
|
|
2073
|
+
Vendor vendor.View // Resolved user-declared extra dependencies
|
|
2074
|
+
SandboxDeps sandbox.View // Resolved sandbox-level extra packages
|
|
1956
2075
|
}
|
|
1957
2076
|
```
|
|
1958
2077
|
|
|
1959
|
-
This allows templates to access any ADL configuration and generate language-appropriate code.
|
|
2078
|
+
This allows templates to access any ADL configuration, toggle features based on SCM and AI settings, and generate language-appropriate code with the correct dependencies.
|
|
1960
2079
|
|
|
1961
2080
|
## Customizing Generation with .adl-ignore
|
|
1962
2081
|
|
|
@@ -2004,7 +2123,7 @@ Taskfile.yml
|
|
|
2004
2123
|
|
|
2005
2124
|
### Prerequisites
|
|
2006
2125
|
|
|
2007
|
-
- Go 1.26.
|
|
2126
|
+
- Go 1.26.4+
|
|
2008
2127
|
- [Task](https://taskfile.dev/) (optional, for using Taskfile commands)
|
|
2009
2128
|
|
|
2010
2129
|
### Building from Source
|
|
@@ -2069,7 +2188,7 @@ spec:
|
|
|
2069
2188
|
language:
|
|
2070
2189
|
go:
|
|
2071
2190
|
module: "github.com/company/my-agent"
|
|
2072
|
-
version: "1.26.
|
|
2191
|
+
version: "1.26.4"
|
|
2073
2192
|
acronyms: ["n8n", "xml", "mqtt", "iot", "uuid"]
|
|
2074
2193
|
```
|
|
2075
2194
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inference-gateway/adl-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"description": "Scaffold complete A2A (Agent-to-Agent) projects from YAML Agent Definition Language (ADL) manifests. Thin npm wrapper around the native adl binary.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"adl": "bin/run.js"
|