vibes-diy 14.3.344 → 14.3.345
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/cli/cmd-evento.d.ts +2 -0
- package/cli/cmds/app/status-cmd.d.ts +2 -0
- package/cli/cmds/app/status-cmd.js +10 -0
- package/cli/cmds/moderation/index.js +54 -12
- package/cli/cmds/run/backend-worker/run-backend-entry.js +301 -70
- package/cli/cmds/run/run-bundle.js +564 -342
- package/cli/cmds/secrets/secrets-cmd.js +1 -1
- package/cli/read-stdin.d.ts +6 -1
- package/cli/read-stdin.js +1 -1
- package/package.json +8 -8
package/cli/cmd-evento.d.ts
CHANGED
|
@@ -169,6 +169,8 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
169
169
|
healed: boolean;
|
|
170
170
|
releaseIntervalMs: number | null;
|
|
171
171
|
pausedIntervalMs: number | null;
|
|
172
|
+
stoppedIntervalMs: number | null;
|
|
173
|
+
stoppedAt: string | null;
|
|
172
174
|
settingsUrl: string;
|
|
173
175
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
174
176
|
type: "vibes-diy.cli.app-chips";
|
|
@@ -27,6 +27,8 @@ export declare const ResAppStatusCli: import("arktype/internal/variants/object.t
|
|
|
27
27
|
healed: boolean;
|
|
28
28
|
releaseIntervalMs: number | null;
|
|
29
29
|
pausedIntervalMs: number | null;
|
|
30
|
+
stoppedIntervalMs: number | null;
|
|
31
|
+
stoppedAt: string | null;
|
|
30
32
|
settingsUrl: string;
|
|
31
33
|
}, {}>;
|
|
32
34
|
export type ResAppStatusCli = typeof ResAppStatusCli.infer;
|
|
@@ -37,6 +37,8 @@ export const ResAppStatusCli = type({
|
|
|
37
37
|
healed: "boolean",
|
|
38
38
|
releaseIntervalMs: "number|null",
|
|
39
39
|
pausedIntervalMs: "number|null",
|
|
40
|
+
stoppedIntervalMs: "number|null",
|
|
41
|
+
stoppedAt: "string|null",
|
|
40
42
|
settingsUrl: "string",
|
|
41
43
|
});
|
|
42
44
|
export function isResAppStatusCli(obj) {
|
|
@@ -56,6 +58,12 @@ export function renderAppStatusLines(msg) {
|
|
|
56
58
|
if (msg.state === "unscheduled" && msg.pausedIntervalMs !== null) {
|
|
57
59
|
return pausedScheduleLines(app, msg.pausedIntervalMs, msg.settingsUrl);
|
|
58
60
|
}
|
|
61
|
+
if (msg.state === "unscheduled" && msg.stoppedIntervalMs !== null) {
|
|
62
|
+
return [
|
|
63
|
+
`${app}: stopped — the live release runs \`scheduled\` every ${humanizeDuration(msg.stoppedIntervalMs)}, and its timer was stopped${msg.stoppedAt === null ? "" : ` at ${msg.stoppedAt}`} on purpose.`,
|
|
64
|
+
` Start it again: npx vibes-diy app rearm ${app} (your next deploy starts it too)`,
|
|
65
|
+
];
|
|
66
|
+
}
|
|
59
67
|
if (msg.state === "unscheduled" && msg.releaseIntervalMs !== null) {
|
|
60
68
|
return [
|
|
61
69
|
`${app}: STALLED — the live release runs \`scheduled\` every ${humanizeDuration(msg.releaseIntervalMs)}, and no timer is armed for it.`,
|
|
@@ -141,6 +149,8 @@ export const appStatusEvento = {
|
|
|
141
149
|
healed: s.healed,
|
|
142
150
|
releaseIntervalMs: s.releaseIntervalMs ?? null,
|
|
143
151
|
pausedIntervalMs: s.pausedIntervalMs ?? null,
|
|
152
|
+
stoppedIntervalMs: s.stoppedIntervalMs ?? null,
|
|
153
|
+
stoppedAt: s.stoppedAt ?? null,
|
|
144
154
|
settingsUrl: appSettingsUrl(args.apiUrl, s.ownerHandle, s.appSlug),
|
|
145
155
|
});
|
|
146
156
|
},
|
|
@@ -160,7 +160,7 @@ export const moderationEvento = {
|
|
|
160
160
|
},
|
|
161
161
|
};
|
|
162
162
|
const textOpt = (long, description) => option({ long, description, type: string, defaultValue: () => "", defaultValueIsSerializable: true });
|
|
163
|
-
function opCmd(ctx, name, description, op, extra = {}) {
|
|
163
|
+
function opCmd({ ctx, name, description, op, extra = {}, }) {
|
|
164
164
|
return command({
|
|
165
165
|
name,
|
|
166
166
|
description,
|
|
@@ -205,19 +205,61 @@ export function moderationSubcommands(ctx) {
|
|
|
205
205
|
name: "moderation",
|
|
206
206
|
description: "Platform-admin moderation: vibe reports, auto flags, account suspension and the stop-publishing switch",
|
|
207
207
|
cmds: {
|
|
208
|
-
reports: opCmd(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
paused: true,
|
|
208
|
+
reports: opCmd({
|
|
209
|
+
ctx,
|
|
210
|
+
name: "reports",
|
|
211
|
+
description: "List vibe reports, newest first (open by default)",
|
|
212
|
+
op: "list-reports",
|
|
214
213
|
}),
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
resolve: opCmd({
|
|
215
|
+
ctx,
|
|
216
|
+
name: "resolve",
|
|
217
|
+
description: "Mark a report resolved: --report <id> --reason <what was done>",
|
|
218
|
+
op: "resolve-report",
|
|
219
|
+
}),
|
|
220
|
+
suspend: opCmd({
|
|
221
|
+
ctx,
|
|
222
|
+
name: "suspend",
|
|
223
|
+
description: "Suspend an account: --user <id> or --handle <h>, with --reason",
|
|
224
|
+
op: "suspend",
|
|
225
|
+
}),
|
|
226
|
+
unsuspend: opCmd({ ctx, name: "unsuspend", description: "Restore a suspended account, with --reason", op: "unsuspend" }),
|
|
227
|
+
"pause-publishing": opCmd({
|
|
228
|
+
ctx,
|
|
229
|
+
name: "pause-publishing",
|
|
230
|
+
description: "Pause publishing across the platform, with --reason",
|
|
231
|
+
op: "set-publishing-paused",
|
|
232
|
+
extra: {
|
|
233
|
+
paused: true,
|
|
234
|
+
},
|
|
235
|
+
}),
|
|
236
|
+
"resume-publishing": opCmd({
|
|
237
|
+
ctx,
|
|
238
|
+
name: "resume-publishing",
|
|
239
|
+
description: "Turn publishing back on, with --reason",
|
|
240
|
+
op: "set-publishing-paused",
|
|
241
|
+
extra: {
|
|
242
|
+
paused: false,
|
|
243
|
+
},
|
|
244
|
+
}),
|
|
245
|
+
status: opCmd({
|
|
246
|
+
ctx,
|
|
247
|
+
name: "status",
|
|
248
|
+
description: "The publishing switch, active suspensions and the open report count",
|
|
249
|
+
op: "status",
|
|
250
|
+
}),
|
|
251
|
+
flags: opCmd({
|
|
252
|
+
ctx,
|
|
253
|
+
name: "flags",
|
|
254
|
+
description: "List the prompt and code checker's flags, newest first (open by default; --status allowed or error for records, --summary for counts)",
|
|
255
|
+
op: "list-flags",
|
|
256
|
+
}),
|
|
257
|
+
triage: opCmd({
|
|
258
|
+
ctx,
|
|
259
|
+
name: "triage",
|
|
260
|
+
description: "Triage an auto flag: --flag <id> --as false_alarm|escalated|resolved --reason <note>",
|
|
261
|
+
op: "triage-flag",
|
|
217
262
|
}),
|
|
218
|
-
status: opCmd(ctx, "status", "The publishing switch, active suspensions and the open report count", "status"),
|
|
219
|
-
flags: opCmd(ctx, "flags", "List the prompt and code checker's flags, newest first (open by default; --status allowed or error for records, --summary for counts)", "list-flags"),
|
|
220
|
-
triage: opCmd(ctx, "triage", "Triage an auto flag: --flag <id> --as false_alarm|escalated|resolved --reason <note>", "triage-flag"),
|
|
221
263
|
},
|
|
222
264
|
});
|
|
223
265
|
}
|