@pooriaarab/vibe-core
v0.2.0
Published
Shared spine for the Vibe Suite: model-preference cascade (agent config → your key → on-device), cross-harness hooks, and the consent ledger that enforces local-first.
Maintainers
Readme
@pooriaarab/vibe-core
Shared spine for the Vibe Suite — the hard parts every product reuses instead of reimplementing. Three primitives:
npm install @pooriaarab/vibe-coreimport { createCascade, createConsentLedger } from '@pooriaarab/vibe-core';
const consent = createConsentLedger();
const cascade = createCascade({ pickLocal, consent });
// declare a capability; get the cheapest, most-private provider that satisfies it
const { provider, tier, egress } = await cascade.resolve({
capability: 'audio',
allowEgress: consent.allows('audio'),
});- Model-preference cascade — declare a capability (
audio,video,usage-read, …); core resolves the cheapest, most-private provider: agent's existing config → a key you bring → on-device/local. Products never pick a provider directly. - Cross-harness hooks — one normalized
VibeEventstream over Claude Code / Codex / Cursor / Gemini / Grok / pi / Kimi / Hermes / OpenClaw hooks, git hooks, or a watcher floor. Triggers are(timing: sync|async, policy: off|ask|auto). - Consent ledger — the enforcement point for local-first. Any off-machine path (cascade tiers agent/byo, a product's sharing feature) needs a scoped grant; without one, core routes to local or refuses. Makes "no readable data out" real, not aspirational.
Status
v0 — the contract (src/types.ts) is defined. Sub-systems land against it:
| module | fulfils | status |
|---|---|---|
| cascade/ | Cascade, ResolvedProvider | todo |
| adapters/ | HostAdapter per harness, ProviderAdapter per provider | todo |
| local/ | LocalRunner (system TTS, Ollama, wasm) | todo |
| hooks/ | HookBus + milestone sources | todo |
| config/ | layered config + ConsentLedger | todo |
| ui/ | terminal kit (spinners, prompts, the local-first badge) | todo |
Design
Full spec: vibelive/docs/vibe-core-spec.md.
Consumers
viberadio · vibemovie · vibedonate · vibelive · vibeshare · vibedating. Published to
npm as @pooriaarab/vibe-core; each product depends on it. MIT.
