@seclai/cli 1.2.2 → 1.3.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 +11 -2
- package/dist/cli.js +9 -0
- package/dist/cli.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ npx add-mcp https://api.seclai.com/mcp --header "X-API-Key: $SECLAI_API_KEY" --n
|
|
|
42
42
|
|
|
43
43
|
## Documentation
|
|
44
44
|
|
|
45
|
-
Command reference (latest): https://seclai.github.io/seclai-cli/1.
|
|
45
|
+
Command reference (latest): https://seclai.github.io/seclai-cli/1.3.0/
|
|
46
46
|
|
|
47
47
|
## Authentication
|
|
48
48
|
|
|
@@ -171,11 +171,20 @@ seclai agents def get <agentId>
|
|
|
171
171
|
seclai agents def update <agentId> --json '{"steps":[...]}'
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
#### Agent Export
|
|
174
|
+
#### Agent Export / Import
|
|
175
175
|
|
|
176
176
|
```bash
|
|
177
177
|
seclai agents export <agentId>
|
|
178
178
|
seclai agents export <agentId> --no-download
|
|
179
|
+
|
|
180
|
+
# Validate an agent_definition payload without creating an agent.
|
|
181
|
+
# Reports counts and any unresolved_refs you'll need to map with entity_remap
|
|
182
|
+
# when calling `agents create` or `agents update`.
|
|
183
|
+
# The body shape is `{ "agent_definition": <export payload> }`.
|
|
184
|
+
seclai agents preview-import --json-file ./preview-body.json
|
|
185
|
+
seclai agents export <agentId> \
|
|
186
|
+
| jq '{agent_definition: .}' \
|
|
187
|
+
| seclai agents preview-import --json-file -
|
|
179
188
|
```
|
|
180
189
|
|
|
181
190
|
#### Agent Input Upload
|
package/dist/cli.js
CHANGED
|
@@ -311,6 +311,15 @@ function register(program, rt) {
|
|
|
311
311
|
printJson(rt, await client.exportAgent(agentId, opts.download));
|
|
312
312
|
});
|
|
313
313
|
});
|
|
314
|
+
agents.command("preview-import").description(
|
|
315
|
+
"Validate an agent_definition payload without creating any agent. Reports step/schedule/alert/criteria/policy counts and any unresolved_refs (workflow refs to KBs, memory banks, source connections, or sub-agents that don't exist in this account)."
|
|
316
|
+
).option("--json <json>", "Inline JSON body ({ agent_definition: ... }). Use '-' for stdin.").option("--json-file <path>", "JSON file path. Use '-' for stdin.").action(async (opts) => {
|
|
317
|
+
await run(rt, async () => {
|
|
318
|
+
const client = createClient(program.opts());
|
|
319
|
+
const body = await readJsonInput(rt, { json: opts.json, jsonFile: opts.jsonFile });
|
|
320
|
+
printJson(rt, await client.previewImportAgent(body));
|
|
321
|
+
});
|
|
322
|
+
});
|
|
314
323
|
agents.command("upload-input").description("Upload a file as agent input.").argument("<agentId>", "Agent ID.").requiredOption("--file <path>", "File to upload.").option("--file-name <name>", "Override filename.").option("--mime-type <type>", "MIME type.").action(async (agentId, opts) => {
|
|
315
324
|
await run(rt, async () => {
|
|
316
325
|
const client = createClient(program.opts());
|