@inference-gateway/adl-cli 0.43.2 → 0.44.1
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 +71 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1590,6 +1590,77 @@ adl generate --file examples/cloudrun-agent.yaml --output ./cloudrun-test
|
|
|
1590
1590
|
adl generate --file examples/cloudrun-ghcr-agent.yaml --output ./ghcr-test
|
|
1591
1591
|
```
|
|
1592
1592
|
|
|
1593
|
+
## Cloudflare Workers Deployment
|
|
1594
|
+
|
|
1595
|
+
Cloudflare Workers run on the V8-isolate edge runtime and, like Vercel and
|
|
1596
|
+
unlike Kubernetes/CloudRun, deploy **from source** via `wrangler` rather than a
|
|
1597
|
+
prebuilt container image. This target is **TypeScript-only** - Workers execute
|
|
1598
|
+
JS/TS on the edge, so a Go or Rust agent does not produce Worker artifacts.
|
|
1599
|
+
|
|
1600
|
+
### Cloudflare Configuration
|
|
1601
|
+
|
|
1602
|
+
```yaml
|
|
1603
|
+
spec:
|
|
1604
|
+
language:
|
|
1605
|
+
typescript:
|
|
1606
|
+
packageName: "my-agent"
|
|
1607
|
+
nodeVersion: "24"
|
|
1608
|
+
deployment:
|
|
1609
|
+
type: cloudflare
|
|
1610
|
+
cloudflare:
|
|
1611
|
+
name: my-agent # Worker (script) name
|
|
1612
|
+
accountId: "${CLOUDFLARE_ACCOUNT_ID}" # prefer a ${VAR} placeholder
|
|
1613
|
+
compatibilityDate: "2025-01-01" # defaults when omitted
|
|
1614
|
+
compatibilityFlags:
|
|
1615
|
+
- nodejs_compat # defaults to [nodejs_compat] when omitted
|
|
1616
|
+
routes:
|
|
1617
|
+
- agent.example.com/* # custom routes/domains
|
|
1618
|
+
workersDev: false # expose on *.workers.dev (omit to keep wrangler's default)
|
|
1619
|
+
environment: # plain-text wrangler [vars]
|
|
1620
|
+
LOG_LEVEL: info
|
|
1621
|
+
```
|
|
1622
|
+
|
|
1623
|
+
### Generated Artifacts
|
|
1624
|
+
|
|
1625
|
+
- `wrangler.toml` - rendered from the block (`name`, `main`, `compatibility_date`,
|
|
1626
|
+
`compatibility_flags`, `account_id`, `workers_dev`, `routes`, `[vars]`).
|
|
1627
|
+
- `src/worker.ts` - a module-format Worker entrypoint scaffold exporting a
|
|
1628
|
+
`fetch` handler. It is added to `.adl-ignore`, so your completed handler
|
|
1629
|
+
survives subsequent `adl generate` runs.
|
|
1630
|
+
|
|
1631
|
+
`compatibilityDate` defaults to a stable value when omitted, and
|
|
1632
|
+
`compatibilityFlags` defaults to `nodejs_compat` (the scaffold relies on Node.js
|
|
1633
|
+
API compatibility).
|
|
1634
|
+
|
|
1635
|
+
### Secrets
|
|
1636
|
+
|
|
1637
|
+
Secrets are never written to `wrangler.toml`. Use `${VAR}` placeholders only in
|
|
1638
|
+
the `environment` block (plain-text `[vars]`), and set real secrets out-of-band:
|
|
1639
|
+
|
|
1640
|
+
```bash
|
|
1641
|
+
wrangler secret put LLM_API_KEY
|
|
1642
|
+
```
|
|
1643
|
+
|
|
1644
|
+
### Deploy
|
|
1645
|
+
|
|
1646
|
+
```bash
|
|
1647
|
+
# One-time setup (not installed by the scaffold)
|
|
1648
|
+
pnpm add -D wrangler @cloudflare/workers-types
|
|
1649
|
+
# then add "@cloudflare/workers-types" to compilerOptions.types in tsconfig.json
|
|
1650
|
+
|
|
1651
|
+
# Validate and generate
|
|
1652
|
+
adl validate examples/cloudflare-agent.yaml
|
|
1653
|
+
adl generate --file examples/cloudflare-agent.yaml --output ./cloudflare-test
|
|
1654
|
+
|
|
1655
|
+
# Finish wiring the A2A handler in src/worker.ts, then
|
|
1656
|
+
wrangler deploy
|
|
1657
|
+
```
|
|
1658
|
+
|
|
1659
|
+
> **Note:** Long-running/stateful work (the background task queue the Node
|
|
1660
|
+
> entrypoint runs) needs Cloudflare Queues or Durable Objects. Those resource
|
|
1661
|
+
> bindings were intentionally left out of the initial schema and may arrive in a
|
|
1662
|
+
> later minor version.
|
|
1663
|
+
|
|
1593
1664
|
## Sandbox Environments
|
|
1594
1665
|
|
|
1595
1666
|
The ADL CLI supports multiple development environments for isolated, reproducible development:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inference-gateway/adl-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.1",
|
|
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"
|