@ectropy/construction-commercial-context

中文文档
0.4.1发布于 2026/10/12Apache-2.0TypeScriptES Module零依赖构建来源已验证近 30 天下载 9262

Public construction-commercial domain context schemas for @ectropy/schemas universal decision log

原始使用文档
文档目录5 节
  1. What's here
  2. Install
  3. Development
  4. Versioning
  5. License

@ectropy/construction-commercial-context

License: Apache-2.0

Public TypeScript type contracts for the construction-commercial domain, published for use with @ectropy/schemas' universal decision log. This package ships types only — no runtime code, no JSON Schema files — as .ts source consumed directly by peers of @ectropy/schemas.

What's here

All types are exported from a single entrypoint, types/index.ts, grouped below by what they model:

Decision domain & authority

  • construction-commercial-domain.types.ts — the construction-commercial domain identifier
  • construction-commercial-authority.types.ts — 7-tier authority cascade (FIELD → REGULATORY) per AIA / IPD / GMP / Design-Build conventions
  • construction-decision-type.types.ts — semantic decision classification (APPROVAL, REJECTION, DEFERRAL, ESCALATION, PROPOSAL, CONSEQUENCE)

Decision event context

  • voxel-attachment.types.ts — spatial/BIM voxel references attachable to a decision event
  • construction-trigger-context.types.ts, construction-action.types.ts, construction-evidence.types.ts, construction-participants.types.ts, construction-outcome-context.types.ts — the trigger/action/evidence/participants/outcome shapes that compose a construction-commercial decision event

BPC (Building Product Catalog) intelligence

  • bpc-enums.types.ts — building-product catalog vocabularies (quantity units, assembly categories, etc.)
  • bpc-assembly-bom.types.ts, bpc-labor-schedule.types.ts, bpc-product-price.types.ts — bill-of-materials, labor, and pricing shapes
  • bpc-cost-composite.types.ts, bpc-cost-grounded.types.ts — dual-channel assembly cost types (PPI-composite vs. product-grounded)

Cost

  • cost-response.types.ts — consumer-facing response shapes for the cost routes, including the combined DualChannelPricingResponse
  • cost-ppi.types.ts, cost-regional.types.ts, cost-material-signal.types.ts, cost-data-provenance.types.ts — PPI, regional-factor, material-signal, and provenance shapes feeding those responses

Carbon

  • carbon-response.types.ts, carbon-epd.types.ts — Environmental Product Declaration (EPD) response shapes, e.g. ProductEpdResponse

Jurisdiction

  • jurisdiction-response.types.ts — site point → administrative and market keys (county FIPS, CBSA, municipality, Canadian census division / economic region / CMA, IANA time zone) with per-source provenance, e.g. JurisdictionResolutionResponse

Install

pnpm add @ectropy/construction-commercial-context

Requires @ectropy/schemas as a peer dependency (^0.4.0) — several types (e.g. AuthorityLabelMap, Urn) are imported from it.

Development

pnpm install
pnpm typecheck   # tsc --noEmit
pnpm test        # vitest run, against __tests__/

There is no build step: the package is consumed as TypeScript source (main/types both point at types/index.ts).

Versioning

Current version: 0.4.0. See git log for the type-contract history (cost types landed in v0.2.0, carbon types in v0.3.0, jurisdiction types in v0.4.0).

License

Apache-2.0 — see LICENSE.

版本与发布记录

@ectropy/construction-commercial-context 共发布 5 个版本,首次发布于 2026/04/24;过去 12 个月发布了 5 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.1latest2026/10/121 个月前
0.4.02026/09/241 个月前
0.3.02026/05/016 个月前
0.2.02026/04/306 个月前
0.1.02026/04/246 个月前

关于 @ectropy/construction-commercial-context 的常见问题

@ectropy/construction-commercial-context 是什么?

Public construction-commercial domain context schemas for @ectropy/schemas universal decision log

如何安装 @ectropy/construction-commercial-context?

在项目目录运行 npm install @ectropy/construction-commercial-context,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@ectropy/schemas(^0.4.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@ectropy/construction-commercial-context 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ectropy/construction-commercial-context 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@ectropy/construction-commercial-context 可以商用吗?

@ectropy/construction-commercial-context 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@ectropy/construction-commercial-context 的下载量有多少?

根据 npm 官方下载统计,@ectropy/construction-commercial-context 在 2026/10/13 – 2026/11/11 这 30 天内被下载 9,262 次,日均约 309 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ectropy/construction-commercial-context 还在维护吗?

最新版本 0.4.1 发布于 2026/10/12(1 个月前);至今共发布 5 个版本,其中过去 12 个月发布了 5 个;首次发布于 2026/04/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。