@unisonlabs/sixminute-admin 0.1.1336 → 0.1.1338-next
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/sixminute-admin.mjs +42 -34
- package/package.json +1 -1
package/dist/sixminute-admin.mjs
CHANGED
|
@@ -21,7 +21,7 @@ import { homedir } from "node:os";
|
|
|
21
21
|
import { fileURLToPath } from "node:url";
|
|
22
22
|
|
|
23
23
|
// tools/admin/src/build-info.ts
|
|
24
|
-
var BUILT = { version: "0.1.
|
|
24
|
+
var BUILT = { version: "0.1.1338-next", commit: "68b97c87ffe2c765b7f2c771951347d856c50f92", surface: "20ea8005a02a0df9" };
|
|
25
25
|
|
|
26
26
|
// tools/admin/src/run.ts
|
|
27
27
|
import { readFileSync as readFileSync4, writeFileSync as writeFileSync2 } from "node:fs";
|
|
@@ -5061,6 +5061,11 @@ var SettingSchema = oneOf([
|
|
|
5061
5061
|
"theme"
|
|
5062
5062
|
]);
|
|
5063
5063
|
var DeviceSettingSchema = oneOf(["unit_minutes", "narrative_language", "narrative_max_chars", "always_on", "launch_at_login", "theme", "exclusions", "entry_size"]);
|
|
5064
|
+
var SignOutTriggerSchema = oneOf(["menu", "tray", "revoked"]);
|
|
5065
|
+
var UpdateStageSchema = oneOf(["check", "download", "verify", "install"]);
|
|
5066
|
+
var ProposalForSchema = oneOf(["compose", "split", "merge"]);
|
|
5067
|
+
var HandMadeHowSchema = oneOf(["drag", "form"]);
|
|
5068
|
+
var UpdateFailureSchema = oneOf(["offline", "timeout", "http_4xx", "http_5xx", "manifest", "signature", "download", "install", "other"]);
|
|
5064
5069
|
var Role = oneOf(["timekeeper", "billing", "admin"]);
|
|
5065
5070
|
var Origin = oneOf(["engine", "hand"]);
|
|
5066
5071
|
var DEVICE_COUNTER_NAMES = [
|
|
@@ -5076,11 +5081,17 @@ var DEVICE_COUNTER_NAMES = [
|
|
|
5076
5081
|
"samples_dropped",
|
|
5077
5082
|
"browser_breaker_trips",
|
|
5078
5083
|
"clock_steps",
|
|
5079
|
-
"capture_seconds",
|
|
5080
5084
|
"active_seconds",
|
|
5081
5085
|
"idle_seconds",
|
|
5086
|
+
"excluded_seconds",
|
|
5082
5087
|
"locked_seconds",
|
|
5083
|
-
"
|
|
5088
|
+
"outbox_dropped",
|
|
5089
|
+
"outbox_aged_out",
|
|
5090
|
+
"outbox_signed_out",
|
|
5091
|
+
"sampler_dropped_channel_full",
|
|
5092
|
+
"sampler_dropped_too_long",
|
|
5093
|
+
"sampler_dropped_unreadable",
|
|
5094
|
+
"sampler_restarts"
|
|
5084
5095
|
];
|
|
5085
5096
|
function counterShape() {
|
|
5086
5097
|
const shape = {};
|
|
@@ -5196,7 +5207,7 @@ var CATALOGUE = {
|
|
|
5196
5207
|
name: "setting changed",
|
|
5197
5208
|
owner: "cloud",
|
|
5198
5209
|
expect: "weekly",
|
|
5199
|
-
trigger: "a firm's or a person's setting row changed, or a desktop
|
|
5210
|
+
trigger: "a firm's or a person's setting row changed, or a desktop's check-in said it changed its own",
|
|
5200
5211
|
question: "Which settings matter to people?",
|
|
5201
5212
|
properties: { setting: SettingSchema, scope: oneOf(["firm", "profile", "device"]) },
|
|
5202
5213
|
wire: { name: "setting.changed", properties: exports_external.object({ setting: DeviceSettingSchema, scope: oneOf(["device"]) }) }
|
|
@@ -5215,7 +5226,8 @@ var CATALOGUE = {
|
|
|
5215
5226
|
attribute_count: count(),
|
|
5216
5227
|
narrative_chars: count(),
|
|
5217
5228
|
day_offset: dayOffset(),
|
|
5218
|
-
run_id: ids.run()
|
|
5229
|
+
run_id: ids.run(),
|
|
5230
|
+
how: HandMadeHowSchema
|
|
5219
5231
|
}
|
|
5220
5232
|
}),
|
|
5221
5233
|
entryEdited: spec({
|
|
@@ -5481,7 +5493,8 @@ var CATALOGUE = {
|
|
|
5481
5493
|
attributes_ms: duration(),
|
|
5482
5494
|
narrative_ms: duration(),
|
|
5483
5495
|
total_ms: duration(),
|
|
5484
|
-
run_id: ids.run()
|
|
5496
|
+
run_id: ids.run(),
|
|
5497
|
+
for: ProposalForSchema
|
|
5485
5498
|
},
|
|
5486
5499
|
wire: { name: "entry.proposed" }
|
|
5487
5500
|
}),
|
|
@@ -5556,10 +5569,18 @@ var CATALOGUE = {
|
|
|
5556
5569
|
name: "device counters",
|
|
5557
5570
|
owner: "host",
|
|
5558
5571
|
expect: "daily",
|
|
5559
|
-
trigger: "a desktop
|
|
5572
|
+
trigger: "a desktop's check-in carried a finished day's counters, once per device and day",
|
|
5560
5573
|
question: "Is capture healthy on each machine?",
|
|
5561
5574
|
properties: { day: day(), ...counterShape() }
|
|
5562
5575
|
}),
|
|
5576
|
+
appUsage: spec({
|
|
5577
|
+
name: "app usage",
|
|
5578
|
+
owner: "host",
|
|
5579
|
+
expect: "daily",
|
|
5580
|
+
trigger: "a desktop's check-in carried a finished day's time in the Sixminute window while the person was present",
|
|
5581
|
+
question: "How much time do people spend in Sixminute?",
|
|
5582
|
+
properties: { day: day(), foreground_seconds: daySeconds(), sessions: count() }
|
|
5583
|
+
}),
|
|
5563
5584
|
captureStarted: spec({
|
|
5564
5585
|
name: "capture started",
|
|
5565
5586
|
owner: "host",
|
|
@@ -5584,25 +5605,16 @@ var CATALOGUE = {
|
|
|
5584
5605
|
expect: "rare",
|
|
5585
5606
|
trigger: "a desktop signed out",
|
|
5586
5607
|
question: "Why do people sign out?",
|
|
5587
|
-
properties: { trigger:
|
|
5608
|
+
properties: { trigger: SignOutTriggerSchema },
|
|
5588
5609
|
wire: { name: "user.signed_out" }
|
|
5589
5610
|
}),
|
|
5590
|
-
permissionChanged: spec({
|
|
5591
|
-
name: "permission changed",
|
|
5592
|
-
owner: "host",
|
|
5593
|
-
expect: "rare",
|
|
5594
|
-
trigger: "a desktop's system permission changed",
|
|
5595
|
-
question: "Do people grant what capture needs?",
|
|
5596
|
-
properties: { permission: oneOf(["accessibility", "automation"]), is_granted: bool() },
|
|
5597
|
-
wire: { name: "permission.changed" }
|
|
5598
|
-
}),
|
|
5599
5611
|
updateFailed: spec({
|
|
5600
5612
|
name: "update failed",
|
|
5601
5613
|
owner: "host",
|
|
5602
5614
|
expect: "rare",
|
|
5603
5615
|
trigger: "a desktop's update failed",
|
|
5604
5616
|
question: "Where do updates break?",
|
|
5605
|
-
properties: { stage:
|
|
5617
|
+
properties: { stage: UpdateStageSchema, reason: UpdateFailureSchema },
|
|
5606
5618
|
wire: { name: "update.failed" }
|
|
5607
5619
|
}),
|
|
5608
5620
|
rawArchiveTurnedOn: spec({
|
|
@@ -5646,19 +5658,10 @@ var CATALOGUE = {
|
|
|
5646
5658
|
owner: "page",
|
|
5647
5659
|
expect: "daily",
|
|
5648
5660
|
trigger: "the window left the front",
|
|
5649
|
-
question: "How
|
|
5650
|
-
properties: {
|
|
5661
|
+
question: "How often do people leave the window?",
|
|
5662
|
+
properties: {},
|
|
5651
5663
|
wire: { name: "application.backgrounded" }
|
|
5652
5664
|
}),
|
|
5653
|
-
appUsage: spec({
|
|
5654
|
-
name: "app usage",
|
|
5655
|
-
owner: "page",
|
|
5656
|
-
expect: "daily",
|
|
5657
|
-
trigger: "a day's time in front of the window",
|
|
5658
|
-
question: "How much time do people spend in Sixminute?",
|
|
5659
|
-
properties: { day: day(), foreground_seconds: daySeconds(), sessions: count() },
|
|
5660
|
-
wire: { name: "app.usage" }
|
|
5661
|
-
}),
|
|
5662
5665
|
screenViewed: spec({
|
|
5663
5666
|
name: "$screen",
|
|
5664
5667
|
owner: "page",
|
|
@@ -6349,7 +6352,8 @@ var EntryMergeRequestSchema = exports_external.object({
|
|
|
6349
6352
|
});
|
|
6350
6353
|
var EntryBatchItemSchema = exports_external.object({
|
|
6351
6354
|
entry: JudgedEntrySchema,
|
|
6352
|
-
intervals: exports_external.array(IntervalSchema).default([])
|
|
6355
|
+
intervals: exports_external.array(IntervalSchema).default([]),
|
|
6356
|
+
how: HandMadeHowSchema.optional()
|
|
6353
6357
|
}).superRefine((item, ctx) => {
|
|
6354
6358
|
if (item.entry.override_seconds != null) {
|
|
6355
6359
|
ctx.addIssue({
|
|
@@ -7282,7 +7286,10 @@ var CheckinCountersSchema = exports_external.object({
|
|
|
7282
7286
|
outbox_aged_out: Count,
|
|
7283
7287
|
outbox_signed_out: Count,
|
|
7284
7288
|
sampler_dropped: SamplerDropsSchema,
|
|
7285
|
-
sampler_restarts: Count
|
|
7289
|
+
sampler_restarts: Count,
|
|
7290
|
+
ended: exports_external.boolean().optional(),
|
|
7291
|
+
app_ms: Count.optional(),
|
|
7292
|
+
app_sessions: Count.optional()
|
|
7286
7293
|
});
|
|
7287
7294
|
var CHECKIN_DAYS_MAX = 8;
|
|
7288
7295
|
var CHECKIN_EVENTS_MAX = 500;
|
|
@@ -7292,7 +7299,6 @@ var eventBase = {
|
|
|
7292
7299
|
};
|
|
7293
7300
|
var CaptureStartTriggerSchema = exports_external.enum(["button", "tray", "always_on", "launch", "sign_in"]);
|
|
7294
7301
|
var CaptureStopTriggerSchema = exports_external.enum(["button", "tray", "sign_out"]);
|
|
7295
|
-
var SignOutTriggerSchema = exports_external.enum(["menu", "tray", "revoked"]);
|
|
7296
7302
|
var CheckinEventSchema = exports_external.discriminatedUnion("name", [
|
|
7297
7303
|
exports_external.object({
|
|
7298
7304
|
...eventBase,
|
|
@@ -7314,7 +7320,8 @@ var CheckinEventSchema = exports_external.discriminatedUnion("name", [
|
|
|
7314
7320
|
exports_external.object({
|
|
7315
7321
|
...eventBase,
|
|
7316
7322
|
name: exports_external.literal("update.failed"),
|
|
7317
|
-
stage:
|
|
7323
|
+
stage: UpdateStageSchema,
|
|
7324
|
+
reason: UpdateFailureSchema.optional()
|
|
7318
7325
|
}),
|
|
7319
7326
|
exports_external.object({
|
|
7320
7327
|
...eventBase,
|
|
@@ -7855,7 +7862,8 @@ var LocalProposeRangeSchema = exports_external.object({
|
|
|
7855
7862
|
});
|
|
7856
7863
|
});
|
|
7857
7864
|
var LocalProposeRangesRequestSchema = exports_external.object({
|
|
7858
|
-
ranges: exports_external.array(LocalProposeRangeSchema).min(1).max(2)
|
|
7865
|
+
ranges: exports_external.array(LocalProposeRangeSchema).min(1).max(2),
|
|
7866
|
+
for: ProposalForSchema.optional()
|
|
7859
7867
|
});
|
|
7860
7868
|
var LocalProposeHowSchema = exports_external.enum(["chosen", "most", "tie", "none"]);
|
|
7861
7869
|
var LocalProposeRangesKeptReasonSchema = exports_external.enum(["no_text", "not_signed_in", "refused", "offline"]);
|
package/package.json
CHANGED