@engini/cli 0.27.0 → 0.28.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.
Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/dist/cli.js +28 -17
  3. 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
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.27.0" : "0.0.0";
453
+ var VERSION = true ? "0.28.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
@@ -2264,7 +2265,8 @@ MCP SERVERS
2264
2265
  ON-PREMISE AGENTS
2265
2266
  The Engini component a customer installs behind their firewall to reach SQL Server,
2266
2267
  Oracle, Priority ERP and file shares. Not connections: connections list never shows them.
2267
- opa list [--status <s>] [--name <substr>] List the account's on-premise agents.
2268
+ opa list [--status <s>] [--name <substr>] [--updated-after <iso>]
2269
+ List the account's on-premise agents.
2268
2270
  opa get <id> Status, version, last heartbeat, settings.
2269
2271
  opa create --name <n> [...] Register an agent. PRINTS ITS TOKEN.
2270
2272
  opa update <id> [...] Change name/description/settings (merges).
@@ -3317,7 +3319,7 @@ function registerOpaGet(opa) {
3317
3319
  // src/opa/list.ts
3318
3320
  async function listBody7(opts) {
3319
3321
  const agents = await apiErrors(
3320
- async () => buildClient().opa.list({ status: opts.status, name: opts.name })
3322
+ async () => buildClient().opa.list({ status: opts.status, name: opts.name, updatedAfter: opts.updatedAfter })
3321
3323
  );
3322
3324
  printOutput(agents.map(summarizeAgent));
3323
3325
  }
@@ -3325,10 +3327,10 @@ function registerOpaList(opa) {
3325
3327
  const cmd = opa.command("list").description("List the account's on-premise agents.").option(
3326
3328
  "--status <status>",
3327
3329
  "Filter: WaitingForConnection | Online | Offline | Disabled (case-insensitive)"
3328
- ).option("--name <substring>", "Filter by name substring");
3330
+ ).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
3331
  cmd.addHelpText(
3330
3332
  "after",
3331
- "\nExamples:\n engini opa list\n engini opa list --status offline --json"
3333
+ "\nExamples:\n engini opa list\n engini opa list --status offline --json\n engini opa list --updated-after 2026-10-01T00:00:00Z"
3332
3334
  );
3333
3335
  addUniversalOptions(cmd);
3334
3336
  cmd.action(async (opts, command) => {
@@ -3945,21 +3947,27 @@ function detail3(schema) {
3945
3947
  max_sorts: clean(schema.maxSorts)
3946
3948
  };
3947
3949
  }
3948
- async function getBody7(toolId) {
3950
+ async function getBody7(toolId, connection) {
3949
3951
  if (!toolId) {
3950
3952
  fail(2 /* USAGE */, "Missing required argument 'tool_id'.");
3951
3953
  }
3954
+ const connectionId = parseConnection(connection);
3952
3955
  const schema = await apiErrors(async () => {
3953
3956
  const client = buildClient();
3954
- return client.tools.getOne(toolId);
3957
+ return client.tools.getOne(toolId, void 0, connectionId);
3955
3958
  });
3956
3959
  printOutput(detail3(schema));
3957
3960
  }
3958
3961
  function registerToolsGet(tools) {
3959
- const cmd = tools.command("get").description("Show full canonical detail for one tool.").argument("[tool_id]", "Tool slug");
3962
+ 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
3963
  addUniversalOptions(cmd);
3961
3964
  cmd.action(async (toolId, opts, command) => {
3962
- await runCommand(command, opts, false, () => getBody7(toolId));
3965
+ await runCommand(
3966
+ command,
3967
+ opts,
3968
+ false,
3969
+ () => getBody7(toolId, opts.connection)
3970
+ );
3963
3971
  });
3964
3972
  }
3965
3973
 
@@ -4535,13 +4543,12 @@ function connectionRef(raw) {
4535
4543
  if (raw === void 0) return {};
4536
4544
  return /^\d+$/.test(raw) ? { connectionId: Number(raw) } : { connectionName: raw };
4537
4545
  }
4538
- async function hasAccountDefaultDestination() {
4546
+ async function accountDefaultDestination() {
4539
4547
  try {
4540
4548
  await buildClient().triggers.destination.get();
4541
- return true;
4549
+ return "set";
4542
4550
  } catch (err) {
4543
- if (err instanceof EnginiNotFoundError2) return false;
4544
- throw err;
4551
+ return err instanceof EnginiNotFoundError2 ? "none" : "unknown";
4545
4552
  }
4546
4553
  }
4547
4554
  async function createBody5(triggerSlug, opts) {
@@ -4590,11 +4597,15 @@ async function createBody5(triggerSlug, opts) {
4590
4597
  }
4591
4598
  });
4592
4599
  if (opts.destination === void 0) {
4593
- const hasDefault = await apiErrors(hasAccountDefaultDestination);
4594
- if (!hasDefault) {
4600
+ const defaultDestination = await accountDefaultDestination();
4601
+ if (defaultDestination === "none") {
4595
4602
  progress(
4596
4603
  "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
4604
  );
4605
+ } else if (defaultDestination === "unknown") {
4606
+ progress(
4607
+ "Trigger created, but this key could not check the account's default destination \u2014 events are delivered only if one is set."
4608
+ );
4598
4609
  }
4599
4610
  }
4600
4611
  printOutput({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engini/cli",
3
- "version": "0.27.0",
3
+ "version": "0.28.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.27.0",
29
+ "@engini/sdk": "^0.28.0",
30
30
  "commander": "^12.1.0",
31
31
  "smol-toml": "^1.3.0"
32
32
  },