{
  "$meta": {
    "package": "@walkeros/server-store-fs",
    "version": "4.2.1",
    "type": "store",
    "platform": [
      "server"
    ],
    "docs": "https://www.walkeros.io/docs/stores/server/fs",
    "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/server/stores/fs/src"
  },
  "schemas": {
    "settings": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "basePath": {
          "type": "string",
          "minLength": 1,
          "description": "Root directory for file operations. All keys are resolved relative to this path."
        }
      },
      "required": [
        "basePath"
      ],
      "additionalProperties": false
    }
  },
  "examples": {
    "staticAssets": {
      "settings": {
        "basePath": "./public"
      },
      "file": true
    },
    "step": {
      "pathTraversalRejection": {
        "public": false,
        "description": "Path traversal via .. segments is rejected with a warning",
        "in": {
          "operation": "get",
          "key": "../../etc/passwd"
        },
        "out": [
          [
            "get",
            "../../etc/passwd",
            null
          ]
        ]
      },
      "readExistingFile": {
        "title": "Read file",
        "description": "Read an existing file and receive its raw bytes byte-exact",
        "in": {
          "operation": "get",
          "key": "walker.js"
        },
        "out": [
          [
            "get",
            "walker.js",
            "Bytes<console.log(\"walkerOS\")>"
          ]
        ]
      },
      "writeNewFile": {
        "title": "Write file",
        "description": "Write creates intermediate directories automatically",
        "in": {
          "operation": "set",
          "key": "js/custom/tracker.js",
          "value": "Buffer<(function(){...})()>"
        },
        "out": [
          [
            "set",
            "js/custom/tracker.js",
            "Buffer<(function(){...})()>"
          ]
        ]
      }
    },
    "structuredState": {
      "settings": {
        "basePath": "./state"
      }
    }
  },
  "hints": {
    "file-mode": {
      "text": "Default mode is structured: values are StoreValue data round-tripped through the shared core codec, good for session state, lookups, and cached responses. Set config.file: true to persist raw bytes byte-exact (set accepts Uint8Array or string, get hands the exact bytes back), the mode for serving assets such as walker.js via the file transformer. One store instance is exactly one mode. Do not pair file: true with a cache; the cache wraps structured stores and flow_validate flags the combination."
    }
  }
}