vibes-diy 12.1.1 → 12.1.2
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 +60 -0
- package/cli/cmd-evento.js +4 -0
- package/cli/cmd-evento.js.map +1 -1
- package/cli/cmds/app/index.d.ts +95 -0
- package/cli/cmds/app/index.js +19 -0
- package/cli/cmds/app/index.js.map +1 -0
- package/cli/cmds/app/logs-cmd.d.ts +82 -0
- package/cli/cmds/app/logs-cmd.js +244 -0
- package/cli/cmds/app/logs-cmd.js.map +1 -0
- package/cli/cmds/app/logs-cmd.test.d.ts +1 -0
- package/cli/cmds/app/logs-cmd.test.js +221 -0
- package/cli/cmds/app/logs-cmd.test.js.map +1 -0
- package/cli/cmds/app/rearm-cmd.d.ts +42 -0
- package/cli/cmds/app/rearm-cmd.js +115 -0
- package/cli/cmds/app/rearm-cmd.js.map +1 -0
- package/cli/cmds/app/status-cmd.d.ts +51 -0
- package/cli/cmds/app/status-cmd.js +158 -0
- package/cli/cmds/app/status-cmd.js.map +1 -0
- package/cli/cmds/app/status-render.test.d.ts +1 -0
- package/cli/cmds/app/status-render.test.js +102 -0
- package/cli/cmds/app/status-render.test.js.map +1 -0
- package/cli/main.js +40 -0
- package/cli/main.js.map +1 -1
- package/package.json +8 -8
package/cli/cmd-evento.d.ts
CHANGED
|
@@ -108,6 +108,27 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
108
108
|
message: string;
|
|
109
109
|
code: "handle-required";
|
|
110
110
|
};
|
|
111
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
112
|
+
type: "vibes-diy.cli.app-status";
|
|
113
|
+
appSlug: string;
|
|
114
|
+
ownerHandle: string;
|
|
115
|
+
apiUrl: string;
|
|
116
|
+
}, {
|
|
117
|
+
type: "vibes-diy.cli.res-app-status";
|
|
118
|
+
appSlug: string;
|
|
119
|
+
ownerHandle: string;
|
|
120
|
+
state: "dead" | "healthy" | "overdue" | "running" | "unscheduled";
|
|
121
|
+
intervalMs: number | null;
|
|
122
|
+
armedAt: string | null;
|
|
123
|
+
lastAttemptAt: string | null;
|
|
124
|
+
lastRunAt: string | null;
|
|
125
|
+
lastErrorAt: string | null;
|
|
126
|
+
lastError: string | null;
|
|
127
|
+
attempt: number;
|
|
128
|
+
nextAlarmAt: string | null;
|
|
129
|
+
graceMs: number;
|
|
130
|
+
overdueMs: number;
|
|
131
|
+
healed: boolean;
|
|
111
132
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
112
133
|
type: "vibes-diy.cli.set-unpublish";
|
|
113
134
|
appSlug: string;
|
|
@@ -568,6 +589,45 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
568
589
|
created: string;
|
|
569
590
|
published: boolean;
|
|
570
591
|
}[];
|
|
592
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
593
|
+
type: "vibes-diy.cli.app-rearm";
|
|
594
|
+
appSlug: string;
|
|
595
|
+
ownerHandle: string;
|
|
596
|
+
apiUrl: string;
|
|
597
|
+
}, {
|
|
598
|
+
type: "vibes-diy.cli.res-app-rearm";
|
|
599
|
+
appSlug: string;
|
|
600
|
+
ownerHandle: string;
|
|
601
|
+
state: "dead" | "healthy" | "overdue" | "running" | "unscheduled";
|
|
602
|
+
intervalMs: number | null;
|
|
603
|
+
nextAlarmAt: string | null;
|
|
604
|
+
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
605
|
+
type: "vibes-diy.cli.app-logs";
|
|
606
|
+
appSlug: string;
|
|
607
|
+
ownerHandle: string;
|
|
608
|
+
apiUrl: string;
|
|
609
|
+
since: string;
|
|
610
|
+
level: string;
|
|
611
|
+
limit: number;
|
|
612
|
+
tail: boolean;
|
|
613
|
+
}, {
|
|
614
|
+
type: "vibes-diy.cli.res-app-logs";
|
|
615
|
+
appSlug: string;
|
|
616
|
+
ownerHandle: string;
|
|
617
|
+
events: {
|
|
618
|
+
id: string;
|
|
619
|
+
ts: string;
|
|
620
|
+
lane: string;
|
|
621
|
+
level: string;
|
|
622
|
+
trigger: string;
|
|
623
|
+
fsId: string;
|
|
624
|
+
body: string;
|
|
625
|
+
sessionId: string | null;
|
|
626
|
+
viewerHandle: string | null;
|
|
627
|
+
}[];
|
|
628
|
+
priorFsId: string | null;
|
|
629
|
+
nextCursor: string | null;
|
|
630
|
+
tail: boolean;
|
|
571
631
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
572
632
|
type: "vibes-diy.cli.secrets";
|
|
573
633
|
apiUrl: string;
|
package/cli/cmd-evento.js
CHANGED
|
@@ -13,6 +13,7 @@ import { editEvento } from "./cmds/edit-cmd.js";
|
|
|
13
13
|
import { listEvento } from "./cmds/list-cmd.js";
|
|
14
14
|
import { pullEvento } from "./cmds/pull-cmd.js";
|
|
15
15
|
import { versionsEvento } from "./cmds/versions-cmd.js";
|
|
16
|
+
import { appStatusEvento, appRearmEvento, appLogsEvento } from "./cmds/app/index.js";
|
|
16
17
|
import { setUnpublishEvento, publishEvento } from "./cmds/unpublish-cmd.js";
|
|
17
18
|
import { secretsEvento } from "./cmds/secrets/secrets-cmd.js";
|
|
18
19
|
import { recommendEvento } from "./cmds/recommend/recommend-cmd.js";
|
|
@@ -36,6 +37,9 @@ export function cliEventoHandlers() {
|
|
|
36
37
|
listEvento,
|
|
37
38
|
pullEvento,
|
|
38
39
|
versionsEvento,
|
|
40
|
+
appStatusEvento,
|
|
41
|
+
appRearmEvento,
|
|
42
|
+
appLogsEvento,
|
|
39
43
|
setUnpublishEvento,
|
|
40
44
|
publishEvento,
|
|
41
45
|
secretsEvento,
|
package/cli/cmd-evento.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd-evento.js","sourceRoot":"","sources":["../../jsr/cli/cmd-evento.ts"],"names":[],"mappings":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isResAppStatusCli, renderAppStatusLines, type ResAppStatusCli } from "./status-cmd.js";
|
|
3
|
+
export { appRearmEvento, isResAppRearmCli, renderAppRearmLines, type ResAppRearmCli } from "./rearm-cmd.js";
|
|
4
|
+
export { appLogsEvento, isResAppLogsCli, renderAppLogLines, parseSince, type ResAppLogsCli } from "./logs-cmd.js";
|
|
5
|
+
export declare function appSubcommands(ctx: CliCtx): Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
6
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
7
|
+
command: "logs";
|
|
8
|
+
args: {
|
|
9
|
+
apiUrl: string;
|
|
10
|
+
json: boolean;
|
|
11
|
+
text: boolean;
|
|
12
|
+
appSlug: string | undefined;
|
|
13
|
+
vibe: string;
|
|
14
|
+
handle: string;
|
|
15
|
+
since: string;
|
|
16
|
+
level: string;
|
|
17
|
+
limit: number;
|
|
18
|
+
tail: boolean;
|
|
19
|
+
};
|
|
20
|
+
} | {
|
|
21
|
+
command: "rearm";
|
|
22
|
+
args: {
|
|
23
|
+
apiUrl: string;
|
|
24
|
+
json: boolean;
|
|
25
|
+
text: boolean;
|
|
26
|
+
appSlug: string | undefined;
|
|
27
|
+
vibe: string;
|
|
28
|
+
handle: string;
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
command: "status";
|
|
32
|
+
args: {
|
|
33
|
+
apiUrl: string;
|
|
34
|
+
json: boolean;
|
|
35
|
+
text: boolean;
|
|
36
|
+
appSlug: string | undefined;
|
|
37
|
+
vibe: string;
|
|
38
|
+
handle: string;
|
|
39
|
+
};
|
|
40
|
+
}>>;
|
|
41
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
42
|
+
command: "logs";
|
|
43
|
+
args: {
|
|
44
|
+
apiUrl: string;
|
|
45
|
+
json: boolean;
|
|
46
|
+
text: boolean;
|
|
47
|
+
appSlug: string | undefined;
|
|
48
|
+
vibe: string;
|
|
49
|
+
handle: string;
|
|
50
|
+
since: string;
|
|
51
|
+
level: string;
|
|
52
|
+
limit: number;
|
|
53
|
+
tail: boolean;
|
|
54
|
+
};
|
|
55
|
+
} | {
|
|
56
|
+
command: "rearm";
|
|
57
|
+
args: {
|
|
58
|
+
apiUrl: string;
|
|
59
|
+
json: boolean;
|
|
60
|
+
text: boolean;
|
|
61
|
+
appSlug: string | undefined;
|
|
62
|
+
vibe: string;
|
|
63
|
+
handle: string;
|
|
64
|
+
};
|
|
65
|
+
} | {
|
|
66
|
+
command: "status";
|
|
67
|
+
args: {
|
|
68
|
+
apiUrl: string;
|
|
69
|
+
json: boolean;
|
|
70
|
+
text: boolean;
|
|
71
|
+
appSlug: string | undefined;
|
|
72
|
+
vibe: string;
|
|
73
|
+
handle: string;
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
command: "logs";
|
|
77
|
+
value: never;
|
|
78
|
+
} | {
|
|
79
|
+
command: "rearm";
|
|
80
|
+
value: never;
|
|
81
|
+
} | {
|
|
82
|
+
command: "status";
|
|
83
|
+
value: never;
|
|
84
|
+
}> & {
|
|
85
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
86
|
+
command: "logs";
|
|
87
|
+
value: never;
|
|
88
|
+
} | {
|
|
89
|
+
command: "rearm";
|
|
90
|
+
value: never;
|
|
91
|
+
} | {
|
|
92
|
+
command: "status";
|
|
93
|
+
value: never;
|
|
94
|
+
}>>;
|
|
95
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { subcommands } from "cmd-ts";
|
|
2
|
+
import { appStatusCmd } from "./status-cmd.js";
|
|
3
|
+
import { appRearmCmd } from "./rearm-cmd.js";
|
|
4
|
+
import { appLogsCmd } from "./logs-cmd.js";
|
|
5
|
+
export { appStatusEvento, isResAppStatusCli, renderAppStatusLines } from "./status-cmd.js";
|
|
6
|
+
export { appRearmEvento, isResAppRearmCli, renderAppRearmLines } from "./rearm-cmd.js";
|
|
7
|
+
export { appLogsEvento, isResAppLogsCli, renderAppLogLines, parseSince } from "./logs-cmd.js";
|
|
8
|
+
export function appSubcommands(ctx) {
|
|
9
|
+
return subcommands({
|
|
10
|
+
name: "app",
|
|
11
|
+
description: "Operate a deployed vibe: scheduled-task health, recovery, and its ctx.log diagnostics",
|
|
12
|
+
cmds: {
|
|
13
|
+
status: appStatusCmd(ctx),
|
|
14
|
+
rearm: appRearmCmd(ctx),
|
|
15
|
+
logs: appLogsCmd(ctx),
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../jsr/cli/cmds/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,oBAAoB,EAAwB,MAAM,iBAAiB,CAAC;AACjH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAuB,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,UAAU,EAAsB,MAAM,eAAe,CAAC;AAElH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,WAAW,CAAC;QACjB,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,uFAAuF;QACpG,IAAI,EAAE;YACJ,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC;YACzB,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC;YACvB,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC;SACtB;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { EventoHandler } from "@adviser/cement";
|
|
2
|
+
import { CliCtx } from "../../cli-ctx.js";
|
|
3
|
+
import { WrapCmdTSMsg } from "../../cmd-evento.js";
|
|
4
|
+
export declare const DEFAULT_SINCE = "1h";
|
|
5
|
+
export declare const TAIL_POLL_MS = 2500;
|
|
6
|
+
export declare const LOG_LEVELS: readonly ["debug", "info", "warn", "error"];
|
|
7
|
+
export type LogLevel = (typeof LOG_LEVELS)[number];
|
|
8
|
+
export declare function isLogLevel(v: string): v is LogLevel;
|
|
9
|
+
export declare function parseSince(input: string, nowMs: number): string | undefined;
|
|
10
|
+
export declare const ReqAppLogsCli: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
11
|
+
type: "vibes-diy.cli.app-logs";
|
|
12
|
+
appSlug: string;
|
|
13
|
+
ownerHandle: string;
|
|
14
|
+
apiUrl: string;
|
|
15
|
+
since: string;
|
|
16
|
+
level: string;
|
|
17
|
+
limit: number;
|
|
18
|
+
tail: boolean;
|
|
19
|
+
}, {}>;
|
|
20
|
+
export type ReqAppLogsCli = typeof ReqAppLogsCli.infer;
|
|
21
|
+
export declare function isReqAppLogsCli(obj: unknown): obj is ReqAppLogsCli;
|
|
22
|
+
export declare const AppLogLineCli: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
23
|
+
id: string;
|
|
24
|
+
ts: string;
|
|
25
|
+
lane: string;
|
|
26
|
+
level: string;
|
|
27
|
+
trigger: string;
|
|
28
|
+
fsId: string;
|
|
29
|
+
body: string;
|
|
30
|
+
sessionId: string | null;
|
|
31
|
+
viewerHandle: string | null;
|
|
32
|
+
}, {}>;
|
|
33
|
+
export declare const ResAppLogsCli: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
34
|
+
type: "vibes-diy.cli.res-app-logs";
|
|
35
|
+
appSlug: string;
|
|
36
|
+
ownerHandle: string;
|
|
37
|
+
events: {
|
|
38
|
+
id: string;
|
|
39
|
+
ts: string;
|
|
40
|
+
lane: string;
|
|
41
|
+
level: string;
|
|
42
|
+
trigger: string;
|
|
43
|
+
fsId: string;
|
|
44
|
+
body: string;
|
|
45
|
+
sessionId: string | null;
|
|
46
|
+
viewerHandle: string | null;
|
|
47
|
+
}[];
|
|
48
|
+
priorFsId: string | null;
|
|
49
|
+
nextCursor: string | null;
|
|
50
|
+
tail: boolean;
|
|
51
|
+
}, {}>;
|
|
52
|
+
export type ResAppLogsCli = typeof ResAppLogsCli.infer;
|
|
53
|
+
export declare function isResAppLogsCli(obj: unknown): obj is ResAppLogsCli;
|
|
54
|
+
export declare function renderAppLogLines(msg: ResAppLogsCli): string[];
|
|
55
|
+
export declare const appLogsEvento: EventoHandler<WrapCmdTSMsg<unknown>, ReqAppLogsCli, ResAppLogsCli>;
|
|
56
|
+
export declare function appLogsCmd(ctx: CliCtx): Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
57
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
58
|
+
apiUrl: string;
|
|
59
|
+
json: boolean;
|
|
60
|
+
text: boolean;
|
|
61
|
+
appSlug: string | undefined;
|
|
62
|
+
vibe: string;
|
|
63
|
+
handle: string;
|
|
64
|
+
since: string;
|
|
65
|
+
level: string;
|
|
66
|
+
limit: number;
|
|
67
|
+
tail: boolean;
|
|
68
|
+
}>>;
|
|
69
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
70
|
+
apiUrl: string;
|
|
71
|
+
json: boolean;
|
|
72
|
+
text: boolean;
|
|
73
|
+
appSlug: string | undefined;
|
|
74
|
+
vibe: string;
|
|
75
|
+
handle: string;
|
|
76
|
+
since: string;
|
|
77
|
+
level: string;
|
|
78
|
+
limit: number;
|
|
79
|
+
tail: boolean;
|
|
80
|
+
}, never> & {
|
|
81
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<never>>;
|
|
82
|
+
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { command, flag, number, option, optional, positional, string } from "cmd-ts";
|
|
2
|
+
import { Result, Option, EventoResult, } from "@adviser/cement";
|
|
3
|
+
import { type } from "arktype";
|
|
4
|
+
import { APP_LOGS_LIMIT_DEFAULT } from "@vibes.diy/api-types";
|
|
5
|
+
import { cmdTsDefaultArgs } from "../../cli-ctx.js";
|
|
6
|
+
import { sendMsg } from "../../cmd-evento.js";
|
|
7
|
+
import { resolveHandle } from "../../resolve-handle.js";
|
|
8
|
+
import { resolveVibePositionals } from "../../parse-vibe.js";
|
|
9
|
+
import { formatErr } from "../format-err.js";
|
|
10
|
+
import { HANDLE_REQUIRED_CLI_MESSAGE } from "../../handle-required.js";
|
|
11
|
+
export const DEFAULT_SINCE = "1h";
|
|
12
|
+
export const TAIL_POLL_MS = 2500;
|
|
13
|
+
export const LOG_LEVELS = ["debug", "info", "warn", "error"];
|
|
14
|
+
export function isLogLevel(v) {
|
|
15
|
+
return LOG_LEVELS.includes(v);
|
|
16
|
+
}
|
|
17
|
+
const DURATION_UNIT_MS = {
|
|
18
|
+
s: 1000,
|
|
19
|
+
m: 60_000,
|
|
20
|
+
h: 3_600_000,
|
|
21
|
+
d: 86_400_000,
|
|
22
|
+
w: 604_800_000,
|
|
23
|
+
};
|
|
24
|
+
const MAX_TIME_VALUE = 8.64e15;
|
|
25
|
+
function isRenderableEpochMs(ms) {
|
|
26
|
+
return Number.isFinite(ms) && Math.abs(ms) <= MAX_TIME_VALUE;
|
|
27
|
+
}
|
|
28
|
+
export function parseSince(input, nowMs) {
|
|
29
|
+
const trimmed = input.trim();
|
|
30
|
+
if (trimmed === "")
|
|
31
|
+
return undefined;
|
|
32
|
+
const dur = /^(\d+)([smhdw])$/.exec(trimmed);
|
|
33
|
+
if (dur) {
|
|
34
|
+
const n = Number.parseInt(dur[1], 10);
|
|
35
|
+
const ms = nowMs - n * DURATION_UNIT_MS[dur[2]];
|
|
36
|
+
return isRenderableEpochMs(ms) ? new Date(ms).toISOString() : undefined;
|
|
37
|
+
}
|
|
38
|
+
const abs = Date.parse(trimmed);
|
|
39
|
+
return isRenderableEpochMs(abs) ? new Date(abs).toISOString() : undefined;
|
|
40
|
+
}
|
|
41
|
+
export const ReqAppLogsCli = type({
|
|
42
|
+
type: "'vibes-diy.cli.app-logs'",
|
|
43
|
+
appSlug: "string",
|
|
44
|
+
ownerHandle: "string",
|
|
45
|
+
apiUrl: "string",
|
|
46
|
+
since: "string",
|
|
47
|
+
level: "string",
|
|
48
|
+
limit: "number",
|
|
49
|
+
tail: "boolean",
|
|
50
|
+
});
|
|
51
|
+
export function isReqAppLogsCli(obj) {
|
|
52
|
+
return !(ReqAppLogsCli(obj) instanceof type.errors);
|
|
53
|
+
}
|
|
54
|
+
export const AppLogLineCli = type({
|
|
55
|
+
id: "string",
|
|
56
|
+
ts: "string",
|
|
57
|
+
lane: "string",
|
|
58
|
+
level: "string",
|
|
59
|
+
trigger: "string",
|
|
60
|
+
fsId: "string",
|
|
61
|
+
body: "string",
|
|
62
|
+
sessionId: "string|null",
|
|
63
|
+
viewerHandle: "string|null",
|
|
64
|
+
});
|
|
65
|
+
export const ResAppLogsCli = type({
|
|
66
|
+
type: "'vibes-diy.cli.res-app-logs'",
|
|
67
|
+
appSlug: "string",
|
|
68
|
+
ownerHandle: "string",
|
|
69
|
+
events: AppLogLineCli.array(),
|
|
70
|
+
priorFsId: "string|null",
|
|
71
|
+
nextCursor: "string|null",
|
|
72
|
+
tail: "boolean",
|
|
73
|
+
});
|
|
74
|
+
export function isResAppLogsCli(obj) {
|
|
75
|
+
return !(ResAppLogsCli(obj) instanceof type.errors);
|
|
76
|
+
}
|
|
77
|
+
const pad = (n) => (n < 10 ? `0${n}` : `${n}`);
|
|
78
|
+
function clock(ts) {
|
|
79
|
+
const d = new Date(ts);
|
|
80
|
+
if (Number.isNaN(d.getTime()))
|
|
81
|
+
return "--:--:--";
|
|
82
|
+
return `${pad(d.getUTCHours())}:${pad(d.getUTCMinutes())}:${pad(d.getUTCSeconds())}`;
|
|
83
|
+
}
|
|
84
|
+
export function renderAppLogLines(msg) {
|
|
85
|
+
if (msg.events.length === 0)
|
|
86
|
+
return [];
|
|
87
|
+
const lines = [];
|
|
88
|
+
let lastFsId = msg.priorFsId;
|
|
89
|
+
for (const e of msg.events) {
|
|
90
|
+
if (e.fsId !== lastFsId) {
|
|
91
|
+
lines.push(`── release ${e.fsId} ──`);
|
|
92
|
+
lastFsId = e.fsId;
|
|
93
|
+
}
|
|
94
|
+
lines.push(`${clock(e.ts)} ${e.level.padEnd(5)} [${e.trigger}] ${e.body}`);
|
|
95
|
+
}
|
|
96
|
+
if (msg.nextCursor !== null && !msg.tail) {
|
|
97
|
+
lines.push(`… more events available — raise --limit or use --tail`);
|
|
98
|
+
}
|
|
99
|
+
return lines;
|
|
100
|
+
}
|
|
101
|
+
export const appLogsEvento = {
|
|
102
|
+
hash: "vibes-diy.cli.app-logs",
|
|
103
|
+
validate: (ctx) => {
|
|
104
|
+
if (isReqAppLogsCli(ctx.enRequest)) {
|
|
105
|
+
return Promise.resolve(Result.Ok(Option.Some(ctx.enRequest)));
|
|
106
|
+
}
|
|
107
|
+
return Promise.resolve(Result.Ok(Option.None()));
|
|
108
|
+
},
|
|
109
|
+
handle: async (ctx) => {
|
|
110
|
+
const ectx = ctx.ctx.getOrThrow("cliCtx");
|
|
111
|
+
if (!ectx.vibesDiyApiFactory) {
|
|
112
|
+
return Result.Err("Not logged in. Run 'vibes-diy login' first.");
|
|
113
|
+
}
|
|
114
|
+
const args = ctx.validated;
|
|
115
|
+
const api = ectx.vibesDiyApiFactory(args.apiUrl);
|
|
116
|
+
const ownerHandle = await resolveHandle(api, args.ownerHandle === "" ? undefined : args.ownerHandle);
|
|
117
|
+
if (ownerHandle === undefined) {
|
|
118
|
+
return Result.Err(HANDLE_REQUIRED_CLI_MESSAGE);
|
|
119
|
+
}
|
|
120
|
+
if (args.appSlug === "") {
|
|
121
|
+
return Result.Err("Missing vibe — pass an app slug or handle/app-slug.");
|
|
122
|
+
}
|
|
123
|
+
const sinceTs = parseSince(args.since, Date.now());
|
|
124
|
+
if (sinceTs === undefined) {
|
|
125
|
+
return Result.Err(`Could not read --since "${args.since}". Use a duration (30m, 2h, 1d) or an ISO timestamp.`);
|
|
126
|
+
}
|
|
127
|
+
if (args.level !== "" && !isLogLevel(args.level)) {
|
|
128
|
+
return Result.Err(`Unknown --level "${args.level}". Use one of: ${LOG_LEVELS.join(", ")}.`);
|
|
129
|
+
}
|
|
130
|
+
const level = args.level === "" ? undefined : args.level;
|
|
131
|
+
let cursor;
|
|
132
|
+
let priorFsId = null;
|
|
133
|
+
const readPage = async () => {
|
|
134
|
+
const rLogs = await api.appLogs({
|
|
135
|
+
appSlug: args.appSlug,
|
|
136
|
+
ownerHandle,
|
|
137
|
+
limit: args.limit,
|
|
138
|
+
...(cursor === undefined ? { sinceTs } : { sinceId: cursor }),
|
|
139
|
+
...(level === undefined ? {} : { level }),
|
|
140
|
+
});
|
|
141
|
+
if (rLogs.isErr())
|
|
142
|
+
return Result.Err(formatErr(rLogs.Err()));
|
|
143
|
+
const res = rLogs.Ok();
|
|
144
|
+
const rSend = await sendMsg(ctx, {
|
|
145
|
+
type: "vibes-diy.cli.res-app-logs",
|
|
146
|
+
appSlug: res.appSlug,
|
|
147
|
+
ownerHandle: res.ownerHandle,
|
|
148
|
+
events: res.events,
|
|
149
|
+
priorFsId,
|
|
150
|
+
nextCursor: res.nextCursor,
|
|
151
|
+
tail: args.tail,
|
|
152
|
+
});
|
|
153
|
+
if (rSend.isErr())
|
|
154
|
+
return Result.Err(rSend.Err());
|
|
155
|
+
if (res.events.length > 0) {
|
|
156
|
+
const last = res.events[res.events.length - 1];
|
|
157
|
+
cursor = last.id;
|
|
158
|
+
priorFsId = last.fsId;
|
|
159
|
+
}
|
|
160
|
+
return Result.Ok(res.nextCursor !== null);
|
|
161
|
+
};
|
|
162
|
+
const rFirst = await readPage();
|
|
163
|
+
if (rFirst.isErr())
|
|
164
|
+
return Result.Err(rFirst.Err());
|
|
165
|
+
if (!args.tail)
|
|
166
|
+
return Result.Ok(EventoResult.Continue);
|
|
167
|
+
let more = rFirst.Ok();
|
|
168
|
+
for (;;) {
|
|
169
|
+
if (!more)
|
|
170
|
+
await new Promise((resolve) => setTimeout(resolve, TAIL_POLL_MS));
|
|
171
|
+
const r = await readPage();
|
|
172
|
+
if (r.isErr())
|
|
173
|
+
return Result.Err(r.Err());
|
|
174
|
+
more = r.Ok();
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
export function appLogsCmd(ctx) {
|
|
179
|
+
return command({
|
|
180
|
+
name: "logs",
|
|
181
|
+
description: "Show what a vibe reported with ctx.log — its own diagnostics over a recent window, oldest line first. --tail follows.",
|
|
182
|
+
args: {
|
|
183
|
+
...cmdTsDefaultArgs(ctx),
|
|
184
|
+
appSlug: positional({
|
|
185
|
+
displayName: "vibe",
|
|
186
|
+
description: "App slug or handle/app-slug (e.g. jchris/hat-smeller)",
|
|
187
|
+
type: optional(string),
|
|
188
|
+
}),
|
|
189
|
+
vibe: option({
|
|
190
|
+
long: "vibe",
|
|
191
|
+
description: "Vibe identifier as handle/app-slug",
|
|
192
|
+
type: string,
|
|
193
|
+
defaultValue: () => "",
|
|
194
|
+
defaultValueIsSerializable: true,
|
|
195
|
+
}),
|
|
196
|
+
handle: option({
|
|
197
|
+
long: "handle",
|
|
198
|
+
description: "Act as this bound handle for this call only (leaves your default handle unchanged)",
|
|
199
|
+
type: string,
|
|
200
|
+
defaultValue: () => "",
|
|
201
|
+
defaultValueIsSerializable: true,
|
|
202
|
+
}),
|
|
203
|
+
since: option({
|
|
204
|
+
long: "since",
|
|
205
|
+
description: `How far back to read: a duration (30m, 2h, 1d, 1w) or an ISO timestamp. Default ${DEFAULT_SINCE}.`,
|
|
206
|
+
type: string,
|
|
207
|
+
defaultValue: () => DEFAULT_SINCE,
|
|
208
|
+
defaultValueIsSerializable: true,
|
|
209
|
+
}),
|
|
210
|
+
level: option({
|
|
211
|
+
long: "level",
|
|
212
|
+
description: "Only this level: debug, info, warn or error",
|
|
213
|
+
type: string,
|
|
214
|
+
defaultValue: () => "",
|
|
215
|
+
defaultValueIsSerializable: true,
|
|
216
|
+
}),
|
|
217
|
+
limit: option({
|
|
218
|
+
long: "limit",
|
|
219
|
+
description: "Maximum events per read (max 500)",
|
|
220
|
+
type: number,
|
|
221
|
+
defaultValue: () => APP_LOGS_LIMIT_DEFAULT,
|
|
222
|
+
defaultValueIsSerializable: true,
|
|
223
|
+
}),
|
|
224
|
+
tail: flag({
|
|
225
|
+
long: "tail",
|
|
226
|
+
description: "Keep following new events until interrupted (Ctrl-C)",
|
|
227
|
+
}),
|
|
228
|
+
},
|
|
229
|
+
handler: ctx.cliStream.enqueue((args) => {
|
|
230
|
+
const resolved = resolveVibePositionals({ vibe: args.vibe, handle: args.handle, positionals: [args.appSlug] });
|
|
231
|
+
return {
|
|
232
|
+
type: "vibes-diy.cli.app-logs",
|
|
233
|
+
appSlug: resolved.appSlug,
|
|
234
|
+
ownerHandle: resolved.handle,
|
|
235
|
+
apiUrl: args.apiUrl,
|
|
236
|
+
since: args.since,
|
|
237
|
+
level: args.level,
|
|
238
|
+
limit: args.limit,
|
|
239
|
+
tail: args.tail,
|
|
240
|
+
};
|
|
241
|
+
}),
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
//# sourceMappingURL=logs-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs-cmd.js","sourceRoot":"","sources":["../../../../jsr/cli/cmds/app/logs-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrF,OAAO,EAEL,MAAM,EAEN,MAAM,EAEN,YAAY,GAEb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAU,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAgB,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAQvE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAGlC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AAGjC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AAEtE,MAAM,UA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