{
  "generatedAt": "2026-07-21T10:33:30.671Z",
  "ok": false,
  "status": "needs_setup",
  "counts": {
    "passed": 8,
    "failed": 5,
    "total": 13
  },
  "callbackUrl": "https://growthos.petvibess.com/webhooks/shopify",
  "requiredScopes": [
    "read_products",
    "read_orders",
    "read_content",
    "read_themes",
    "read_files",
    "read_inventory",
    "read_metafields"
  ],
  "configuredScopes": [
    "read_products",
    "write_products",
    "read_inventory",
    "read_files",
    "write_files",
    "read_themes",
    "write_themes",
    "read_content",
    "write_content",
    "read_online_store_navigation",
    "write_online_store_navigation",
    "read_metaobjects",
    "write_metaobjects",
    "read_metaobject_definitions",
    "write_metaobject_definitions",
    "read_translations",
    "write_translations",
    "read_locales",
    "write_locales",
    "read_locations",
    "read_orders",
    "read_customers"
  ],
  "missingScopes": [
    "read_metafields"
  ],
  "requiredEnv": [
    "SHOPIFY_STORE_DOMAIN",
    "SHOPIFY_ADMIN_ACCESS_TOKEN",
    "SHOPIFY_CLIENT_SECRET",
    "GROWTHOS_APP_URL",
    "GROWTHOS_ADMIN_TOKEN",
    "GROWTHOS_LOGIN_PASSWORD",
    "GROWTHOS_SHOPIFY_SCOPES"
  ],
  "recommendedEnv": [
    "GROWTHOS_STORE_AUDIT_DATA_DIR",
    "GROWTHOS_ALERT_WEBHOOK_URL",
    "GROWTHOS_ENABLE_SCHEDULER",
    "GROWTHOS_STORE_AUDIT_INTERVAL_MINUTES"
  ],
  "envTemplate": "SHOPIFY_STORE_DOMAIN=dimxv1-b8.myshopify.com\nSHOPIFY_ADMIN_ACCESS_TOKEN=shpat_...\nSHOPIFY_CLIENT_SECRET=...\nGROWTHOS_APP_URL=https://growthos.petvibess.com\nGROWTHOS_ADMIN_TOKEN=...\nGROWTHOS_LOGIN_PASSWORD=...\nGROWTHOS_SHOPIFY_SCOPES=read_products,read_orders,read_content,read_themes,read_files,read_inventory,read_metafields\nGROWTHOS_STORE_AUDIT_DATA_DIR=/opt/growthos/audit\nGROWTHOS_ALERT_WEBHOOK_URL=https://...\nGROWTHOS_ENABLE_SCHEDULER=true\nGROWTHOS_STORE_AUDIT_INTERVAL_MINUTES=15",
  "nextActions": [
    "Add read_metafields to GROWTHOS_SHOPIFY_SCOPES, release the Shopify app version, then reconnect.",
    "Set GROWTHOS_ADMIN_TOKEN before exposing Store Audit job endpoints.",
    "Set GROWTHOS_ALERT_WEBHOOK_URL to receive realtime high-risk Store Audit alerts.",
    "AI will ensure Store Audit webhooks after Shopify Admin access is configured; inspect setup details only if /daily flags a connection issue.",
    "AI will generate Store Audit snapshots after Shopify Admin access is configured; inspect evidence only if /daily flags a monitoring issue."
  ],
  "evidence": {
    "latestSnapshotId": "",
    "latestSnapshotGeneratedAt": "",
    "snapshotCount": 0,
    "recentEventCount": 0,
    "webhookEnsureGeneratedAt": "",
    "webhookRequestedCount": 20,
    "webhookExistingCount": 0,
    "webhookCreatedCount": 0,
    "webhookErrorCount": 0,
    "dataDirectory": "/opt/growthos-petvibess/runtime/audit",
    "dataDirectoryWritable": true,
    "dataDirectoryError": "",
    "chainOk": true,
    "chainCheckedCount": 0,
    "chainBrokenCount": 0,
    "alertCount": 0,
    "openAlertCount": 0,
    "acknowledgedAlertCount": 0,
    "resolvedAlertCount": 0,
    "ignoredAlertCount": 0
  },
  "checks": [
    {
      "name": "Shopify store domain",
      "ok": true,
      "status": "ready",
      "evidence": "afp0a0-1i.myshopify.com",
      "action": "Set SHOPIFY_STORE_DOMAIN to the myshopify.com admin domain."
    },
    {
      "name": "Shopify Admin access token",
      "ok": true,
      "status": "ready",
      "evidence": "SHOPIFY_ADMIN_ACCESS_TOKEN is configured.",
      "action": "Reconnect Shopify OAuth or set SHOPIFY_ADMIN_ACCESS_TOKEN before running audit jobs."
    },
    {
      "name": "Shopify webhook HMAC secret",
      "ok": true,
      "status": "ready",
      "evidence": "SHOPIFY_CLIENT_SECRET is configured for webhook HMAC verification.",
      "action": "Set SHOPIFY_CLIENT_SECRET from the Shopify app dashboard before exposing /webhooks/shopify."
    },
    {
      "name": "Audit read scopes",
      "ok": false,
      "status": "needs_action",
      "evidence": "Missing: read_metafields.",
      "action": "Add read_metafields to GROWTHOS_SHOPIFY_SCOPES, release the Shopify app version, then reconnect."
    },
    {
      "name": "Public webhook URL",
      "ok": true,
      "status": "ready",
      "evidence": "https://growthos.petvibess.com/webhooks/shopify",
      "action": "Set GROWTHOS_APP_URL to the public HTTPS GrowthOS URL."
    },
    {
      "name": "Admin token protection",
      "ok": false,
      "status": "needs_action",
      "evidence": "GROWTHOS_ADMIN_TOKEN is not set; Store Audit job endpoints would be unprotected.",
      "action": "Set GROWTHOS_ADMIN_TOKEN before exposing Store Audit job endpoints."
    },
    {
      "name": "Login protection",
      "ok": true,
      "status": "ready",
      "evidence": "GROWTHOS_LOGIN_PASSWORD is configured for Store Audit pages and read APIs.",
      "action": "Set GROWTHOS_LOGIN_PASSWORD or GROWTHOS_ADMIN_TOKEN before exposing Store Audit pages and read APIs."
    },
    {
      "name": "Realtime alert webhook",
      "ok": false,
      "status": "needs_action",
      "evidence": "GROWTHOS_ALERT_WEBHOOK_URL is not set; high-risk changes will be stored locally but not pushed in realtime.",
      "action": "Set GROWTHOS_ALERT_WEBHOOK_URL to receive realtime high-risk Store Audit alerts."
    },
    {
      "name": "Audit evidence directory",
      "ok": true,
      "status": "ready",
      "evidence": "/opt/growthos-petvibess/runtime/audit is writable.",
      "action": "No action required."
    },
    {
      "name": "Audit webhook subscriptions",
      "ok": false,
      "status": "needs_action",
      "evidence": "Webhook subscriptions have not been ensured yet.",
      "action": "AI will ensure Store Audit webhooks after Shopify Admin access is configured; inspect setup details only if /daily flags a connection issue."
    },
    {
      "name": "Initial resource snapshot",
      "ok": false,
      "status": "needs_action",
      "evidence": "No Store Audit snapshot has been generated yet.",
      "action": "AI will generate Store Audit snapshots after Shopify Admin access is configured; inspect evidence only if /daily flags a monitoring issue."
    },
    {
      "name": "Tamper-evident event chain",
      "ok": true,
      "status": "ready",
      "evidence": "0 event(s) checked, 0 break(s).",
      "action": "No action required."
    },
    {
      "name": "Open high-risk alerts",
      "ok": true,
      "status": "ready",
      "evidence": "0 open, 0 acknowledged, 0 resolved, 0 ignored.",
      "action": "No action required."
    }
  ]
}