@seclai/cli 1.2.0 → 1.2.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 +8 -1
- package/dist/cli.js +10 -4
- 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.2.
|
|
45
|
+
Command reference (latest): https://seclai.github.io/seclai-cli/1.2.1/
|
|
46
46
|
|
|
47
47
|
## Authentication
|
|
48
48
|
|
|
@@ -171,6 +171,13 @@ seclai agents def get <agentId>
|
|
|
171
171
|
seclai agents def update <agentId> --json '{"steps":[...]}'
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
+
#### Agent Export
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
seclai agents export <agentId>
|
|
178
|
+
seclai agents export <agentId> --no-download
|
|
179
|
+
```
|
|
180
|
+
|
|
174
181
|
#### Agent Input Upload
|
|
175
182
|
|
|
176
183
|
```bash
|
package/dist/cli.js
CHANGED
|
@@ -169,7 +169,7 @@ async function readAiInput(rt, opts) {
|
|
|
169
169
|
|
|
170
170
|
// src/commands/agents.ts
|
|
171
171
|
function register(program, rt) {
|
|
172
|
-
const agents = program.command("agents").description("Manage agents, runs, definitions, and AI assistance.");
|
|
172
|
+
const agents = program.command("agents").description("Manage agents, runs, definitions, export, and AI assistance.");
|
|
173
173
|
agents.command("list").description("List agents.").option("--page <n>", "Page number.", (v) => Number(v)).option("--limit <n>", "Page size.", (v) => Number(v)).action(async (opts) => {
|
|
174
174
|
await run(rt, async () => {
|
|
175
175
|
const client = createClient(program.opts());
|
|
@@ -302,6 +302,12 @@ function register(program, rt) {
|
|
|
302
302
|
printJson(rt, await client.updateAgentDefinition(agentId, body));
|
|
303
303
|
});
|
|
304
304
|
});
|
|
305
|
+
agents.command("export").description("Export an agent definition as a portable JSON snapshot.").argument("<agentId>", "Agent ID.").option("--no-download", "Omit Content-Disposition header (inline response).").action(async (agentId, opts) => {
|
|
306
|
+
await run(rt, async () => {
|
|
307
|
+
const client = createClient(program.opts());
|
|
308
|
+
printJson(rt, await client.exportAgent(agentId, opts.download));
|
|
309
|
+
});
|
|
310
|
+
});
|
|
305
311
|
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) => {
|
|
306
312
|
await run(rt, async () => {
|
|
307
313
|
const client = createClient(program.opts());
|
|
@@ -1948,7 +1954,7 @@ _seclai_completions() {
|
|
|
1948
1954
|
runs) COMPREPLY=( $(compgen -W "list get delete cancel search eval-results" -- "$cur") ); return ;;
|
|
1949
1955
|
def) COMPREPLY=( $(compgen -W "get update" -- "$cur") ); return ;;
|
|
1950
1956
|
ai) COMPREPLY=( $(compgen -W "gen-steps step-config history mark" -- "$cur") ); return ;;
|
|
1951
|
-
*) COMPREPLY=( $(compgen -W "list create get update delete run runs def upload-input input-status ai" -- "$cur") ); return ;;
|
|
1957
|
+
*) COMPREPLY=( $(compgen -W "list create get update delete run runs def export upload-input input-status ai" -- "$cur") ); return ;;
|
|
1952
1958
|
esac ;;
|
|
1953
1959
|
sources|source)
|
|
1954
1960
|
case "\${COMP_WORDS[2]}" in
|
|
@@ -2040,7 +2046,7 @@ _seclai() {
|
|
|
2040
2046
|
args)
|
|
2041
2047
|
case \${words[1]} in
|
|
2042
2048
|
agents)
|
|
2043
|
-
local -a sub=(list create get update delete run runs def upload-input input-status ai)
|
|
2049
|
+
local -a sub=(list create get update delete run runs def export upload-input input-status ai)
|
|
2044
2050
|
_describe 'subcommand' sub ;;
|
|
2045
2051
|
sources|source)
|
|
2046
2052
|
local -a sub=(list create get update delete upload upload-text exports migration)
|
|
@@ -2110,7 +2116,7 @@ complete -c seclai -n "not __fish_seen_subcommand_from $top" -f -a "mcp" -d "MCP
|
|
|
2110
2116
|
complete -c seclai -n "not __fish_seen_subcommand_from $top" -f -a "completion" -d "Shell completions"
|
|
2111
2117
|
|
|
2112
2118
|
# agents
|
|
2113
|
-
complete -c seclai -n "__fish_seen_subcommand_from agents; and not __fish_seen_subcommand_from list create get update delete run runs def upload-input input-status ai" -f -a "list create get update delete run runs def upload-input input-status ai"
|
|
2119
|
+
complete -c seclai -n "__fish_seen_subcommand_from agents; and not __fish_seen_subcommand_from list create get update delete run runs def export upload-input input-status ai" -f -a "list create get update delete run runs def export upload-input input-status ai"
|
|
2114
2120
|
|
|
2115
2121
|
# sources
|
|
2116
2122
|
complete -c seclai -n "__fish_seen_subcommand_from sources; and not __fish_seen_subcommand_from list create get update delete upload upload-text exports migration" -f -a "list create get update delete upload upload-text exports migration"
|