Skip to main content

repositorysource API

Table of Contents​

Top

upsquad/repositorysource/v1/source.proto​

Internal repository source protocol. Only the strict authenticated source listener may serve it; never mount on public Connect/Envoy/Caveman surfaces.

ExchangeRequest​

ExchangeRequest is the typed request.

FieldTypeLabelDescription
subject_tokenstringKnowledge-audience bearer; sensitive, never logged.

ExchangeResponse​

ExchangeResponse is the typed result.

FieldTypeLabelDescription
access_tokenstringShort-lived source bearer; sensitive, never logged.
expires_atgoogle.protobuf.TimestampAbsolute UTC bearer expiration.
token_typestringAlways Bearer, never a refresh token or caller-selected token type.

FindPathsRequest​

FindPathsRequest is the typed request.

FieldTypeLabelDescription
pinPinSelectorRepository and pin comparison selectors.
querystringLiteral, case-sensitive path substring; never code/content search.
page_sizeint32Maximum returned paths, at most 200.
cursorstringOpaque authenticated continuation selector.

FindPathsResponse​

FindPathsResponse is the typed result.

FieldTypeLabelDescription
observationSourceObservationRequired pin and freshness evidence.
pathsstringrepeatedSorted permitted regular-file paths; no file bodies.
manifest_completeboolManifest complete.
has_moreboolTrue exactly when a continuation cursor is supplied.
next_cursorstringOpaque next-page selector, empty on final page.
search_scopestringAlways paths_only, including when there are no matches.

ListPathsRequest​

ListPathsRequest is the typed request.

FieldTypeLabelDescription
pinPinSelectorRepository and pin comparison selectors.
prefixstringCanonical relative path prefix.
page_sizeint32Maximum returned paths, at most 200.
cursorstringOpaque authenticated continuation selector.

ListPathsResponse​

ListPathsResponse is the typed result.

FieldTypeLabelDescription
observationSourceObservationRequired pin and freshness evidence.
pathsstringrepeatedSorted permitted regular-file paths; no file bodies.
manifest_completeboolComplete tree enumerated, not every file read or understood.
has_moreboolTrue exactly when a continuation cursor is supplied.
next_cursorstringOpaque next-page selector, empty on final page.

PinSelector​

PinSelector contains comparison selectors, never session/tenant authority.

FieldTypeLabelDescription
repo_idstringRegistry identity; never tenant authority.
pin_idstringServer-issued pin selector, scoped to the verified session.
repinboolExplicitly replace the selected pin after live authorization.

ReadFileRequest​

ReadFileRequest is the typed request.

FieldTypeLabelDescription
pinPinSelectorRepository and pin comparison selectors.
pathstringCanonical relative file path.
start_lineint32One-based inclusive first returned/requested line.
end_lineint32One-based inclusive final returned/requested line.

ReadFileResponse​

ReadFileResponse is the typed result.

FieldTypeLabelDescription
observationSourceObservationRequired pin and freshness evidence.
pathstringCanonical relative file path.
start_lineint32One-based inclusive first returned/requested line.
end_lineint32One-based inclusive final returned/requested line.
textstringBounded redacted UTF-8 source excerpt.
redactedboolWhether any source line was replaced by a redaction marker.
truncatedboolAlways false: oversize is refusal, not partial success.

SourceErrorDetail​

SourceErrorDetail is attached to a non-OK gRPC status. The server emits only the documented closed code/message pair, never provider/raw errors.

FieldTypeLabelDescription
codestringClosed documented source refusal identifier.
messagestringSafe fixed message for the identifier, never raw provider text.
retry_after_secondsuint32Safe bounded retry delay, zero when not applicable.
correlation_idstringServer-issued diagnostic UUID, never caller text.

SourceObservation​

SourceObservation is required on every successful result. CURRENT describes the last observation time, not a guarantee about the branch at delivery.

FieldTypeLabelDescription
repo_idstringRegistry identity; never tenant authority.
pin_idstringServer-issued pin selector, scoped to the verified session.
commit_shastringImmutable pinned Git commit.
credential_epochint64Connection credential revision used by this pin.
binding_epochint64Repository binding revision used by this pin.
grant_epochint64Explicit source grant revision.
observed_atgoogle.protobuf.TimestampUTC time of the most recent freshness observation attempt.
freshnessFreshnessRequired observation state; unspecified is invalid.
pin_changedboolTrue only for an explicit re-pin that changed commits.
previous_commit_shastringPrevious commit when pin_changed is true; empty otherwise.

Freshness​

Freshness describes the latest branch observation attempt.

NameNumberDescription
FRESHNESS_UNSPECIFIED0Unspecified observation state.
FRESHNESS_CURRENT1Current observation state.
FRESHNESS_BEHIND2Behind observation state.
FRESHNESS_UNKNOWN3Unknown observation state.

RepositorySourceIssuer​

RepositorySourceIssuer exchanges only a verified Knowledge subject token.

Method NameRequest TypeResponse TypeDescription
ExchangeExchangeRequestExchangeResponseExchange uses the authenticated internal source channel only.

RepositorySourceService​

RepositorySourceService derives authority exclusively from verified claims.

Method NameRequest TypeResponse TypeDescription
ListPathsListPathsRequestListPathsResponseListPaths uses the authenticated internal source channel only.
FindPathsFindPathsRequestFindPathsResponseFindPaths uses the authenticated internal source channel only.
ReadFileReadFileRequestReadFileResponseReadFile uses the authenticated internal source channel only.

Scalar Value Types​

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)