Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ out/

dist/
tmp/

# Generated SDK documentation (make proto-docs)
docs/sdk/_generated/
51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,54 @@ Date format: `YYYY-MM-DD`
### Fixed
### Security


## [1.61.0] - 2026-09-29

### Added
- **feature:** Added `archived_at` field (11) to `EntityMetadata`.
- **feature:** Added `ValidateTags` and `MaxTagLength` Go helpers for `EntityMetadata.tags`.
- **feature:** Added `path` field (7) to `Uri`.
- **feature:** Added `Space` message and `AngleUnit` enum to `geometry.proto`; every shape carries one `Space`.
- **feature:** Added `LineSegment` and `Polyline` messages to `geometry.proto`.

### Changed
- **feature:** `ValidateUUID` now requires an RFC 9562-compliant value (Nil, Max, or the RFC 9562 variant with version 1–8), not just 16 bytes. Conversion helpers still check only length.
- **debt:** Renumbered `Uri.user_info` from 7 to 6. **Breaking (wire):** `Uri` messages serialized by earlier versions decode incorrectly.
- **debt:** Changed `Uri.port` from `int32` to `uint32`; 0 means no port was given. **Breaking (API).**
- **debt:** Changed `GeometryType` and `CoordinateSystem` from free-form string messages to enums. **Breaking.**
- **debt:** Changed `Coordinate` to carry only `values`; `Point` and `Polygon` now carry a `Space` and `Coordinate`s. `Polygon` is always closed, with counter-clockwise vertices in 2D. **Breaking.**
- **defect:** Changed `MapPoint.x` and `MapPoint.y` from `float` to `double`; `float` limited Web Mercator positions to 0.5–2 m resolution. **Breaking (wire):** values serialized by earlier versions are dropped as unknown fields.
- **defect:** Reshaped `TimeZone` to describe the zone in effect at an instant: `name` (1), `abbreviation` (2), `utc_offset` (3, `google.protobuf.Duration` with a single ISO 8601 sign), `daylight_saving` (4), and `central_coordinate` (5). Removed `utc_offset_std`, `utc_offset_dst`, and `TimeZone.TimeOffset`. **Breaking (wire):** an old `utc_offset_std` decodes as `utc_offset` with the wrong value (hours read as seconds, minutes as nanoseconds); an old `utc_offset_dst` is dropped as an unknown field.
- **debt:** Renamed repeated fields to plural names: `Language.bcp47_tag` to `bcp47_tags` and `Geofence.polygon` to `polygons`. Field numbers are unchanged, so the binary wire format is compatible. **Breaking (JSON and API).**
- **debt:** Changed `csharp_namespace` from `SixAfter.Types.V1.WellKnownTypes` to `SixAfter.Types.V1` in all `.proto` files; `WellKnownTypes` is Google's namespace for protobuf's built-in types. **Breaking (C# API).**

### Deprecated
### Removed
- **debt:** Removed `option cc_enable_arenas = true` from all `.proto` files; arenas have been enabled by default since protobuf 3.14.
- **debt:** Removed the `google.api.field_info` `UUID4` annotation from `UUID.value`; it applied only to version 4 and to string fields. Any RFC 9562 version is now permitted.
- **debt:** Removed the `buf.build/googleapis/googleapis` and `google.golang.org/genproto/googleapis/api` dependencies.
- **debt:** Removed `authority` field from `Uri`; it duplicated `user_info`, `host`, and `port`. **Breaking.**
- **debt:** Removed `Url` message (`url.proto`); use `Uri`, which covers every URL component. **Breaking.**
- **debt:** Removed `Line` (use `LineSegment`) and `Polygon.is_closed` (use `Polyline` for open shapes) from `geometry.proto`. **Breaking.**

### Fixed
- **defect:** Fixed `make proto-format`, which failed because it ran `buf format` from `proto/v1` instead of the module root. Added `make proto-format CHECK=true`, which reports formatting differences and fails instead of rewriting files.
- **defect:** Fixed `sbin/proto-docs.sh`, which checked for `buf.gen.doc.yaml` instead of `buf.gen.docs.yaml` and so never generated documentation. Generated docs under `docs/sdk/_generated/` are now ignored by git.
- **defect:** Corrected documentation for `CompassHeading`, `GeospatialLocation`, `Version` examples (replaced non-ASCII dashes with the SemVer spec's hyphens), `Country.numeric_code` (leading zeros), and `EmailAddress` (split at the last "@").
- **defect:** Clarified that `EntityMetadata.version` versions released content under SemVer 2.0.0 and is not a revision counter for optimistic concurrency.
- **defect:** Clarified `EntityMetadata.tags` constraints: tags MUST be unique and are case-sensitive.
- **defect:** Corrected `EntityMetadata.attributes` documentation: values may be any JSON value, not only strings, as `google.protobuf.Struct` allows.
- **defect:** Corrected `TimeZone.central_coordinate` documentation: it is the principal city from the IANA `zone1970.tab`, not a geometric center, and does not by itself determine a location's time zone.
- **debt:** Applied `buf format` to `geospatial_location.proto` (import order).
- **defect:** Documented that a negative `CompassHeading.true_heading`, `CompassHeading.heading_accuracy`, `GeospatialLocation.course`, or `GeospatialLocation.speed` means invalid or unknown, matching Core Location.
- **defect:** Documented that an unset `GeospatialCoordinate.elevation`, `TimeZone.utc_offset`, `TimeZone.central_coordinate`, `GeospatialLocation.coordinate`, or `MapPoint.coordinate` means unknown.
- **defect:** Updated UUID helper doc comments to cite RFC 9562, the Go standard library `uuid` package, and the full message name `sixafter.types.proto.v1.UUID`.
- **defect:** `UUID.MarshalJSON` now returns an error for a non-empty `Value` that is not 16 bytes instead of silently emitting `""`; doc comments on `MarshalJSON`/`UnmarshalJSON` now state they apply to `encoding/json` only, not protojson.
- **defect:** Updated `UUID` to cite RFC 9562, which obsoletes RFC 4122, and to require an RFC 9562-compliant value.
- **defect:** Updated `Uri` to cite RFC 3986, which obsoletes RFC 2396 and RFC 2732.

### Security

---

## [1.60.2] - 2026-09-28
Expand Down Expand Up @@ -606,7 +654,8 @@ package sixafter.types.proto.v1;
### Fixed
### Security

[Unreleased]: https://github.com/sixafter/types/compare/v1.60.2...HEAD
[Unreleased]: https://github.com/sixafter/types/compare/v1.61.0...HEAD
[1.61.0]: https://github.com/sixafter/types/compare/v1.60.2...v1.61.0
[1.60.2]: https://github.com/sixafter/types/compare/v1.60.1...v1.60.2
[1.60.1]: https://github.com/sixafter/types/compare/v1.60.0...v1.60.1
[1.60.0]: https://github.com/sixafter/types/compare/v1.59.3...v1.60.0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ signature-verify: ## Verify latest release's digital signatures
# Protobuf Operations
# ---------------------------------------------------------------------------
.PHONY: proto-format
proto-format: ## buf format -w (writes canonical formatting)
proto-format: ## buf format -w (writes canonical formatting); CHECK=true reports diffs and fails instead
@sbin/proto-format.sh

.PHONY: proto-lint
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ This module is a set of common types expressed as [Google Protocol Buffers](http
To verify the integrity of the `types` source, run the following commands:

```sh
# Fetch the latest release tag from GitHub API (e.g., "v1.60.2")
# Fetch the latest release tag from GitHub API (e.g., "v1.61.0")
TAG=$(curl -s https://api.github.com/repos/sixafter/types/releases/latest | jq -r .tag_name)

# Remove the leading "v" for filenames (e.g., "v1.60.2" -> "1.60.2")
# Remove the leading "v" for filenames (e.g., "v1.61.0" -> "1.61.0")
VERSION=${TAG#v}

# ---------------------------------------------------------------------
Expand Down Expand Up @@ -66,7 +66,7 @@ cosign verify-blob \
# Confirm local artifact integrity
# ---------------------------------------------------------------------

shasum -a 256 -c checksups.txt
shasum -a 256 -c checksums.txt

```

Expand Down
4 changes: 0 additions & 4 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/googleapis/googleapis
commit: 004180b77378443887d3b55cabc00384
digest: b5:e8f475fe3330f31f5fd86ac689093bcd274e19611a09db91f41d637cb9197881ce89882b94d13a58738e53c91c6e4bae7dc1feba85f590164c975a89e25115dc
3 changes: 0 additions & 3 deletions buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
# ref: https://buf.build/docs/configuration/v2/buf-yaml/
version: v2

deps:
- buf.build/googleapis/googleapis

# Define the module for this proto package
modules:
- path: .
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ go 1.27

require (
github.com/stretchr/testify v1.11.1
google.golang.org/genproto/googleapis/api v0.0.0-20251222181119-0a764e51fe1b
google.golang.org/protobuf v1.36.12
)

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
google.golang.org/genproto/googleapis/api v0.0.0-20251222181119-0a764e51fe1b h1:uA40e2M6fYRBf0+8uN5mLlqUtV192iiksiICIBkYJ1E=
google.golang.org/genproto/googleapis/api v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:Xa7le7qx2vmqB/SzWUBa7KdMjpdpAHlh5QCSnjessQk=
google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
16 changes: 9 additions & 7 deletions proto/v1/compass_heading.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ package sixafter.types.proto.v1;

import "google/protobuf/timestamp.proto";

option cc_enable_arenas = true;
option csharp_namespace = "SixAfter.Types.V1.WellKnownTypes";
option csharp_namespace = "SixAfter.Types.V1";
option go_package = "github.com/sixafter/types/proto/v1/pb;types";
option java_multiple_files = true;
option java_outer_classname = "CompassHeadingProto";
option java_package = "com.sixafter.types.v1";
option objc_class_prefix = "TPB";

// The `CompassHeading` message represents the orientation of an object
// in the Compass Geodetic System (CGS). This can be used in geolocation
// systems, navigation tools, or applications requiring orientation data.
// The `CompassHeading` message represents the orientation of a device relative to
// magnetic and true north, together with the raw geomagnetic field measurements.
// The fields correspond to Apple Core Location's `CLHeading`. This can be used in
// geolocation systems, navigation tools, or applications requiring orientation data.
message CompassHeading {
// The heading (measured in degrees) relative to magnetic north.
// Values range from 0 to 360, where 0 indicates north, 90 indicates east,
Expand All @@ -41,11 +41,13 @@ message CompassHeading {
// The heading (measured in degrees) relative to true north.
// This compensates for the local magnetic declination.
// Similar to `magnetic_heading`, values range from 0 to 360.
// A negative value means the true heading could not be determined.
float true_heading = 2;

// The maximum deviation (measured in degrees) between the reported heading
// and the true geomagnetic heading. A lower value indicates higher accuracy.
// The maximum deviation (measured in degrees) between the reported `magnetic_heading`
// and the actual direction of magnetic north. A lower value indicates higher accuracy.
// This property is essential for assessing the reliability of the heading data.
// A negative value means the heading is invalid.
float heading_accuracy = 3;

// The time at which this heading measurement was taken.
Expand Down
5 changes: 3 additions & 2 deletions proto/v1/country.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ syntax = "proto3";

package sixafter.types.proto.v1;

option cc_enable_arenas = true;
option csharp_namespace = "SixAfter.Types.V1.WellKnownTypes";
option csharp_namespace = "SixAfter.Types.V1";
option go_package = "github.com/sixafter/types/proto/v1/pb;types";
option java_multiple_files = true;
option java_outer_classname = "CountryProto";
Expand Down Expand Up @@ -51,6 +50,8 @@ message Country {
// The ISO 3166-1 numeric code for the country.
// This is a three-digit code that is language-neutral and often used in databases or systems
// where numeric identifiers are preferred.
// Codes below 100 have leading zeros that this integer field does not keep;
// format the value as three digits when displaying it.
// Example: 840 for the United States.
uint32 numeric_code = 5;
}
3 changes: 1 addition & 2 deletions proto/v1/country_subdivision.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ package sixafter.types.proto.v1;

import "proto/v1/country.proto";

option cc_enable_arenas = true;
option csharp_namespace = "SixAfter.Types.V1.WellKnownTypes";
option csharp_namespace = "SixAfter.Types.V1";
option go_package = "github.com/sixafter/types/proto/v1/pb;types";
option java_multiple_files = true;
option java_outer_classname = "CountrySubdivisionProto";
Expand Down
5 changes: 3 additions & 2 deletions proto/v1/email_address.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ syntax = "proto3";

package sixafter.types.proto.v1;

option cc_enable_arenas = true;
option csharp_namespace = "SixAfter.Types.V1.WellKnownTypes";
option csharp_namespace = "SixAfter.Types.V1";
option go_package = "github.com/sixafter/types/proto/v1/pb;types";
option java_multiple_files = true;
option java_outer_classname = "EmailAddressProto";
Expand All @@ -30,6 +29,8 @@ option objc_class_prefix = "TPB";
// The `EmailAddress` message represents an electronic mail (email) address
// as defined by RFC 5322. It separates the email address into its two main
// components: the local part and the domain part.
// Split the address at the last "@": a quoted local part may itself contain "@"
// (e.g., `"john@doe"@example.com`).
message EmailAddress {
// The local part of the email address.
// This is the portion of the address before the "@" symbol.
Expand Down
36 changes: 26 additions & 10 deletions proto/v1/entity_metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "proto/v1/version.proto";

option cc_enable_arenas = true;
option csharp_namespace = "SixAfter.Types.V1.WellKnownTypes";
option csharp_namespace = "SixAfter.Types.V1";
option go_package = "github.com/sixafter/types/proto/v1/pb;types";
option java_multiple_files = true;
option java_outer_classname = "EntityMetadataProto";
Expand Down Expand Up @@ -61,8 +60,14 @@ message EntityMetadata {
// Example: `true` for a cryptographic hash record.
bool immutable = 6;

// The Semantic Version v2.0 compliant version of the entity.
// This provides versioning information for tracking changes and compatibility.
// The Semantic Version 2.0.0 version of the entity's content.
// Use this for entities that are released to consumers who depend on compatibility,
// such as schemas, models, documents, or configurations: increment MAJOR for
// incompatible changes, MINOR for compatible additions, and PATCH for compatible fixes.
// This is not a per-modification revision counter and is not suitable for
// optimistic concurrency control; use `modified_at` or an application-specific
// revision for that.
// Unset means the entity is not versioned.
// Example: Version `1.0.0` for the initial release of the entity.
proto.v1.Version version = 7;

Expand All @@ -73,15 +78,26 @@ message EntityMetadata {

// A list of tags associated with the entity.
// Tags provide descriptive labels for categorization or search.
// Tags must have:
// - A minimum length of 1 character
// - A maximum length of 256 characters
// - A pattern matching "^[a-zA-Z0-9_-]+$" (alphanumeric, underscores, and hyphens).
// Each tag MUST:
// - Be at least 1 and at most 256 characters long.
// - Match the pattern "^[a-zA-Z0-9_-]+$" (ASCII letters, digits, underscores, and hyphens).
// Tags MUST be unique within the list. Tags are case-sensitive: "Finance" and
// "finance" are different tags.
// Note: The Protobuf schema cannot enforce these constraints; validation must be
// performed in application code or by a validation framework.
// Example: `["finance", "report2024"]` for an entity tagged as a 2024 finance report.
repeated string tags = 9;

// Custom attributes for additional metadata in key-value format.
// The keys and values are strings, allowing flexible metadata descriptions.
// Example: `{"source": "API", "priority": "high"}` for an entity from the API with high priority.
// Keys are strings. Values may be any JSON value: a string, number, boolean,
// null, list, or nested object.
// Example: `{"source": "API", "priority": "high", "retries": 3, "flags": ["beta"]}`.
google.protobuf.Struct attributes = 10;

// The timestamp at which the entity was archived, if applicable.
// An archived entity is retained but no longer in active use; unlike a deleted
// entity, it remains available for reference.
// Unset means the entity is not archived.
// Example: "2024-12-01T09:00:00Z" for an entity archived on December 1, 2024.
google.protobuf.Timestamp archived_at = 11;
}
5 changes: 2 additions & 3 deletions proto/v1/geofence.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ package sixafter.types.proto.v1;

import "proto/v1/map_polygon.proto";

option cc_enable_arenas = true;
option csharp_namespace = "SixAfter.Types.V1.WellKnownTypes";
option csharp_namespace = "SixAfter.Types.V1";
option go_package = "github.com/sixafter/types/proto/v1/pb;types";
option java_multiple_files = true;
option java_outer_classname = "GeofenceProto";
Expand All @@ -41,5 +40,5 @@ message Geofence {
// A geofence may consist of one or more polygons, where each polygon represents
// a distinct area. The polygons can define complex, multi-vertex boundaries.
// Example: A campus geofence with multiple disconnected zones.
repeated proto.v1.MapPolygon polygon = 2;
repeated proto.v1.MapPolygon polygons = 2;
}
5 changes: 2 additions & 3 deletions proto/v1/geographic_region.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ syntax = "proto3";

package sixafter.types.proto.v1;

option cc_enable_arenas = true;
option csharp_namespace = "SixAfter.Types.V1.WellKnownTypes";
option csharp_namespace = "SixAfter.Types.V1";
option go_package = "github.com/sixafter/types/proto/v1/pb;types";
option java_multiple_files = true;
option java_outer_classname = "GeographicRegionProto";
Expand All @@ -40,7 +39,7 @@ message GeographicRegion {
// Example: "State of Texas".
string formal_name = 2;

// The numeric code for the region as defined in the ISO 3166-2 standard.
// The numeric code for the region as defined in the ISO 3166 standard.
// This code is often used in databases or systems where numeric identifiers
// are preferred for regional classification.
// Example: 48 (numeric code for Texas in the United States, if applicable).
Expand Down
Loading
Loading