Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(gmail): point message archive/delete at @googleapis/gmail, not the removed googleapis package

[._.]/ Adam Eivy151e2341e433
diff --git a/client/src/utils/README.md b/client/src/utils/README.md
index 25755ec5d3..ef7595f8a2 100644
--- a/client/src/utils/README.md
+++ b/client/src/utils/README.md
@@ -84,7 +84,7 @@ its tunable constants and placement helpers.
| `cityMiniMap` | Mini-map projection of building positions into 2D bounds (`computeMiniMap`, `projectPoint`). |
| `cityPhotoMode` | Photo-mode camera presets, the demand-loop fly stepper, postcard stats, and screenshot filename (`getPreset`, `cyclePreset`, `stepFly`). |
| `cityPlan` | Master town plan: district parcels, shoreline/bay, plaza, transit loop, street network (`PARCELS`, `WORLD`, `computeStreets`, `computeStreetProps`, `isInWater`). |
-| `cityPlayerRig` | Exploration player-rig math: third-person follow camera, boom collision, damping, facing, avatar state (`thirdPersonCamera`, `resolveBoomT`, `dampAngle`, `moveFacing`, `avatarState`). |
+| `cityPlayerRig` | Exploration player-rig math: third-person follow camera, boom collision, damping, facing, avatar state (`thirdPersonCamera`, `resolveBoom`, `dampAngle`, `moveFacing`, `avatarState`). |
| `cityRooftops` | Deterministic rooftop fixture kits (antenna/tank/AC/dish) per app name (`computeRooftopKit`). |
| `cityProductivity` | Productivity monument from streak/velocity tiers (`computeProductivityMonument`). |
| `citySeasonalDecor` | Season/holiday resolution → seasonal decoration placements (`computeSeasonalDecor`). |
diff --git a/client/src/utils/cityPlayerRig.js b/client/src/utils/cityPlayerRig.js
index 6bef729fee..959df26a11 100644
--- a/client/src/utils/cityPlayerRig.js
+++ b/client/src/utils/cityPlayerRig.js
@@ -29,7 +29,7 @@ export const clampPitch = (pitch) =>
Math.min(THIRD_PERSON.maxPitch, Math.max(THIRD_PERSON.minPitch, pitch));
// Desired third-person camera + aim point for a rig pose. Pure — collision is applied
-// separately via resolveBoomT so callers can damp toward the resolved point.
+// separately via resolveBoom so callers can damp toward the resolved point.
export function thirdPersonCamera({ pos, yaw, pitch, boom = THIRD_PERSON.boom }) {
const p = clampPitch(pitch);
const back = boom * Math.cos(p);
diff --git a/scripts/recover-synced-test-fixtures.mjs b/scripts/recover-synced-test-fixtures.mjs
index bf59cfb545..9b616cb32c 100644
--- a/scripts/recover-synced-test-fixtures.mjs
+++ b/scripts/recover-synced-test-fixtures.mjs
@@ -123,8 +123,9 @@ if (existsSync(subsPath)) {
const serIds = new Set(psql(`SELECT id FROM pipeline_series WHERE ${jsonbTombstoned()} IS NOT TRUE`).split('\n').filter(Boolean));
copyFileSync(subsPath, `${subsPath}.bak`);
const j = JSON.parse(readFileSync(subsPath, 'utf8'));
- const before = j.subscriptions.length;
- j.subscriptions = j.subscriptions.filter((s) => {
+ const subs = Array.isArray(j.subscriptions) ? j.subscriptions : [];
+ const before = subs.length;
+ j.subscriptions = subs.filter((s) => {
if (s.recordKind === 'universe') return uniIds.has(s.recordId);
if (s.recordKind === 'series') return serIds.has(s.recordId);
return true; // keep mediaCollection + other kinds
diff --git a/server/services/messageActions.js b/server/services/messageActions.js
index 8bd0b94f92..b061a33c52 100644
--- a/server/services/messageActions.js
+++ b/server/services/messageActions.js
@@ -129,19 +129,19 @@ export async function executeAction(accountId, messageId, action) {
* Archive = remove INBOX label. Delete = move to trash.
*/
async function executeGmailApiAction(message, action) {
- const { google } = await import('googleapis');
+ const { gmail } = await import('@googleapis/gmail');
const { getAuthenticatedClient } = await import('./googleAuth.js');
const auth = await getAuthenticatedClient();
if (!auth) throw new Error('Google OAuth not configured');
- const gmail = google.gmail({ version: 'v1', auth });
+ const gmailClient = gmail({ version: 'v1', auth });
if (action === 'delete') {
- await gmail.users.messages.trash({ userId: 'me', id: message.apiId });
+ await gmailClient.users.messages.trash({ userId: 'me', id: message.apiId });
console.log(`📧 Gmail API: trashed "${message.subject}"`);
} else if (action === 'archive') {
- await gmail.users.messages.modify({
+ await gmailClient.users.messages.modify({
userId: 'me',
id: message.apiId,
requestBody: { removeLabelIds: ['INBOX'] }