@semiont/gateway 0.5.30 → 0.5.31

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/dist/openapi.json CHANGED
@@ -1688,10 +1688,13 @@
1688
1688
  "description": "Web Annotation creator — the entity that initiated the annotation. For human-driven work this is a Person; for autonomous-agent work this is a Software peer."
1689
1689
  },
1690
1690
  "created": {
1691
- "type": "string"
1691
+ "type": "string",
1692
+ "format": "date-time",
1693
+ "description": "When the annotation was MADE — the authoring moment, carried from the event that created it. Not when a projection happened to write it: a store that rebuilds from the log must preserve this value, never restamp it."
1692
1694
  },
1693
1695
  "modified": {
1694
- "type": "string"
1696
+ "type": "string",
1697
+ "format": "date-time"
1695
1698
  },
1696
1699
  "generator": {
1697
1700
  "oneOf": [
@@ -1729,7 +1732,8 @@
1729
1732
  "type",
1730
1733
  "id",
1731
1734
  "motivation",
1732
- "target"
1735
+ "target",
1736
+ "created"
1733
1737
  ]
1734
1738
  },
1735
1739
  "AnnotationAddedPayload": {
@@ -2767,18 +2771,13 @@
2767
2771
  },
2768
2772
  "BrowseAnchoredTextResult": {
2769
2773
  "type": "object",
2770
- "description": "A resource's stored extraction outcome — the coordinate map with its provenance, or a named decline or null when none has been derived. Null is the common case and not an error: a native text layer is read in the browser, and a media type with no extractor never produces one.",
2774
+ "description": "A resource's coordinate map, a stored decline, or a named reason there is none (SMELTER-OWNS-OCR P1). Never null: absence used to be a bare null covering four different facts barrier expired, settled-skipped, no content identity, fold disposed two of which a caller should retry and two of which it should not.",
2771
2775
  "properties": {
2772
2776
  "correlationId": {
2773
2777
  "type": "string"
2774
2778
  },
2775
2779
  "response": {
2776
- "nullable": true,
2777
- "allOf": [
2778
- {
2779
- "$ref": "#/components/schemas/ExtractionOutcome"
2780
- }
2781
- ]
2780
+ "$ref": "#/components/schemas/AnchoredTextAnswer"
2782
2781
  }
2783
2782
  },
2784
2783
  "required": [
@@ -2786,20 +2785,46 @@
2786
2785
  "response"
2787
2786
  ]
2788
2787
  },
2789
- "BrowseAnchoredTextByChecksumRequest": {
2788
+ "AnchoredTextAnswer": {
2789
+ "description": "What a reader gets when it asks for a resource's coordinate map: the map, a stored decline, or a named absence.\n\nDistinct from `ExtractionOutcome` on purpose. That type is what the STORE holds and what an extractor RETURNS — neither of which can ever be 'not yet'. This is the read answer, which can, so widening ExtractionOutcome itself would have put an impossible state into the store's own type.\n\nFlat, one discriminant: every member carries `kind`, rather than nesting an outcome inside a status envelope and giving the wire two `kind` fields at different depths.",
2790
+ "oneOf": [
2791
+ {
2792
+ "$ref": "#/components/schemas/ExtractedText"
2793
+ },
2794
+ {
2795
+ "$ref": "#/components/schemas/ExtractionDeclined"
2796
+ },
2797
+ {
2798
+ "$ref": "#/components/schemas/AnchoredTextAbsent"
2799
+ }
2800
+ ],
2801
+ "discriminator": {
2802
+ "propertyName": "kind",
2803
+ "mapping": {
2804
+ "extracted": "#/components/schemas/ExtractedText",
2805
+ "declined": "#/components/schemas/ExtractionDeclined",
2806
+ "not-yet": "#/components/schemas/AnchoredTextAbsent",
2807
+ "no-map": "#/components/schemas/AnchoredTextAbsent",
2808
+ "unknown": "#/components/schemas/AnchoredTextAbsent"
2809
+ }
2810
+ }
2811
+ },
2812
+ "AnchoredTextAbsent": {
2790
2813
  "type": "object",
2791
- "description": "Request the stored extraction outcome for a content identity the caller already holds the detection workers' read-through cache consult (ANCHORED-TEXT-TO-SMELTER P2). A hit success or decline is served whole and the caller skips extraction; null is a miss and the caller extracts locally. Read-only: the Smelter is the sole writer and never answers over this channel.",
2814
+ "description": "There is no coordinate map to serve, and WHY the distinction a bare null could not carry (SMELTER-OWNS-OCR P1).\n\nOne member covers all three absences because none carries a payload; `kind` alone is the fact. Retryability is legible from the name, deliberately: a caller must not need a lookup table to decide whether to come back.",
2792
2815
  "properties": {
2793
- "correlationId": {
2794
- "type": "string"
2795
- },
2796
- "checksum": {
2797
- "type": "string"
2816
+ "kind": {
2817
+ "type": "string",
2818
+ "enum": [
2819
+ "not-yet",
2820
+ "no-map",
2821
+ "unknown"
2822
+ ],
2823
+ "description": "Discriminant, sharing the `kind` field with the ExtractedText/ExtractionDeclined members so the whole answer is one flat union (D6).\n\n`not-yet` — the Smelter has not settled this content generation: the settle barrier expired, the progress fold was disposed, or it settled indexed and the artifact is missing (the reconcile planner's third drift class, which heals). RETRY.\n\n`no-map` — the Smelter settled this resource as skipped: its media type derives no geometry, so a map will never exist. TERMINAL.\n\n`unknown` — no content identity to look up: the resource is not in the view store, or its primary representation carries no checksum. TERMINAL."
2798
2824
  }
2799
2825
  },
2800
2826
  "required": [
2801
- "correlationId",
2802
- "checksum"
2827
+ "kind"
2803
2828
  ]
2804
2829
  },
2805
2830
  "BrowseResourceRequest": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semiont/gateway",
3
- "version": "0.5.30",
3
+ "version": "0.5.31",
4
4
  "type": "module",
5
5
  "description": "Semiont gateway server - pre-built for npm consumption",
6
6
  "main": "dist/index.js",
@@ -30,9 +30,9 @@
30
30
  "@hono/swagger-ui": "^0.6.1",
31
31
  "@prisma/adapter-pg": "^7.10.0",
32
32
  "@prisma/client": "^7.10.0",
33
- "@semiont/core": "0.5.30",
34
- "@semiont/make-meaning": "0.5.30",
35
- "@semiont/observability": "0.5.30",
33
+ "@semiont/core": "0.5.31",
34
+ "@semiont/make-meaning": "0.5.31",
35
+ "@semiont/observability": "0.5.31",
36
36
  "ajv": "^8.20.0",
37
37
  "ajv-formats": "^3.0.1",
38
38
  "argon2": "^0.45.1",
@@ -40,6 +40,6 @@
40
40
  "jsonwebtoken": "^9.0.2",
41
41
  "prisma": "^7.10.0",
42
42
  "winston": "^3.19.0",
43
- "zod": "^4.4.3"
43
+ "zod": "^4.5.4"
44
44
  }
45
45
  }