@engini/cli 0.28.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 +1 -1
- package/dist/cli.js +14 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ engini tools result <handle> --select items.email # drill into a large result
|
|
|
29
29
|
## Commands
|
|
30
30
|
|
|
31
31
|
```
|
|
32
|
-
engini login | logout | whoami # auth
|
|
32
|
+
engini login | logout | whoami # auth (whoami also prints an API key's workspace/environment)
|
|
33
33
|
engini tools list | get | call | result # discover, execute & drill into results
|
|
34
34
|
engini applications list | get # browse connector apps
|
|
35
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}`;
|
|
@@ -2169,7 +2169,8 @@ ACCOUNT
|
|
|
2169
2169
|
The key must start with "eng_"; a malformed or empty one exits 2 and
|
|
2170
2170
|
stores nothing. Interactive entry needs a terminal on stdin AND stdout.
|
|
2171
2171
|
logout Clear the stored credentials.
|
|
2172
|
-
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).
|
|
2173
2174
|
|
|
2174
2175
|
CONNECTIONS
|
|
2175
2176
|
connect [<app>] [--provider <name|id|none>]
|
|
@@ -5095,12 +5096,16 @@ function registerTriggers(program) {
|
|
|
5095
5096
|
|
|
5096
5097
|
// src/whoami.ts
|
|
5097
5098
|
function summary5(me) {
|
|
5099
|
+
const ws = me.workspace;
|
|
5100
|
+
const env = me.environment;
|
|
5098
5101
|
return {
|
|
5099
5102
|
full_name: clean(me.fullName),
|
|
5100
5103
|
email: clean(me.email),
|
|
5101
5104
|
current_company: clean(me.currentCompany),
|
|
5102
5105
|
role: clean(me.role),
|
|
5103
|
-
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
|
|
5104
5109
|
};
|
|
5105
5110
|
}
|
|
5106
5111
|
async function whoamiBody() {
|
|
@@ -5111,8 +5116,12 @@ async function whoamiBody() {
|
|
|
5111
5116
|
printOutput(summary5(me));
|
|
5112
5117
|
}
|
|
5113
5118
|
function registerWhoami(program) {
|
|
5114
|
-
const cmd = program.command("whoami").description("Report the authenticated user/company.");
|
|
5115
|
-
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"'`);
|
|
5116
5125
|
addUniversalOptions(cmd);
|
|
5117
5126
|
cmd.action(async (opts, command) => {
|
|
5118
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
|
},
|