feat: prefer workspace key path for google maps

This commit is contained in:
Stefano Fiorini
2026-03-10 00:35:25 -05:00
parent 7361b31c7c
commit d3a2b9faae
4 changed files with 142 additions and 7 deletions

View File

@@ -0,0 +1,92 @@
# Google Maps Workspace Key Repo Sync Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
**Goal:** Sync the `stef-openclaw-skills` repository source and docs with the verified Google Maps workspace-key behavior, then commit and push the change.
**Architecture:** Apply the same path-resolution change from the live integration to the repo copy, keep the docs aligned, and verify behavior with inspection plus a live ETA command. Commit only the repo files that reflect this feature.
**Tech Stack:** Node.js CLI, local file path resolution, git
---
### Task 1: Sync repo source copy
**Files:**
- Modify: `/Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills/integrations/google-maps/traffic.js`
**Step 1: Write the failing check**
Run:
```bash
sed -n '1,50p' /Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills/integrations/google-maps/traffic.js
```
Expected: only the legacy path is present and there is no workspace credential fallback array.
**Step 2: Write minimal implementation**
Apply the same path lookup logic as the live local integration:
- prefer `~/.openclaw/workspace/.clawdbot/credentials/google-maps/apikey.txt`
- keep `~/.openclaw/credentials/google-maps/apikey.txt` as fallback
- keep `GOOGLE_MAPS_API_KEY` support unchanged
**Step 3: Verify source sync**
Run:
```bash
sed -n '1,60p' /Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills/integrations/google-maps/traffic.js
```
Expected: workspace path is primary and legacy path remains fallback.
### Task 2: Verify docs alignment
**Files:**
- Modify or confirm: `/Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills/docs/google-maps.md`
**Step 1: Verify doc text**
Run:
```bash
sed -n '1,80p' /Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills/docs/google-maps.md
```
Expected: docs show workspace key path as preferred and legacy path as fallback.
### Task 3: Verify behavior and publish
**Files:**
- Commit: `/Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills/integrations/google-maps/traffic.js`
- Commit: `/Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills/docs/google-maps.md`
- Commit: `/Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills/docs/plans/2026-03-10-google-maps-workspace-key-repo-sync-design.md`
- Commit: `/Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills/docs/plans/2026-03-10-google-maps-workspace-key-repo-sync.md`
**Step 1: Run live verification**
Run:
```bash
node /Users/stefano/.openclaw/workspace/integrations/google-maps/traffic.js eta --from "DFW Airport" --to "Downtown Dallas" --departAt now
```
Expected: JSON ETA output succeeds with the workspace key file.
**Step 2: Inspect git diff**
Run:
```bash
git -C /Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills diff -- integrations/google-maps/traffic.js docs/google-maps.md docs/plans/2026-03-10-google-maps-workspace-key-repo-sync-design.md docs/plans/2026-03-10-google-maps-workspace-key-repo-sync.md
```
Expected: only the intended repo sync changes appear.
**Step 3: Commit**
Run:
```bash
git -C /Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills add integrations/google-maps/traffic.js docs/google-maps.md docs/plans/2026-03-10-google-maps-workspace-key-repo-sync-design.md docs/plans/2026-03-10-google-maps-workspace-key-repo-sync.md && git -C /Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills commit -m "docs: sync google maps workspace key path"
```
Expected: commit succeeds.
**Step 4: Push**
Run:
```bash
git -C /Users/stefano/.openclaw/workspace/projects/stef-openclaw-skills push origin main
```
Expected: push succeeds.