{"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/examples/index.ts","../src/examples/step.ts","../src/hints.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\n\nexport { SettingsSchema, type Settings } from './settings';\n\nexport const settings = zodToSchema(SettingsSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n  basePath: z\n    .string()\n    .min(1)\n    .describe(\n      'Root directory for file operations. All keys are resolved relative to this path.',\n    ),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import type { Store } from '@walkeros/core';\n\n/** Serve static files from a local directory, byte-exact (file mode) */\nexport const staticAssets: Store.Config = {\n  settings: {\n    basePath: './public',\n  },\n  file: true,\n};\n\n/** Structured key-value store on disk (default mode) */\nexport const structuredState: Store.Config = {\n  settings: {\n    basePath: './state',\n  },\n};\n\nexport * as step from './step';\n","import type { Flow } from '@walkeros/core';\n\n/** Read a file that exists in the store directory (file mode, byte-exact). */\nexport const readExistingFile: Flow.StepExample = {\n  title: 'Read file',\n  description: 'Read an existing file and receive its raw bytes byte-exact',\n  in: { operation: 'get', key: 'walker.js' },\n  out: [['get', 'walker.js', 'Bytes<console.log(\"walkerOS\")>']],\n};\n\n/** Write a file with auto-created parent directories. */\nexport const writeNewFile: Flow.StepExample = {\n  title: 'Write file',\n  description: 'Write creates intermediate directories automatically',\n  in: {\n    operation: 'set',\n    key: 'js/custom/tracker.js',\n    value: 'Buffer<(function(){...})()>',\n  },\n  out: [['set', 'js/custom/tracker.js', 'Buffer<(function(){...})()>']],\n};\n\n/** Path traversal attempt is rejected for security. */\nexport const pathTraversalRejection: Flow.StepExample = {\n  public: false,\n  description: 'Path traversal via .. segments is rejected with a warning',\n  in: { operation: 'get', key: '../../etc/passwd' },\n  out: [['get', '../../etc/passwd', undefined]],\n};\n","import type { Hint } from '@walkeros/core';\n\nexport const hints: Hint.Hints = {\n  'file-mode': {\n    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.',\n  },\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAEX,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,UAAU,EACP,OAAO,EACP,IAAI,CAAC,EACL;AAAA,IACC;AAAA,EACF;AACJ,CAAC;;;ADJM,IAAM,WAAW,YAAY,cAAc;;;AELlD;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,mBAAqC;AAAA,EAChD,OAAO;AAAA,EACP,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,YAAY;AAAA,EACzC,KAAK,CAAC,CAAC,OAAO,aAAa,gCAAgC,CAAC;AAC9D;AAGO,IAAM,eAAiC;AAAA,EAC5C,OAAO;AAAA,EACP,aAAa;AAAA,EACb,IAAI;AAAA,IACF,WAAW;AAAA,IACX,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EACA,KAAK,CAAC,CAAC,OAAO,wBAAwB,6BAA6B,CAAC;AACtE;AAGO,IAAM,yBAA2C;AAAA,EACtD,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,mBAAmB;AAAA,EAChD,KAAK,CAAC,CAAC,OAAO,oBAAoB,MAAS,CAAC;AAC9C;;;ADzBO,IAAM,eAA6B;AAAA,EACxC,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,MAAM;AACR;AAGO,IAAM,kBAAgC;AAAA,EAC3C,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AACF;;;AEbO,IAAM,QAAoB;AAAA,EAC/B,aAAa;AAAA,IACX,MAAM;AAAA,EACR;AACF;","names":[]}