moby-core defines the shared TypeScript contracts for MOBY-compatible cannabis operations tools. It gives independent modules a common vocabulary for run manifests, artifacts, warnings, input sources, summaries, domain objects, audit events, and workflow gates. The goal is simple: separate tools can produce outputs that are understandable across the MOBY ecosystem without sharing business logic.
Cannabis operators often work with messy POS exports, invoice data, shift notes, approval trails, and audit artifacts. If every tool invents its own schema, the handoff between modules, reviewers, and dashboards becomes fragile. moby-core gives those tools a shared contract language so outputs can be reviewed, displayed, and connected more consistently.
Raw operator data
-> module run
-> normal artifact outputs
-> moby-run-manifest.json
-> TrackingTHC / downstream review tools
moby-core is a TypeScript contract package for operator-first cannabis workflows. It defines shared vocabulary and domain model definitions for manifests, artifacts, warnings, sources, summaries, audit events, and workflow gates.
This repo is the compatibility foundation between independent modules. Modules import these types so their outputs can be understood by other MOBY tools while each module keeps its own behavior and business logic.
moby-core is not:
- a frontend app
- a CLI runtime
- an ERP
- a POS connector
- a compliance sync engine
- a dashboard
- a storage layer
- a JSON runtime validator
- a place for module business logic
Business logic, file-writing behavior, integrations, and runtime validation belong in module repos or consuming applications. moby-core only defines shared contracts.
Current MOBY-compatible modules:
trackingthc-import-mapperinvoice-cost-spreadercannabis-approval-routercannabis-shift-handoff
- Run manifest: the ecosystem handoff file for a completed module run, usually written as
moby-run-manifest.json. - Artifact: a normal output file produced by a module for review, import, audit, or downstream display.
- Warning: an explicit issue, assumption, or review note produced during a run instead of being silently cleaned up.
- Source: the input data, file, system, or operator-provided context used by a module.
- Summary: high-level run metadata that helps reviewers understand status, counts, outcomes, or next steps.
- Domain object: a typed business entity shared across MOBY-compatible tools.
- Audit event: a typed record of what happened, who or what did it, where it came from, and what changed.
- Workflow gate: a contract for review, approval, handoff, or follow-up steps in an operator workflow.
moby-run-manifest.json records what ran, where the inputs came from, which artifacts were produced, which warnings occurred, and the summary/status metadata needed by viewers or downstream review tools.
Modules should keep their normal result artifacts and also write a moby-run-manifest.json when run in MOBY output mode. The manifest points at artifacts; it does not replace them.
Compatible modules should:
- preserve their existing behavior
- optionally support a run directory or MOBY output mode
- write their normal result files
- write
moby-run-manifest.jsonbeside those outputs - keep business logic inside the module repo
- use
moby-coreonly for shared contracts
This pattern lets modules such as trackingthc-import-mapper, invoice-cost-spreader, cannabis-approval-router, and cannabis-shift-handoff stay small and focused while still producing reviewable outputs for the wider MOBY ecosystem.
TrackingTHC consumes committed sample outputs from compatible modules:
/moby-runsdisplays samplemoby-run-manifest.jsonfiles in MOBY Mission Control./import-reviewdisplaysmoby-import.jsonsidecars.
TrackingTHC acts as a viewer and review surface for MOBY-compatible outputs. It can display committed sample artifacts and manifests without owning the module logic that produced them.
- Small tools over monoliths
- Reviewable artifacts over black-box automation
- Explicit warnings over silent cleanup
- Stable contracts over one-off schemas
- Operator-first workflows
- Audit trails by default
Every important business action should answer:
- What happened?
- Who or what did it?
- When did it happen?
- What system did it come from?
- What changed?
- What needs to happen next?
moby-core is an early portfolio/demo ecosystem contract package. APIs and contracts may evolve while the MOBY ecosystem is being shaped.