Skip to content

API Reference

Generated Go code lives under gen/go/<package>/v1/. TypeScript under gen/ts/<package>/v1/. Import via github.com/paper-board/proto/gen/go/<package>/v1.

PackageStatusGo import suffixProto file(s)
common.v1stablecommon/v1;commonv1errors, ids, paging, timestamps, usage
identity.v1stableidentity/v1;identityv1auth.proto
runtime.v1stableruntime/v1;runtimev1runtime.proto
compute.v1stablecompute/v1;computev1compute.proto
agents.v1Phase 4
platform.v1Phase 4
billing.v1Phase 5

Shared types imported by every service package.

Structured error returned in gRPC status details. Mapped from paper-board/sdk/errors sentinels.

FieldTypeDescription
codestringSentinel code (not_found, conflict, unauthorized, permission_denied, …)
messagestringHuman-readable; do not parse programmatically
fieldsmap<string,string>Optional structured fields for client-side handling
retry_after_secondsoptional int32Hint for rate-limited / unavailable responses

Resource consumption snapshot. Emitted by compute.v1 on destroy / exec completion.

FieldTypeUnit
cpu_msuint64ms
memory_peak_bytesuint64bytes
memory_avg_bytesuint64bytes
disk_read_bytesuint64bytes
disk_write_bytesuint64bytes
network_egress_bytesuint64bytes
network_ingress_bytesuint64bytes
gpu_msuint64ms
gpu_memory_bytesuint64bytes

Other shared messages: PageRequest / PageResponse (cursor-based paging), ResourceId (UUID wrapper), Timestamps (created_at / updated_at).


Internal gRPC service. Consumed by paper-board/agents, paper-board/runtime, and paper-board/gateway (Phase 7) to validate caller credentials.

RPCRequestResponseDescription
VerifyAPIKeyVerifyAPIKeyRequestVerifyAPIKeyResponseValidates an API key; returns AuthContext
VerifyJWTVerifyJWTRequestVerifyJWTResponseValidates a JWT; returns AuthContext
IssueJWTIssueJWTRequestIssueJWTResponseIssues a signed JWT for a user/org
GetPublicKeyGetPublicKeyRequestGetPublicKeyResponseReturns the signing public key by kid

Propagated downstream via gRPC metadata (x-user-id, x-org-id, x-roles, x-trace-id per ADR-0005).

FieldType
user_idstring
org_idstring
modeAuthMode enum
auth_key_idstring
api_key_idstring
methodstring
envEnv enum (LIVE / TEST)
roleRole enum (OWNER / MEMBER)
expires_atgoogle.protobuf.Timestamp

Internal service. paper-board/runtime implements the server; paper-board/agents is the caller.

RPCRequestResponseDescription
InvokeInvokeRequeststream InvokeEventForwards agent prompt invocation; streams events

Tenant context is propagated via gRPC metadata (x-tenant-id, x-org-id) — not in the request body.

FieldType
session_idstring
request_idstring
trace_idstring
messagesrepeated PromptMessage
VariantFields
text_chunkcontent string
turn_donetokens_in int32, tokens_out int32
errorcode string, message string

All variants carry emitted_at google.protobuf.Timestamp at field 10.


Internal service. paper-board/compute implements the server; paper-board/runtime is the primary caller.

RPCRequestResponseDescription
CreateSandboxCreateSandboxRequestCreateSandboxResponseProvisions a gVisor sandbox pod
DestroySandboxDestroySandboxRequestDestroySandboxResponseTears down sandbox; returns usage
DescribeSandboxDescribeSandboxRequestDescribeSandboxResponseCurrent status and live usage snapshot
ExecCommandExecCommandRequeststream ExecEventRuns a command; streams stdout/stderr
ReadFileReadFileRequestReadFileResponseReads up to 16 MiB from workspace
WriteFileWriteFileRequestWriteFileResponseWrites up to 16 MiB to workspace
ListFilesListFilesRequestListFilesResponseLists workspace entries (default 1000)

A bidirectional ExecSession RPC is deferred to Phase 5 (interactive REPL; per D24).

UNSPECIFIED · STARTING · READY · FAILED · DESTROYED

VariantFields
stdoutdata bytes
stderrdata bytes
completedexit_code int32, wall_time Duration, cancelled bool, usage UsageMetrics

All variants carry emitted_at google.protobuf.Timestamp at field 10.

All paths must be under WorkspaceSpec.mount_path. Symlink escapes are rejected via in-pod realpath validation. Read/Write capped at 16 MiB per call. ListFiles defaults to 1000 entries.


These patterns are applied consistently across all packages:

PatternExample fieldsRule
UUID string IDssandbox_id, session_id, tenant_idNon-empty; validated at service boundary, not here
Enum zero valueSANDBOX_STATUS_UNSPECIFIED, AUTH_MODE_UNSPECIFIEDAlways defined; callers treat zero as unset
optional scalarretry_after_secondsUse proto3 optional; absence is meaningful
oneof event streamsInvokeEvent, ExecEventExactly one variant set per message
Reserved field 10emitted_at, current_usage, total_usageHigh-number field reserved for cross-cutting metadata to avoid renumbering

buf lint (STANDARD ruleset) requires the proto package statement to match the directory path. Every .proto file under <svc>/v1/ must declare package <svc>.v1;. Mismatches fail CI. The PACKAGE_VERSION_SUFFIX rule is excepted in buf.yaml to allow v1 without a v1 suffix in the package name literal.