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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 10.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore
run: dotnet build -c Release --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish
run: dotnet publish
run: dotnet test -c Release --no-build --verbosity normal

- name: Pack
run: dotnet pack -c Release --no-build
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 10.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build -c Release --no-restore --version-suffix="$GITHUB_REF_NAME.$GITHUB_RUN_NUMBER"
- name: Publish
run: dotnet publish -c Release --no-build --version-suffix="$GITHUB_REF_NAME.$GITHUB_RUN_NUMBER"
run: dotnet build -c Release --no-restore

- name: Test
run: dotnet test -c Release --no-build --verbosity normal

- name: Pack
run: dotnet pack -c Release --no-build --version-suffix="$GITHUB_REF_NAME.$GITHUB_RUN_NUMBER"
run: dotnet pack -c Release --no-build

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: dpp.cot
path: dpp.cot/bin/*/*.nupkg
path: dpp.cot/bin/Release/*.nupkg

- name: Publish To Nuget
run: dotnet nuget push dpp.cot/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

## 2.0.0

- separate the XML/domain model from protobuf wire DTOs and explicit mapping
- add TAK streaming envelope support and stronger framed message parsing
- preserve unknown and mixed `detail` XML more faithfully, including typed elements with extra attributes
- add public-source-backed fixture coverage from ATAK CIV and `taky`
- document source inventory, fixture provenance, compatibility policy, and type inference
- multi-target the library for `netstandard2.0` and `net10.0`
85 changes: 85 additions & 0 deletions docs/compatibility-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Compatibility Policy

This page describes how `dpp.cot` handles compatibility when public ATAK/TAK sources do not expose exactly the same protobuf surface.

## Source Hierarchy

For protobuf and transport behavior, this repo uses the following hierarchy:

1. repo-local public protocol artifacts committed with this project
2. public ATAK CIV client artifacts
3. public TAK Server artifacts
4. implementation policy documented here and backed by tests

Sources:

- [`dpp.cot/protobuf/`](../dpp.cot/protobuf/)
- <https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/tree/main/takproto>
- <https://github.com/TAK-Product-Center/Server>

## Baseline

The compatibility baseline for `dpp.cot` is:

- decode legacy XML CoT correctly
- encode and decode protobuf v1 payloads using the committed local `.proto` contract
- preserve XML `detail` information even when it exceeds the protobuf typed subset

This means XML fidelity is treated as a first-class requirement, not as a lossy staging format for protobuf.

## Public Proto Split

The public ATAK CIV client repository and the public TAK Server repository do not expose an identical protobuf surface.

Observed split:

- ATAK CIV `takmessage.proto` exposes `takControl` and `cotEvent`
- public TAK Server `takmessage.proto` also exposes `submissionTime` and `creationTime`
- ATAK CIV `cotevent.proto` exposes the base event fields and `detail`
- public TAK Server `cotevent.proto` also exposes fields such as `caveat` and `releaseableTo`

Implication:

- `dpp.cot` should remain able to interoperate with the narrower public ATAK CIV client surface
- `dpp.cot` may also support public TAK Server extensions when they remain wire-compatible and do not break the client baseline

## Policy For Additional Fields

`dpp.cot` may implement public server-side fields beyond the public ATAK CIV client baseline when all of the following hold:

- the field exists in a public upstream protocol artifact
- protobuf unknown-field behavior keeps omission safe for narrower peers
- local mapping and tests clearly document the behavior

Current examples:

- `submissionTime`
- `creationTime`
- `caveat`
- `releaseableTo`

These are treated as compatible public extensions, not as proof that every public client emits them.

## Policy For XML Detail

When XML `detail` content fits one of the typed protobuf messages exactly, `dpp.cot` may map it into that message.

When XML `detail` content does not fit exactly, `dpp.cot` should prefer preserving the full XML element in residual `xmlDetail`.

This includes cases such as:

- additional attributes on an otherwise known typed element
- repeated occurrences of an element intended for a single typed field
- nested structures that the typed protobuf model does not represent

This policy is derived from the public `detail.proto` rule set and reinforced by public ATAK CIV example payloads.

## Current Practical Policy

In practical terms, `dpp.cot` currently aims to be:

- conservative about protobuf conversion
- lossless about XML preservation
- explicit about public-source-backed extensions

If a future field or mapping rule is only visible in one public upstream implementation, it should be documented as a compatibility policy choice rather than a universal protocol truth unless a stronger normative source is available.
77 changes: 77 additions & 0 deletions docs/fixture-provenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Fixture Provenance

This page records the public origin of borrowed or adapted protocol fixtures used in the test suite.

## Rule

When a test fixture is adapted from a public upstream source, the local fixture should:

- name the upstream repository
- point to the upstream file when practical
- explain what protocol behavior the fixture protects

## ATAK CIV Fixtures

Source repository:
- <https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV>

Imported example files:
- [`takcot/examples/Marker - 2525.cot`](https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/main/takcot/examples/Marker%20-%202525.cot)
- [`takcot/examples/Geo Fence.cot`](https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/main/takcot/examples/Geo%20Fence.cot)
- [`takcot/examples/Route.cot`](https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/main/takcot/examples/Route.cot)

Local use:
- [`Helpers.cs`](../dpp.cot.Tests/Helpers.cs)
- [`SerializationTests.cs`](../dpp.cot.Tests/SerializationTests.cs)

Behaviors protected:
- repeated unknown `detail` elements remain ordered
- nested unknown `detail` XML subtrees are preserved
- common ATAK client payloads survive XML parse and semantic round-trip
- typed elements with extra XML attributes are not silently flattened away

## taky Fixtures

Source repository:
- <https://github.com/tkuester/taky>

Imported test files:
- [`tests/test_takuser.py`](https://github.com/tkuester/taky/blob/016f2c3657455617dae3c302cef7ca0c743df8e4/tests/test_takuser.py)
- [`tests/test_geo_chat.py`](https://github.com/tkuester/taky/blob/016f2c3657455617dae3c302cef7ca0c743df8e4/tests/test_geo_chat.py)

Local use:
- [`Helpers.cs`](../dpp.cot.Tests/Helpers.cs)
- [`SerializationTests.cs`](../dpp.cot.Tests/SerializationTests.cs)
- [`ProtoMappingTests.cs`](../dpp.cot.Tests/ProtoMappingTests.cs)

Behaviors protected:
- extra attributes on typed `detail` elements
- GeoChat-style residual XML preservation
- protobuf `xmlDetail` fallback for typed elements that no longer fit the proto shape

## PyTAK References

Source repository:
- <https://github.com/snstac/pytak>

Referenced test files:
- [`tests/test_classes.py`](https://github.com/snstac/pytak/blob/fa875a181bd724a7a841be2384677fc363ebbac5/tests/test_classes.py)
- [`tests/test_functions.py`](https://github.com/snstac/pytak/blob/fa875a181bd724a7a841be2384677fc363ebbac5/tests/test_functions.py)

Current use:
- documentation and behavior reference only

Behaviors observed:
- generated CoT event defaults
- common event and point attribute expectations
- `_flow-tags_` detail output

## Provenance Boundary

Fixtures here are used as public interoperability examples, not as normative specification text.

The normative hierarchy for this repo remains:

1. local copies of public protocol artifacts such as `.proto`, `protocol.txt`, and `takcot` XSD material
2. public implementation references such as ATAK CIV and TAK Server
3. public fixture sources used to protect specific tested behaviors
29 changes: 29 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# dpp.cot

`dpp.cot` is a library for handling Cursor-on-Target messages.

This documentation set focuses on:

- supported protocol behavior
- source attribution
- implementation notes backed by tests

The goal is to make the supported parts of the library easier to understand and verify.

## Coverage

This repo currently documents and tests:

- CoT XML `event` parsing and serialization
- TAK protobuf payload v1 mapping
- TAK streaming envelope framing
- selected typed `detail` elements
- preservation of unsupported or unknown `detail` elements as residual XML

## Reading Guide

- start with [Scope](scope.md) for what these docs are and are not claiming
- use [Protocols](protocols/cot-xml.md) for wire-format behavior
- use [Library Design](library-design.md) for implementation structure
- use [Testing](testing.md) for executable support boundaries
- use [Sources](sources.md) for public source material used in the docs
Loading
Loading