@sirenodeck/sirenodeck 0.2.9 → 0.2.10
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/main.mjs +36 -5
- package/package.json +1 -1
- package/src/builtin-addons/coding-agents/global/backend.ts +15 -1
- package/src/builtin-addons/media/backend.ts +21 -0
- package/src/builtin-addons/system-status/README.md +1 -1
- package/src/builtin-addons/system-status/domain/display-metrics.ts +1 -1
- package/src/builtin-addons/system-status/manifest.ts +1 -1
- package/src/cli/commands/emulator-mode.ts +2 -1
package/dist/main.mjs
CHANGED
|
@@ -308,7 +308,7 @@ const levelNameFromNumber = (level) => {
|
|
|
308
308
|
};
|
|
309
309
|
//#endregion
|
|
310
310
|
//#region package.json
|
|
311
|
-
var version$1 = "0.2.
|
|
311
|
+
var version$1 = "0.2.10";
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/version.ts
|
|
314
314
|
const PACKAGE_NAME = "@sirenodeck/sirenodeck";
|
|
@@ -1539,7 +1539,7 @@ const packageRoot = () => {
|
|
|
1539
1539
|
const resolveViteBin = () => {
|
|
1540
1540
|
let dir = packageRoot() ?? findWorkspaceRoot();
|
|
1541
1541
|
for (;;) {
|
|
1542
|
-
const bin = join(dir, "node_modules", "
|
|
1542
|
+
const bin = join(dir, "node_modules", "vite", "bin", "vite.js");
|
|
1543
1543
|
if (existsSync(bin)) return bin;
|
|
1544
1544
|
const parent = dirname(dir);
|
|
1545
1545
|
if (parent === dir) return bin;
|
|
@@ -10422,8 +10422,23 @@ let provider = null;
|
|
|
10422
10422
|
let ctxRef$2 = null;
|
|
10423
10423
|
let captureMediaState = null;
|
|
10424
10424
|
let captureStage = "playing";
|
|
10425
|
+
let captureUpdatedAt = 0;
|
|
10425
10426
|
const captureMode = () => process.env["SIRENO_CAPTURE_FAKE_MEDIA"] === "1";
|
|
10427
|
+
const updateCaptureProgress = () => {
|
|
10428
|
+
if (captureMediaState === null) return;
|
|
10429
|
+
const now = Date.now();
|
|
10430
|
+
if (captureMediaState.isPlaying) {
|
|
10431
|
+
const currentTime = Math.min(captureMediaState.totalTime, captureMediaState.currentTime + (now - captureUpdatedAt) / 1e3);
|
|
10432
|
+
captureMediaState = {
|
|
10433
|
+
...captureMediaState,
|
|
10434
|
+
currentTime,
|
|
10435
|
+
progress: computeProgress(currentTime, captureMediaState.totalTime)
|
|
10436
|
+
};
|
|
10437
|
+
}
|
|
10438
|
+
captureUpdatedAt = now;
|
|
10439
|
+
};
|
|
10426
10440
|
const setCapturePlayback = (playing) => {
|
|
10441
|
+
updateCaptureProgress();
|
|
10427
10442
|
captureStage = playing ? "playing" : "paused";
|
|
10428
10443
|
if (captureMediaState === null) return;
|
|
10429
10444
|
captureMediaState = {
|
|
@@ -10465,6 +10480,7 @@ const globalService$3 = {
|
|
|
10465
10480
|
intervalMs: 1e3,
|
|
10466
10481
|
poll: async (_ctx) => {
|
|
10467
10482
|
if (captureMode() && captureMediaState !== null) {
|
|
10483
|
+
updateCaptureProgress();
|
|
10468
10484
|
const stagePath = process.env["SIRENO_CAPTURE_FAKE_MEDIA_FILE"];
|
|
10469
10485
|
if (stagePath !== void 0) try {
|
|
10470
10486
|
if (JSON.parse((await import("node:fs")).readFileSync(stagePath, "utf8")).stage === "paused" && captureStage !== "paused") setCapturePlayback(false);
|
|
@@ -10530,6 +10546,7 @@ const globalService$3 = {
|
|
|
10530
10546
|
muted: false
|
|
10531
10547
|
};
|
|
10532
10548
|
captureStage = "playing";
|
|
10549
|
+
captureUpdatedAt = Date.now();
|
|
10533
10550
|
provider = null;
|
|
10534
10551
|
return;
|
|
10535
10552
|
}
|
|
@@ -12185,7 +12202,7 @@ function formatValue(value, formatter) {
|
|
|
12185
12202
|
case "bytes": return formatBytes(value);
|
|
12186
12203
|
case "bool": return formatBool(value);
|
|
12187
12204
|
case "count": return { value: value.toFixed(0) };
|
|
12188
|
-
case "frequency-ghz": return { value: value.toFixed(
|
|
12205
|
+
case "frequency-ghz": return { value: value.toFixed(1) };
|
|
12189
12206
|
case "percent": return value < 10 ? {
|
|
12190
12207
|
value: value.toFixed(1),
|
|
12191
12208
|
unit: "%"
|
|
@@ -12472,7 +12489,7 @@ const CAPTURE_METRIC_VALUES = {
|
|
|
12472
12489
|
disk: 54,
|
|
12473
12490
|
"disk-io": 124e4,
|
|
12474
12491
|
"fan-rpm": 1260,
|
|
12475
|
-
frequency:
|
|
12492
|
+
frequency: 3.6,
|
|
12476
12493
|
"gpu-temp": 58,
|
|
12477
12494
|
"gpu-usage": 27,
|
|
12478
12495
|
load: 1.4,
|
|
@@ -17867,10 +17884,24 @@ const captureAgentsForStage = (stage) => {
|
|
|
17867
17884
|
"waiting_for_human"
|
|
17868
17885
|
];
|
|
17869
17886
|
const now = Date.now();
|
|
17887
|
+
const titles = [
|
|
17888
|
+
"Review authentication flow",
|
|
17889
|
+
"Fix dashboard loading state",
|
|
17890
|
+
"Write API integration tests",
|
|
17891
|
+
"Refactor configuration parser",
|
|
17892
|
+
"Investigate memory usage",
|
|
17893
|
+
"Update developer documentation",
|
|
17894
|
+
"Add keyboard shortcuts",
|
|
17895
|
+
"Improve deployment pipeline",
|
|
17896
|
+
"Review database migration",
|
|
17897
|
+
"Polish settings interface",
|
|
17898
|
+
"Summarize code changes",
|
|
17899
|
+
"Check release notes"
|
|
17900
|
+
];
|
|
17870
17901
|
const agents = statuses.map((status, index) => ({
|
|
17871
17902
|
sessionId: `sireno-capture-${stage}-${index + 1}`,
|
|
17872
17903
|
providerId: index % 2 === 0 ? "opencode" : "claude-code",
|
|
17873
|
-
title:
|
|
17904
|
+
title: titles[index],
|
|
17874
17905
|
status,
|
|
17875
17906
|
directory: "/works/sireno-deck",
|
|
17876
17907
|
updatedAt: now - index * 1e3,
|
package/package.json
CHANGED
|
@@ -273,10 +273,24 @@ const captureAgentsForStage = (stage: string): AgentsSnapshot => {
|
|
|
273
273
|
"waiting_for_human",
|
|
274
274
|
]
|
|
275
275
|
const now = Date.now()
|
|
276
|
+
const titles = [
|
|
277
|
+
"Review authentication flow",
|
|
278
|
+
"Fix dashboard loading state",
|
|
279
|
+
"Write API integration tests",
|
|
280
|
+
"Refactor configuration parser",
|
|
281
|
+
"Investigate memory usage",
|
|
282
|
+
"Update developer documentation",
|
|
283
|
+
"Add keyboard shortcuts",
|
|
284
|
+
"Improve deployment pipeline",
|
|
285
|
+
"Review database migration",
|
|
286
|
+
"Polish settings interface",
|
|
287
|
+
"Summarize code changes",
|
|
288
|
+
"Check release notes",
|
|
289
|
+
]
|
|
276
290
|
const agents: Agent[] = statuses.map((status, index) => ({
|
|
277
291
|
sessionId: `sireno-capture-${stage}-${index + 1}`,
|
|
278
292
|
providerId: index % 2 === 0 ? "opencode" : "claude-code",
|
|
279
|
-
title:
|
|
293
|
+
title: titles[index]!,
|
|
280
294
|
status,
|
|
281
295
|
directory: "/works/sireno-deck",
|
|
282
296
|
updatedAt: now - index * 1_000,
|
|
@@ -26,11 +26,30 @@ let provider: MediaStatusProvider | null = null
|
|
|
26
26
|
let ctxRef: AddonServiceContext | null = null
|
|
27
27
|
let captureMediaState: MediaPlayerState | null = null
|
|
28
28
|
let captureStage = "playing"
|
|
29
|
+
let captureUpdatedAt = 0
|
|
29
30
|
|
|
30
31
|
const captureMode = (): boolean =>
|
|
31
32
|
process.env["SIRENO_CAPTURE_FAKE_MEDIA"] === "1"
|
|
32
33
|
|
|
34
|
+
const updateCaptureProgress = (): void => {
|
|
35
|
+
if (captureMediaState === null) return
|
|
36
|
+
const now = Date.now()
|
|
37
|
+
if (captureMediaState.isPlaying) {
|
|
38
|
+
const currentTime = Math.min(
|
|
39
|
+
captureMediaState.totalTime,
|
|
40
|
+
captureMediaState.currentTime + (now - captureUpdatedAt) / 1000,
|
|
41
|
+
)
|
|
42
|
+
captureMediaState = {
|
|
43
|
+
...captureMediaState,
|
|
44
|
+
currentTime,
|
|
45
|
+
progress: computeProgress(currentTime, captureMediaState.totalTime),
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
captureUpdatedAt = now
|
|
49
|
+
}
|
|
50
|
+
|
|
33
51
|
const setCapturePlayback = (playing: boolean): void => {
|
|
52
|
+
updateCaptureProgress()
|
|
34
53
|
captureStage = playing ? "playing" : "paused"
|
|
35
54
|
if (captureMediaState === null) return
|
|
36
55
|
captureMediaState = {
|
|
@@ -92,6 +111,7 @@ export const globalService: AddonGlobalService = {
|
|
|
92
111
|
intervalMs: 1_000,
|
|
93
112
|
poll: async (_ctx: AddonServiceContext): Promise<MediaPlayerState> => {
|
|
94
113
|
if (captureMode() && captureMediaState !== null) {
|
|
114
|
+
updateCaptureProgress()
|
|
95
115
|
const stagePath = process.env["SIRENO_CAPTURE_FAKE_MEDIA_FILE"]
|
|
96
116
|
if (stagePath !== undefined) {
|
|
97
117
|
try {
|
|
@@ -169,6 +189,7 @@ export const globalService: AddonGlobalService = {
|
|
|
169
189
|
muted: false,
|
|
170
190
|
}
|
|
171
191
|
captureStage = "playing"
|
|
192
|
+
captureUpdatedAt = Date.now()
|
|
172
193
|
provider = null
|
|
173
194
|
return
|
|
174
195
|
}
|
|
@@ -123,7 +123,7 @@ rail, so there is nothing to read — this is not a gap waiting to be filled.
|
|
|
123
123
|
| `count` | `42` (≥100) / `5.4` (<100) |
|
|
124
124
|
| `bytes` | `5.2 MB` |
|
|
125
125
|
| `rate-bytes` | `5.2 MB/s` (uses KiB/MiB/GiB/TiB scaling) |
|
|
126
|
-
| `frequency-ghz` | `3.
|
|
126
|
+
| `frequency-ghz` | `3.4` |
|
|
127
127
|
| `uptime` | `2h` |
|
|
128
128
|
| `bool` | `ON` (≥0.5) / `OFF` |
|
|
129
129
|
|
|
@@ -54,7 +54,7 @@ function formatValue(
|
|
|
54
54
|
value: value.toFixed(0),
|
|
55
55
|
}
|
|
56
56
|
case "frequency-ghz":
|
|
57
|
-
return { value: value.toFixed(
|
|
57
|
+
return { value: value.toFixed(1) }
|
|
58
58
|
case "percent":
|
|
59
59
|
// ponytail: integers when stable, one decimal when low. High values
|
|
60
60
|
// (10%+) hide <1% swing behind integer rounding; low values benefit
|
|
@@ -60,7 +60,8 @@ const packageRoot = (): string | null => {
|
|
|
60
60
|
const resolveViteBin = (): string => {
|
|
61
61
|
let dir = packageRoot() ?? findWorkspaceRoot()
|
|
62
62
|
for (;;) {
|
|
63
|
-
|
|
63
|
+
// pnpm's .bin entry is a shell wrapper, not a JavaScript entry point.
|
|
64
|
+
const bin = join(dir, "node_modules", "vite", "bin", "vite.js")
|
|
64
65
|
if (existsSync(bin)) return bin
|
|
65
66
|
const parent = dirname(dir)
|
|
66
67
|
if (parent === dir) return bin
|