| Age | Commit message (Collapse) | Author |
|
The tagline and both plugin descriptors now say that romaji conversion can run
inside the server through anthy, so the engine is visible wherever the project
describes itself: the README, the website hero and meta description, the API
documentation, and the Paper and Velocity plugin descriptors.
|
|
{world} rendered empty for a direct message from another server, which
left formats like "({world})" showing a bare pair of brackets. The relay
now carries the sender's world as an optional field, so this is a PATCH
bump (protocol 1.0.2) and either side can be updated first; an older
sender or proxy still yields an empty value.
The world is read once per message, so the sender, the spies and the
relayed copy can no longer disagree if the sender changes worlds mid-way.
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
Three findings from review of #296.
Brigadier evaluates a `requires` predicate when it builds the command tree it
sends to a player - on every join and every updateCommands() - not when someone
is refused. The denial line sitting there put one entry per gated node per
player in the log, burying the command results the category exists to show. It
is dropped rather than moved: a hidden node is never reached by an execution, so
there is no refusal path to log from.
`all` was honoured by `debug: all` and `/lc debug all on` but not by
`categories: [all]`, which resolved to an unknown name - leaving `enabled: true`
with nothing switched on, reported as off by /lc status, explained only by a
warning in the log. The word now lives in one place that all three read.
Two dumps in the same second left one file, because the name is only accurate to
the second and the write replaces. Reproducing a bug means dumping either side of
the step that triggers it, so the second one now takes a suffix.
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
|
|
The proxy had three slf4j debug calls and no way to turn them on, so the
handshake internals were either missing or mixed into INFO for every backend.
The switch is read from the `lunaticchat.debug` system property, falling back to
the `LUNATICCHAT_DEBUG` environment variable, rather than from a new config file:
a file means a parser and a parser means a dependency, and platform-velocity
deliberately ships without so much as Ktor. The property wins so a proxy started
from a compose file can still be overridden for one run without editing it.
Paper's `debug` is deliberately not carried over the handshake. The proxy is
shared by every backend, so one Paper server's setting must not decide how much
the proxy logs for everyone else.
The compatibility check now reports both halves of the rule with their measured
values. "Protocol version incompatible" left the operator comparing two version
strings against a rule they could not see, and which half failed is the whole
answer when a rolling upgrade stops relaying. For the same reason the relay names
the servers it skipped and why: from the receiving server's log, "the message
never arrived" and "the message was never sent" look identical.
The lines that were unconditionally at INFO drop to their category, leaving only
the failure an operator has to act on.
Refs #228
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
"Debug" had grown into three unconnected mechanisms: a boolean injected into
RomanjiConverter, a one-off configuration dump at startup, and KtorSimpleLogger
calls that Paper's stock log4j configuration never printed. Turning `debug: true`
on told an operator nothing about the Velocity handshake, which is what #228 is
actually about.
The vocabulary goes in engine because it is a contract before it is an
implementation: config.yml and the proxy's system property have to agree on what
`velocity,protocol` means, and a category added on one side must exist on the
other. Only the writing is left to the platforms.
The message is a lambda so that the chat path - instrumented once per message -
costs nothing while debugging is off. The `if (debugMode) logger.info("... $word")`
guards this replaces built their strings either way.
Both platform loggers write at INFO rather than at the level the content
deserves, because neither Paper's nor Velocity's stock logging configuration
prints anything below it, and asking operators to edit log4j before they can
answer a bug report is the friction this exists to remove.
Refs #228
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
A nightly JAR was named after the bare release version, so a build from
main and the release of the same base version were indistinguishable in
the JAR file name, /plugins and bug reports; only build-info.properties
knew the difference, and Velocity does not even ship that file.
The x script tried to express this with -Pversion, but each module
assigns its own version from paperVersion/velocityVersion, so the
override never took effect.
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
Both platform modules described the engine dependency as providing
serialization, coroutines and ktor. Moving romaji conversion out of engine left
it exposing serialization alone, so the note now points readers at dependencies
they have to declare themselves.
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
DirectMessageError.reason was a String backed by two constants, so the
receiving side matched one case and let everything else fall through to
"the target is offline". Adding a third reason on the proxy would have
shipped it to Paper servers that silently reported the wrong thing - the
one string-keyed dispatch sitting next to a protocol layer whose messages
are otherwise a sealed hierarchy with exhaustiveness checking.
As an enum, the reader must decide what to show for each case, and
CrossServerDirectMessageManager's when no longer needs an else.
The wire format is unchanged: kotlinx serializes an enum as its name, so
the existing snapshots still decode. What did need care is the reverse
direction - a reason from a newer proxy would now fail to parse, where the
String version degraded. The property has a default and the codec enables
coerceInputValues, so an unknown reason lands on TARGET_OFFLINE, exactly
the old else branch. There is a compatibility test for that case.
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Every channel message wrote a fully interpolated INFO line, duplicating
what the dedicated async ChannelMessageLogger already persists. Every
cross-server message produced one INFO on the sending Paper server, two on
Velocity, and one on each receiving Paper server - so a single global chat
message cost up to four synchronous console and latest.log writes across
the network, on the message path, with JUL and Logback appenders being
synchronous.
These are now debug, and phrased so the string is not built unless debug
is on: the JUL sites take a supplier, the slf4j sites take a format plus
arguments.
Handshake, registration and delivery-failure lines stay at info - they
fire once per server or once per failed message, and they explain
something an operator needs to see.
Two relay tests asserted on the text of a log line. One of them was
verifying "0 servers" where the same test already verifies zero sends;
the other was really checking that the payload reaches the target, so it
now decodes the relayed bytes and compares them to the original message.
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
The channel Paper and Velocity talk over was declared in seven places, in
two spellings ("lunaticchat:main" and the namespace/name pair), one of
them an inline literal in CrossServerChatManager that bypassed even its
own file's constant. Renaming it meant finding all seven; missing one
leaves both sides compiling and starting, just not talking. It now lives
next to the codec that defines the wire format.
The echo-suppression cache was likewise written twice, and the copies had
already drifted in style - one hand-rolled the expiry sweep, the other used
filter/map - while staying semantically identical. Any future change to
eviction would have had to land in both, and CrossServerChatManager's copy
carried a comment claiming ConcurrentHashMap iterators cannot remove(),
which they can.
MessageDeduplicationCache documents the one property that surprised the
tests written against it: eviction orders by millisecond timestamp, so a
burst inside a single millisecond evicts arbitrarily among its members.
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
These were all scaffolding that drifted out of use, and each one costs
a reader time before they discover it does nothing:
- UUIDASStringSerializer duplicated UUIDSerializer byte for byte; the
differing descriptor name never reaches the JSON/YAML wire format, so
the choice between them was a coin flip for contributors.
- Velocity's BuildInfo was never referenced (the plugin reads its version
from PluginContainer) and read a "commit" property the build never
wrote, so it would have reported "unknown" had anyone called it.
- KanaConverter.TrieNode.Leaf is never constructed: buildTrie starts from
a Branch and insert only ever returns Branch. Six branches guarded
against a state the type system allowed but the code could not produce.
With those gone, isValidRomaji and toHiragana were visibly the same
trie walk, so they now share one longestMatch.
- @Deprecated command handling had no annotated command to act on.
- The settings backup restore looked for *.backup.* files that nothing in
the repository writes, so it always fell through to empty settings.
Also drops CommandContext.replyWithEvent/replyPlain, PluginCoroutineScope's
unused plugin parameter, GitHubRelease fields no caller reads, and four
language keys with no lookup site.
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
support
Velocity moved to the 4.x generation while platform-velocity still compiled
against 3.5.1, so the debug environment had to pin an older proxy than the one
most users now run.
The migration needed no source changes. Comparing every one of the 213 classes in
the API jar with javap shows 4.0.0 is identical to 3.5.1 in its public
signatures; the supported protocol range is unchanged too. The one real
difference is the POM, which moves adventure-bom from 4.26.1 to 5.2.0.
Support for 3.5.x is dropped even though the JAR would still load there, because
keeping it meant Adventure 4.26.1 could be the runtime and engine had to stay
inside the API surface both Adventure majors share -- a constraint no build step
could check. Narrowing to 4.x makes every supported runtime ship Adventure 5.2.0,
matching what engine already compiles against, so the constraint is gone rather
than merely documented. Nothing enforces the requirement in code, matching how
dropping 3.4.0 was handled in v1.1.0.
Also drops two dead dependencies: kaml, declared but never imported, worth about
1 MB of shaded JAR, and the velocity-api annotationProcessor, which does nothing
without Java sources or kapt.
|
|
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
Allow /tell and /reply to reach players on other Paper servers behind a
Velocity proxy using the "<player>@<server>" target syntax.
Engine (protocol bumped 1.0.0 -> 1.0.1, optional sub-channels):
- Add DirectMessageRelay, DirectMessageError, PresenceSnapshot/PresenceEntry
and PresenceRequest messages plus codec branches.
Velocity:
- CrossServerDirectMessageRelay routes a DM to the target server (or returns
a delivery error to the source).
- PresenceTracker broadcasts proxy-wide presence snapshots on join/quit/switch
and on request.
Paper:
- RemotePlayerRegistry caches proxy presence for completion and remote target
resolution.
- CrossServerDirectMessageManager handles send/receive/error and dedup.
- DirectMessageHandler reply state generalized to ReplyTarget (Local/Remote)
so /reply works across servers.
- TellCommand parses "name@server", completes local names and remote
name@server targets, and uses exact local name matching.
- New crossServerDirectMessage config flag and i18n keys (en/ja).
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
|
|
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
|
|
|
|
- Add 23 new test files covering exceptions, data classes, permissions,
setting handlers, commands, and cross-server relay
- Change command execute methods from private to internal visibility
to enable unit testing (16 command files)
- Engine coverage: 65.5% → 92.4%
- Platform-paper coverage: 16.8% → 40.0%
- Platform-velocity coverage: 62.4% → 76.8%
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
- Add Jacoco plugin to all subprojects with XML report generation
- Replace post-test-results.sh with Codecov upload in CI workflow
- Add codecov.yml configuration
- Add 140 new tests across engine, platform-paper, and platform-velocity
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
Explain why the plugin parameter uses Any type instead of a generic:
- Velocity's EventManager.register() accepts Object
- Generic type provides little practical benefit given the API design
- Typically receives the main plugin instance
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
|
|
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
マルチプロジェクト構造に移行し,Paper と Velocity の両方をサポートできるようにしました.
- engine: 共通ロジック(データモデル,JSON シリアライゼーション)
- platform-paper: Paper プラグイン実装
- platform-velocity: Velocity プラグイン実装(将来用)
主な変更:
- settings.gradle.kts: サブプロジェクト定義を追加
- build.gradle.kts: マルチプロジェクト用に再構成
- 既存コードを platform-paper に移動
- CI/CD ワークフローを更新
- Docker 設定を更新
- IntelliJ Run Configurations を更新
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|