Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
542 commits
Select commit Hold shift + click to select a range
0117396
Used jsonName for message field keys in custom options
tom-newotny Feb 18, 2026
479ada3
Added test for custom options from nested extensions being silently d…
tom-newotny Feb 18, 2026
43f569c
Supported nested message extensions in buildExtensionMap for custom o…
tom-newotny Feb 18, 2026
aa199e7
Added test for custom float option scientific notation formatting bug
tom-newotny Feb 18, 2026
dc7c3f7
Fixed custom float option scientific notation formatting to match Jav…
tom-newotny Feb 18, 2026
445f13b
Added test for custom float NaN/Infinity values not quoted as strings
tom-newotny Feb 18, 2026
3260079
Handled NaN/Infinity/-Infinity float values as quoted strings in cust…
tom-newotny Feb 18, 2026
208ba0c
Added test for custom map option field outputting array instead of ob…
tom-newotny Feb 18, 2026
5b9cddc
Added map field support in custom message options
tom-newotny Feb 18, 2026
0a800b4
Added test for custom map option integer keys not string-quoted
tom-newotny Feb 18, 2026
c468d59
Quoted integer map keys in custom options output
tom-newotny Feb 18, 2026
9d9f978
Added test for custom map string key starting with digit not being qu…
tom-newotny Feb 18, 2026
ff36670
Fixed custom map digit key quoting in formatCustomOptions
tom-newotny Feb 18, 2026
69cba0e
Added test for packed repeated scalar fields in message-typed custom …
tom-newotny Feb 18, 2026
3c5a3f7
Updated adversarial testing notes for run 64
tom-newotny Feb 18, 2026
aa7bfa0
Fixed packed repeated scalar fields in custom message options
tom-newotny Feb 18, 2026
13a673e
Updated plan and status: all 150/150 tests passing
tom-newotny Feb 18, 2026
4e0d38f
Added test for empty service formatting bugs
tom-newotny Feb 18, 2026
e44d553
Fixed empty service codegen: skip RpcOptions import and inline empty …
tom-newotny Feb 18, 2026
79b0bf6
Added test for enum prefix detection with trailing underscore in name
tom-newotny Feb 18, 2026
76717a3
Fixed enum prefix detection to unconditionally append underscore for …
tom-newotny Feb 18, 2026
2553382
Updated RALPH.md with test 147 notes
tom-newotny Feb 18, 2026
39d8221
Added failing test for enum prefix detection with leading underscore …
tom-newotny Feb 18, 2026
4ac2e51
Fixed enum prefix detection for names starting with underscore
tom-newotny Feb 18, 2026
3b43368
Added test for duplicate ServerStreamingCall import in client file wi…
tom-newotny Feb 18, 2026
b34aece
Fixed duplicate ServerStreamingCall import when multiple methods shar…
tom-newotny Feb 18, 2026
da284fc
Updated RALPH.md with test 149 fix notes
tom-newotny Feb 18, 2026
a3fbab3
Added failing test for client import ordering with streaming call typ…
tom-newotny Feb 18, 2026
5a3ae41
Fixed client import ordering for mixed streaming/non-streaming method…
tom-newotny Feb 18, 2026
68faf7e
Updated plan: all 155/155 tests passing
tom-newotny Feb 18, 2026
5eea2c4
Added test for oneof with underscore name misidentified as proto3 opt…
tom-newotny Feb 18, 2026
ebcd635
Fixed proto3 optional detection to use field.Proto3Optional instead o…
tom-newotny Feb 18, 2026
4166d08
Added test for duplicate property initialization when two fields shar…
tom-newotny Feb 18, 2026
f4fb040
Deduplicated create() property init for fields with same camelCase name
tom-newotny Feb 18, 2026
0d1bc09
Added test for missing package-level detached comments
tom-newotny Feb 18, 2026
1be7f58
Added package-level detached comments (path [2]) to file header output
tom-newotny Feb 18, 2026
0c4625e
Updated RALPH.md with test 153 completion, marked DONE
tom-newotny Feb 18, 2026
c5e7c46
Added test for import name collision missing alias
tom-newotny Feb 18, 2026
99a11c3
Added import name collision detection — alias imported types that col…
tom-newotny Feb 18, 2026
3bda329
Updated RALPH.md with import collision fix notes
tom-newotny Feb 18, 2026
4d72346
Added test for map value type import ordering bug
tom-newotny Feb 18, 2026
f667351
Fixed map value import ordering to register at map field position
tom-newotny Feb 18, 2026
1a2390a
Added test for missing import when proto files have no package declar…
tom-newotny Feb 18, 2026
b36ba3e
Fixed no-package import resolution in protoc-gen-kaja
tom-newotny Feb 18, 2026
f6d1104
Added test for no-package enum option value falling back to numeric
tom-newotny Feb 18, 2026
29310de
Fixed no-package enum option name resolution in resolveEnumValueName
tom-newotny Feb 18, 2026
4eee954
Added test for no-package client import path bug
tom-newotny Feb 19, 2026
b1c4bed
Fixed no-package client import path resolution in getImportPathForType
tom-newotny Feb 19, 2026
797b92a
Added test for lowercase-named nested message type resolution across …
tom-newotny Feb 19, 2026
02f6d50
Fixed lowercase nested cross-package type name resolution
tom-newotny Feb 19, 2026
e1cba73
Added test for 4-level deep nested type import name bug
tom-newotny Feb 19, 2026
92f273e
Fixed deep nested import by generalizing type resolution to arbitrary…
tom-newotny Feb 19, 2026
b7a4f59
Added test for multiline trailing comment collapsed to single line
tom-newotny Feb 19, 2026
072fa7f
Fixed multiline trailing comment handling for fields
tom-newotny Feb 19, 2026
919de23
Added test for oneof member multiline trailing comment missing // prefix
tom-newotny Feb 19, 2026
7e08618
Fixed oneof member multiline trailing comment output
tom-newotny Feb 19, 2026
9f6ec33
Added test for service client file import name collision not aliased
tom-newotny Feb 19, 2026
0a5b0c3
Fixed service import name collision with pre-computed aliases
tom-newotny Feb 19, 2026
2db6d54
Updated RALPH.md and status.txt
tom-newotny Feb 19, 2026
13c456f
Added test for WireType import position bug with empty first message …
tom-newotny Feb 19, 2026
b8d723a
Fixed WireType import ordering when first message is empty and servic…
tom-newotny Feb 19, 2026
3eea8aa
Updated RALPH.md with test 164 notes
tom-newotny Feb 19, 2026
58a28c9
Added test for jsonName field descriptor missing escape of special ch…
tom-newotny Feb 19, 2026
5c2c96b
Fixed json_name escaping in field descriptor output
tom-newotny Feb 19, 2026
ea89ffb
Fix jsonName escaping in field descriptor output and update status to…
tom-newotny Feb 19, 2026
ba6d8f0
Added test for enum value trailing comment whitespace not stripped
tom-newotny Feb 19, 2026
02937cb
Fixed enum value trailing whitespace trimming in JSDoc blocks
tom-newotny Feb 19, 2026
e15b783
Add protoc-gen-kaja build step to Dockerfile
wham Feb 19, 2026
a042a01
Remove Node.js installation step and build protoc-gen-kaja in desktop…
wham Feb 19, 2026
a88323d
Added test for deep nested enum resolution in custom options
tom-newotny Feb 19, 2026
ac53113
Fixed deep nested enum resolution in custom options
tom-newotny Feb 19, 2026
e2071c5
Added test for custom option string tab character escaping
tom-newotny Feb 19, 2026
b1565b7
Escaped tab characters in custom option string values
tom-newotny Feb 19, 2026
e4954cd
Added test for syntax detached comment no-space formatting bug
tom-newotny Feb 19, 2026
d48b406
Fixed syntax detached comment spacing to preserve original leading space
tom-newotny Feb 19, 2026
e52333f
Added test for package detached comment no-space formatting bug
tom-newotny Feb 19, 2026
90a6fcd
Fixed package detached comments to preserve original spacing without …
tom-newotny Feb 19, 2026
a22831e
Added test for import ordering bug when fields declared out of field-…
tom-newotny Feb 19, 2026
d95d68b
Fixed import ordering to use declaration order instead of field numbe…
tom-newotny Feb 19, 2026
3f13619
Added failing test for runtime import name collision not aliased
tom-newotny Feb 19, 2026
3e7fbfe
Fixed runtime WireType import collision with local message type
tom-newotny Feb 19, 2026
8202f4d
Updated RALPH.md and status.txt — all 177 tests passing
tom-newotny Feb 19, 2026
67d65a2
Added test for MessageType runtime import collision not aliased
tom-newotny Feb 19, 2026
b1859d0
Added runtime MessageType import collision handling
tom-newotny Feb 19, 2026
1cb1092
Added test for ServiceType runtime-rpc import collision not aliased
tom-newotny Feb 19, 2026
c60ab4e
Fixed ServiceType runtime-rpc import collision when proto message nam…
tom-newotny Feb 19, 2026
2c29c34
Added failing test for UnknownFieldHandler runtime import collision n…
tom-newotny Feb 19, 2026
6cab3e3
Fixed UnknownFieldHandler runtime import collision
tom-newotny Feb 19, 2026
ccec7af
Added test for PartialMessage runtime import collision not aliased
tom-newotny Feb 19, 2026
ea158ce
Fixed PartialMessage runtime import collision handling
tom-newotny Feb 19, 2026
9afc588
Added test for BinaryReadOptions import type collision not aliased
tom-newotny Feb 19, 2026
63db155
Fixed BinaryReadOptions runtime import collision when proto message n…
tom-newotny Feb 19, 2026
55b3345
Added test for BinaryWriteOptions runtime import collision not aliased
tom-newotny Feb 19, 2026
fd57f6e
Fixed BinaryWriteOptions runtime import collision
tom-newotny Feb 19, 2026
3fcf379
Added test for IBinaryReader runtime import collision not aliased
tom-newotny Feb 19, 2026
5b9f479
Fixed IBinaryReader runtime import collision
tom-newotny Feb 19, 2026
4d0c9e8
Added test for IBinaryWriter runtime import collision not aliased
tom-newotny Feb 19, 2026
fa5fdfe
Fixed IBinaryWriter runtime import collision
tom-newotny Feb 19, 2026
d22e44a
Added test for RpcOptions runtime-rpc import collision not aliased in…
tom-newotny Feb 19, 2026
88881a4
Fixed RpcOptions runtime-rpc import collision in client file
tom-newotny Feb 19, 2026
c86f485
Added test for reflectionMergePartial runtime import collision
tom-newotny Feb 19, 2026
ec8dcd9
Fixed reflectionMergePartial runtime import collision
tom-newotny Feb 19, 2026
0902bdb
Added test for service name collision with RpcTransport runtime-rpc i…
tom-newotny Feb 19, 2026
552a5bc
Fixed RpcTransport service name collision with runtime-rpc import
tom-newotny Feb 19, 2026
a872555
Added test for ServiceInfo service name collision in client file
tom-newotny Feb 19, 2026
f08e809
Fixed ServiceInfo runtime-rpc import collision when service is named …
tom-newotny Feb 19, 2026
cea6c2e
Added test for UnaryCall service name collision not aliased in client…
tom-newotny Feb 19, 2026
f79d04c
Fixed service name collision with UnaryCall call type in client file
tom-newotny Feb 19, 2026
dd20b00
Updated RALPH.md and status.txt
tom-newotny Feb 19, 2026
4b97807
Added test for service name RpcOptions collision not aliased in clien…
tom-newotny Feb 19, 2026
ee9a5d2
Fixed service name RpcOptions collision with runtime-rpc RpcOptions type
tom-newotny Feb 19, 2026
95caeea
Added test for stackIntercept service name collision in client file
tom-newotny Feb 19, 2026
e2af6d3
Added stackIntercept to service name collision detection for proto im…
tom-newotny Feb 19, 2026
733352a
Added test for duplicate localName create() default using first field…
tom-newotny Feb 19, 2026
4a1e606
Fixed duplicate property create() to use last-write-wins dedup
tom-newotny Feb 19, 2026
5c8b785
Added test for client file syntax detached comment missing block sepa…
tom-newotny Feb 19, 2026
ae22bd9
Fixed client file syntax detached comment block separators
tom-newotny Feb 19, 2026
da10795
Added failing test for client file dropping package-level detached co…
tom-newotny Feb 19, 2026
3dcd9c1
Added package-level detached comments to client file header
tom-newotny Feb 19, 2026
2f06e1b
Added test for unconditional service name aliasing when runtime-rpc t…
tom-newotny Feb 19, 2026
f593c95
Fixed service call type collision to only alias when call type is act…
tom-newotny Feb 19, 2026
16baf68
Added test for false client alias when runtime-rpc type not imported
tom-newotny Feb 19, 2026
1413201
Fixed false client alias for proto types named after unused runtime-r…
tom-newotny Feb 19, 2026
cd01756
Added test for message type named RpcTransport not aliased in client …
tom-newotny Feb 19, 2026
bf647ba
Fixed message RpcTransport/ServiceInfo collision with runtime-rpc imp…
tom-newotny Feb 19, 2026
e45c7e5
Added test for stackIntercept message collision aliasing wrong import
tom-newotny Feb 19, 2026
124d7df
Fixed message stackIntercept runtime import collision
tom-newotny Feb 19, 2026
8d051ee
Added test for create() integer-like property key ordering with under…
tom-newotny Feb 19, 2026
97de924
Fixed create() field init order to match JS Object.entries() enumeration
tom-newotny Feb 19, 2026
75a38c9
Added test for detached comment trailing whitespace trimming
tom-newotny Feb 19, 2026
33c6fde
Preserved trailing whitespace in detached comments
tom-newotny Feb 19, 2026
e3c8b5a
Added test for client file cross-file type name collision not aliased
tom-newotny Feb 19, 2026
bbad5a3
Fixed client cross-file type name collision detection
tom-newotny Feb 19, 2026
84742a5
Added test for whitespace-only comment being dropped by Go plugin
tom-newotny Feb 20, 2026
d38ac22
Fixed whitespace-only comment handling in getLeadingComments
tom-newotny Feb 20, 2026
53eafaf
Updated RALPH.md and status.txt
tom-newotny Feb 20, 2026
14708ac
Added test for keyword-named parent nested type collision detection bug
tom-newotny Feb 20, 2026
9618c6e
Fixed keyword-nested type name collision detection
tom-newotny Feb 20, 2026
b1eb657
Added test for jsonName tab character escaping in field descriptor
tom-newotny Feb 20, 2026
aeeb59a
Escaped tab characters in jsonName field descriptor values
tom-newotny Feb 20, 2026
25798db
Added test for DuplexStreamingCall message collision aliasing wrong i…
tom-newotny Feb 20, 2026
057ab26
Fixed message call type collision aliasing runtime-rpc import instead…
tom-newotny Feb 20, 2026
8f612be
Added test for jsonName newline character not escaped in field descri…
tom-newotny Feb 20, 2026
9416f57
Fixed jsonName newline and carriage return escaping in field descriptors
tom-newotny Feb 20, 2026
673b58e
Added test for ServerStreamingCall message-vs-call-type alias directi…
tom-newotny Feb 20, 2026
c201a4e
Fixed three-way call type collision by using registration order
tom-newotny Feb 20, 2026
9307fab
Updated RALPH.md with test 203 notes
tom-newotny Feb 20, 2026
d5c0fc9
Added test for multiple trailing blank comment lines collapsed to one
tom-newotny Feb 20, 2026
7df9322
Fixed double trailing blank comment lines — count trailing blanks ins…
tom-newotny Feb 20, 2026
6662a96
Updated RALPH.md with test 204 fix notes
tom-newotny Feb 20, 2026
2d0fee7
Added test for deprecated=false annotation mismatch
tom-newotny Feb 20, 2026
d784e07
Fixed deprecated=false annotation to output [deprecated = true] when …
tom-newotny Feb 20, 2026
a02ea4c
Added cross-directory WireType import ordering test
tom-newotny Feb 20, 2026
973fe4a
Fixed cross-directory WireType import ordering — removed isImportedBy…
tom-newotny Feb 20, 2026
06f6bdd
Updated RALPH.md and status.txt
tom-newotny Feb 20, 2026
f85f868
Added test for empty comment line leaking blank JSDoc lines
tom-newotny Feb 20, 2026
1462592
Fixed empty comment detection — truly empty comments (only newlines) …
tom-newotny Feb 20, 2026
00daf8d
Updated RALPH.md and status — all 212/212 tests passing
tom-newotny Feb 20, 2026
9ff3216
Added test for whitespace-only syntax detached comment being dropped
tom-newotny Feb 20, 2026
ecc1001
Fixed whitespace-only syntax detached comment handling
tom-newotny Feb 20, 2026
dd60d7b
Updated RALPH.md with test 208 fix notes
tom-newotny Feb 20, 2026
d450b41
Added test for multi-service streaming call type import missing in cl…
tom-newotny Feb 20, 2026
ed9223a
Added streaming call type imports for services 2..N in multi-service …
tom-newotny Feb 20, 2026
c8e964d
Added test for missing UnaryCall import in multi-service client file
tom-newotny Feb 20, 2026
d768d0f
Fixed multi-service UnaryCall import positioning
tom-newotny Feb 20, 2026
b64fd67
Updated RALPH.md and status.txt — all 215 tests passing
tom-newotny Feb 20, 2026
93abaf8
Added test for extend-only file skipping WKT generation
tom-newotny Feb 20, 2026
1803131
Fixed extend-only files not generating WKT dependencies
tom-newotny Feb 20, 2026
fe73e02
Updated RALPH.md with test 211 fix notes
tom-newotny Feb 20, 2026
2060a3a
Added test for import public missing transitive import
tom-newotny Feb 20, 2026
0481736
Added import public transitive dependency support
tom-newotny Feb 20, 2026
6f89afc
Added test for missing enum prefix on import-public enums
tom-newotny Feb 20, 2026
9912fb1
Fixed findEnumType to search transitive public deps for enum prefix d…
tom-newotny Feb 20, 2026
78ef3fd
Added test for empty service client import ordering bug
tom-newotny Feb 20, 2026
7f7ead7
Fixed empty service import ordering in multi-service client files
tom-newotny Feb 20, 2026
4a1ca72
Added test for multi-service ClientStreamingCall import ordering bug
tom-newotny Feb 20, 2026
df8da3d
Fixed multi-service client-streaming import ordering with firstMethod…
tom-newotny Feb 20, 2026
ff1d461
Added test for missing google.type.Date toJsDate/fromJsDate methods
tom-newotny Feb 21, 2026
4fbb959
Added google.type.Date/Color/DateTime/TimeOfDay WKT method generation
tom-newotny Feb 21, 2026
23f5aba
Added test for google.type.Color method formatting differences
tom-newotny Feb 21, 2026
defb4e6
Fixed google.type.Color toHex/fromHex to match protobuf-ts output format
tom-newotny Feb 21, 2026
6b32d51
Added google.type.DateTime test exposing missing PbLong import and fr…
tom-newotny Feb 21, 2026
505a63e
Fixed google.type.DateTime fromJsDate formatting and PbLong import
tom-newotny Feb 21, 2026
68ebc01
Added failing test for google.type.TimeOfDay fromJsDate formatting
tom-newotny Feb 21, 2026
076a114
Fixed TimeOfDay fromJsDate to put all properties on single line
tom-newotny Feb 21, 2026
52a71e7
Added test for oneof group field not skipped in interface union type
tom-newotny Feb 21, 2026
fef8b2c
Skipped TYPE_GROUP fields in oneof member collection
tom-newotny Feb 21, 2026
ce201bc
Added test for map entry name collision breaking map detection
tom-newotny Feb 21, 2026
dcd4e2e
Fixed map entry name collision in findMessageType
tom-newotny Feb 21, 2026
80cd5eb
Added test for EnumValue falsely treated as wrapper type in google.pr…
tom-newotny Feb 21, 2026
58d4e3f
Fixed wrapper type detection to use explicit set instead of HasSuffix
tom-newotny Feb 21, 2026
212b666
Added test for wrapper types unconditionally importing ScalarType/Lon…
tom-newotny Feb 21, 2026
de3284b
Fixed wrapper ScalarType/LongType imports to only emit for Int64Value…
tom-newotny Feb 21, 2026
cb23a1f
Updated RALPH.md with test 223 plan entry and notes
tom-newotny Feb 21, 2026
3cdab3e
Added three-way type collision alias suffix test
tom-newotny Feb 21, 2026
849e12e
Fixed three-way type collision alias to use numeric suffixes (Item$, …
tom-newotny Feb 21, 2026
b2edea0
Updated RALPH.md with three-way type collision notes
tom-newotny Feb 21, 2026
4c72453
Added test for WKT transitive import not generated
tom-newotny Feb 21, 2026
b47d298
Fixed transitive WKT dependency generation for google/protobuf types
tom-newotny Feb 21, 2026
008f946
Added test for ScalarType import collision in wrapper types
tom-newotny Feb 21, 2026
5ddbcda
Added ScalarType runtime import collision handling for wrapper types
tom-newotny Feb 21, 2026
1c5dddb
Updated RALPH.md and status.txt
tom-newotny Feb 21, 2026
d50e09f
Added test for LongType runtime import collision not aliased
tom-newotny Feb 21, 2026
5b62ceb
Fixed LongType runtime import collision — alias as LongType$ when loc…
tom-newotny Feb 21, 2026
c86a383
Added test for PbLong runtime import collision not aliased
tom-newotny Feb 21, 2026
cc69307
Added PbLong runtime import collision handling for Timestamp/Duration…
tom-newotny Feb 21, 2026
e7719e2
Updated RALPH.md plan and status for test 229
tom-newotny Feb 21, 2026
dd1b077
Added typeofJsonValue runtime import collision test
tom-newotny Feb 21, 2026
88c8ebd
Fixed typeofJsonValue runtime import collision handling
tom-newotny Feb 21, 2026
cdda3a6
Updated RALPH.md with test 230 completion notes
tom-newotny Feb 21, 2026
b43cb5a
Added test for lowerCamelCase runtime import collision not aliased
tom-newotny Feb 21, 2026
41794df
Fixed lowerCamelCase runtime import collision for FieldMask
tom-newotny Feb 21, 2026
0ca5f35
Updated RALPH.md with test 231 notes
tom-newotny Feb 21, 2026
8db702a
Added failing test for isJsonObject runtime import collision not aliased
tom-newotny Feb 21, 2026
46c0a6a
Added isJsonObject runtime import collision handling
tom-newotny Feb 21, 2026
b4fa382
Updated RALPH.md with test 232 completion notes
tom-newotny Feb 21, 2026
4e7586c
Added failing test for jsonWriteOptions runtime import collision not …
tom-newotny Feb 21, 2026
f47d147
Fixed jsonWriteOptions runtime import collision when proto message na…
tom-newotny Feb 21, 2026
d5a38af
Updated RALPH.md and status.txt — all 238/238 tests passing
tom-newotny Feb 21, 2026
3d9c46b
Added test for JsonValue type import collision not aliased
tom-newotny Feb 21, 2026
58af779
Added JsonValue runtime import collision handling
tom-newotny Feb 21, 2026
eff31da
Updated RALPH.md and status.txt for test 234 completion
tom-newotny Feb 21, 2026
ebb8416
Added test for JsonReadOptions type import collision not aliased
tom-newotny Feb 21, 2026
cbd13b2
Added JsonReadOptions runtime import collision handling
tom-newotny Feb 21, 2026
57a2d73
Updated RALPH.md with test 235 completion notes
tom-newotny Feb 21, 2026
56428e7
Added test for JsonWriteOptions TYPE import collision not aliased
tom-newotny Feb 21, 2026
eb1d1b5
Fixed JsonWriteOptions type import collision in protoc-gen-kaja
tom-newotny Feb 21, 2026
c9d7999
Updated RALPH.md and status.txt — all 241 tests passing
tom-newotny Feb 21, 2026
6bd9384
Added test for IMessageType runtime import collision not aliased
tom-newotny Feb 21, 2026
01f1bcc
Added IMessageType runtime import collision handling
tom-newotny Feb 21, 2026
9d8f1e3
Updated RALPH.md with test 237 completion
tom-newotny Feb 21, 2026
b2b4005
Added test for JsonObject type import collision not aliased in Struct…
tom-newotny Feb 21, 2026
3f7ea5d
Added JsonObject runtime import collision handling
tom-newotny Feb 21, 2026
5bcb0d1
Updated RALPH.md with test 238 completion
tom-newotny Feb 21, 2026
c4a9f59
Added test for empty leading comment (newline-only) being dropped
tom-newotny Feb 21, 2026
20a22df
Fixed multi-line empty leading comment JSDoc output
tom-newotny Feb 21, 2026
2f90c8b
Fix test 239_empty_leading_comment to preserve multi-line empty comme…
tom-newotny Feb 21, 2026
e6f1a61
Merge branch 'claude/add-protoc-gen-kaja-sQ6oN' of https://github.com…
tom-newotny Feb 21, 2026
a92d203
Renamed test 28_comprehensive to 00_big and expanded coverage
wham Feb 21, 2026
b4512c3
Renumbered tests to three-digit format with no gaps
wham Feb 21, 2026
e1fb3f3
Remove unused build artifacts and fix comments handling in detached c…
wham Feb 21, 2026
01714cf
Moved loop files into protoc-gen-kaja, cleaned up notes
wham Feb 21, 2026
7b84700
Remove TODO.md file as it is no longer needed
wham Feb 21, 2026
534744b
Removed protoc-gen-ts from build pipeline, kept as test-only devDepen…
wham Feb 21, 2026
20fae2f
Moved @protobuf-ts/plugin to its own package.json in protoc-gen-kaja
wham Feb 21, 2026
fa73081
Restored @protobuf-ts/plugin in ui, added protoc script and Node.js b…
wham Feb 21, 2026
52d3331
Clarified protoc-gen-kaja vs protoc-gen-ts roles in AGENTS.md
wham Feb 21, 2026
8804df1
Switched to protoc-gen-kaja for all TypeScript codegen
wham Feb 21, 2026
3067d5f
Removed unsupported generate_dependencies option from protoc-gen-kaja…
wham Feb 21, 2026
20cae85
Removed long_type option from protoc-gen-kaja, always use string
wham Feb 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/desktop/build/bin
/desktop/frontend/dist
/protoc-gen-kaja/node_modules
/protoc-gen-kaja/results
/protoc-gen-kaja/status.txt
/server/build
/ui/node_modules
249 changes: 249 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
## Guidelines

- See [Development](README.md#development) for instructions how to run and test.
- Only add code comments for really tricky parts; otherwise keep it clean.
- If API is called "getConfiguration", use "configuration" not "config" in code.
- Don't run `go build` directly; use `scripts/server`, `scripts/desktop`, or `scripts/docker`. Kill `scripts/server` when done. Make sure the server port is not in use.
- Don't run `scripts/build-ui` separately; when `scripts/server` is running, the UI is recompiled automatically on page load.
- The is using https://primer.style/product/getting-started/react/. Use out-of-the-box Primer components as much as possible. Avoid custom styling unless absolutely necessary.
- Don't update generated files directly; they will be overwritten.
- `ui/src/server/` is generated by protoc-gen-kaja.
- `ui/src/wailsjs/**` are generated by Wails.
- When I prompt you to make changes that are radically different from what's documented here, please update this file accordingly.
- Don't commit changes to `kaja.json`
- Use past tense in pull request titles and commit messages (e.g., "Fix bug" → "Fixed bug").
- Use capitalized "Kaja" for user-facing labels (titles, headings, UI text). Keep lowercase "kaja" for code, terminal commands, and file paths.
- Use pure Primer when possible, avoid custom wrappers and abstractions.
- Ask me before creating custom UI components; prefer direct use of Primer components.
- Keep pull-request descriptions super short - one or two sentences summarizing the change.

## Directory Structure

```
/
├── desktop/ # Desktop application (Wails framework)
├── protoc-gen-kaja/ # Protoc plugin for TypeScript codegen (Go)
├── server/ # Backend server (Go) - serves both web and desktop
├── ui/ # Frontend UI (React/TypeScript)
├── workspace/ # Demo workspace with example proto definitions
├── scripts/ # Build and development scripts
└── docs/ # Documentation
```

### Build Directories

There are multiple `build/` directories, each serving a different purpose:

| Directory | Purpose | Gitignored |
| ------------------------- | ---------------------------------------------------------------------------------------- | ---------- |
| `/server/build/` | Protoc plugins (protoc-gen-\*) and bundled UI assets (main.js, main.css, monaco workers) | Yes |
| `/desktop/build/` | Platform files (app icons, Info.plist) - tracked in git | No |
| `/desktop/build/bin/` | Desktop executable binaries | Yes |
| `/desktop/frontend/dist/` | Frontend distribution for desktop (copied from server/build) | Yes |
| `$TMPDIR/kaja/` | Compilation temp folders (auto-cleaned after 60 min) | N/A |

### Development vs Production Builds

The server uses Go build tags to switch between development and production modes:

**Development** (`-tags development`):

- `server/assets_development.go` is used
- Reads UI files from filesystem at runtime
- Calls `ui.BuildForDevelopment()` to rebuild assets on startup
- Allows hot-reload during development

**Production** (default, no tags):

- `server/assets_production.go` is used
- All assets are embedded in the binary via `//go:embed`
- No filesystem access needed for serving UI
- Single self-contained binary

### Server vs Desktop

Both share the same backend code but differ in how they're packaged:

**Server (Web)**:

- Single Go binary with embedded React UI
- Serves HTTP API on port 41520
- Run with: `scripts/server`
- Assets from `/server/build/` and `/server/static/`

**Desktop (Wails)**:

- Uses Wails framework (Go + webview)
- Embeds frontend via `//go:embed all:frontend/dist`
- Frontend files copied from server build to `/desktop/frontend/dist/`
- Native window and file dialogs
- Run with: `scripts/desktop`

### Source Directories

**`/ui/`** - React/TypeScript frontend:

- `src/*.tsx` - React components
- `src/server/` - Generated proto client code (from `/server/proto/api.proto`)
- `src/wailsjs/` - Generated Wails bindings (auto-generated)

**`/server/`** - Go backend:

- `cmd/server/` - Main server application
- `cmd/build-ui/` - Tool to bundle React UI with esbuild
- `pkg/api/` - Generated proto code (Go)
- `proto/api.proto` - API service definition (source of truth)
- `static/` - Static files (index.html, favicon)

**`/protoc-gen-kaja/`** - Protoc plugin for TypeScript code generation:

- A Go-based protoc plugin that generates TypeScript client code from `.proto` files
- Currently a drop-in replacement for `@protobuf-ts/plugin` (`protoc-gen-ts`), producing identical output. Will eventually diverge and do things differently.
- Ships as a single native Go binary — no Node.js dependency
- Has its own `go.mod` (separate Go module from `/server/`)
- Built by `scripts/server` into `server/build/protoc-gen-kaja`; shipped alongside `protoc` in production and desktop builds
- Used for all TypeScript proto codegen: both Kaja's own API (`server/proto/api.proto` → `ui/src/server/`) and user workspace protos (compiled at runtime)
- Tests in `protoc-gen-kaja/tests/` compare output against `protoc-gen-ts` to ensure identical codegen; run with `protoc-gen-kaja/scripts/test`
- `protoc-gen-kaja/tests/000_big` is a comprehensive multi-file integration test (8 proto files across 6 directories) using an e-commerce theme. It covers: all 15 scalar types, all WKTs, all map key types (bool, int64, string, int32), map with message values, all 4 streaming RPC types, custom options (method/message/field extensions), `import public`, proto3 optional, `allow_alias` enums, reserved fields/names, deprecated messages/fields/enums/methods, `jstype` (JS_STRING, JS_NUMBER), `json_name`, TypeScript keyword field names, `__proto__` field, `oneof_kind` field, `constructor` oneof member, 4-level deep nesting, self-referential messages, nested collision (Product_Variant vs Product.Variant), runtime import collision (WireType, MessageType), cross-package name collision (Status, Metadata), empty service, idempotency levels, detached comments, and comments with special chars (`*/`, `<html>`, `\n`). When adding new codegen features, expand this test to cover them.
- Automated loop: `protoc-gen-kaja/scripts/loop` runs two agents in alternation — RALPH (fixer, reads `protoc-gen-kaja/RALPH.md`) and NELSON (adversarial tester, reads `protoc-gen-kaja/NELSON.md`). RALPH writes "DONE" to `protoc-gen-kaja/status.txt` when all tests pass; NELSON writes "HAHA" when it finds a new failing test. The loop continues until NELSON can't break it.

**`/desktop/`** - Wails desktop app:

- `main.go` - Wails app entry point
- `frontend/dist/` - Copied from server build (gitignored)

**`/workspace/`** - Example workspace for development and testing:

- This is a demo workspace that developers use to test kaja
- `kaja.json` - Configuration file defining demo projects hosted on kaja.tools:
- quirks, users, teams services (both gRPC and Twirp protocols)
- `quirks/proto/`, `users/proto/`, `teams/proto/` - Proto files for each service
- Run `scripts/demo-protos` to update proto files from kaja-tools/website
- The `scripts/server` script starts kaja with this workspace by default

### Code Generation Flow

```
/server/proto/api.proto
├──→ [protoc + protoc-gen-go/twirp] → /server/pkg/api/*.go
└──→ [protoc + protoc-gen-kaja] → /ui/src/server/*.ts
v
go run cmd/build-ui/main.go (esbuild)
v
/server/build/
(main.js, main.css, workers)
┌────────────────────────────┼────────────────────────────┐
│ │ │
v v v
Server (embedded) Desktop (copied to Docker (embedded)
/desktop/frontend/dist)
```

## Primer Components

Available components from `@primer/react` (v38). Prefer these over custom components.

### Main (`@primer/react`)

- **ActionBar** - A collection of horizontally aligned IconButtons with overflow menu
- **ActionList** - Vertical list of interactive actions or options
- **ActionMenu** - Combines ActionList and Overlay for quick actions and selections
- **AnchoredOverlay** - Opens an Overlay positioned relative to an anchor element
- **Autocomplete** - Filter through a list and pick one or more values
- **Avatar** - Image representing a user or organization
- **AvatarStack** - Displays two or more Avatars in an inline stack
- **Banner** - Highlights important information
- **Blankslate** - Placeholder explaining why content is missing
- **BranchName** - Label component for displaying branch names
- **Breadcrumb** - Legacy breadcrumb component
- **Breadcrumbs** - Displays current page hierarchy for navigation
- **Button** - Initiates actions on a page or form
- **ButtonGroup** - Renders a series of buttons together
- **Checkbox** - Form control for single and multiple selections
- **CheckboxGroup** - Renders a set of checkboxes
- **CircleBadge** - Connects logos of third-party services visually
- **ConfirmationDialog** - Dialog for confirming destructive actions
- **CounterLabel** - Adds a count to navigational elements and buttons
- **Details** - Styled wrapper for native `<details>` element
- **Dialog** - Floating surface for transient content
- **Flash** - Inline message banner for feedback
- **FormControl** - Labelled input with optional validation and hint text
- **Header** - Page-level header bar
- **Heading** - Defines hierarchical content structure
- **IconButton** - Button displaying an icon instead of text
- **Label** - Adds contextual metadata to a design
- **LabelGroup** - Layout constraints for groups of Labels
- **Link** - Styles for hyperlink text
- **LinkButton** - Button styled as a link
- **NavList** - Vertical list of navigation links
- **Overlay** - Floating surface design patterns
- **PageHeader** - Top-level page heading
- **PageLayout** - Defines header, main, pane, and footer areas
- **Pagination** - Horizontal links for navigating paginated content
- **Popover** - Brings attention to specific UI elements
- **Portal** - Renders children into a different DOM subtree
- **ProgressBar** - Shows completion progress or part-to-whole ratios
- **Radio** - Form control for single selection from options
- **RadioGroup** - Renders mutually exclusive options
- **RelativeTime** - Displays time clearly and accessibly
- **SegmentedControl** - Pick one choice from a linear set of options
- **Select** - Dropdown for single predefined choice
- **SelectPanel** - Anchored dialog for selecting one or multiple items
- **SideNav** - Vertical navigation sidebar
- **Spinner** - Indeterminate loading indicator
- **SplitPageLayout** - Two-column layout with main content and sidebar
- **Stack** - Responsive horizontal and vertical layout flows
- **StateLabel** - Renders issue or pull request status
- **SubNav** - Secondary horizontal navigation
- **Text** - Applies Primer typographic styles
- **TextInput** - Single-line text input
- **TextInputWithTokens** - Input for list-based values
- **Textarea** - Multi-line text input
- **Timeline** - Displays items on a vertical timeline
- **ToggleSwitch** - Immediately toggles a setting on or off
- **Token** - Compact representation of an object or metadata
- **Tooltip** - Additional context on hover or keyboard focus
- **TreeView** - Hierarchical list with expandable parents
- **Truncate** - Shortens overflowing text with ellipsis
- **UnderlineNav** - Horizontal tabbed navigation
- **VisuallyHidden** - Hides content visually while keeping it accessible

### Experimental (`@primer/react/experimental`)

- **Announce** - Live region announcements for screen readers
- **AriaAlert** - Assertive live region alert
- **AriaStatus** - Polite live region status update
- **ButtonBase** - Base component for building custom buttons
- **DataTable** - 2D data structure with rows and columns
- **FeatureFlags** - Provider for toggling feature flags
- **FilteredActionList** - ActionList with built-in text filtering
- **Hidden** - Conditionally hides content at breakpoints
- **InlineMessage** - Informs users about action results within content
- **IssueLabel** - Renders GitHub issue labels
- **KeybindingHint** - Displays keyboard shortcut hints
- **ScrollableRegion** - Accessible scrollable container
- **SelectPanel2** - Next-generation SelectPanel
- **SkeletonAvatar** - Loading placeholder for Avatar
- **SkeletonBox** - Loading placeholder for non-text elements
- **SkeletonText** - Loading placeholder for text
- **Table** - Low-level table component (used by DataTable)
- **Tabs** - Tabbed interface for switching views
- **TopicTag** - Renders topic/tag labels
- **UnderlinePanels** - Tabbed panels for related content

### Deprecated (`@primer/react/deprecated`)

- **ActionList** - Legacy ActionList (use main ActionList instead)
- **ActionMenu** - Legacy ActionMenu (use main ActionMenu instead)
- **Dialog** - Legacy Dialog v1 (use main Dialog instead)
- **FilteredSearch** - Legacy filtered search input
- **Octicon** - Renders Octicon icons directly
- **Pagehead** - Legacy page heading
- **TabNav** - Legacy tab navigation (use UnderlineNav instead)
- **Tooltip** - Legacy Tooltip (use main Tooltip instead)
- **UnderlineNav** - Legacy UnderlineNav
Loading