Replace all light-mode Tailwind classes across every module with the
AG-Refine dark design system: #0f1621 body, #131c2b header/nav,
#1a2438 cards, #1e2d40 borders, agri-green (22c55e/16a34a) accents.
- tailwind.config.js: add `night` dark palette (950–300)
- sidebar.css: full dark rewrite (cards, tags, inputs, scrollbar)
- sidebar.html: AG/REFINE/FIELD INTELLIGENCE logo, dark tab bar with
INTEL/INGEST/FIELDS/DATA/CARBON/AGENT labels and dot indicators
- sidebar/index.js: manage inactive tab color via inline style
- reading-list: card links → agri-400, summary/date → gray-400/500
- data-ingest: drop zone → night borders, file cards → dark theme
- field-profile: form → night-700 bg, inputs use .ag-input, cards dark
- dashboard: AI query bar and category pills → dark, answer box dark
- carbon-estimator: feature list and notify banner → dark palette
- ag-refine: suggestions → night-700, chat bubbles dark, tool call
cards use night-700/border-night-600, errors use red-900/20 tint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBD2dN2KEjzz3UQFa9hEpu
Farm memory (agrifine_farm_memory in chrome.storage.local):
- New FarmMemory schema: aiGeneratedSummary, farm_name, total_acres,
primary_crops, soil_overview, key_insights, action_items, risk_flags,
opportunities, lastUpdated
- getFarmMemory() / saveFarmMemory() in storage.js
buildContextBundle() now loads all four data sources in parallel:
1. Farm memory snapshot (AI synthesis from prior sessions) — at top
2. Field profiles with crop history, harvest records, and coordinates
3. Ingested data files with structured-data previews
4. Reading list articles with summaries and tags
Two new AgriAgent tools:
- get_farm_memory: retrieve the stored knowledge snapshot
- update_farm_memory: agent saves a comprehensive farm synthesis so future
sessions start with full context (the key to persistent memory)
System prompt rewrite in agent.js:
- Agent now understands its role as the farm's persistent advisor
- Memory protocol: reference farm memory first, update it when new
insights are discovered
- Explicit reasoning steps: Ground → Gaps → Connect → Cite → Remember
- Full tool selection guide with when-to-use guidance for all 11 tools
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBD2dN2KEjzz3UQFa9hEpu
screenshot_active_tab — captures current browser tab as JPEG; agent.js
formats the result as an Anthropic vision image block so Claude can
actually see the page (not just its text)
get_page_content — reads text of the active tab via content script, or
falls back to the reading-list cache when a URL is supplied
export_farm_data — generates a CSV or JSON file and triggers a browser
download for reading_list, field_profiles, ingested_files, or all data
open_tab — opens any https:// URL in a new browser tab and waits for it
to finish loading; returns tab_id for chained tool calls
read_tab_content — extracts and parses page text from any tab by tab_id
(or active tab) using chrome.scripting.executeScript; more reliable
than the content-script sendMessage path
Background worker gains CAPTURE_SCREENSHOT, GET_ACTIVE_TAB_CONTENT,
OPEN_TAB, and READ_TAB_CONTENT message handlers; agent.js detects
_type:'image' results and formats them as vision content blocks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBD2dN2KEjzz3UQFa9hEpu
- agent.js: add anthropic-dangerous-direct-browser-access header to _callAPI
(root cause of 401 CORS errors in AgriAgent tab)
- agent.js: handle stop_reason=max_tokens alongside end_turn
- ag-refine/index.js: reset isRunning in a try/catch around agent.run()
- tools.js: check res.ok before parsing JSON in toolLookupUSDAsoil
- tools.js: guard p.name?.toLowerCase() against null field names
- field-profile/index.js: guard both lat and lon before toFixed()
- reading-list/index.js: escapeHtml + safeHref to prevent XSS from page titles/urls
- dashboard/index.js: escapeHtml AI answer and all dynamic list content
- data-ingest/index.js: add .xlsx/.xls extension fallbacks for missing MIME type
- storage.js: check chrome.runtime.lastError in all four storage helpers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBD2dN2KEjzz3UQFa9hEpu
Manifest V3 Chrome extension with a persistent side-panel dashboard
for farm data management. Includes:
- Background service worker that proxies all Anthropic API calls
(API key stored in chrome.storage.session, never in content scripts)
- Content script that extracts page text for reading-list summarisation
- Sidebar UI with bottom tab bar and settings panel (API key entry)
- Five module stubs wired to live storage:
1. ReadingList — save pages with AI summary + topic tagging
2. DataIngest — drag-and-drop CSV/Excel/PDF → AI-structured JSON
3. FieldProfile — per-field cards with CLU, acres, soil, coordinates
4. Dashboard — unified filterable view + natural-language AI query bar
5. CarbonEstimator — Phase 7 stub with feature preview
- Shared storage schema (chrome.storage.local) with context-bundle
builder for passing reading-list + field data as AI system context
- Tailwind CSS + Webpack 5 build pipeline; builds successfully
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBD2dN2KEjzz3UQFa9hEpu
Python 2 reached end-of-life in January 2020. The 'Python 2/3
compatible' qualifier is no longer relevant and misleading. Updated
to match the official repository description.
Add an entry for synology-api to the README's list of Python libraries. The link points to N4S4/synology-api and notes it provides a Python wrapper for Synology NAS APIs (Surveillance Station, File Station, Download Station, Docker, and 50+ other endpoints).