@skrr-ai/cli 0.1.103 → 0.1.105
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/base-command.js +6 -2
- package/dist/commands/agenda/trigger/list.js +2 -0
- package/dist/commands/agents/chat.js +4 -1
- package/dist/commands/agents/operating-plan.js +5 -2
- package/dist/commands/agents/triggers/create.js +3 -1
- package/dist/commands/agents/triggers/fire.js +2 -0
- package/dist/commands/agents/triggers/replay.js +2 -0
- package/dist/commands/agents/triggers/update.js +12 -4
- package/dist/commands/commitments/action-history.js +7 -2
- package/dist/commands/commitments/cadence-decisions.js +6 -1
- package/dist/commands/commitments/cadence-requests/decide.d.ts +1 -1
- package/dist/commands/commitments/cadence-requests/decide.js +1 -1
- package/dist/commands/commitments/create.js +2 -0
- package/dist/commands/commitments/doctor.js +7 -1
- package/dist/commands/commitments/observations.js +7 -1
- package/dist/commands/commitments/operating-review.d.ts +15 -0
- package/dist/commands/commitments/operating-review.js +23 -2
- package/dist/commands/commitments/preflight.d.ts +12 -0
- package/dist/commands/commitments/preflight.js +23 -9
- package/dist/commands/commitments/reflection.js +6 -1
- package/dist/commands/commitments/show.js +3 -1
- package/dist/commands/commitments/trigger-status.js +2 -22
- package/dist/commands/commitments/wake-capabilities.d.ts +13 -0
- package/dist/commands/commitments/wake-capabilities.js +39 -3
- package/dist/commands/daemon/logs.d.ts +109 -4
- package/dist/commands/daemon/logs.js +397 -43
- package/dist/commands/followups/act.js +13 -1
- package/dist/commands/followups/checkin.js +11 -2
- package/dist/commands/followups/reschedule.js +13 -1
- package/dist/commands/proposals/discard.d.ts +1 -1
- package/dist/commands/proposals/keep.d.ts +1 -1
- package/dist/commands/proposals/list.d.ts +7 -0
- package/dist/commands/proposals/list.js +31 -5
- package/dist/commands/proposals/show.d.ts +2 -1
- package/dist/commands/proposals/show.js +31 -4
- package/dist/commands/proposals/snooze.d.ts +1 -1
- package/dist/commands/requests/create.js +8 -3
- package/dist/commands/spaces/workflows/create.js +3 -3
- package/dist/commands/tasks/complete.js +4 -0
- package/dist/commands/tasks/create.d.ts +2 -0
- package/dist/commands/tasks/create.js +17 -3
- package/dist/commands/tasks/deliverable/add.d.ts +2 -0
- package/dist/commands/tasks/deliverable/add.js +22 -7
- package/dist/commands/tasks/deliverable/list.d.ts +13 -0
- package/dist/commands/tasks/deliverable/list.js +34 -1
- package/dist/commands/tasks/economics-compare.js +7 -1
- package/dist/commands/tasks/expectations.d.ts +10 -0
- package/dist/commands/tasks/expectations.js +31 -3
- package/dist/commands/tasks/list.d.ts +9 -0
- package/dist/commands/tasks/list.js +40 -5
- package/dist/commands/tasks/report.js +1 -1
- package/dist/commands/tasks/result/show.d.ts +7 -0
- package/dist/commands/tasks/result/show.js +32 -1
- package/dist/commands/tasks/result/submit.js +1 -1
- package/dist/commands/tasks/show.d.ts +6 -0
- package/dist/commands/tasks/show.js +23 -0
- package/dist/commands/tasks/update.d.ts +3 -0
- package/dist/commands/tasks/update.js +23 -3
- package/dist/commands/triggers/audit.js +6 -2
- package/dist/commands/triggers/create.js +3 -1
- package/dist/commands/triggers/fire.d.ts +1 -0
- package/dist/commands/triggers/fire.js +16 -1
- package/dist/commands/triggers/preflight.js +6 -5
- package/dist/commands/triggers/replay.js +2 -0
- package/dist/commands/triggers/update.js +12 -4
- package/dist/commands/workspaces/stewardship.js +5 -1
- package/dist/lib/agentic-stream.d.ts +9 -0
- package/dist/lib/agentic-stream.js +38 -18
- package/dist/lib/commitment-event-wakes.d.ts +8 -0
- package/dist/lib/commitment-event-wakes.js +39 -0
- package/dist/lib/commitment-ledgers.d.ts +9 -0
- package/dist/lib/commitment-ledgers.js +126 -0
- package/dist/lib/commitments.d.ts +102 -2
- package/dist/lib/commitments.js +208 -8
- package/dist/lib/delegated-cli.js +13 -2
- package/dist/lib/followups.d.ts +6 -0
- package/dist/lib/followups.js +12 -0
- package/dist/lib/message-content.d.ts +6 -0
- package/dist/lib/message-content.js +24 -0
- package/dist/lib/operating-plan-loops.d.ts +8 -0
- package/dist/lib/operating-plan-loops.js +32 -0
- package/dist/lib/preflight-copy.d.ts +27 -0
- package/dist/lib/preflight-copy.js +89 -0
- package/dist/lib/proposal-decision-command.d.ts +1 -1
- package/dist/lib/proposal-decision-command.js +27 -3
- package/dist/lib/proposals.d.ts +17 -0
- package/dist/lib/proposals.js +41 -0
- package/dist/lib/stewardship-output.js +57 -12
- package/dist/lib/task-economics-line.d.ts +30 -0
- package/dist/lib/task-economics-line.js +49 -0
- package/dist/lib/task-economics.d.ts +15 -0
- package/dist/lib/task-economics.js +73 -8
- package/dist/lib/task-recurrence-outcome.d.ts +19 -0
- package/dist/lib/task-recurrence-outcome.js +30 -0
- package/dist/lib/triggers.d.ts +42 -0
- package/dist/lib/triggers.js +136 -2
- package/dist/lib/widgetTerminalText.d.ts +8 -0
- package/dist/lib/widgetTerminalText.js +116 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/cliHandoffWire.d.ts +33 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/cliHandoffWire.js +27 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.d.ts +84 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.js +222 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/cliHandoffWire.d.ts +33 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/cliHandoffWire.js +26 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.d.ts +84 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.js +216 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +11 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +7628 -7414
- package/docs/v1/operations.md +1 -1
- package/oclif.manifest.json +117 -73
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ export interface DaemonLogsFlags {
|
|
|
19
19
|
stderr?: boolean;
|
|
20
20
|
path?: boolean;
|
|
21
21
|
profile?: string;
|
|
22
|
+
rotated?: boolean;
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Older daemons already kept logs in this profile-scoped location, even
|
|
@@ -61,13 +62,25 @@ export declare function resolveDaemonLogsProfile(flags: Pick<DaemonLogsFlags, 'p
|
|
|
61
62
|
home?: string;
|
|
62
63
|
env?: NodeJS.ProcessEnv;
|
|
63
64
|
}): string;
|
|
65
|
+
/** Output destinations the installed launchd definition for a profile declares. */
|
|
66
|
+
export interface InstalledServiceLogDestinations {
|
|
67
|
+
/** The `--log-file` in ProgramArguments, when present. */
|
|
68
|
+
logFile: string | null;
|
|
69
|
+
stdoutPath: string | null;
|
|
70
|
+
stderrPath: string | null;
|
|
71
|
+
}
|
|
64
72
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
73
|
+
* Read the installed launchd definition's log destinations (OSK-15993). The
|
|
74
|
+
* desktop supervisor starts the daemon with
|
|
67
75
|
* `--log-file ~/Library/Logs/Skrr/daemon.app.log` and redirects stderr to
|
|
68
76
|
* `daemon.stderr.log`, so the profile's `logs/` directory can hold a file
|
|
69
77
|
* nobody has written for a week. Read-only: the plist is parsed, never loaded.
|
|
70
78
|
*/
|
|
79
|
+
export declare function installedServiceLogDestinations(profile: string, options?: {
|
|
80
|
+
home?: string;
|
|
81
|
+
platform?: NodeJS.Platform;
|
|
82
|
+
}): InstalledServiceLogDestinations | null;
|
|
83
|
+
/** The installed service's log files for the main log, or for `--stderr`. */
|
|
71
84
|
export declare function installedServiceLogCandidates(profile: string, stderr: boolean, options?: {
|
|
72
85
|
home?: string;
|
|
73
86
|
platform?: NodeJS.Platform;
|
|
@@ -82,6 +95,8 @@ export declare function chooseLegacyFallbackLog(args: {
|
|
|
82
95
|
profilePath: string;
|
|
83
96
|
serviceCandidates: readonly string[];
|
|
84
97
|
mtimeOf: (filePath: string) => number | null;
|
|
98
|
+
/** Why the runtime's own answer is not used; ends the note. */
|
|
99
|
+
reason?: string;
|
|
85
100
|
}): {
|
|
86
101
|
path: string;
|
|
87
102
|
note: string | null;
|
|
@@ -93,6 +108,93 @@ export declare function chooseLegacyFallbackLog(args: {
|
|
|
93
108
|
* rather than printed about a file that may not be the one shown.
|
|
94
109
|
*/
|
|
95
110
|
export declare function resolveForwardedLogPath(flags: Pick<DaemonLogsFlags, 'stderr' | 'profile'>, capture?: typeof execRuntimeBinaryCapture): Promise<string | null>;
|
|
111
|
+
/**
|
|
112
|
+
* The first runtime whose own `logs` reads the LIVE daemon's `--log-file`
|
|
113
|
+
* (OSK-15993, `daemon/src/daemon-log-target.ts`). 0.8.112 through 0.8.118 have
|
|
114
|
+
* a `logs` subcommand, so the subcommand probe says "supported", but it reads
|
|
115
|
+
* the profile's `logs/daemon.log` unconditionally — with a desktop-managed
|
|
116
|
+
* daemon, a file nobody has written for a week. Forwarding to one of those is
|
|
117
|
+
* forwarding to the bug, so the CLI forwards only at or above this version.
|
|
118
|
+
*/
|
|
119
|
+
export declare const LIVE_LOG_RESOLUTION_RUNTIME_VERSION = "0.8.119";
|
|
120
|
+
/**
|
|
121
|
+
* The first runtime whose `logs` knows `--rotated` (OSK-16214). An older one
|
|
122
|
+
* rejects it as an unknown option, so the CLI never forwards the flag below
|
|
123
|
+
* this version: it asks the runtime which file it reads (`--path`) and reads
|
|
124
|
+
* that file and its rotated siblings itself.
|
|
125
|
+
*/
|
|
126
|
+
export declare const ROTATED_LOGS_RUNTIME_VERSION = "0.8.120";
|
|
127
|
+
/**
|
|
128
|
+
* Rotated siblings of a log, OLDEST FIRST (OSK-16214). The daemon's logger
|
|
129
|
+
* renames `daemon.app.log` to `daemon.app.1.log`, `.1` to `.2` and so on at
|
|
130
|
+
* 10 MB (`daemon/src/logger.ts` `maybeRotate`), and `logs` never reached them —
|
|
131
|
+
* `--lines 5000 | grep <run id>` found nothing while `daemon.app.1.log` held the
|
|
132
|
+
* run. A copy of `daemon/src/rotated-log-files.ts`, for runtimes that predate
|
|
133
|
+
* `--rotated`. Never throws.
|
|
134
|
+
*/
|
|
135
|
+
export declare function rotatedLogSiblings(filePath: string, readdir?: (dir: string) => string[]): string[];
|
|
136
|
+
/** The sentence shown when rotated siblings hold older lines the view leaves out. */
|
|
137
|
+
export declare function describeRotatedSiblings(filePath: string, siblings: readonly string[]): string | null;
|
|
138
|
+
/**
|
|
139
|
+
* The last `maxLines` lines of one file, read backwards in chunks so the cost
|
|
140
|
+
* follows the lines asked for, not the file's size. Bytes are decoded once, so
|
|
141
|
+
* a multi-byte character split across a chunk boundary survives.
|
|
142
|
+
*/
|
|
143
|
+
export declare function readLastLines(filePath: string, maxLines: number): string[];
|
|
144
|
+
/**
|
|
145
|
+
* The last `maxLines` lines across `files` (OLDEST FIRST) as if they were one
|
|
146
|
+
* file. A file renamed away between the listing and the read is skipped.
|
|
147
|
+
*/
|
|
148
|
+
export declare function readLastLinesAcross(files: readonly string[], maxLines: number): string[];
|
|
149
|
+
/** Every byte of `files`, in order, to `out` — streamed, honouring back-pressure. */
|
|
150
|
+
export declare function streamLogFiles(files: readonly string[], out: NodeJS.WritableStream): Promise<void>;
|
|
151
|
+
/** `x.y.z` from a version string, or null. A prerelease suffix is ignored. */
|
|
152
|
+
export declare function parseRuntimeVersion(text: string): [number, number, number] | null;
|
|
153
|
+
/** Whether `version` is at least `floor`; null when either is not a version. */
|
|
154
|
+
export declare function runtimeVersionAtLeast(version: string, floor: string): boolean | null;
|
|
155
|
+
/** The installed runtime's `--version`, or null when it cannot say in time. */
|
|
156
|
+
export declare function probeRuntimeVersion(capture?: typeof execRuntimeBinaryCapture): Promise<string | null>;
|
|
157
|
+
/**
|
|
158
|
+
* The live daemon's log as the runtime's `status --json` reports it
|
|
159
|
+
* (`service.logs`). Status has named the live `--log-file` since before `logs`
|
|
160
|
+
* did, so on 0.8.117 status is right while logs is wrong. Null when status
|
|
161
|
+
* cannot answer, or answers with anything but an absolute path.
|
|
162
|
+
*/
|
|
163
|
+
export declare function probeStatusLogPath(flags: Pick<DaemonLogsFlags, 'profile'>, capture?: typeof execRuntimeBinaryCapture): Promise<string | null>;
|
|
164
|
+
/** What `skrr daemon logs` does: forward to the runtime, or read a file itself. */
|
|
165
|
+
export type DaemonLogsPlan =
|
|
166
|
+
/** `runtimeVersion` decides whether a flag newer than 0.8.119 may be forwarded. */
|
|
167
|
+
{
|
|
168
|
+
kind: 'forward';
|
|
169
|
+
runtimeVersion: string | null;
|
|
170
|
+
}
|
|
171
|
+
/** `note` goes to stderr before any log content; never printed for `--path`. */
|
|
172
|
+
| {
|
|
173
|
+
kind: 'read';
|
|
174
|
+
path: string;
|
|
175
|
+
note: string | null;
|
|
176
|
+
missingHint: string;
|
|
177
|
+
};
|
|
178
|
+
export interface DaemonLogsPlanDeps {
|
|
179
|
+
supportsLogs(): Promise<boolean | null>;
|
|
180
|
+
runtimeVersion(): Promise<string | null>;
|
|
181
|
+
statusLogPath(): Promise<string | null>;
|
|
182
|
+
/** The profile log for this invocation (`daemon.err.log` under `--stderr`). */
|
|
183
|
+
profilePath: string;
|
|
184
|
+
service: InstalledServiceLogDestinations | null;
|
|
185
|
+
mtimeOf(filePath: string): number | null;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Decide which runtime, if any, `skrr daemon logs` may trust (OSK-15993).
|
|
189
|
+
*
|
|
190
|
+
* - No `logs` subcommand: the legacy fallback, as before.
|
|
191
|
+
* - A runtime at or above {@link LIVE_LOG_RESOLUTION_RUNTIME_VERSION}: forward.
|
|
192
|
+
* - An older runtime, or one whose version cannot be read: ask its `status`
|
|
193
|
+
* which file the live daemon writes and read that file here. When status
|
|
194
|
+
* cannot answer, an older runtime gets the legacy fallback (the newest of the
|
|
195
|
+
* profile log and the installed service's logs); an unknown one is forwarded.
|
|
196
|
+
*/
|
|
197
|
+
export declare function planDaemonLogs(flags: Pick<DaemonLogsFlags, 'stderr'>, deps: DaemonLogsPlanDeps): Promise<DaemonLogsPlan>;
|
|
96
198
|
/** Read a bounded trailing window, so an unrotated legacy err log is safe. */
|
|
97
199
|
export declare function readDaemonLogTail(filePath: string, maxLines: number): string[];
|
|
98
200
|
/**
|
|
@@ -104,13 +206,15 @@ export declare function readDaemonLogTail(filePath: string, maxLines: number): s
|
|
|
104
206
|
* or it parses successfully and is then silently dropped.
|
|
105
207
|
*/
|
|
106
208
|
export declare function buildDaemonLogsArgs(flags: DaemonLogsFlags): string[];
|
|
209
|
+
/** `--stderr` help, word for word the runtime's own (`daemon/src/index.ts`). */
|
|
210
|
+
export declare const STDERR_FLAG_DESCRIPTION = "Read the daemon's raw stderr instead of its log: the file its installed service redirects stderr to, or the profile's daemon.err.log. A daemon started with --log-file by anything else has no known stderr file, so its live log (which carries every WARN and ERROR) is shown instead, with a note";
|
|
107
211
|
export default class DaemonLogs extends Command {
|
|
108
212
|
static aliases: string[];
|
|
109
213
|
static description: string;
|
|
110
214
|
/**
|
|
111
|
-
* Mirrors the
|
|
215
|
+
* Mirrors the options `oversky logs` actually implements
|
|
112
216
|
* (`daemon/src/index.ts` — `-n/--lines`, `-f/--follow`, `--stderr`,
|
|
113
|
-
* `--path`). Typed flags are deliberate — they give `skrr daemon logs --help`
|
|
217
|
+
* `--path`, and since 0.8.120 `--rotated`). Typed flags are deliberate — they give `skrr daemon logs --help`
|
|
114
218
|
* something real to print, which raw `strict = false` passthrough never did.
|
|
115
219
|
* The trade is that anything NOT declared here becomes unreachable, so this
|
|
116
220
|
* list has to stay in step with the daemon command.
|
|
@@ -120,6 +224,7 @@ export default class DaemonLogs extends Command {
|
|
|
120
224
|
lines: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
121
225
|
stderr: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
122
226
|
path: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
227
|
+
rotated: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
123
228
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
124
229
|
};
|
|
125
230
|
static examples: string[];
|