walkeros-create-cmp-so…
A CMP source is a specialized walkerOS source that listens to a consent management platform's events and translates consent…
Stores provide key-value storage that other components (sources, transformers, destinations) consume via environment injection. They are the 4th component type in Flow.Json alongside sources, transformers, and destinations.
Claude Code
$ npx -y skills add elbwalker/walkerOS --skill walkeros-understanding-stores --agent claude-code
Codex
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-stores -a codex -y
Cursor
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-stores -a cursor -y
Gemini CLI
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-stores -a gemini-cli -y
GitHub Copilot
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-stores -a github-copilot -y
OpenCode
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-stores -a opencode -y
Windsurf
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-stores -a windsurf -y
name: walkeros-understanding-stores description: Use when working with walkerOS stores, understanding key-value storage in flows, or learning about store injection via env. Covers interface, lifecycle, $store. wiring, and available store packages.
Stores provide key-value storage that other components (sources, transformers, destinations) consume via environment injection. They are the 4th component type in Flow.Json alongside sources, transformers, and destinations.
**Core principle:** Stores are passive infrastructure. They don't process events or participate in chains; they provide state that other components read and write.
See [packages/core/src/types/store.ts](../../packages/core/src/types/store.ts) for the canonical interface.
| Property | Type | Purpose | Required | | --------- | ---------------------------------- | ------------------------- | ------------ | | `type` | `string` | Store type identifier | **Required** | | `config` | `Store.Config` | Settings and env | **Required** | | `get` | `(key) => StoreValue \| undefined` | Read a value | **Required** | | `set` | `(key, value, ttl?) => void` | Write a value (see below) | **Required** | | `delete` | `(key) => void` | Remove a value | **Required** | | `destroy` | `DestroyFn` | Cleanup on shutdown | Optional |
All methods can be sync or async (return `Promise`).
Stores hold one canonical value type: structured data (`StoreValue`), with binary (`Uint8Array`) as a first-class leaf. `StoreValue` is `string | number | boolean | null | Uint8Array | StoreValue[] | { [key: string]: StoreValue }` (`undefined` is reserved as the "miss" sentinel and is never a stored value). A shared codec in `@walkeros/core/node` (`serializeStoreValue` / `deserializeStoreValue`, Node only, `StoreCodecError` on a bad value) round-trips that value to and from each backing.
`Store.Config.file?: boolean` (default `false`) picks the mode, decided once at init:
shared codec.
bytes byte-exact. `set()` accepts a `Uint8Array` or `string` and stores it untouched; `get()` hands the exact bytes back. Use for serving assets such as walker.js. The Sheets store is structured-only and rejects `file: true` at init.
TTL is owned by the cache layer, not the store. The store persists values; a `cache` wrapper manages expiry. The `ttl` argument of `set` is only a hint for TTL-native backends: the fs, S3, GCS and Sheets stores ignore it and keep the value. `flow_validate` warns when a store sets both `file: true` and `cache`, and when a `@walkeros/server-transformer-file` is wired to a byte-native store that does not set `file: true`.
Stores use the same context-based init pattern as other components:
import type { Store } from '@walkeros/core';
export const storeMyStore: Store.Init = (context) => {
const { config, env, logger, id } = context;
const settings = config.settings || {};
return {
type: 'my-store',
config,
get(key) {
/* ... */
},
set(key, value, ttl) {
/* ... */
},
delete(key) {
/* ... */
},
destroy() {
/* cleanup */
},
};
};**Context contains:**
| Property | Type | Purpose | | ----------- | -------------------- | ------------------------- | | `config` | `Store.Config` | Settings from flow config | | `env` | `Store.Env` | Environment dependencies | | `logger` | `Logger.Instance` | Scoped logger | | `id` | `string` | Store identifier | | `collector` | `Collector.Instance` | Reference to collector |
Stores have the simplest lifecycle of all component types:
Startup: Stores → Destinations → Transformers → Sources Shutdown: Sources → Destinations → Transformers → Stores
when sources/transformers/destinations start
can flush during their own destroy
deferred activation; they are always eager
Use `$store.storeId` in a component's `env` to inject a store instance:
{
"stores": {
"assets": {
"package": "@walkeros/server-store-fs",
"config": { "file": true, "settings": { "basePath": "./public" } }
}
},
"transformers": {
"file": {
"package": "@walkeros/server-transformer-file",
"config": { "settings": { "prefix": "/static" } },
"env": { "store": "$store.assets" }
}
}
}The bundler resolves `$store.assets` to a runtime reference. Invalid references are caught at build time. `walkeros validate` also catches typos at validation time, including unknown store names and the colon-instead-of-dot mistake (e.g. `$store:assets` is flagged with the suggested form `$store.assets`).
Pass the store definition object itself, no `$store.` prefix:
import { startFlow } from '@walkeros/collector';
import { storeFsInit } from '@walkeros/server-store-fs';
import { transformerFile } from '@walkeros/server-transformer-file';
const assets = {
code: storeFsInit,
config: { file: true, settings: { basePath: './public' } },
};
await startFlow({
stores: { assets },
transformers: {
file: {
code: transformerFile,From browser to BigQuery and ad platforms - warehouse-native, and ready for AI agents via MCP.
A CMP source is a specialized walkerOS source that listens to a consent management platform's events and translates consent…
Use when creating a new walkerOS destination to send events to a vendor or API (GA4/gtag, Meta/Facebook Pixel, Mixpanel,…
Use when creating a new walkerOS source to capture events (browser source, dataLayer interception, server/HTTP source, webhook…
| Symptom | Likely Cause | Check | | ---------------------------------- | ---------------------------- |…
Read [understanding-mapping](../walkeros-understanding-mapping/SKILL.md) first for core concepts.
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…