Journal

manifest.json 168 lines

Files · 9
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168{
  "id": "com.lattice.journal",
  "name": "Journal",
  "icon": "▤",
  "color": "#8b5a9f",
  "description": "Keep daily journal entries with mood and tags.",
  "requested_permissions": {
    "storage": ["sql"],
    "network": {
      "allowlist": []
    },
    "events": {
      "entry-created": {
        "description": "A daily entry was created.",
        "schema": {
          "type": "object",
          "properties": {
            "entry_id": {
              "type": "string",
              "description": "Entry UUID.",
              "minLength": 1
            },
            "date": {
              "type": "string",
              "description": "Local entry date, YYYY-MM-DD; one entry per date.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "text": {
              "type": "string",
              "description": "Full entry text, possibly multiline.",
              "minLength": 1
            },
            "mood": {
              "type": "string",
              "description": "Self-reported mood.",
              "enum": ["very-low", "low", "neutral", "good", "great"]
            },
            "tags": {
              "type": "array",
              "description": "Trimmed, case-sensitive tags; empty array means none.",
              "items": {
                "type": "string",
                "description": "Nonempty tag.",
                "minLength": 1
              },
              "uniqueItems": true
            },
            "created_at": {
              "type": "string",
              "description": "Creation time, UTC ISO 8601 timestamp.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
            },
            "updated_at": {
              "type": "string",
              "description": "Last-change time, UTC ISO 8601 timestamp.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
            }
          },
          "required": [
            "entry_id",
            "date",
            "text",
            "mood",
            "tags",
            "created_at",
            "updated_at"
          ],
          "additionalProperties": false
        }
      },
      "entry-updated": {
        "description": "A daily entry was edited or appended to.",
        "schema": {
          "type": "object",
          "properties": {
            "entry_id": {
              "type": "string",
              "description": "Entry UUID.",
              "minLength": 1
            },
            "date": {
              "type": "string",
              "description": "Local entry date, YYYY-MM-DD; one entry per date.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "text": {
              "type": "string",
              "description": "Full entry text, possibly multiline.",
              "minLength": 1
            },
            "mood": {
              "type": "string",
              "description": "Self-reported mood.",
              "enum": ["very-low", "low", "neutral", "good", "great"]
            },
            "tags": {
              "type": "array",
              "description": "Trimmed, case-sensitive tags; empty array means none.",
              "items": {
                "type": "string",
                "description": "Nonempty tag.",
                "minLength": 1
              },
              "uniqueItems": true
            },
            "created_at": {
              "type": "string",
              "description": "Creation time, UTC ISO 8601 timestamp.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
            },
            "updated_at": {
              "type": "string",
              "description": "Last-change time, UTC ISO 8601 timestamp.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
            }
          },
          "required": [
            "entry_id",
            "date",
            "text",
            "mood",
            "tags",
            "created_at",
            "updated_at"
          ],
          "additionalProperties": false
        }
      }
    },
    "listeners": {
      "add-entry": {
        "description": "Append text with two newlines to the date’s entry, creating it if absent.",
        "schema": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string",
              "description": "Nonblank text to append; surrounding whitespace is trimmed.",
              "minLength": 1
            },
            "date": {
              "type": "string",
              "description": "Local entry date, YYYY-MM-DD; omitted defaults to local today.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "mood": {
              "type": "string",
              "description": "Mood; omitted preserves existing mood or defaults to neutral for new entries.",
              "enum": ["very-low", "low", "neutral", "good", "great"]
            },
            "tags": {
              "type": "array",
              "description": "Trimmed, case-sensitive tags to union; omitted or empty preserves existing tags.",
              "items": {
                "type": "string",
                "description": "Nonempty tag.",
                "minLength": 1
              },
              "uniqueItems": true
            }
          },
          "required": ["text"],
          "additionalProperties": false
        }
      }
    }
  }
}