@skrr-ai/cli 0.1.92 → 0.1.93
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.d.ts +44 -0
- package/dist/base-command.js +96 -0
- package/dist/commands/agents/badge.d.ts +41 -0
- package/dist/commands/agents/badge.js +158 -0
- package/dist/commands/agents/create.d.ts +24 -0
- package/dist/commands/agents/create.js +212 -0
- package/dist/commands/agents/embed.d.ts +20 -0
- package/dist/commands/agents/embed.js +61 -0
- package/dist/commands/agents/share.d.ts +27 -0
- package/dist/commands/agents/share.js +100 -0
- package/dist/commands/agents/vanity.d.ts +21 -0
- package/dist/commands/agents/vanity.js +77 -0
- package/dist/commands/agents/visibility.d.ts +21 -1
- package/dist/commands/agents/visibility.js +112 -0
- package/dist/commands/commands.d.ts +1 -0
- package/dist/commands/commands.js +22 -9
- package/dist/commands/earnings/attributions.d.ts +17 -0
- package/dist/commands/earnings/attributions.js +82 -0
- package/dist/commands/earnings/index.js +2 -1
- package/dist/commands/generate-recovery-code.js +4 -3
- package/dist/commands/github/allow-tools.d.ts +1 -0
- package/dist/commands/github/app/install.d.ts +1 -0
- package/dist/commands/github/app/status.d.ts +1 -0
- package/dist/commands/github/connect.d.ts +1 -0
- package/dist/commands/github/connections.d.ts +1 -0
- package/dist/commands/github/disconnect.d.ts +1 -0
- package/dist/commands/github/finalize.d.ts +1 -0
- package/dist/commands/github/reconnect.d.ts +1 -0
- package/dist/commands/github/run.d.ts +1 -0
- package/dist/commands/github/tools.d.ts +1 -0
- package/dist/commands/integrations/connections/connect.d.ts +1 -0
- package/dist/commands/integrations/connections/disconnect.d.ts +1 -0
- package/dist/commands/integrations/connections/finalize.d.ts +1 -0
- package/dist/commands/integrations/connections/list.d.ts +1 -0
- package/dist/commands/integrations/connections/reconnect.d.ts +1 -0
- package/dist/commands/integrations/execute.d.ts +1 -0
- package/dist/commands/integrations/search.d.ts +1 -0
- package/dist/commands/integrations/toolkits.d.ts +1 -0
- package/dist/commands/integrations/tools/allow.d.ts +1 -0
- package/dist/commands/integrations/tools/list.d.ts +1 -0
- package/dist/commands/login.js +12 -0
- package/dist/commands/machines/dedicated/logs.d.ts +19 -0
- package/dist/commands/machines/dedicated/logs.js +103 -0
- package/dist/commands/machines/dedicated/power/set.js +1 -1
- package/dist/commands/open.d.ts +24 -0
- package/dist/commands/open.js +74 -0
- package/dist/commands/projects/archive.d.ts +1 -0
- package/dist/commands/projects/archive.js +23 -0
- package/dist/commands/projects/delete.d.ts +1 -0
- package/dist/commands/projects/delete.js +23 -0
- package/dist/commands/projects/list.d.ts +3 -0
- package/dist/commands/projects/list.js +12 -2
- package/dist/commands/spaces/actions/add.js +4 -3
- package/dist/commands/spaces/actions/available.js +3 -2
- package/dist/commands/spaces/actions/list.js +5 -4
- package/dist/commands/spaces/actions/replace.js +6 -5
- package/dist/commands/spaces/archive.js +3 -2
- package/dist/commands/spaces/auto-executor/preview.js +4 -3
- package/dist/commands/spaces/auto-executor/run.js +4 -3
- package/dist/commands/spaces/auto-executor/runs.js +3 -2
- package/dist/commands/spaces/auto-executor/update.js +4 -3
- package/dist/commands/spaces/bootstrap.js +3 -2
- package/dist/commands/spaces/briefs/delete.js +3 -2
- package/dist/commands/spaces/briefs/get.js +3 -2
- package/dist/commands/spaces/briefs/list.js +3 -2
- package/dist/commands/spaces/briefs/set.js +5 -4
- package/dist/commands/spaces/capacity.js +5 -4
- package/dist/commands/spaces/conversations.js +3 -2
- package/dist/commands/spaces/cycles/create.js +3 -2
- package/dist/commands/spaces/cycles/graph.js +2 -1
- package/dist/commands/spaces/cycles/list.js +3 -2
- package/dist/commands/spaces/cycles/settings.js +4 -3
- package/dist/commands/spaces/cycles/show.js +3 -2
- package/dist/commands/spaces/cycles/update.js +3 -2
- package/dist/commands/spaces/delete.js +4 -3
- package/dist/commands/spaces/expertise-suggestions.js +4 -3
- package/dist/commands/spaces/files/delete.js +3 -2
- package/dist/commands/spaces/files/folders/create.js +3 -2
- package/dist/commands/spaces/files/folders/delete.js +3 -2
- package/dist/commands/spaces/files/folders/list.js +3 -2
- package/dist/commands/spaces/files/folders/update.js +3 -2
- package/dist/commands/spaces/files/list.js +3 -2
- package/dist/commands/spaces/files/move.js +3 -2
- package/dist/commands/spaces/files/rename.js +3 -2
- package/dist/commands/spaces/files/upload.js +6 -5
- package/dist/commands/spaces/github-automations/set.js +3 -2
- package/dist/commands/spaces/github-automations/show.js +3 -2
- package/dist/commands/spaces/goals.js +2 -1
- package/dist/commands/spaces/heartbeats/create.js +4 -3
- package/dist/commands/spaces/heartbeats/delete.js +4 -3
- package/dist/commands/spaces/heartbeats/list.js +4 -3
- package/dist/commands/spaces/heartbeats/status.js +3 -2
- package/dist/commands/spaces/heartbeats/update.js +4 -3
- package/dist/commands/spaces/insights.js +5 -4
- package/dist/commands/spaces/labels/add.js +4 -3
- package/dist/commands/spaces/labels/list.js +2 -1
- package/dist/commands/spaces/labels/remove.js +4 -3
- package/dist/commands/spaces/list.d.ts +3 -0
- package/dist/commands/spaces/list.js +11 -2
- package/dist/commands/spaces/live/cards/create.js +3 -2
- package/dist/commands/spaces/live/cards/list.js +3 -2
- package/dist/commands/spaces/live/cards/reorder.js +7 -2
- package/dist/commands/spaces/live/scene.js +4 -3
- package/dist/commands/spaces/members/add.js +7 -6
- package/dist/commands/spaces/members/list.js +4 -3
- package/dist/commands/spaces/members/remove.js +7 -6
- package/dist/commands/spaces/move.js +3 -2
- package/dist/commands/spaces/pin.js +5 -4
- package/dist/commands/spaces/preferences/show.js +4 -3
- package/dist/commands/spaces/preferences/tabs.js +4 -3
- package/dist/commands/spaces/revisions.js +3 -2
- package/dist/commands/spaces/room/ensure.js +5 -4
- package/dist/commands/spaces/room/messages.js +3 -2
- package/dist/commands/spaces/room/show.js +5 -4
- package/dist/commands/spaces/skills/add.js +4 -3
- package/dist/commands/spaces/skills/list.js +3 -2
- package/dist/commands/spaces/skills/pin.js +4 -3
- package/dist/commands/spaces/skills/remove.js +4 -3
- package/dist/commands/spaces/snapshot.js +3 -2
- package/dist/commands/spaces/states/archive.js +3 -2
- package/dist/commands/spaces/states/create.js +3 -2
- package/dist/commands/spaces/states/list.js +3 -2
- package/dist/commands/spaces/states/reorder.js +2 -1
- package/dist/commands/spaces/states/update.js +3 -2
- package/dist/commands/spaces/summary.js +4 -3
- package/dist/commands/spaces/tasks.d.ts +3 -0
- package/dist/commands/spaces/tasks.js +14 -3
- package/dist/commands/spaces/triggers/delete.js +5 -4
- package/dist/commands/spaces/triggers/set.js +4 -3
- package/dist/commands/spaces/triggers/show.js +4 -3
- package/dist/commands/spaces/unarchive.js +3 -2
- package/dist/commands/spaces/update.js +5 -4
- package/dist/commands/spaces/views/create.js +3 -2
- package/dist/commands/spaces/views/list.js +3 -2
- package/dist/commands/spaces/views/reorder.js +6 -3
- package/dist/commands/spaces/views/subscribe.js +2 -1
- package/dist/commands/spaces/views/subscriptions.js +1 -0
- package/dist/commands/spaces/views/unsubscribe.js +2 -1
- package/dist/commands/spaces/widgets/add.js +4 -3
- package/dist/commands/spaces/widgets/list.js +3 -2
- package/dist/commands/spaces/widgets/remove.js +5 -4
- package/dist/commands/spaces/work-graph.js +2 -1
- package/dist/commands/store/install.d.ts +1 -1
- package/dist/commands/store/install.js +24 -8
- package/dist/commands/store/show.d.ts +25 -0
- package/dist/commands/store/show.js +203 -0
- package/dist/commands/store/stats.d.ts +33 -0
- package/dist/commands/store/stats.js +258 -0
- package/dist/commands/tasks/actions/attach.js +1 -1
- package/dist/commands/tasks/actions/detach.js +4 -3
- package/dist/commands/tasks/activity.js +3 -2
- package/dist/commands/tasks/ancestors.js +2 -1
- package/dist/commands/tasks/approvals/create.js +2 -1
- package/dist/commands/tasks/approvals/delete.js +3 -2
- package/dist/commands/tasks/approvals/list.js +5 -4
- package/dist/commands/tasks/approvals/resolve.js +2 -1
- package/dist/commands/tasks/archive.js +3 -2
- package/dist/commands/tasks/assign.js +4 -3
- package/dist/commands/tasks/attachments/delete.js +3 -2
- package/dist/commands/tasks/attachments/download.d.ts +1 -0
- package/dist/commands/tasks/attachments/download.js +20 -1
- package/dist/commands/tasks/attachments/list.js +2 -1
- package/dist/commands/tasks/attachments/set-role.js +2 -1
- package/dist/commands/tasks/attachments/upload.js +2 -1
- package/dist/commands/tasks/bulk-update.d.ts +1 -0
- package/dist/commands/tasks/bulk-update.js +106 -15
- package/dist/commands/tasks/cancel-cascade.d.ts +1 -0
- package/dist/commands/tasks/cancel-cascade.js +13 -3
- package/dist/commands/tasks/cascade-status.js +2 -1
- package/dist/commands/tasks/checkout.js +3 -2
- package/dist/commands/tasks/children.js +2 -1
- package/dist/commands/tasks/comments/add.js +7 -6
- package/dist/commands/tasks/comments/anchor.js +8 -7
- package/dist/commands/tasks/comments/delete.js +3 -2
- package/dist/commands/tasks/comments/list.js +2 -1
- package/dist/commands/tasks/comments/reopen.js +3 -2
- package/dist/commands/tasks/comments/resolve.js +3 -2
- package/dist/commands/tasks/create-tree.d.ts +63 -0
- package/dist/commands/tasks/create-tree.js +197 -4
- package/dist/commands/tasks/delete.js +5 -4
- package/dist/commands/tasks/descendants.js +2 -1
- package/dist/commands/tasks/dri-plan.js +3 -2
- package/dist/commands/tasks/dri-run.js +3 -2
- package/dist/commands/tasks/dri-status.js +2 -1
- package/dist/commands/tasks/duplicate-pipeline.js +2 -1
- package/dist/commands/tasks/execution-summary.js +2 -1
- package/dist/commands/tasks/execution-timeline.js +2 -1
- package/dist/commands/tasks/fork.js +1 -0
- package/dist/commands/tasks/forward.js +4 -3
- package/dist/commands/tasks/handover.js +1 -0
- package/dist/commands/tasks/interrupt.js +3 -2
- package/dist/commands/tasks/labels/attach.js +4 -3
- package/dist/commands/tasks/labels/detach.js +4 -3
- package/dist/commands/tasks/labels/suggest.js +5 -4
- package/dist/commands/tasks/list.d.ts +27 -1
- package/dist/commands/tasks/list.js +101 -3
- package/dist/commands/tasks/move.js +4 -3
- package/dist/commands/tasks/output.js +6 -5
- package/dist/commands/tasks/pause-schedule.js +3 -2
- package/dist/commands/tasks/promote.js +1 -0
- package/dist/commands/tasks/prompt-log.js +2 -1
- package/dist/commands/tasks/release.js +5 -4
- package/dist/commands/tasks/remind.js +2 -1
- package/dist/commands/tasks/replay.js +3 -2
- package/dist/commands/tasks/report.js +1 -0
- package/dist/commands/tasks/resume-schedule.js +3 -2
- package/dist/commands/tasks/retry-schedule.js +3 -2
- package/dist/commands/tasks/retry.js +10 -9
- package/dist/commands/tasks/revisions.js +2 -1
- package/dist/commands/tasks/runs.js +6 -5
- package/dist/commands/tasks/schedule.js +3 -2
- package/dist/commands/tasks/self-schedule.js +6 -5
- package/dist/commands/tasks/skills/pin.js +3 -2
- package/dist/commands/tasks/skills/unpin.js +3 -2
- package/dist/commands/tasks/snooze.js +6 -5
- package/dist/commands/tasks/start-all.js +5 -4
- package/dist/commands/tasks/subscribe.js +1 -0
- package/dist/commands/tasks/tags/add.js +4 -3
- package/dist/commands/tasks/tags/remove.js +4 -3
- package/dist/commands/tasks/timeline.js +3 -2
- package/dist/commands/tasks/today.d.ts +4 -1
- package/dist/commands/tasks/today.js +12 -2
- package/dist/commands/tasks/transcript.js +6 -5
- package/dist/commands/tasks/unschedule.js +3 -2
- package/dist/commands/tasks/unsnooze.js +3 -2
- package/dist/commands/tasks/unsubscribe.js +2 -1
- package/dist/commands/tasks/update.js +5 -4
- package/dist/commands/tasks/wait.js +5 -4
- package/dist/lib/agent-distribution.d.ts +37 -0
- package/dist/lib/agent-distribution.js +63 -0
- package/dist/lib/agent-ref.d.ts +69 -0
- package/dist/lib/agent-ref.js +168 -0
- package/dist/lib/api-fetch.d.ts +2 -0
- package/dist/lib/api-fetch.js +14 -3
- package/dist/lib/command-hygiene.d.ts +13 -0
- package/dist/lib/command-hygiene.js +62 -2
- package/dist/lib/dedicated-power.d.ts +5 -0
- package/dist/lib/dedicated-power.js +30 -2
- package/dist/lib/dry-run-plans.d.ts +50 -0
- package/dist/lib/dry-run-plans.js +85 -0
- package/dist/lib/json-output.d.ts +31 -0
- package/dist/lib/json-output.js +78 -0
- package/dist/lib/list-output.d.ts +75 -0
- package/dist/lib/list-output.js +266 -0
- package/dist/lib/machine-daemon-log.d.ts +36 -0
- package/dist/lib/machine-daemon-log.js +78 -0
- package/dist/lib/node-adapter.js +10 -1
- package/dist/lib/open-target.d.ts +12 -0
- package/dist/lib/open-target.js +108 -0
- package/dist/lib/rate-limit-retry.d.ts +45 -0
- package/dist/lib/rate-limit-retry.js +88 -0
- package/dist/lib/store-listing.d.ts +45 -0
- package/dist/lib/store-listing.js +186 -0
- package/dist/lib/task-batch.d.ts +67 -0
- package/dist/lib/task-batch.js +227 -0
- package/dist/lib/terminal-qr.d.ts +55 -0
- package/dist/lib/terminal-qr.js +119 -0
- package/dist/lib/web-url.d.ts +11 -0
- package/dist/lib/web-url.js +24 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +68 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +47 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +68 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +46 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +6612 -6113
- package/oclif.manifest.json +46778 -38019
- package/package.json +2 -1
|
@@ -151,6 +151,14 @@ export declare const DAEMON_COMPUTER_EVENTS: {
|
|
|
151
151
|
* `computer_declared_services_v1`.
|
|
152
152
|
*/
|
|
153
153
|
readonly services: "daemon:computer:services";
|
|
154
|
+
/**
|
|
155
|
+
* Read the tail of the daemon's OWN process log (a bounded, redacted copy of
|
|
156
|
+
* what its logger wrote since it started), for the owner who asks why their
|
|
157
|
+
* machine reconnected. Carries a `requestId` and the principal the API
|
|
158
|
+
* authorized (`observe`); the daemon checks the principal against the grant
|
|
159
|
+
* set it holds. Needs `computer_daemon_log_v1`.
|
|
160
|
+
*/
|
|
161
|
+
readonly daemonLog: "daemon:computer:log";
|
|
154
162
|
/** The answer to any request that carried a `requestId`. */
|
|
155
163
|
readonly ack: "daemon:computer:ack";
|
|
156
164
|
readonly manifest: "daemon:computer:manifest";
|
|
@@ -295,6 +303,15 @@ export declare const COMPUTER_CAPABILITIES: {
|
|
|
295
303
|
* browser; nothing is proxied to it. Announced by the relay that serves it.
|
|
296
304
|
*/
|
|
297
305
|
readonly declaredServices: "computer_declared_services_v1";
|
|
306
|
+
/**
|
|
307
|
+
* The daemon serves the tail of its own process log
|
|
308
|
+
* (`daemon:computer:log`): an in-memory ring of lines its logger
|
|
309
|
+
* wrote, redacted before they enter the ring, read at the `watch` tier. It
|
|
310
|
+
* is NOT syslog or the journal and never reads either. Announced by the relay
|
|
311
|
+
* that serves it; a personal machine's daemon announces it too and refuses
|
|
312
|
+
* the read `consent_missing` until `skrr computer allow`.
|
|
313
|
+
*/
|
|
314
|
+
readonly daemonLog: "computer_daemon_log_v1";
|
|
298
315
|
/**
|
|
299
316
|
* The page follows the controlling window (§6.2 "a stable viewport", §7.1,
|
|
300
317
|
* OSK-13808): a browser `viewport` input, sent only by the attachment that
|
|
@@ -1080,3 +1097,54 @@ export declare function computerPowerPhaseForLeaseState(state: unknown): Compute
|
|
|
1080
1097
|
export declare function computerShowsDesktop(phase: ComputerPowerPhase): boolean;
|
|
1081
1098
|
/** Power actions are offered for a Dedicated Runtime only; a personal machine has none (§18). */
|
|
1082
1099
|
export declare function computerOffersPowerActions(machineKind: ComputerMachineKind): boolean;
|
|
1100
|
+
/**
|
|
1101
|
+
* Why the daemon's log is a wire feature at all: the tenant uid on a Dedicated
|
|
1102
|
+
* Runtime guest cannot read syslog or the journal, so an owner could not see
|
|
1103
|
+
* why their machine's daemon reconnected or failed. The daemon keeps the last
|
|
1104
|
+
* lines its OWN logger wrote in memory and serves them; it opens no file and no
|
|
1105
|
+
* system log for this.
|
|
1106
|
+
*/
|
|
1107
|
+
export declare const COMPUTER_DAEMON_LOG_LEVELS: readonly ["trace", "debug", "info", "warn", "error"];
|
|
1108
|
+
export type ComputerDaemonLogLevel = (typeof COMPUTER_DAEMON_LOG_LEVELS)[number];
|
|
1109
|
+
/** Every bound is the daemon's to enforce and the API's to validate against. */
|
|
1110
|
+
export declare const COMPUTER_DAEMON_LOG_LIMITS: {
|
|
1111
|
+
/** Lines the daemon keeps in memory; older ones fall off the front. */
|
|
1112
|
+
readonly ringLines: 2000;
|
|
1113
|
+
/** A line longer than this is cut and marked, never kept whole. */
|
|
1114
|
+
readonly lineChars: 1000;
|
|
1115
|
+
/** Lines returned when the caller names none. */
|
|
1116
|
+
readonly defaultLines: 100;
|
|
1117
|
+
/** The most lines one answer carries. */
|
|
1118
|
+
readonly maxLines: 500;
|
|
1119
|
+
/** The most bytes (UTF-8) one answer's text carries; far under the 1 MiB SSE frame. */
|
|
1120
|
+
readonly maxBytes: number;
|
|
1121
|
+
/** The longest look-back a `sinceMs` may ask for (24 h; the ring is shorter anyway). */
|
|
1122
|
+
readonly maxSinceMs: number;
|
|
1123
|
+
/** Requests the daemon answers per `rateWindowMs`; one more is `rate_limited`. */
|
|
1124
|
+
readonly rateMax: 30;
|
|
1125
|
+
readonly rateWindowMs: number;
|
|
1126
|
+
};
|
|
1127
|
+
/** One line of the daemon's log as it leaves the daemon: redacted, time and level split out. */
|
|
1128
|
+
export interface ComputerDaemonLogLine {
|
|
1129
|
+
/** Epoch milliseconds the daemon wrote it. */
|
|
1130
|
+
at: number;
|
|
1131
|
+
level: ComputerDaemonLogLevel;
|
|
1132
|
+
text: string;
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* The answer to `daemon:computer:log`. `lines` are oldest first, at most
|
|
1136
|
+
* the asked number of the NEWEST that match. `truncated` is true when more
|
|
1137
|
+
* matched than were returned (by count or bytes); `ringFull` is true when the
|
|
1138
|
+
* ring has already dropped older lines, so "no line before this" does not mean
|
|
1139
|
+
* "the daemon logged nothing earlier". `startedAt` is the daemon process start:
|
|
1140
|
+
* a reconnect that restarted the daemon is visible as a new one.
|
|
1141
|
+
*/
|
|
1142
|
+
export interface ComputerDaemonLogResult {
|
|
1143
|
+
lines: ComputerDaemonLogLine[];
|
|
1144
|
+
startedAt: number;
|
|
1145
|
+
now: number;
|
|
1146
|
+
truncated: boolean;
|
|
1147
|
+
ringFull: boolean;
|
|
1148
|
+
/** Lines the redaction rewrote anywhere in the ring (a count, never content). */
|
|
1149
|
+
redactedLines: number;
|
|
1150
|
+
}
|
|
@@ -155,6 +155,14 @@ export const DAEMON_COMPUTER_EVENTS = {
|
|
|
155
155
|
* `computer_declared_services_v1`.
|
|
156
156
|
*/
|
|
157
157
|
services: 'daemon:computer:services',
|
|
158
|
+
/**
|
|
159
|
+
* Read the tail of the daemon's OWN process log (a bounded, redacted copy of
|
|
160
|
+
* what its logger wrote since it started), for the owner who asks why their
|
|
161
|
+
* machine reconnected. Carries a `requestId` and the principal the API
|
|
162
|
+
* authorized (`observe`); the daemon checks the principal against the grant
|
|
163
|
+
* set it holds. Needs `computer_daemon_log_v1`.
|
|
164
|
+
*/
|
|
165
|
+
daemonLog: 'daemon:computer:log',
|
|
158
166
|
// daemon → API
|
|
159
167
|
/** The answer to any request that carried a `requestId`. */
|
|
160
168
|
ack: 'daemon:computer:ack',
|
|
@@ -315,6 +323,15 @@ export const COMPUTER_CAPABILITIES = {
|
|
|
315
323
|
* browser; nothing is proxied to it. Announced by the relay that serves it.
|
|
316
324
|
*/
|
|
317
325
|
declaredServices: 'computer_declared_services_v1',
|
|
326
|
+
/**
|
|
327
|
+
* The daemon serves the tail of its own process log
|
|
328
|
+
* (`daemon:computer:log`): an in-memory ring of lines its logger
|
|
329
|
+
* wrote, redacted before they enter the ring, read at the `watch` tier. It
|
|
330
|
+
* is NOT syslog or the journal and never reads either. Announced by the relay
|
|
331
|
+
* that serves it; a personal machine's daemon announces it too and refuses
|
|
332
|
+
* the read `consent_missing` until `skrr computer allow`.
|
|
333
|
+
*/
|
|
334
|
+
daemonLog: 'computer_daemon_log_v1',
|
|
318
335
|
/**
|
|
319
336
|
* The page follows the controlling window (§6.2 "a stable viewport", §7.1,
|
|
320
337
|
* OSK-13808): a browser `viewport` input, sent only by the attachment that
|
|
@@ -1197,3 +1214,32 @@ export function computerShowsDesktop(phase) {
|
|
|
1197
1214
|
export function computerOffersPowerActions(machineKind) {
|
|
1198
1215
|
return machineKind === 'dedicated';
|
|
1199
1216
|
}
|
|
1217
|
+
// ---------------------------------------------------------------------------
|
|
1218
|
+
// The daemon's own log (`computer_daemon_log_v1`)
|
|
1219
|
+
// ---------------------------------------------------------------------------
|
|
1220
|
+
/**
|
|
1221
|
+
* Why the daemon's log is a wire feature at all: the tenant uid on a Dedicated
|
|
1222
|
+
* Runtime guest cannot read syslog or the journal, so an owner could not see
|
|
1223
|
+
* why their machine's daemon reconnected or failed. The daemon keeps the last
|
|
1224
|
+
* lines its OWN logger wrote in memory and serves them; it opens no file and no
|
|
1225
|
+
* system log for this.
|
|
1226
|
+
*/
|
|
1227
|
+
export const COMPUTER_DAEMON_LOG_LEVELS = ['trace', 'debug', 'info', 'warn', 'error'];
|
|
1228
|
+
/** Every bound is the daemon's to enforce and the API's to validate against. */
|
|
1229
|
+
export const COMPUTER_DAEMON_LOG_LIMITS = {
|
|
1230
|
+
/** Lines the daemon keeps in memory; older ones fall off the front. */
|
|
1231
|
+
ringLines: 2000,
|
|
1232
|
+
/** A line longer than this is cut and marked, never kept whole. */
|
|
1233
|
+
lineChars: 1000,
|
|
1234
|
+
/** Lines returned when the caller names none. */
|
|
1235
|
+
defaultLines: 100,
|
|
1236
|
+
/** The most lines one answer carries. */
|
|
1237
|
+
maxLines: 500,
|
|
1238
|
+
/** The most bytes (UTF-8) one answer's text carries; far under the 1 MiB SSE frame. */
|
|
1239
|
+
maxBytes: 192 * 1024,
|
|
1240
|
+
/** The longest look-back a `sinceMs` may ask for (24 h; the ring is shorter anyway). */
|
|
1241
|
+
maxSinceMs: 24 * 60 * 60 * 1000,
|
|
1242
|
+
/** Requests the daemon answers per `rateWindowMs`; one more is `rate_limited`. */
|
|
1243
|
+
rateMax: 30,
|
|
1244
|
+
rateWindowMs: 60 * 1000,
|
|
1245
|
+
};
|