@erdoai/cli 0.62.0 → 0.63.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/dist/index.js +53 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -269,6 +269,15 @@ var ErdoClient = class {
|
|
|
269
269
|
setAutonomyMode(mode) {
|
|
270
270
|
return this.request("PUT", "/v1/autonomy-mode", { mode });
|
|
271
271
|
}
|
|
272
|
+
// Personal approval settings — which risk classes of the caller's OWN agent
|
|
273
|
+
// runs still raise a card in the active org. gates null = no personal
|
|
274
|
+
// setting (org default); [] = nothing asks; otherwise the listed classes ask.
|
|
275
|
+
getApprovalSettings() {
|
|
276
|
+
return this.request("GET", "/v1/approval-settings");
|
|
277
|
+
}
|
|
278
|
+
setApprovalSettings(gates) {
|
|
279
|
+
return this.request("PUT", "/v1/approval-settings", { gates });
|
|
280
|
+
}
|
|
272
281
|
// --- Manager accounts: operate many client (managed) orgs with ONE manager key ---
|
|
273
282
|
// The manager is your active org; you must be an admin/owner of it. A managed org
|
|
274
283
|
// is a client tenant you provision and operate. The manager key (createManagerKey)
|
|
@@ -3109,6 +3118,50 @@ ${listing}`);
|
|
|
3109
3118
|
}
|
|
3110
3119
|
}
|
|
3111
3120
|
);
|
|
3121
|
+
approvalsCmd.command("settings [mode]").description(
|
|
3122
|
+
"Show or set YOUR approval settings: which classes of your agents' actions still ask. mode: safe (auto-approve page work + bookkeeping; spend and destructive still ask) | all (approve everything) | reset (back to the org default)"
|
|
3123
|
+
).option(
|
|
3124
|
+
"--gates <classes>",
|
|
3125
|
+
"explicit comma-separated gate list, e.g. spend,destructive (overrides <mode>)"
|
|
3126
|
+
).action(async (mode, opts = {}) => {
|
|
3127
|
+
try {
|
|
3128
|
+
const client = new ErdoClient();
|
|
3129
|
+
let gates;
|
|
3130
|
+
if (opts.gates !== void 0) {
|
|
3131
|
+
gates = opts.gates.split(",").map((g) => g.trim()).filter(Boolean);
|
|
3132
|
+
} else {
|
|
3133
|
+
switch (mode) {
|
|
3134
|
+
case void 0:
|
|
3135
|
+
break;
|
|
3136
|
+
// show
|
|
3137
|
+
case "safe":
|
|
3138
|
+
gates = ["spend", "destructive"];
|
|
3139
|
+
break;
|
|
3140
|
+
case "all":
|
|
3141
|
+
gates = [];
|
|
3142
|
+
break;
|
|
3143
|
+
case "reset":
|
|
3144
|
+
gates = null;
|
|
3145
|
+
break;
|
|
3146
|
+
default:
|
|
3147
|
+
throw new Error(`unknown mode ${mode} \u2014 use safe | all | reset, or --gates spend,destructive`);
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
if (gates !== void 0) {
|
|
3151
|
+
await client.setApprovalSettings(gates);
|
|
3152
|
+
}
|
|
3153
|
+
const { gates: current } = await client.getApprovalSettings();
|
|
3154
|
+
if (current === null) {
|
|
3155
|
+
console.log("Approval settings: org default (every gated action asks, subject to the org's own gates and standing policies)");
|
|
3156
|
+
} else if (current.length === 0) {
|
|
3157
|
+
console.log("Approval settings: approve everything \u2014 no class of your agents' actions asks (a standing always-require policy still applies)");
|
|
3158
|
+
} else {
|
|
3159
|
+
console.log(`Approval settings: ${current.join(", ")} still ask; the rest of your agents' actions auto-approve`);
|
|
3160
|
+
}
|
|
3161
|
+
} catch (e) {
|
|
3162
|
+
fail(e);
|
|
3163
|
+
}
|
|
3164
|
+
});
|
|
3112
3165
|
var attnCmd = program.command("attention").description("The attention feed \u2014 digests, choices, escalations awaiting a human");
|
|
3113
3166
|
attnCmd.command("list").description("List attention items").option("--status <status...>", "open | answered | dismissed | expired").option("--open", "shorthand for --status open").option("--engine-actions", "only engine-generated items").option("--item <idOrSlug>", "read one item: its slug or its uuid").option("-n, --limit <n>", "max items", (v) => parseInt(v, 10)).option("--offset <n>", "pagination offset", (v) => parseInt(v, 10)).action(
|
|
3114
3167
|
async (opts) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erdoai/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Erdo CLI
|
|
3
|
+
"version": "0.63.0",
|
|
4
|
+
"description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"erdo": "dist/index.js"
|
|
@@ -52,4 +52,4 @@
|
|
|
52
52
|
"overrides": {
|
|
53
53
|
"esbuild": "^0.28.1"
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
}
|