@isaacthoman/pulpo 0.46.0 → 0.47.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 +4 -0
- package/dist/index.js +10 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,3 +39,7 @@ Management token scopes are `account:read`, `account:write`, `instance:read`,
|
|
|
39
39
|
Administrator scopes continue to require the token owner's current administrator
|
|
40
40
|
role. Tokens are shown only once when created and only work below
|
|
41
41
|
`/api/management/v1`.
|
|
42
|
+
|
|
43
|
+
Deleting a model permanently reassigns its historical chats and usage to the
|
|
44
|
+
hidden `unknown model` placeholder while retaining recorded token and cost
|
|
45
|
+
totals. Active or queued model work must finish before deletion can proceed.
|
package/dist/index.js
CHANGED
|
@@ -15590,7 +15590,7 @@ async function confirmExact(io, expected, yes, json2) {
|
|
|
15590
15590
|
}
|
|
15591
15591
|
|
|
15592
15592
|
// src/index.ts
|
|
15593
|
-
var CLI_VERSION = true ? "0.
|
|
15593
|
+
var CLI_VERSION = true ? "0.47.0" : "0.1.0";
|
|
15594
15594
|
var CLI_BUNDLED = true;
|
|
15595
15595
|
var commandIo = /* @__PURE__ */ new WeakMap();
|
|
15596
15596
|
var commandClientFactory = /* @__PURE__ */ new WeakMap();
|
|
@@ -15746,7 +15746,10 @@ function registerFileCrud(program, io, input) {
|
|
|
15746
15746
|
emit(io, command, await client.request(`${input.pluralPath}/${encodeURIComponent(id)}`, { method: "PATCH", body }));
|
|
15747
15747
|
});
|
|
15748
15748
|
if (input.remove !== false) group.command("delete <id>").action(async (id, _options, command) => {
|
|
15749
|
-
|
|
15749
|
+
const options = globalOptions(command);
|
|
15750
|
+
if (input.deleteWarning && !options.yes && !options.json) io.stderr.write(`${input.deleteWarning}
|
|
15751
|
+
`);
|
|
15752
|
+
await confirmExact(io, id, Boolean(options.yes), Boolean(options.json));
|
|
15750
15753
|
const { client } = await clientFor(command);
|
|
15751
15754
|
await client.request(`${input.pluralPath}/${encodeURIComponent(id)}`, { method: "DELETE" });
|
|
15752
15755
|
emit(io, command, { id, deleted: true });
|
|
@@ -15955,7 +15958,11 @@ function createProgram(io = processIo, dependencies = {}) {
|
|
|
15955
15958
|
const { client } = await clientFor(command);
|
|
15956
15959
|
emit(io, command, await client.request(`/api/management/v1/labs/${encodeURIComponent(id)}/models/order`, { method: "PUT", body: await jsonFile(options.file) }));
|
|
15957
15960
|
});
|
|
15958
|
-
registerFileCrud(program, io, {
|
|
15961
|
+
registerFileCrud(program, io, {
|
|
15962
|
+
name: "model",
|
|
15963
|
+
pluralPath: "/api/management/v1/models",
|
|
15964
|
+
deleteWarning: "Historical references will be permanently reassigned to \u201Cunknown model\u201D."
|
|
15965
|
+
});
|
|
15959
15966
|
const user = registerFileCrud(program, io, { name: "user", pluralPath: "/api/management/v1/users" });
|
|
15960
15967
|
for (const [action, patch] of [["approve", { role: "user" }], ["block", { blocked: true }], ["unblock", { blocked: false }]]) {
|
|
15961
15968
|
user.command(`${action} <id>`).action(async (id, _options, command) => {
|