Summary
Foundation layer for the Effect-TS 7-layer architecture (Epic #7). Implements Layer 4 (Error) and Layer 3 (Schema) — the only layers with no DHT dependencies — plus the shared utilities ported from Requests & Offers that all subsequent domain layers depend on.
Implemented by PR #89.
Scope
Layer 4 — Error
errors/person.errors.ts — PersonError extends Data.TaggedError
errors/resource.errors.ts — ResourceError extends Data.TaggedError
errors/governance.errors.ts — GovernanceError + WorkflowError extends Data.TaggedError (carries step, rejected_reasons)
errors/ppr.errors.ts — PPRError extends Data.TaggedError
errors/error-contexts.ts — PERSON_CONTEXTS, RESOURCE_CONTEXTS, GOVERNANCE_CONTEXTS, PPR_CONTEXTS, WORKFLOW_CONTEXTS
Layer 3 — Schema
schemas/person.schemas.ts — PersonInput, UIPerson, EncryptedProfileInput
schemas/resource.schemas.ts — ResourceSpecInput, UIResourceSpec, EconomicResourceInput, UIEconomicResource
schemas/governance.schemas.ts — VfActionSchema (all 16 Rust variants exactly), CommitmentInput, UICommitment, GovernanceTransitionResult
schemas/ppr.schemas.ts — PerformanceMetrics, UIParticipationClaim, UIReputationSummary
Shared utilities (ported verbatim from Requests & Offers)
utils/zome-helpers.ts — wrapZomeCallWithErrorFactory
utils/effect-svelte-integration.ts — useEffectOnMount, createStoreInitializer, createEffectErrorBoundary
utils/store-helpers/core.ts — withLoadingState, createErrorHandler
utils/store-helpers/cache-helpers.ts — createGenericCacheSyncHelper
utils/store-helpers/record-helpers.ts — createUIEntityFromRecord
utils/store-helpers/event-helpers.ts — createStandardEventEmitters
utils/store-helpers/fetching-helpers.ts — createEntityFetcher
Acceptance Criteria
Part of
Epic #7
Summary
Foundation layer for the Effect-TS 7-layer architecture (Epic #7). Implements Layer 4 (Error) and Layer 3 (Schema) — the only layers with no DHT dependencies — plus the shared utilities ported from Requests & Offers that all subsequent domain layers depend on.
Implemented by PR #89.
Scope
Layer 4 — Error
errors/person.errors.ts—PersonError extends Data.TaggedErrorerrors/resource.errors.ts—ResourceError extends Data.TaggedErrorerrors/governance.errors.ts—GovernanceError+WorkflowError extends Data.TaggedError(carriesstep,rejected_reasons)errors/ppr.errors.ts—PPRError extends Data.TaggedErrorerrors/error-contexts.ts—PERSON_CONTEXTS,RESOURCE_CONTEXTS,GOVERNANCE_CONTEXTS,PPR_CONTEXTS,WORKFLOW_CONTEXTSLayer 3 — Schema
schemas/person.schemas.ts—PersonInput,UIPerson,EncryptedProfileInputschemas/resource.schemas.ts—ResourceSpecInput,UIResourceSpec,EconomicResourceInput,UIEconomicResourceschemas/governance.schemas.ts—VfActionSchema(all 16 Rust variants exactly),CommitmentInput,UICommitment,GovernanceTransitionResultschemas/ppr.schemas.ts—PerformanceMetrics,UIParticipationClaim,UIReputationSummaryShared utilities (ported verbatim from Requests & Offers)
utils/zome-helpers.ts—wrapZomeCallWithErrorFactoryutils/effect-svelte-integration.ts—useEffectOnMount,createStoreInitializer,createEffectErrorBoundaryutils/store-helpers/core.ts—withLoadingState,createErrorHandlerutils/store-helpers/cache-helpers.ts—createGenericCacheSyncHelperutils/store-helpers/record-helpers.ts—createUIEntityFromRecordutils/store-helpers/event-helpers.ts—createStandardEventEmittersutils/store-helpers/fetching-helpers.ts—createEntityFetcherAcceptance Criteria
Data.TaggedErrorwithfromError(unknown, context)static factoryVfActionSchemacovers all 16 RustVfActionvariants — verified against zome sourcebun run checkbun run buildpassesPart of
Epic #7