1.1 KiB
1.1 KiB
Agents
Intentional design decisions (not bugs)
ConvTypeonly convertsfloat64 -> int: Other type mismatches are caught byreflect.Callpanic, which is recovered and reported as an error. No additional type validation is needed inConvType.handleCallassumes last return value iserror: All API methods must returnerroras their last return value. This is enforced by the code generator (kitcom). The runtime does not re-validate this — registering a struct with non-conforming exported methods is a usage error.Function.lengthused for arg count validation in TS: API methods must not use default parameters or rest parameters. This is a constraint of the IPC interface — all parameters are always sent explicitly over the wire.- Blob serialization is asymmetric between Go and TS: Go wraps blobs as
{"t":"blob","d":"<base64>"}, TS sends bare base64 strings. This is handled by the generated code on each side (base64.DecodeStringin Go templates,Buffer.fromin TS templates). DirectCall()with blob args across languages requires matching the target's expected format.