@company-semantics/contracts 0.138.0 → 0.139.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "0.138.0",
3
+ "version": "0.139.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -613,6 +613,9 @@ export type {
613
613
  SchedulerEvent,
614
614
  } from './requests'
615
615
 
616
+ // Mutation policy types (lane behavior semantics)
617
+ export type { MutationPolicy } from './mutations'
618
+
616
619
  // Observability envelope types (shared metric shape)
617
620
  export { REQUEST_ID_HEADER } from './observability'
618
621
  export type { Labels, MetricEnvelope, SchedulerMetricName } from './observability'
@@ -0,0 +1,13 @@
1
+ export type { MutationBehavior } from './requests';
2
+
3
+ export type MutationPolicy = {
4
+ /**
5
+ * collapse — the newer mutation supersedes older in-flight or queued mutations
6
+ * on the same resource lane. Use for idempotent field sets (rename).
7
+ * queue — FIFO lane per resource. No collapse. Use when each mutation carries
8
+ * meaningful intent that must be preserved (reorder, append, toggle-sequence).
9
+ * parallel — independent mutations on different resourceIds may run concurrently;
10
+ * same-resource requests still serialize to avoid lost writes.
11
+ */
12
+ behavior: 'collapse' | 'queue' | 'parallel';
13
+ };