GooseFactory — Shared Package
Owner: Architect (maintained by all agents)
Canonical TypeScript types, constants, and Zod validation schemas. Every type in this package is derived from CONTRACTS.md.
Rules
- This package is the SINGLE source of TypeScript types.
- All other packages import from
@goosefactory/shared. - If you need a new type that crosses package boundaries, add it HERE first.
- Never define the same type in two packages.
Structure
src/
├── types/
│ ├── pipeline.ts # Pipeline, PipelineStage, PipelineStatus
│ ├── task.ts # Task, TaskType, TaskStatus, TaskDecision
│ ├── approval.ts # Approval, ApprovalType, ApprovalStatus
│ ├── agent.ts # Agent, AgentType, AgentHealth
│ ├── asset.ts # Asset, AssetType
│ ├── feedback.ts # FeedbackEvent, FeedbackPayload, all feedback subtypes
│ ├── modal.ts # ModalMessage, ModalResponse, ModalMetrics
│ ├── api.ts # ApiResponse, ApiError, PaginationParams
│ ├── ws.ts # WsEvent, WsChannel, all event payloads
│ └── index.ts # Re-exports everything
├── constants/
│ ├── stages.ts # KANBAN_STAGES, stage order, stage transitions
│ ├── errors.ts # ErrorCode values
│ └── sla.ts # Default SLA durations
└── schemas/
├── feedback.schema.ts # Zod schema for FeedbackEvent validation
├── pipeline.schema.ts # Zod schema for Pipeline validation
└── task.schema.ts # Zod schema for Task validation
Usage
import type { Pipeline, Task, FeedbackEvent } from "@goosefactory/shared";
import { KANBAN_STAGES, DEFAULT_SLA } from "@goosefactory/shared/constants";
import { feedbackSchema } from "@goosefactory/shared/schemas";