forge-openclaw-plugin 0.2.84 → 0.2.85
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/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
/>
|
|
14
14
|
<link rel="icon" type="image/png" href="/forge/assets/favicon-BCHm9dUV.ico" />
|
|
15
15
|
<link rel="alternate icon" href="/forge/assets/favicon-BCHm9dUV.ico" />
|
|
16
|
-
<script type="module" crossorigin src="/forge/assets/index-
|
|
16
|
+
<script type="module" crossorigin src="/forge/assets/index-BNvUaA6y.js"></script>
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/forge/assets/vendor-BVU0cZC9.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/forge/assets/board-DKxKOwax.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/forge/assets/ui-3Wd4pVaA.js">
|
|
@@ -901,10 +901,13 @@ function mapSleepRawLog(row) {
|
|
|
901
901
|
createdAt: row.created_at
|
|
902
902
|
};
|
|
903
903
|
}
|
|
904
|
-
function mapWorkoutSession(row) {
|
|
904
|
+
function mapWorkoutSession(row, options = {}) {
|
|
905
905
|
const provenance = safeJsonParse(row.provenance_json, {});
|
|
906
906
|
const derived = safeJsonParse(row.derived_json, {});
|
|
907
|
-
const
|
|
907
|
+
const includeAnalytics = options.includeAnalytics ?? true;
|
|
908
|
+
const analytics = includeAnalytics
|
|
909
|
+
? getStoredWorkoutAnalytics(row)
|
|
910
|
+
: undefined;
|
|
908
911
|
const presentation = buildWorkoutSessionPresentation({
|
|
909
912
|
source: row.source,
|
|
910
913
|
sourceType: row.source_type,
|
|
@@ -950,7 +953,7 @@ function mapWorkoutSession(row) {
|
|
|
950
953
|
annotations: safeJsonParse(row.annotations_json, {}),
|
|
951
954
|
provenance,
|
|
952
955
|
derived,
|
|
953
|
-
analytics,
|
|
956
|
+
...(analytics ? { analytics } : {}),
|
|
954
957
|
generatedFromHabitId: row.generated_from_habit_id,
|
|
955
958
|
generatedFromCheckInId: row.generated_from_check_in_id,
|
|
956
959
|
reconciliationStatus: row.reconciliation_status,
|
|
@@ -1151,7 +1154,7 @@ export function listSleepSessions(userIds) {
|
|
|
1151
1154
|
return listSleepRows(userIds).map(mapSleepSession);
|
|
1152
1155
|
}
|
|
1153
1156
|
export function listWorkoutSessions(userIds) {
|
|
1154
|
-
return listWorkoutRows(userIds).map(mapWorkoutSession);
|
|
1157
|
+
return listWorkoutRows(userIds).map((row) => mapWorkoutSession(row));
|
|
1155
1158
|
}
|
|
1156
1159
|
export function getSleepSessionById(sleepId) {
|
|
1157
1160
|
ensureLegacyAppleSleepHistoryRepaired();
|
|
@@ -2928,7 +2931,7 @@ function mobileSyncSessionPairing(session) {
|
|
|
2928
2931
|
function mobileSyncSessionMetadata(session) {
|
|
2929
2932
|
return safeJsonParse(session.source_metadata_json, {});
|
|
2930
2933
|
}
|
|
2931
|
-
function
|
|
2934
|
+
function applyWorkoutChunkImmediately(session, family, workouts) {
|
|
2932
2935
|
if (workouts.length === 0) {
|
|
2933
2936
|
return;
|
|
2934
2937
|
}
|
|
@@ -2982,6 +2985,7 @@ function applyWorkoutSummaryChunkImmediately(session, workouts) {
|
|
|
2982
2985
|
.run(device.sourceDevice, JSON.stringify({
|
|
2983
2986
|
progressiveChunk: true,
|
|
2984
2987
|
syncSessionId: session.id,
|
|
2988
|
+
family,
|
|
2985
2989
|
workouts: workouts.length
|
|
2986
2990
|
}), workouts.length, createdCount, updatedCount, mergedCount, now, now, runId);
|
|
2987
2991
|
});
|
|
@@ -3201,8 +3205,9 @@ export function ingestMobileHealthSyncChunk(syncSessionId, payload, rawPayloadJs
|
|
|
3201
3205
|
serverChecksum,
|
|
3202
3206
|
mode: wirePayload.mode
|
|
3203
3207
|
}), now, now, now, now);
|
|
3204
|
-
if (parsed.family === "workout_summaries"
|
|
3205
|
-
|
|
3208
|
+
if (parsed.family === "workout_summaries" ||
|
|
3209
|
+
parsed.family === "workout_archive") {
|
|
3210
|
+
applyWorkoutChunkImmediately(session, parsed.family, wirePayload.payload.workouts ?? []);
|
|
3206
3211
|
}
|
|
3207
3212
|
const progress = updateMobileSyncSessionProgress(syncSessionId);
|
|
3208
3213
|
return {
|
|
@@ -3669,7 +3674,7 @@ export function getCompanionOverview(userIds) {
|
|
|
3669
3674
|
WHERE user_id IN (${userIds.map(() => "?").join(",")})`
|
|
3670
3675
|
: `SELECT COUNT(*) AS count FROM health_sleep_raw_logs`)
|
|
3671
3676
|
.get(...(userIds ?? []));
|
|
3672
|
-
const workouts = listWorkoutRows(userIds).map(mapWorkoutSession);
|
|
3677
|
+
const workouts = listWorkoutRows(userIds).map((row) => mapWorkoutSession(row));
|
|
3673
3678
|
const vitalsRows = listDailySummaryRows("vitals", userIds);
|
|
3674
3679
|
const vitalsMetricEntries = vitalsRows.reduce((sum, row) => {
|
|
3675
3680
|
const metrics = safeJsonParse(row.metrics_json, {});
|
|
@@ -3897,9 +3902,17 @@ function buildFitnessVitalsTrend(rows) {
|
|
|
3897
3902
|
}));
|
|
3898
3903
|
}
|
|
3899
3904
|
export function getFitnessViewData(userIds) {
|
|
3900
|
-
const
|
|
3905
|
+
const workoutRows = listWorkoutRows(userIds);
|
|
3906
|
+
const recent = workoutRows
|
|
3907
|
+
.slice(0, 40)
|
|
3908
|
+
.map((row) => mapWorkoutSession(row, { includeAnalytics: true }));
|
|
3909
|
+
const browserSessions = workoutRows
|
|
3910
|
+
.slice(0, 2000)
|
|
3911
|
+
.map((row, index) => mapWorkoutSession(row, { includeAnalytics: index < 40 }));
|
|
3912
|
+
const analysisSessions = workoutRows
|
|
3913
|
+
.slice(0, 500)
|
|
3914
|
+
.map((row) => mapWorkoutSession(row, { includeAnalytics: true }));
|
|
3901
3915
|
const vitalsTrend = buildFitnessVitalsTrend(listDailySummaryRows("vitals", userIds));
|
|
3902
|
-
const recent = workouts.slice(0, 40);
|
|
3903
3916
|
const weekly = recent.filter((session) => Date.now() - Date.parse(session.startedAt) <= 7 * 24 * 60 * 60 * 1000);
|
|
3904
3917
|
const weeklyVolumeSeconds = weekly.reduce((sum, session) => sum + session.durationSeconds, 0);
|
|
3905
3918
|
const exerciseMinutes = weekly.reduce((sum, session) => sum + (session.exerciseMinutes ?? session.durationSeconds / 60), 0);
|
|
@@ -4012,8 +4025,8 @@ export function getFitnessViewData(userIds) {
|
|
|
4012
4025
|
energyKcal: metrics.energyKcal
|
|
4013
4026
|
})),
|
|
4014
4027
|
vitalsTrend,
|
|
4015
|
-
analysisSessions
|
|
4016
|
-
sessions:
|
|
4028
|
+
analysisSessions,
|
|
4029
|
+
sessions: browserSessions
|
|
4017
4030
|
};
|
|
4018
4031
|
}
|
|
4019
4032
|
function averageNullable(values) {
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "forge-openclaw-plugin",
|
|
3
3
|
"name": "Forge",
|
|
4
4
|
"description": "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.85",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
package/package.json
CHANGED