diff --git a/boldi-vigna/src/display.rs b/boldi-vigna/src/display.rs
index d3dc448..093e7e0 100644
--- a/boldi-vigna/src/display.rs
+++ b/boldi-vigna/src/display.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::query::{SpanQuery, SpanQueryWithTerms};
use std::fmt;
diff --git a/boldi-vigna/src/error.rs b/boldi-vigna/src/error.rs
index 51b0a94..3798e24 100644
--- a/boldi-vigna/src/error.rs
+++ b/boldi-vigna/src/error.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
#[derive(Debug, thiserror::Error)]
pub enum SpanError {
#[error("term index {index} out of range (num_terms = {num_terms})")]
diff --git a/boldi-vigna/src/interval.rs b/boldi-vigna/src/interval.rs
index cc7b997..74c305d 100644
--- a/boldi-vigna/src/interval.rs
+++ b/boldi-vigna/src/interval.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
/// A positional match: contiguous region [start, end] in a document's
/// token stream. Both bounds are inclusive 0-indexed token positions.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
diff --git a/boldi-vigna/src/lib.rs b/boldi-vigna/src/lib.rs
index 0de34be..b9806ea 100644
--- a/boldi-vigna/src/lib.rs
+++ b/boldi-vigna/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
mod display;
mod error;
mod interval;
diff --git a/boldi-vigna/src/positions.rs b/boldi-vigna/src/positions.rs
index 47912f1..bcd1a3f 100644
--- a/boldi-vigna/src/positions.rs
+++ b/boldi-vigna/src/positions.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
/// Provides sorted token positions for leaf terms in a span query.
///
/// Each term in a [`SpanQuery::Term(i)`](crate::SpanQuery::Term) references
diff --git a/boldi-vigna/src/query.rs b/boldi-vigna/src/query.rs
index 6c0e39b..0046a04 100644
--- a/boldi-vigna/src/query.rs
+++ b/boldi-vigna/src/query.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::error::SpanError;
/// The operator tree for a span query.
diff --git a/boldi-vigna/src/solver.rs b/boldi-vigna/src/solver.rs
index 93bf8a6..e858a09 100644
--- a/boldi-vigna/src/solver.rs
+++ b/boldi-vigna/src/solver.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::error::SpanError;
use crate::interval::Interval;
use crate::positions::TermPositions;
diff --git a/boldi-vigna/src/state/disjunction.rs b/boldi-vigna/src/state/disjunction.rs
index 978f0a5..13f3161 100644
--- a/boldi-vigna/src/state/disjunction.rs
+++ b/boldi-vigna/src/state/disjunction.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use super::NodeState;
use crate::interval::Interval;
use crate::positions::TermPositions;
diff --git a/boldi-vigna/src/state/empty.rs b/boldi-vigna/src/state/empty.rs
index bf0880e..d30dc40 100644
--- a/boldi-vigna/src/state/empty.rs
+++ b/boldi-vigna/src/state/empty.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::interval::Interval;
use crate::positions::TermPositions;
diff --git a/boldi-vigna/src/state/filter.rs b/boldi-vigna/src/state/filter.rs
index 6bea219..0de2ed3 100644
--- a/boldi-vigna/src/state/filter.rs
+++ b/boldi-vigna/src/state/filter.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use super::NodeState;
use crate::interval::Interval;
use crate::positions::TermPositions;
diff --git a/boldi-vigna/src/state/mod.rs b/boldi-vigna/src/state/mod.rs
index 6feff1f..28f4a2e 100644
--- a/boldi-vigna/src/state/mod.rs
+++ b/boldi-vigna/src/state/mod.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
mod disjunction;
mod empty;
mod filter;
diff --git a/boldi-vigna/src/state/ordered.rs b/boldi-vigna/src/state/ordered.rs
index e9008ba..d4c771a 100644
--- a/boldi-vigna/src/state/ordered.rs
+++ b/boldi-vigna/src/state/ordered.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use super::NodeState;
use crate::interval::Interval;
use crate::positions::TermPositions;
diff --git a/boldi-vigna/src/state/phrase.rs b/boldi-vigna/src/state/phrase.rs
index b991a13..06b108e 100644
--- a/boldi-vigna/src/state/phrase.rs
+++ b/boldi-vigna/src/state/phrase.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::interval::Interval;
use crate::positions::TermPositions;
diff --git a/boldi-vigna/src/state/relation.rs b/boldi-vigna/src/state/relation.rs
index 301f915..e6faa5b 100644
--- a/boldi-vigna/src/state/relation.rs
+++ b/boldi-vigna/src/state/relation.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use super::NodeState;
use crate::interval::Interval;
use crate::positions::TermPositions;
diff --git a/boldi-vigna/src/state/term.rs b/boldi-vigna/src/state/term.rs
index af5c08d..b6fa3a0 100644
--- a/boldi-vigna/src/state/term.rs
+++ b/boldi-vigna/src/state/term.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::interval::Interval;
use crate::positions::TermPositions;
diff --git a/boldi-vigna/src/state/unordered.rs b/boldi-vigna/src/state/unordered.rs
index e3c4a1a..c1ac66f 100644
--- a/boldi-vigna/src/state/unordered.rs
+++ b/boldi-vigna/src/state/unordered.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use std::cmp::Reverse;
use std::collections::{BTreeSet, VecDeque};
use std::ops::Bound::{Excluded, Unbounded};
diff --git a/postgres/src/am.rs b/postgres/src/am.rs
index 7f4c293..9d12c5b 100644
--- a/postgres/src/am.rs
+++ b/postgres/src/am.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use pgrx::{PgBox, pg_extern, pg_guard, pg_sys};
use std::ffi::c_void;
diff --git a/postgres/src/bm25.rs b/postgres/src/bm25.rs
index 513ce94..8093b59 100644
--- a/postgres/src/bm25.rs
+++ b/postgres/src/bm25.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
//! Standalone scoring policy and production-compatible BM25 arithmetic.
use std::collections::BTreeMap;
diff --git a/postgres/src/highlight.rs b/postgres/src/highlight.rs
index 34dcdbf..549a614 100644
--- a/postgres/src/highlight.rs
+++ b/postgres/src/highlight.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::match_positions::MatchPosition;
use rustc_hash::FxHasher;
use std::borrow::Cow;
diff --git a/postgres/src/highlight_udfs.rs b/postgres/src/highlight_udfs.rs
index 11faf17..9ee916c 100644
--- a/postgres/src/highlight_udfs.rs
+++ b/postgres/src/highlight_udfs.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::highlight::{highlight_text, highlight_text_ansi, positions_from_query, rewrap_text};
use pgrx::{FromDatum, Internal, IntoDatum, PgList, default, pg_extern, pg_guard, pg_sys};
use std::borrow::Cow;
diff --git a/postgres/src/lib.rs b/postgres/src/lib.rs
index 7e02165..7b5612b 100644
--- a/postgres/src/lib.rs
+++ b/postgres/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use pgrx::pg_guard;
::pgrx::pg_module_magic!(name);
diff --git a/postgres/src/match_positions.rs b/postgres/src/match_positions.rs
index c1ea5d6..467f207 100644
--- a/postgres/src/match_positions.rs
+++ b/postgres/src/match_positions.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
/// One matched query part over token-position coordinates.
///
/// `start` / `end` are inclusive token positions in the indexed token stream.
diff --git a/postgres/src/operator.rs b/postgres/src/operator.rs
index 3c114c7..6920f76 100644
--- a/postgres/src/operator.rs
+++ b/postgres/src/operator.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
#[allow(unused_imports)]
use crate::am::amhandler;
use pgrx::{extension_sql, pg_extern};
diff --git a/postgres/src/options.rs b/postgres/src/options.rs
index c775272..279ee60 100644
--- a/postgres/src/options.rs
+++ b/postgres/src/options.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use pgrx::{pg_guard, pg_sys};
use std::ffi::CStr;
use std::sync::atomic::{AtomicU32, Ordering};
diff --git a/postgres/src/score.rs b/postgres/src/score.rs
index 2ba8435..be9a631 100644
--- a/postgres/src/score.rs
+++ b/postgres/src/score.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::bm25::{
Bm25Overrides, DenseRatio, ScoreStopWords, ScoringTermInput, TermScorer, TermSetEdit,
compile_scoring_terms, sum_scores_in_order,
diff --git a/postgres/src/tf_bucket.rs b/postgres/src/tf_bucket.rs
index 953797c..43d978d 100644
--- a/postgres/src/tf_bucket.rs
+++ b/postgres/src/tf_bucket.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
//! Production-compatible term-frequency quantization.
/// Number of bits in a stored term-frequency bucket.
diff --git a/postgres/src/udfs.rs b/postgres/src/udfs.rs
index 6bf1c90..2165e65 100644
--- a/postgres/src/udfs.rs
+++ b/postgres/src/udfs.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use pgrx::{default, iter::SetOfIterator, pg_extern};
use tokenizer::{
Folding, GraphemeMode, LongTokenMode, LongTokenSpec, PositionGapMode, Tokenizer,
diff --git a/tinql/src/ast.rs b/tinql/src/ast.rs
index 46a0747..f6eebd0 100644
--- a/tinql/src/ast.rs
+++ b/tinql/src/ast.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
/// A parsed query expression.
///
/// This is the syntax tree — it faithfully represents what the user wrote.
diff --git a/tinql/src/error.rs b/tinql/src/error.rs
index 4ad79b0..327b3a9 100644
--- a/tinql/src/error.rs
+++ b/tinql/src/error.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use thiserror::Error;
/// An error produced during query parsing.
diff --git a/tinql/src/lib.rs b/tinql/src/lib.rs
index eefc5d3..0947acd 100644
--- a/tinql/src/lib.rs
+++ b/tinql/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
pub mod ast;
pub mod error;
mod parser;
diff --git a/tinql/src/parser/mod.rs b/tinql/src/parser/mod.rs
index 788a731..d76aa6e 100644
--- a/tinql/src/parser/mod.rs
+++ b/tinql/src/parser/mod.rs
@@ -1 +1,17 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
pub(crate) mod pest_parser;
diff --git a/tinql/src/parser/pest_parser/mod.rs b/tinql/src/parser/pest_parser/mod.rs
index ae3f339..f56bf4f 100644
--- a/tinql/src/parser/pest_parser/mod.rs
+++ b/tinql/src/parser/pest_parser/mod.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
mod phrase_grammar;
use pest::Parser;
diff --git a/tinql/src/parser/pest_parser/phrase_grammar.rs b/tinql/src/parser/pest_parser/phrase_grammar.rs
index 32f0e3e..d850c05 100644
--- a/tinql/src/parser/pest_parser/phrase_grammar.rs
+++ b/tinql/src/parser/pest_parser/phrase_grammar.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use pest_derive::Parser;
#[derive(Parser)]
diff --git a/tinql/src/quote.rs b/tinql/src/quote.rs
index 131bc09..47ef8b0 100644
--- a/tinql/src/quote.rs
+++ b/tinql/src/quote.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use std::borrow::Cow;
use crate::{Expr, ImplicitOp, PhraseElement, parse};
diff --git a/tinql/src/runtime/capability.rs b/tinql/src/runtime/capability.rs
index 3be1070..84b54dd 100644
--- a/tinql/src/runtime/capability.rs
+++ b/tinql/src/runtime/capability.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::Expr;
use tokenizer::presets::default_pipeline;
diff --git a/tinql/src/runtime/display.rs b/tinql/src/runtime/display.rs
index 3b37a48..ab250a3 100644
--- a/tinql/src/runtime/display.rs
+++ b/tinql/src/runtime/display.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use super::{Query, RangeBound, SpanExpr, SpanTermSlot};
use std::fmt;
diff --git a/tinql/src/runtime/eval.rs b/tinql/src/runtime/eval.rs
index 7182963..861124e 100644
--- a/tinql/src/runtime/eval.rs
+++ b/tinql/src/runtime/eval.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use std::cmp::Ordering;
use boldi_vigna::{Interval, SpanSolver, TermPositions};
diff --git a/tinql/src/runtime/lower.rs b/tinql/src/runtime/lower.rs
index 04e1410..2d58d5b 100644
--- a/tinql/src/runtime/lower.rs
+++ b/tinql/src/runtime/lower.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
//! Lowers a `tinql::Expr` into the shared runtime `Query` / `SpanQuery`
//! representation.
//!
diff --git a/tinql/src/runtime/mod.rs b/tinql/src/runtime/mod.rs
index 4a71457..6e967a4 100644
--- a/tinql/src/runtime/mod.rs
+++ b/tinql/src/runtime/mod.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
//! Shared pure-Rust tinql runtime.
//!
//! Owns the lowered query AST, sub-tokenization, lowering, capability
diff --git a/tinql/src/runtime/position_filter.rs b/tinql/src/runtime/position_filter.rs
index c96f572..8c1051b 100644
--- a/tinql/src/runtime/position_filter.rs
+++ b/tinql/src/runtime/position_filter.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use boldi_vigna::Interval;
use std::fmt;
diff --git a/tinql/src/runtime/regex.rs b/tinql/src/runtime/regex.rs
index 4444cfb..d1a05d5 100644
--- a/tinql/src/runtime/regex.rs
+++ b/tinql/src/runtime/regex.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use regex_automata::meta::Regex as MetaRegex;
use regex_syntax::hir::Hir;
use std::fmt;
diff --git a/tinql/src/runtime/simplify.rs b/tinql/src/runtime/simplify.rs
index f1eaa68..1e66306 100644
--- a/tinql/src/runtime/simplify.rs
+++ b/tinql/src/runtime/simplify.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
//! Query simplification for lowered tinql runtime queries.
//!
//! This module owns two simplification profiles over [`Query`]:
diff --git a/tinql/src/runtime/span_expr.rs b/tinql/src/runtime/span_expr.rs
index 8a265fb..b036d53 100644
--- a/tinql/src/runtime/span_expr.rs
+++ b/tinql/src/runtime/span_expr.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use super::SpanPositionFilter;
#[derive(Debug, Clone, PartialEq)]
diff --git a/tinql/src/runtime/subtokenize.rs b/tinql/src/runtime/subtokenize.rs
index a12f45e..7c31a82 100644
--- a/tinql/src/runtime/subtokenize.rs
+++ b/tinql/src/runtime/subtokenize.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
//! Sub-tokenization rewrite pass for the shared runtime.
use crate::*;
diff --git a/tinql/src/tests.rs b/tinql/src/tests.rs
index ad4a092..0659cd6 100644
--- a/tinql/src/tests.rs
+++ b/tinql/src/tests.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
mod cases {
use crate::Expr;
use crate::ImplicitOp;
diff --git a/tinql/src/util.rs b/tinql/src/util.rs
index 6f8bdf8..9429cd5 100644
--- a/tinql/src/util.rs
+++ b/tinql/src/util.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::ast::{Expr, WildcardPart};
/// Classify a raw term string into `Term` or `Wildcard`.
diff --git a/tokenizer/src/compiled.rs b/tokenizer/src/compiled.rs
index 7cd0e6b..248a555 100644
--- a/tokenizer/src/compiled.rs
+++ b/tokenizer/src/compiled.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::folder::{CompiledFolder, lowercase_ascii_from};
use crate::long_tokens::LongTokenIter;
use crate::spec::{GraphemeMode, TokenizerPipelineSpec, TokenizerSpec};
diff --git a/tokenizer/src/folder.rs b/tokenizer/src/folder.rs
index abed2bd..8de86ca 100644
--- a/tokenizer/src/folder.rs
+++ b/tokenizer/src/folder.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::{Folding, Token};
use std::borrow::Cow;
use unicode_normalization::char::{canonical_combining_class, is_combining_mark};
diff --git a/tokenizer/src/lib.rs b/tokenizer/src/lib.rs
index b73f1a5..204e255 100644
--- a/tokenizer/src/lib.rs
+++ b/tokenizer/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use std::borrow::Cow;
use std::fmt::Display;
diff --git a/tokenizer/src/long_tokens.rs b/tokenizer/src/long_tokens.rs
index ed920ad..8affb0f 100644
--- a/tokenizer/src/long_tokens.rs
+++ b/tokenizer/src/long_tokens.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::{LongTokenMode, LongTokenSpec, MIN_TOKEN_BYTES, PositionGapMode, Token};
use std::borrow::Cow;
use unicode_segmentation::UnicodeSegmentation;
diff --git a/tokenizer/src/presets.rs b/tokenizer/src/presets.rs
index 393cd7a..5af14c9 100644
--- a/tokenizer/src/presets.rs
+++ b/tokenizer/src/presets.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use std::sync::LazyLock;
use crate::{CompiledTokenizerPipeline, TokenizerPipelineSpec};
diff --git a/tokenizer/src/source_spans.rs b/tokenizer/src/source_spans.rs
index 1a3f512..dfc71f9 100644
--- a/tokenizer/src/source_spans.rs
+++ b/tokenizer/src/source_spans.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
//! Source-span view of a compiled pipeline.
//!
//! Highlighting maps match positions — computed against the pipeline's
diff --git a/tokenizer/src/spec.rs b/tokenizer/src/spec.rs
index e71a11b..f39dcd8 100644
--- a/tokenizer/src/spec.rs
+++ b/tokenizer/src/spec.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::compiled::CompiledTokenizerPipeline;
/// Smallest byte ceiling that can contain every UTF-8 scalar value.
diff --git a/tokenizer/src/tokenizers.rs b/tokenizer/src/tokenizers.rs
index 319aea0..829eac6 100644
--- a/tokenizer/src/tokenizers.rs
+++ b/tokenizer/src/tokenizers.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
mod unicode;
mod whitespace;
diff --git a/tokenizer/src/tokenizers/unicode.rs b/tokenizer/src/tokenizers/unicode.rs
index 9052bb2..4231b4c 100644
--- a/tokenizer/src/tokenizers/unicode.rs
+++ b/tokenizer/src/tokenizers/unicode.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::{Classification, Token};
use std::marker::PhantomData;
use unicode_properties::{GeneralCategoryGroup, UnicodeGeneralCategory};
diff --git a/tokenizer/src/tokenizers/whitespace.rs b/tokenizer/src/tokenizers/whitespace.rs
index 55660a0..45e2513 100644
--- a/tokenizer/src/tokenizers/whitespace.rs
+++ b/tokenizer/src/tokenizers/whitespace.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2026 PlanetScale
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// The full license text is available in LICENSE.
use crate::{Token, Tokenizer};
pub struct Whitespace;