@duvoai/cli 0.4.0 → 0.4.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 +1 -1
- package/dist/bin/duvo.js +45 -6
- package/dist/bin/duvo.js.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ duvo --profile team-2 whoami # one-off override for a single command
|
|
|
50
50
|
| ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
|
|
51
51
|
| `duvo login` | Store an API key under a named profile |
|
|
52
52
|
| `duvo logout` | Remove a profile |
|
|
53
|
-
| `duvo whoami` | Show the active profile, API key owner, and
|
|
53
|
+
| `duvo whoami` | Show the active profile, API key owner, and auth type |
|
|
54
54
|
| `duvo profiles <subcmd>` | `list`, `use`, `rename`, `remove` |
|
|
55
55
|
| `duvo agents list` | List agents on your team |
|
|
56
56
|
| `duvo agents get <id>` | Show details for one agent |
|
package/dist/bin/duvo.js
CHANGED
|
@@ -14549,6 +14549,45 @@ function registerSkillsList(skills) {
|
|
|
14549
14549
|
}
|
|
14550
14550
|
__name(registerSkillsList, "registerSkillsList");
|
|
14551
14551
|
|
|
14552
|
+
// src/commands/skills/system.ts
|
|
14553
|
+
var SYSTEM_COLUMNS2 = [
|
|
14554
|
+
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
14555
|
+
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
14556
|
+
{
|
|
14557
|
+
header: "DESCRIPTION",
|
|
14558
|
+
cell: /* @__PURE__ */ __name((row) => row.description, "cell"),
|
|
14559
|
+
maxWidth: 60
|
|
14560
|
+
}
|
|
14561
|
+
];
|
|
14562
|
+
function registerSkillsSystem(skills) {
|
|
14563
|
+
skills.command("system").description("List global system skills available to all teams").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function systemAction(options) {
|
|
14564
|
+
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
14565
|
+
const raw = await httpRequest({
|
|
14566
|
+
method: "GET",
|
|
14567
|
+
path: "/v1/skills/system",
|
|
14568
|
+
apiKey,
|
|
14569
|
+
apiBaseUrl
|
|
14570
|
+
});
|
|
14571
|
+
if (options.json) {
|
|
14572
|
+
printJson(raw);
|
|
14573
|
+
return;
|
|
14574
|
+
}
|
|
14575
|
+
const parsed = listSystemSkillsResponseSchema.safeParse(raw);
|
|
14576
|
+
if (!parsed.success) {
|
|
14577
|
+
throw new CliError(
|
|
14578
|
+
`Unexpected response from the API: ${parsed.error.message}`
|
|
14579
|
+
);
|
|
14580
|
+
}
|
|
14581
|
+
if (parsed.data.skills.length === 0) {
|
|
14582
|
+
console.log("No system skills found.");
|
|
14583
|
+
return;
|
|
14584
|
+
}
|
|
14585
|
+
console.log(renderTable(SYSTEM_COLUMNS2, parsed.data.skills));
|
|
14586
|
+
console.log(`Showing ${parsed.data.skills.length}`);
|
|
14587
|
+
}, "systemAction"));
|
|
14588
|
+
}
|
|
14589
|
+
__name(registerSkillsSystem, "registerSkillsSystem");
|
|
14590
|
+
|
|
14552
14591
|
// src/commands/skills/upload.ts
|
|
14553
14592
|
import { readFile as readFile6, stat as stat2 } from "node:fs/promises";
|
|
14554
14593
|
import { basename as basename2 } from "node:path";
|
|
@@ -14614,6 +14653,7 @@ __name(registerSkillsUpload, "registerSkillsUpload");
|
|
|
14614
14653
|
function registerSkills(program) {
|
|
14615
14654
|
const skills = program.command("skills").description("Manage skills (custom and system)");
|
|
14616
14655
|
registerSkillsList(skills);
|
|
14656
|
+
registerSkillsSystem(skills);
|
|
14617
14657
|
registerSkillsCreate(skills);
|
|
14618
14658
|
registerSkillsUpload(skills);
|
|
14619
14659
|
registerSkillsDelete(skills);
|
|
@@ -14776,21 +14816,20 @@ __name(registerTeam, "registerTeam");
|
|
|
14776
14816
|
// src/commands/whoami.ts
|
|
14777
14817
|
function registerWhoami(program) {
|
|
14778
14818
|
program.command("whoami").description(
|
|
14779
|
-
"Print the active profile, the API key owner's name and email,
|
|
14819
|
+
"Print the active profile, the API key owner's name and email, and the auth type"
|
|
14780
14820
|
).action(/* @__PURE__ */ __name(async function whoamiAction() {
|
|
14781
14821
|
const resolved = await requireAuthenticatedConfig(this);
|
|
14782
14822
|
const profileLabel = resolved.profileName ?? "(env-only, no stored profile)";
|
|
14783
|
-
console.log(`Profile
|
|
14823
|
+
console.log(`Profile ${profileLabel}`);
|
|
14784
14824
|
const userLine = await fetchUserLine({
|
|
14785
14825
|
apiKey: resolved.apiKey,
|
|
14786
14826
|
apiBaseUrl: resolved.apiBaseUrl
|
|
14787
14827
|
});
|
|
14788
14828
|
if (userLine !== null) {
|
|
14789
|
-
console.log(`User
|
|
14829
|
+
console.log(`User ${userLine}`);
|
|
14790
14830
|
}
|
|
14791
|
-
const
|
|
14792
|
-
console.log(
|
|
14793
|
-
console.log(`Base URL ${resolved.apiBaseUrl}`);
|
|
14831
|
+
const authTypeLabel = resolved.authType === "oauth" ? "OAuth" : "API key";
|
|
14832
|
+
console.log(`Auth type ${authTypeLabel}`);
|
|
14794
14833
|
}, "whoamiAction"));
|
|
14795
14834
|
}
|
|
14796
14835
|
__name(registerWhoami, "registerWhoami");
|