@spaceteams/weft-layer-provenance 0.5.1 → 0.7.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.
Files changed (2) hide show
  1. package/dist/index.d.mts +9 -7
  2. package/package.json +2 -2
package/dist/index.d.mts CHANGED
@@ -1,12 +1,14 @@
1
1
  import { KeyId, LayerEvaluator } from "@spaceteams/weft";
2
-
3
2
  //#region src/provenance.d.ts
4
3
  /**
5
4
  * Provenance tracks the source and confidence of a value in the computation model.
6
5
  */
7
6
  type Provenance = {
8
- /** The source of this value — e.g., "user-input", "GPS", "estimate", "derived" */readonly source: string; /** Confidence score 0..1 (1 = fully trusted, 0 = no confidence). Default: 1. */
9
- readonly confidence: number; /** Optional tags for additional classification (e.g., "audited", "provisional") */
7
+ /** The source of this value — e.g., "user-input", "GPS", "estimate", "derived" */
8
+ readonly source: string;
9
+ /** Confidence score 0..1 (1 = fully trusted, 0 = no confidence). Default: 1. */
10
+ readonly confidence: number;
11
+ /** Optional tags for additional classification (e.g., "audited", "provisional") */
10
12
  readonly tags?: readonly string[];
11
13
  };
12
14
  /**
@@ -17,12 +19,12 @@ type Provenance = {
17
19
  * m.annotate(sensor, "provenance", provenance("GPS", 0.9, ["field-measured"]));
18
20
  * ```
19
21
  */
20
- declare function provenance(source: string, confidence?: number, tags?: string[]): Provenance;
22
+ export declare function provenance(source: string, confidence?: number, tags?: string[]): Provenance;
21
23
  /**
22
24
  * Creates derived provenance from a set of dependency provenance values.
23
25
  * The confidence is the minimum across all deps.
24
26
  */
25
- declare function derived(deps: ReadonlyMap<KeyId, Provenance>): Provenance;
27
+ export declare function derived(deps: ReadonlyMap<KeyId, Provenance>): Provenance;
26
28
  /**
27
29
  * A source-tracking layer with confidence scores.
28
30
  *
@@ -30,6 +32,6 @@ declare function derived(deps: ReadonlyMap<KeyId, Provenance>): Provenance;
30
32
  * Computed values automatically receive `source: "derived"` with the minimum confidence
31
33
  * of their dependencies.
32
34
  */
33
- declare const provenanceLayer: LayerEvaluator<Provenance>;
35
+ export declare const provenanceLayer: LayerEvaluator<Provenance>;
34
36
  //#endregion
35
- export { type Provenance, derived, provenance, provenanceLayer };
37
+ export type { Provenance };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaceteams/weft-layer-provenance",
3
- "version": "0.5.1",
3
+ "version": "0.7.0",
4
4
  "description": "Source tracking and confidence scoring layer for @spaceteams/weft",
5
5
  "type": "module",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "dependencies": {
30
- "@spaceteams/weft": "0.5.1"
30
+ "@spaceteams/weft": "0.7.0"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "tsdown",