Repository navigation
fix(AIC-3614)!: hide SDK-only entry points in internal/sdkapi - #8
Conversation
Handler packages were calling exported ConfigInternal, GraphInternal, and CreateHandlerInternal. Those now live under internal/, which modules outside this repo cannot import. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Human message: Go's internals are generally in an |
|
Reviewed 737a54c: the change is correct. The token can't be built outside the module (unexported field, One gap before merging: no test covers the token on the graph path. Timing: if the team takes this, it should land before the 0.1.0 release PR (#2). Removing exported functions only costs nothing until |
Suggested fix — merge only if the team agrees
This is a proposal from AIC-3614, not an agreed change. Please do not merge it unless the team wants the public API break.
Summary
ConfigInternal,GraphInternal, andCreateHandlerInternalwere exported so handler packages could skip$ld:ai:sdk:usage. They could not move intoaiserver/internal: handler packages are siblings ofaiserver, and Go would reject that import.internal/sdkapiinstead. Modules outside this repo cannot importinternal/.ConfigandGraphskip usage reporting only whenSDKCallis a token frominternal/sdkcall. External code cannot construct one.CreateHandler,Config, andGraphstay the application API and still report usage.Test plan
go test ./...ConfigArgs.SDKCallandGraphOptions.SDKCallis acceptable on the public structsclient.config.*eventMade with Cursor