Skip to content

Commit 5bbdbda

Browse files
committed
feat(cli): add cache-first template duplicate and local validation
1 parent 3fccf05 commit 5bbdbda

13 files changed

Lines changed: 2146 additions & 11 deletions

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ agenticflow logout --profile staging # remove a single profile
7373

7474
## Commands
7575

76+
### Cold start
77+
78+
```bash
79+
# Machine-discoverable first-touch path
80+
agenticflow discover --json
81+
agenticflow playbook first-touch
82+
83+
# Prime local template cache for workflow/agent/workforce examples
84+
agenticflow templates sync --json
85+
agenticflow templates index --json
86+
```
87+
7688
### agent
7789

7890
```bash
@@ -97,7 +109,7 @@ agenticflow workflow run --workflow-id <id> [--input <json|@file>]
97109
agenticflow workflow run-status --workflow-run-id <id>
98110
agenticflow workflow list-runs --workflow-id <id> [--sort-order asc|desc]
99111
agenticflow workflow run-history --workflow-id <id>
100-
agenticflow workflow validate --body <json|@file>
112+
agenticflow workflow validate --body <json|@file> [--local-only]
101113
agenticflow workflow reference-impact --workflow-id <id>
102114
agenticflow workflow like-status --workflow-id <id>
103115
```
@@ -156,6 +168,9 @@ agenticflow call --operation-id get_all_v1_agents__get --dry-run
156168
# Preflight diagnostics
157169
agenticflow doctor
158170

171+
# Machine-readable capability discovery
172+
agenticflow discover --json
173+
159174
# OpenAPI operation discovery
160175
agenticflow ops list [--public-only] [--tag <tag>] [--json]
161176
agenticflow ops show <operation-id>
@@ -170,6 +185,22 @@ agenticflow policy init [--spend-ceiling <amount>]
170185

171186
# Built-in playbooks
172187
agenticflow playbook [topic] [--list]
188+
# First-touch onboarding for cold agents
189+
agenticflow playbook first-touch
190+
agenticflow playbook --list --json
191+
192+
# Template bootstrap cache for cold agents
193+
agenticflow templates sync [--dir .agenticflow/templates] [--limit 100] [--strict] [--json]
194+
agenticflow templates index [--dir .agenticflow/templates] [--json]
195+
196+
# Duplicate resources from templates (web-like flow)
197+
agenticflow templates duplicate workflow --template-id <workflow_template_id> --json
198+
agenticflow templates duplicate agent --template-id <agent_template_id> --json
199+
# Build payloads only (no create)
200+
agenticflow templates duplicate workflow --template-id <id> --dry-run --json
201+
# Resolve template IDs from local cache first (cold/sandbox-friendly)
202+
agenticflow templates duplicate workflow --template-id <id> --cache-dir .agenticflow/templates --json
203+
agenticflow templates duplicate agent --template-file .agenticflow/templates/agent/<file>.json --cache-dir .agenticflow/templates --dry-run --json
173204
```
174205

175206
## Global Options
@@ -180,6 +211,7 @@ agenticflow playbook [topic] [--list]
180211
| `--workspace-id <id>` | Default workspace ID |
181212
| `--project-id <id>` | Default project ID |
182213
| `--spec-file <path>` | Path to OpenAPI spec JSON |
214+
| `--no-color` | Disable ANSI color output |
183215
| `--json` | Force JSON output |
184216
| `--version` | Show version |
185217
| `--help` | Show help |
@@ -188,6 +220,10 @@ agenticflow playbook [topic] [--list]
188220

189221
Use `--json` for machine-readable output. In JSON mode, errors use a structured envelope and exit non-zero.
190222

223+
Create/update/run/stream commands perform local payload validation first. This returns `local_schema_validation_failed` immediately for malformed inputs, before any API request is sent.
224+
225+
`templates duplicate` can resolve workflow templates from a local `templates sync` cache via `--cache-dir` before attempting API fetches. This improves cold-start behavior in restricted environments.
226+
191227
```bash
192228
agenticflow agent list | jq '.[] | .name'
193229
```

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pixelml/agenticflow-cli",
3-
"version": "1.0.3",
3+
"version": "1.0.6",
44
"description": "AgenticFlow CLI for agent-native API operations.",
55
"license": "Apache-2.0",
66
"repository": {
@@ -38,4 +38,4 @@
3838
"commander": "^13.1.0",
3939
"@pixelml/agenticflow-sdk": "*"
4040
}
41-
}
41+
}

0 commit comments

Comments
 (0)