@engini/cli 0.32.0 → 0.34.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 +9 -0
- package/dist/cli.js +24 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -58,6 +58,9 @@ drains every page of a step's recorded payloads unless `--top` is given (`--offs
|
|
|
58
58
|
at 300 characters; the full connector error body is in `executions data <id> <step> --type response`).
|
|
59
59
|
On a terminal the log prints as a table with each failed step's error under it; piped or with
|
|
60
60
|
`--json` it stays the plain snake_case array.
|
|
61
|
+
`executions data --type status` entries carry `duration` (active seconds of that one iteration or
|
|
62
|
+
retry attempt, set once its status is final; absent on request/response/input entries and while it
|
|
63
|
+
is still running). The step-level `duration` in `executions log` is the cumulative sum.
|
|
61
64
|
Note the difference from `triggers list`: that prints a bare JSON array, while `executions list`
|
|
62
65
|
prints one page as an object (use `--all` to drain, still as the object).
|
|
63
66
|
|
|
@@ -78,11 +81,17 @@ table on stderr (a JSON object when piped) and exits 3 (401/403, e.g. `API_KEY_R
|
|
|
78
81
|
```bash
|
|
79
82
|
engini workflows folders --name sales # folder ids (names are unique per workspace + environment)
|
|
80
83
|
engini workflows list --name "lead alert" --folder Sales
|
|
84
|
+
engini workflows schema monday.create_item --connection 42 --selected BOARD_ID=123 # pick a board, re-read its fields
|
|
81
85
|
engini workflows compile --file plan.json # dry run: hasErrors + diagnostics
|
|
82
86
|
engini workflows create --file plan.json --folder-id 7
|
|
83
87
|
engini workflows plan 1234 > plan.json && engini workflows update 1234 --file plan.json --expected-revision-id 3
|
|
84
88
|
```
|
|
85
89
|
|
|
90
|
+
`schema` lists `objectPickers` (`{field, side}`: a board, a Salesforce object, …). Pick a value
|
|
91
|
+
per field with `--selected FIELD=value` (repeatable, needs `--connection`) and read again: the
|
|
92
|
+
picked object's fields come back as input properties named by field id. A pick that cannot be
|
|
93
|
+
resolved still answers 200 and is listed in `unresolvedPicks` (`not_found` | `read_failed`).
|
|
94
|
+
|
|
86
95
|
The `mcp` group maintains the MCP endpoints Engini **exposes** (not the
|
|
87
96
|
`MCPClient` connection kind, which is Engini *consuming* someone else's server).
|
|
88
97
|
Servers are account-wide and are created/deleted in the engini.io UI, so the group
|
package/dist/cli.js
CHANGED
|
@@ -465,7 +465,7 @@ function saveConfig(config, path = configPath()) {
|
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
// src/version.ts
|
|
468
|
-
var VERSION = true ? "0.
|
|
468
|
+
var VERSION = true ? "0.34.0" : "0.0.0";
|
|
469
469
|
|
|
470
470
|
// src/http.ts
|
|
471
471
|
var USER_AGENT_PREFIX = `engini-cli/${VERSION}`;
|
|
@@ -5336,7 +5336,10 @@ function registerExecutions(program) {
|
|
|
5336
5336
|
await runCommand(command, opts, false, () => logBody(id));
|
|
5337
5337
|
});
|
|
5338
5338
|
const data = executions.command("data").description("Recorded request / response / input / status payloads of one step.").argument("[execution_id]", "Execution id").argument("[step_no]", "Step number from `executions log`").option("--type <kind>", "request | response | input | status").option("--loop-path <step:iteration>", "Loop position, repeat per nesting level, outermost first", collect4).option("--run-number <n>", "Only this run of the step").option("--retry-no <n>", "Only this retry attempt").option("--status <status>", "Only payloads recorded at this step status").option("--top <n>", "One page of at most n entries (server cap 10); default drains every page").option("--offset <n>", "With --top: skip n entries");
|
|
5339
|
-
data.addHelpText(
|
|
5339
|
+
data.addHelpText(
|
|
5340
|
+
"after",
|
|
5341
|
+
"\nExamples:\n engini executions data 4567 3 --type response --json\n engini executions data 4567 3 --type status --json\nduration: status entries only - active seconds of that iteration or retry attempt, set once its\n status is final (absent on request/response/input entries and while running). The step-level\n duration in `executions log` is the cumulative sum over iterations, attempts and runs."
|
|
5342
|
+
);
|
|
5340
5343
|
addUniversalOptions(data);
|
|
5341
5344
|
data.action(
|
|
5342
5345
|
async (id, step2, opts, command) => {
|
|
@@ -5364,21 +5367,26 @@ async function searchBody(query, opts) {
|
|
|
5364
5367
|
}
|
|
5365
5368
|
async function schemaBody(slug, opts) {
|
|
5366
5369
|
if (!slug) fail(2 /* USAGE */, "A catalog slug is required.");
|
|
5370
|
+
const selected = parsePairs(opts.selected, "--selected");
|
|
5371
|
+
if (selected !== void 0 && opts.connection === void 0) {
|
|
5372
|
+
fail(2 /* USAGE */, "--selected needs --connection: a pick is read through a connection.");
|
|
5373
|
+
}
|
|
5367
5374
|
const schema = await apiErrors(
|
|
5368
5375
|
async () => buildClient().workflows.getSchema(slug, {
|
|
5369
5376
|
connectionId: parseOptId(opts.connection, "--connection"),
|
|
5370
5377
|
kind: opts.kind,
|
|
5371
|
-
table: opts.table
|
|
5378
|
+
table: opts.table,
|
|
5379
|
+
selected
|
|
5372
5380
|
})
|
|
5373
5381
|
);
|
|
5374
5382
|
printOutput(schema);
|
|
5375
5383
|
}
|
|
5376
|
-
function
|
|
5384
|
+
function parsePairs(pairs, flag) {
|
|
5377
5385
|
if (pairs === void 0) return void 0;
|
|
5378
5386
|
const out = {};
|
|
5379
5387
|
for (const pair of pairs) {
|
|
5380
5388
|
const eq = pair.indexOf("=");
|
|
5381
|
-
if (eq <= 0) fail(2 /* USAGE */,
|
|
5389
|
+
if (eq <= 0) fail(2 /* USAGE */, `${flag} must be field=value, got '${pair}'.`);
|
|
5382
5390
|
out[pair.slice(0, eq)] = pair.slice(eq + 1);
|
|
5383
5391
|
}
|
|
5384
5392
|
return out;
|
|
@@ -5390,7 +5398,7 @@ async function optionsBody(slug, opts) {
|
|
|
5390
5398
|
field: opts.field,
|
|
5391
5399
|
connectionId: parseOptId(opts.connection, "--connection"),
|
|
5392
5400
|
kind: opts.kind,
|
|
5393
|
-
dependsOn:
|
|
5401
|
+
dependsOn: parsePairs(opts.dependsOn, "--depends-on")
|
|
5394
5402
|
})
|
|
5395
5403
|
);
|
|
5396
5404
|
printOutput(items);
|
|
@@ -5488,11 +5496,17 @@ function registerWorkflows(program) {
|
|
|
5488
5496
|
search.action(async (q, opts, command) => {
|
|
5489
5497
|
await runCommand(command, opts, false, () => searchBody(q, opts));
|
|
5490
5498
|
});
|
|
5491
|
-
const schema = workflows.command("schema").description("Input/output schema of one catalog entry (the slug from `search`).").argument("[slug]", "Catalog slug, e.g. slack.post_message").option("--connection <id>", "Resolve dynamic fields against this connection").option("--kind <kind>", "action | trigger | block").option("--table <id>", "Table the entry is used on");
|
|
5499
|
+
const schema = workflows.command("schema").description("Input/output schema of one catalog entry (the slug from `search`).").argument("[slug]", "Catalog slug, e.g. slack.post_message").option("--connection <id>", "Resolve dynamic fields against this connection").option("--kind <kind>", "action | trigger | block").option("--table <id>", "Table the entry is used on").option("--selected <FIELD=value>", "Pick an object for a picker field; repeatable. Needs --connection", collect4);
|
|
5500
|
+
schema.addHelpText(
|
|
5501
|
+
"after",
|
|
5502
|
+
"\nObject pickers (a Monday board, a Salesforce object, \u2026): the first read lists them in\n`objectPickers` ({field, side: request|response|both}). Pick a value for each with\n--selected FIELD=value and read again: the picked object's fields come back as input\nproperties named by field id, with their enums. A pick that cannot be resolved is listed\nin `unresolvedPicks` ({field, value, reason: not_found|read_failed}); the answer is still\n200. A {{ref}} value picks nothing.\n\nExamples:\n engini workflows schema monday.create_item --connection 42\n engini workflows schema monday.create_item --connection 42 --selected BOARD_ID=123"
|
|
5503
|
+
);
|
|
5492
5504
|
addUniversalOptions(schema);
|
|
5493
|
-
schema.action(
|
|
5494
|
-
|
|
5495
|
-
|
|
5505
|
+
schema.action(
|
|
5506
|
+
async (slug, opts, command) => {
|
|
5507
|
+
await runCommand(command, opts, false, () => schemaBody(slug, opts));
|
|
5508
|
+
}
|
|
5509
|
+
);
|
|
5496
5510
|
const options = workflows.command("options").description("Dropdown values ({id, label}) for one field of a catalog entry.").argument("[slug]", "Catalog slug").option("--field <name>", "The field to list values for").option("--connection <id>", "Connection to read the values through").option("--kind <kind>", "action | trigger | block").option("--depends-on <field=value>", "Value of a parent field; repeatable", collect4);
|
|
5497
5511
|
options.addHelpText(
|
|
5498
5512
|
"after",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@engini/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Engini CLI — machine-first command line over the Engini Public API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "vitest run"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@engini/sdk": "^0.
|
|
29
|
+
"@engini/sdk": "^0.34.0",
|
|
30
30
|
"commander": "^12.1.0",
|
|
31
31
|
"smol-toml": "^1.3.0"
|
|
32
32
|
},
|