@engini/cli 0.27.0 → 0.29.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 +3 -1
- package/dist/cli.js +41 -21
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,6 +19,8 @@ npx @engini/cli --help
|
|
|
19
19
|
engini login --api-key eng_… # or bare `engini login` to paste it interactively
|
|
20
20
|
engini applications list --available # discover connector apps
|
|
21
21
|
engini tools list --application monday # discover tools
|
|
22
|
+
engini tools get monday_create_item --connection 3 # schema as connection 3 sees it
|
|
23
|
+
engini opa list --updated-after 2026-10-01T00:00:00Z # on-prem agents changed at or after
|
|
22
24
|
engini tools call monday_create_item --args '{}' --connection 3
|
|
23
25
|
engini tools call gmail_send_mail --args '{}' --file attachmentsarray=@report.pdf # attach a file
|
|
24
26
|
engini tools result <handle> --select items.email # drill into a large result
|
|
@@ -27,7 +29,7 @@ engini tools result <handle> --select items.email # drill into a large result
|
|
|
27
29
|
## Commands
|
|
28
30
|
|
|
29
31
|
```
|
|
30
|
-
engini login | logout | whoami # auth
|
|
32
|
+
engini login | logout | whoami # auth (whoami also prints an API key's workspace/environment)
|
|
31
33
|
engini tools list | get | call | result # discover, execute & drill into results
|
|
32
34
|
engini applications list | get # browse connector apps
|
|
33
35
|
engini toolsets list | get | create | update | delete # scope an agent's tools/connections/workflows
|
package/dist/cli.js
CHANGED
|
@@ -450,7 +450,7 @@ function saveConfig(config, path = configPath()) {
|
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
// src/version.ts
|
|
453
|
-
var VERSION = true ? "0.
|
|
453
|
+
var VERSION = true ? "0.29.0" : "0.0.0";
|
|
454
454
|
|
|
455
455
|
// src/http.ts
|
|
456
456
|
var USER_AGENT_PREFIX = `engini-cli/${VERSION}`;
|
|
@@ -2147,8 +2147,9 @@ USAGE
|
|
|
2147
2147
|
CORE COMMANDS
|
|
2148
2148
|
tools list [--application <slug>] [--toolset <id>] [--limit <n>]
|
|
2149
2149
|
Discover available tools (one concise summary per tool).
|
|
2150
|
-
tools get <tool_id>
|
|
2151
|
-
Full input/output schema + capability flags for one tool
|
|
2150
|
+
tools get <tool_id> [--connection <id>]
|
|
2151
|
+
Full input/output schema + capability flags for one tool
|
|
2152
|
+
(--connection: the schema as that connection sees it).
|
|
2152
2153
|
tools call <tool_id> --args <json|@file|-> [--file <field=@path>] [--connection <id>] [--raw] [--llm <vendor>] [--inline]
|
|
2153
2154
|
Execute a tool against a connection. Attach files with --file (repeat for a
|
|
2154
2155
|
list). Validate first with --dry-run. A large result spills to a local
|
|
@@ -2168,7 +2169,8 @@ ACCOUNT
|
|
|
2168
2169
|
The key must start with "eng_"; a malformed or empty one exits 2 and
|
|
2169
2170
|
stores nothing. Interactive entry needs a terminal on stdin AND stdout.
|
|
2170
2171
|
logout Clear the stored credentials.
|
|
2171
|
-
whoami Show the authenticated user/company
|
|
2172
|
+
whoami Show the authenticated user/company, and the workspace + environment an
|
|
2173
|
+
API key is scoped to (both null for a login token or an unscoped key).
|
|
2172
2174
|
|
|
2173
2175
|
CONNECTIONS
|
|
2174
2176
|
connect [<app>] [--provider <name|id|none>]
|
|
@@ -2264,7 +2266,8 @@ MCP SERVERS
|
|
|
2264
2266
|
ON-PREMISE AGENTS
|
|
2265
2267
|
The Engini component a customer installs behind their firewall to reach SQL Server,
|
|
2266
2268
|
Oracle, Priority ERP and file shares. Not connections: connections list never shows them.
|
|
2267
|
-
opa list [--status <s>] [--name <substr>]
|
|
2269
|
+
opa list [--status <s>] [--name <substr>] [--updated-after <iso>]
|
|
2270
|
+
List the account's on-premise agents.
|
|
2268
2271
|
opa get <id> Status, version, last heartbeat, settings.
|
|
2269
2272
|
opa create --name <n> [...] Register an agent. PRINTS ITS TOKEN.
|
|
2270
2273
|
opa update <id> [...] Change name/description/settings (merges).
|
|
@@ -3317,7 +3320,7 @@ function registerOpaGet(opa) {
|
|
|
3317
3320
|
// src/opa/list.ts
|
|
3318
3321
|
async function listBody7(opts) {
|
|
3319
3322
|
const agents = await apiErrors(
|
|
3320
|
-
async () => buildClient().opa.list({ status: opts.status, name: opts.name })
|
|
3323
|
+
async () => buildClient().opa.list({ status: opts.status, name: opts.name, updatedAfter: opts.updatedAfter })
|
|
3321
3324
|
);
|
|
3322
3325
|
printOutput(agents.map(summarizeAgent));
|
|
3323
3326
|
}
|
|
@@ -3325,10 +3328,10 @@ function registerOpaList(opa) {
|
|
|
3325
3328
|
const cmd = opa.command("list").description("List the account's on-premise agents.").option(
|
|
3326
3329
|
"--status <status>",
|
|
3327
3330
|
"Filter: WaitingForConnection | Online | Offline | Disabled (case-insensitive)"
|
|
3328
|
-
).option("--name <substring>", "Filter by name substring");
|
|
3331
|
+
).option("--name <substring>", "Filter by name substring").option("--updated-after <datetime>", "Only agents changed at or after this ISO 8601 datetime; include Z or an offset (no zone is read as server time)");
|
|
3329
3332
|
cmd.addHelpText(
|
|
3330
3333
|
"after",
|
|
3331
|
-
"\nExamples:\n engini opa list\n engini opa list --status offline --json"
|
|
3334
|
+
"\nExamples:\n engini opa list\n engini opa list --status offline --json\n engini opa list --updated-after 2026-10-01T00:00:00Z"
|
|
3332
3335
|
);
|
|
3333
3336
|
addUniversalOptions(cmd);
|
|
3334
3337
|
cmd.action(async (opts, command) => {
|
|
@@ -3945,21 +3948,27 @@ function detail3(schema) {
|
|
|
3945
3948
|
max_sorts: clean(schema.maxSorts)
|
|
3946
3949
|
};
|
|
3947
3950
|
}
|
|
3948
|
-
async function getBody7(toolId) {
|
|
3951
|
+
async function getBody7(toolId, connection) {
|
|
3949
3952
|
if (!toolId) {
|
|
3950
3953
|
fail(2 /* USAGE */, "Missing required argument 'tool_id'.");
|
|
3951
3954
|
}
|
|
3955
|
+
const connectionId = parseConnection(connection);
|
|
3952
3956
|
const schema = await apiErrors(async () => {
|
|
3953
3957
|
const client = buildClient();
|
|
3954
|
-
return client.tools.getOne(toolId);
|
|
3958
|
+
return client.tools.getOne(toolId, void 0, connectionId);
|
|
3955
3959
|
});
|
|
3956
3960
|
printOutput(detail3(schema));
|
|
3957
3961
|
}
|
|
3958
3962
|
function registerToolsGet(tools) {
|
|
3959
|
-
const cmd = tools.command("get").description("Show full canonical detail for one tool.").argument("[tool_id]", "Tool slug");
|
|
3963
|
+
const cmd = tools.command("get").description("Show full canonical detail for one tool.").argument("[tool_id]", "Tool slug").option("--connection <id>", "Show the schema as this connection sees it");
|
|
3960
3964
|
addUniversalOptions(cmd);
|
|
3961
3965
|
cmd.action(async (toolId, opts, command) => {
|
|
3962
|
-
await runCommand(
|
|
3966
|
+
await runCommand(
|
|
3967
|
+
command,
|
|
3968
|
+
opts,
|
|
3969
|
+
false,
|
|
3970
|
+
() => getBody7(toolId, opts.connection)
|
|
3971
|
+
);
|
|
3963
3972
|
});
|
|
3964
3973
|
}
|
|
3965
3974
|
|
|
@@ -4535,13 +4544,12 @@ function connectionRef(raw) {
|
|
|
4535
4544
|
if (raw === void 0) return {};
|
|
4536
4545
|
return /^\d+$/.test(raw) ? { connectionId: Number(raw) } : { connectionName: raw };
|
|
4537
4546
|
}
|
|
4538
|
-
async function
|
|
4547
|
+
async function accountDefaultDestination() {
|
|
4539
4548
|
try {
|
|
4540
4549
|
await buildClient().triggers.destination.get();
|
|
4541
|
-
return
|
|
4550
|
+
return "set";
|
|
4542
4551
|
} catch (err) {
|
|
4543
|
-
|
|
4544
|
-
throw err;
|
|
4552
|
+
return err instanceof EnginiNotFoundError2 ? "none" : "unknown";
|
|
4545
4553
|
}
|
|
4546
4554
|
}
|
|
4547
4555
|
async function createBody5(triggerSlug, opts) {
|
|
@@ -4590,11 +4598,15 @@ async function createBody5(triggerSlug, opts) {
|
|
|
4590
4598
|
}
|
|
4591
4599
|
});
|
|
4592
4600
|
if (opts.destination === void 0) {
|
|
4593
|
-
const
|
|
4594
|
-
if (
|
|
4601
|
+
const defaultDestination = await accountDefaultDestination();
|
|
4602
|
+
if (defaultDestination === "none") {
|
|
4595
4603
|
progress(
|
|
4596
4604
|
"No destination is set for this trigger and the account has no default \u2014 events will accrue but nothing will be delivered. Set one with `engini triggers destinations set <url>`."
|
|
4597
4605
|
);
|
|
4606
|
+
} else if (defaultDestination === "unknown") {
|
|
4607
|
+
progress(
|
|
4608
|
+
"Trigger created, but this key could not check the account's default destination \u2014 events are delivered only if one is set."
|
|
4609
|
+
);
|
|
4598
4610
|
}
|
|
4599
4611
|
}
|
|
4600
4612
|
printOutput({
|
|
@@ -5084,12 +5096,16 @@ function registerTriggers(program) {
|
|
|
5084
5096
|
|
|
5085
5097
|
// src/whoami.ts
|
|
5086
5098
|
function summary5(me) {
|
|
5099
|
+
const ws = me.workspace;
|
|
5100
|
+
const env = me.environment;
|
|
5087
5101
|
return {
|
|
5088
5102
|
full_name: clean(me.fullName),
|
|
5089
5103
|
email: clean(me.email),
|
|
5090
5104
|
current_company: clean(me.currentCompany),
|
|
5091
5105
|
role: clean(me.role),
|
|
5092
|
-
user_type: me.userType
|
|
5106
|
+
user_type: me.userType,
|
|
5107
|
+
workspace: ws ? { id: ws.id, name: clean(ws.name) } : null,
|
|
5108
|
+
environment: env ? { id: env.id, name: clean(env.name), type: clean(env.type) } : null
|
|
5093
5109
|
};
|
|
5094
5110
|
}
|
|
5095
5111
|
async function whoamiBody() {
|
|
@@ -5100,8 +5116,12 @@ async function whoamiBody() {
|
|
|
5100
5116
|
printOutput(summary5(me));
|
|
5101
5117
|
}
|
|
5102
5118
|
function registerWhoami(program) {
|
|
5103
|
-
const cmd = program.command("whoami").description("Report the authenticated user/company.");
|
|
5104
|
-
cmd.addHelpText("after",
|
|
5119
|
+
const cmd = program.command("whoami").description("Report the authenticated user/company and the key's workspace/environment.");
|
|
5120
|
+
cmd.addHelpText("after", `
|
|
5121
|
+
Examples:
|
|
5122
|
+
engini whoami
|
|
5123
|
+
engini whoami --json | jq -r '.email'
|
|
5124
|
+
engini whoami --json | jq -r '.workspace.id // "unscoped"'`);
|
|
5105
5125
|
addUniversalOptions(cmd);
|
|
5106
5126
|
cmd.action(async (opts, command) => {
|
|
5107
5127
|
await runCommand(command, opts, false, () => whoamiBody());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@engini/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.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.29.0",
|
|
30
30
|
"commander": "^12.1.0",
|
|
31
31
|
"smol-toml": "^1.3.0"
|
|
32
32
|
},
|