{"components":{"schemas":{"Problem":{"properties":{"code":{"description":"the gRPC code in snake case","type":"string"},"details":{"items":{"type":"object"},"type":"array"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}}},"info":{"description":"Every method of the gateway's backends. One this gateway does not serve has x-served false and x-reason. There is no authentication. This gateway runs in public mode: calls that write or reach outside are refused or left out.","title":"ahto","version":"v0.1.3-20-g975187e"},"openapi":"3.1.0","paths":{"/v1/agents":{"get":{"description":"Lists every agent the server knows, enabled or not, with whether it can run now.","operationId":"agent.AgentService.ListAgents","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"agents":{"description":"Every agent the server knows, enabled or not.","items":{"additionalProperties":false,"properties":{"auth":{"description":"\"subscription\", \"api_key\" or \"none\".","type":"string"},"enabled":{"description":"Whether the settings enable it (agents.enabled and agents.\u003cname\u003e.enabled).","type":"boolean"},"kind":{"description":"\"cli\" (ahto runs the agent's own command line tool) or \"chat\" (ahto drives a chat API).","type":"string"},"model":{"description":"The model asked for; empty means the agent's own default.","type":"string"},"name":{"description":"claude, codex, grok, mistral or ollama.","type":"string"},"ready":{"description":"Whether it can run now: installed and signed in, or the API answers.","type":"boolean"},"reason":{"description":"Why it cannot run, when ready is false.","type":"string"},"sandbox":{"description":"What a CLI agent may change: \"read_only\" or \"workspace_write\". Empty for chat agents.","type":"string"},"version":{"description":"The CLI's version, or the API's address for a chat agent.","type":"string"}},"type":"object"},"type":"array"},"default_agent":{"description":"The agent \"default\" runs: agents.default.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists every agent the server knows, enabled or not, with whether it can run now.","tags":["agent"],"x-rpc":"ahto.agent.v1.AgentService/ListAgents"}},"/v1/agents/{name}/ask":{"post":{"description":"Runs an agent to its end and returns its final answer, its usage and every event of\nthe run. Takes the same input and gives the same errors as Run; use it from a client\nthat cannot read a stream, and Run for anything a person watches.","operationId":"agent.AgentService.Ask","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"dir":{"description":"The folder the agent works in, on the server's machine. Empty runs it in a new empty\nfolder that is removed afterwards.","type":"string"},"max_turns":{"description":"For a chat agent, how many rounds of tool calls it may make; 0 means 8.","type":"integer"},"model":{"description":"A model for this run only; empty keeps the agent's model.","type":"string"},"name":{"description":"The agent: claude, codex, grok, mistral or ollama, or \"default\".","type":"string"},"prompt":{"description":"What the agent is asked to do.","type":"string"},"system":{"description":"Instructions added to the agent's own.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"events":{"description":"Every event of the run, in order, without the deltas.","items":{"additionalProperties":false,"properties":{"kind":{"description":"text, delta, tool_call, tool_result, usage, error or done.","type":"string"},"text":{"description":"The text of a text, delta, error or done event.","type":"string"},"time":{"description":"When the event happened, on the server.","format":"date-time","type":"string"},"tool":{"additionalProperties":false,"description":"The call or the result, for a tool_call or tool_result event.","properties":{"id":{"description":"The call's id, which ties a result to its call.","type":"string"},"input_json":{"description":"The arguments, as JSON.","type":"string"},"is_error":{"description":"Whether the tool failed, in a result.","type":"boolean"},"name":{"description":"The tool's name.","type":"string"},"output":{"description":"What the tool answered, in a result.","type":"string"}},"type":"object"},"usage":{"additionalProperties":false,"description":"The usage so far, for a usage event.","properties":{"cached_tokens":{"description":"Input tokens the model served from its cache.","type":"integer"},"cost_usd":{"description":"What the CLI says the run cost, in US dollars, when it says; 0 otherwise.","type":"number"},"input_tokens":{"description":"Tokens sent to the model.","type":"integer"},"output_tokens":{"description":"Tokens the model wrote.","type":"integer"},"turns":{"description":"How many rounds the agent took.","type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"text":{"description":"The agent's final answer.","type":"string"},"usage":{"additionalProperties":false,"description":"What the whole run used.","properties":{"cached_tokens":{"description":"Input tokens the model served from its cache.","type":"integer"},"cost_usd":{"description":"What the CLI says the run cost, in US dollars, when it says; 0 otherwise.","type":"number"},"input_tokens":{"description":"Tokens sent to the model.","type":"integer"},"output_tokens":{"description":"Tokens the model wrote.","type":"integer"},"turns":{"description":"How many rounds the agent took.","type":"integer"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Runs an agent to its end and returns its final answer, its usage and every event of the run.","tags":["agent"],"x-rpc":"ahto.agent.v1.AgentService/Ask"}},"/v1/agents/{name}/runs":{"post":{"description":"Runs an agent and streams what it does: text as it comes, tool calls and their\nresults, usage, and one done event at the end (after an error event when it failed).\nPass name and prompt; dir, model, system and max_turns are optional. The agent may\nchange files in dir, as its sandbox allows. Server stream: the first message may\ntake a while, and ending the call stops the agent. Errors: INVALID_ARGUMENT for an\nempty prompt, a dir that is not absolute or a negative max_turns; NOT_FOUND for an\nunknown agent; FAILED_PRECONDITION when the agent is disabled or not ready;\nPERMISSION_DENIED on a public gateway or one that accepts remote clients.","operationId":"agent.AgentService.Run","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"dir":{"description":"The folder the agent works in, on the server's machine. Empty runs it in a new empty\nfolder that is removed afterwards.","type":"string"},"max_turns":{"description":"For a chat agent, how many rounds of tool calls it may make; 0 means 8.","type":"integer"},"model":{"description":"A model for this run only; empty keeps the agent's model.","type":"string"},"name":{"description":"The agent: claude, codex, grok, mistral or ollama, or \"default\".","type":"string"},"prompt":{"description":"What the agent is asked to do.","type":"string"},"system":{"description":"Instructions added to the agent's own.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"event":{"additionalProperties":false,"description":"The thing the agent just did.","properties":{"kind":{"description":"text, delta, tool_call, tool_result, usage, error or done.","type":"string"},"text":{"description":"The text of a text, delta, error or done event.","type":"string"},"time":{"description":"When the event happened, on the server.","format":"date-time","type":"string"},"tool":{"additionalProperties":false,"description":"The call or the result, for a tool_call or tool_result event.","properties":{"id":{"description":"The call's id, which ties a result to its call.","type":"string"},"input_json":{"description":"The arguments, as JSON.","type":"string"},"is_error":{"description":"Whether the tool failed, in a result.","type":"boolean"},"name":{"description":"The tool's name.","type":"string"},"output":{"description":"What the tool answered, in a result.","type":"string"}},"type":"object"},"usage":{"additionalProperties":false,"description":"The usage so far, for a usage event.","properties":{"cached_tokens":{"description":"Input tokens the model served from its cache.","type":"integer"},"cost_usd":{"description":"What the CLI says the run cost, in US dollars, when it says; 0 otherwise.","type":"number"},"input_tokens":{"description":"Tokens sent to the model.","type":"integer"},"output_tokens":{"description":"Tokens the model wrote.","type":"integer"},"turns":{"description":"How many rounds the agent took.","type":"integer"}},"type":"object"}},"type":"object"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Runs an agent and streams what it does: text as it comes, tool calls and their results, usage, and one done event at the end (after an error event when it failed).","tags":["agent"],"x-rpc":"ahto.agent.v1.AgentService/Run"}},"/v1/base/info":{"get":{"description":"Returns the version, the environment, the build, the runtime and the listen\nsettings of the running gateway.","operationId":"base.BaseService.GetInfo","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"allow_remote":{"description":"Whether the gateway accepts calls from other machines (protocol.allow_remote).","type":"boolean"},"arch":{"description":"The CPU architecture, as Go names it, such as arm64.","type":"string"},"build_time":{"description":"The time of the commit the binary was built from, as RFC 3339; empty when the build\ndid not stamp it.","type":"string"},"commit":{"description":"The commit and the commit time the binary was built from, when the build stamped\nthem (go build in a git checkout). Empty otherwise: scripts/build.sh and go run\nleave them out, and the version then carries the commit.","type":"string"},"denied_rpcs":{"description":"The rpcs the gateway refuses on every surface (protocol.rpcs), by full proto name\n(\"ahto.source.v1.SourceService.AddRepository\"), sorted. Empty when it refuses none.\nA client hides or disables what calls them, such as adding a repository on a\nread-only demo.","items":{"type":"string"},"type":"array"},"environment":{"description":"The environment it runs in: development, test, staging or production.","type":"string"},"go_version":{"description":"The Go release the binary was built with, for example \"go1.26.0\".","type":"string"},"listen":{"description":"The address the gateway listens on, host:port (protocol.listen). Empty in public\nmode, where it is an address inside the server, not one a visitor can use.","type":"string"},"local":{"description":"Whether the gateway only answers this machine: it listens on a loopback address,\ndoes not accept calls from other machines and is not in public mode. A client may\nthen call it \"this machine\" and show where it listens; otherwise it is a server.","type":"boolean"},"os":{"description":"The operating system and the architecture it runs on, as Go names them:\n\"darwin\" and \"arm64\".","type":"string"},"parsed_languages":{"description":"The languages this build parses into symbols, calls and syntax trees, Go first. A\nbuild without cgo parses Go only. A client reads which files have code to show here\ninstead of keeping its own list.","items":{"additionalProperties":false,"properties":{"extensions":{"description":"The file extensions parsed as this language, lower case with the dot (\".rs\"),\nsorted. A file go-enry gives no language is parsed by its extension.","items":{"type":"string"},"type":"array"},"name":{"description":"The go-enry name, as file_versions.language holds it: \"Go\", \"C++\", \"TSX\".","type":"string"},"parser":{"description":"The parser and its extraction version, as parse_status.parser holds it:\n\"go/parser go1.27.4 v1\".","type":"string"}},"type":"object"},"type":"array"},"public":{"description":"Whether the gateway runs in public mode (the setting public, AHTO_PUBLIC): errors\nleave out what is only useful on the owner's own machine, such as DuckDB's message\nfor a failed query. FunctionService.Call then runs a function of kind \"builtin\" only\nand refuses any other kind (a \"wasm\" module) with PERMISSION_DENIED, unless\ndenied_rpcs lists Call, which refuses every kind.","type":"boolean"},"started_at":{"description":"When the gateway process started, RFC 3339 in UTC.","type":"string"},"surfaces":{"description":"The surfaces that are on, by name, with the path each one is mounted at.","items":{"additionalProperties":false,"properties":{"name":{"description":"The key under protocol.surfaces.","type":"string"},"path":{"description":"Where it is mounted. Empty for grpc, which is told by its content type.","type":"string"}},"type":"object"},"type":"array"},"tls":{"description":"Whether it serves HTTPS (protocol.tls).","type":"boolean"},"version":{"description":"The build version of the gateway.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns the version, the environment, the build, the runtime and the listen settings of the running gateway.","tags":["base"],"x-rpc":"ahto.base.v1.BaseService/GetInfo"}},"/v1/base/ping":{"get":{"description":"Checks that the gateway is up. Returns the message it was given and the server time.","operationId":"base.BaseService.Ping","parameters":[{"in":"query","name":"message","schema":{"description":"Text to return unchanged. Optional.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"message":{"description":"The text from the request.","type":"string"},"time":{"description":"Server time, RFC 3339 in UTC.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Checks that the gateway is up.","tags":["base"],"x-rpc":"ahto.base.v1.BaseService/Ping"}},"/v1/base/services":{"get":{"description":"Lists the backends the gateway forwards to, with the services each one serves and\nwhether its descriptors are loaded.","operationId":"base.BaseService.ListServices","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"backends":{"description":"One entry per backend, ordered by name.","items":{"additionalProperties":false,"properties":{"address":{"description":"The address the gateway dials. Empty for the built-in base backend.","type":"string"},"error":{"description":"Why the backend is not ready. Empty when ready.","type":"string"},"name":{"description":"The name from the config. It is the prefix of the backend's tool names.","type":"string"},"ready":{"description":"True when the descriptors are loaded and calls can be forwarded.","type":"boolean"},"services":{"description":"Full names of the gRPC services the backend serves.","items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the backends the gateway forwards to, with the services each one serves and whether its descriptors are loaded.","tags":["base"],"x-rpc":"ahto.base.v1.BaseService/ListServices"}},"/v1/base/status/watch":{"get":{"description":"Streams the status of the gateway: first GetInfo and ListServices as one message,\nthen the whole status again each time it changes, such as a backend that gets ready or\nfails. The gateway compares once a second in the process and sends only a change. It\nnever ends; a surface without streaming gets what protocol.streams collects.","operationId":"base.BaseService.WatchStatus","responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"authority":{"additionalProperties":false,"description":"What IdentityService.GetAuthorityStatus answers: lease_state OFF where the network has\nno v2 log, left out where the gateway serves no identity service. A change of lease\nsends the status again.","properties":{"certificate_not_after":{"description":"When the epoch certificate ends; the guardians renew it.","format":"date-time","type":"string"},"certificate_superseded":{"description":"A guardian change came after the certificate was made: the new guardians\nre-certify at once, and until the epoch installs, the certificate in force\nwas signed by guardians that no longer rule.","type":"boolean"},"epoch":{"description":"The epoch of the authority's certificate in force; it counts up.","type":"integer"},"head_hash":{"contentEncoding":"base64","description":"The hash of the newest entry this node has applied.","type":"string"},"head_seq":{"description":"The newest entry this node has applied.","type":"integer"},"last_verified_at":{"description":"When the last lease answer was verified.","format":"date-time","type":"string"},"lease_expires_at":{"description":"When the lease ends unless it is renewed.","format":"date-time","type":"string"},"lease_state":{"description":"Whether this node holds a lease from the authority.","enum":["LEASE_STATE_UNSPECIFIED","LEASE_STATE_OK","LEASE_STATE_RECONNECTING","LEASE_STATE_SERVING_LAST_VERIFIED","LEASE_STATE_OFF"],"type":"string"},"nodes":{"description":"The nodes of the authority group.","items":{"additionalProperties":false,"properties":{"leader":{"description":"Whether it is the leader of the group.","type":"boolean"},"peer_id":{"description":"The node's libp2p peer id.","type":"string"},"reachable":{"description":"Whether this node reaches it now.","type":"boolean"}},"type":"object"},"type":"array"},"outage":{"description":"What this node does while it holds no lease.","enum":["OUTAGE_POLICY_UNSPECIFIED","OUTAGE_POLICY_FAIL_CLOSED","OUTAGE_POLICY_SERVE_LAST_VERIFIED"],"type":"string"},"serve_last_verified_until":{"description":"With LEASE_STATE_SERVING_LAST_VERIFIED, when remote calls stop. Otherwise unset.","format":"date-time","type":"string"}},"type":"object"},"backends":{"description":"What ListServices answers.","items":{"additionalProperties":false,"properties":{"address":{"description":"The address the gateway dials. Empty for the built-in base backend.","type":"string"},"error":{"description":"Why the backend is not ready. Empty when ready.","type":"string"},"name":{"description":"The name from the config. It is the prefix of the backend's tool names.","type":"string"},"ready":{"description":"True when the descriptors are loaded and calls can be forwarded.","type":"boolean"},"services":{"description":"Full names of the gRPC services the backend serves.","items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"},"info":{"additionalProperties":false,"description":"What GetInfo answers.","properties":{"allow_remote":{"description":"Whether the gateway accepts calls from other machines (protocol.allow_remote).","type":"boolean"},"arch":{"description":"The CPU architecture, as Go names it, such as arm64.","type":"string"},"build_time":{"description":"The time of the commit the binary was built from, as RFC 3339; empty when the build\ndid not stamp it.","type":"string"},"commit":{"description":"The commit and the commit time the binary was built from, when the build stamped\nthem (go build in a git checkout). Empty otherwise: scripts/build.sh and go run\nleave them out, and the version then carries the commit.","type":"string"},"denied_rpcs":{"description":"The rpcs the gateway refuses on every surface (protocol.rpcs), by full proto name\n(\"ahto.source.v1.SourceService.AddRepository\"), sorted. Empty when it refuses none.\nA client hides or disables what calls them, such as adding a repository on a\nread-only demo.","items":{"type":"string"},"type":"array"},"environment":{"description":"The environment it runs in: development, test, staging or production.","type":"string"},"go_version":{"description":"The Go release the binary was built with, for example \"go1.26.0\".","type":"string"},"listen":{"description":"The address the gateway listens on, host:port (protocol.listen). Empty in public\nmode, where it is an address inside the server, not one a visitor can use.","type":"string"},"local":{"description":"Whether the gateway only answers this machine: it listens on a loopback address,\ndoes not accept calls from other machines and is not in public mode. A client may\nthen call it \"this machine\" and show where it listens; otherwise it is a server.","type":"boolean"},"os":{"description":"The operating system and the architecture it runs on, as Go names them:\n\"darwin\" and \"arm64\".","type":"string"},"parsed_languages":{"description":"The languages this build parses into symbols, calls and syntax trees, Go first. A\nbuild without cgo parses Go only. A client reads which files have code to show here\ninstead of keeping its own list.","items":{"additionalProperties":false,"properties":{"extensions":{"description":"The file extensions parsed as this language, lower case with the dot (\".rs\"),\nsorted. A file go-enry gives no language is parsed by its extension.","items":{"type":"string"},"type":"array"},"name":{"description":"The go-enry name, as file_versions.language holds it: \"Go\", \"C++\", \"TSX\".","type":"string"},"parser":{"description":"The parser and its extraction version, as parse_status.parser holds it:\n\"go/parser go1.27.4 v1\".","type":"string"}},"type":"object"},"type":"array"},"public":{"description":"Whether the gateway runs in public mode (the setting public, AHTO_PUBLIC): errors\nleave out what is only useful on the owner's own machine, such as DuckDB's message\nfor a failed query. FunctionService.Call then runs a function of kind \"builtin\" only\nand refuses any other kind (a \"wasm\" module) with PERMISSION_DENIED, unless\ndenied_rpcs lists Call, which refuses every kind.","type":"boolean"},"started_at":{"description":"When the gateway process started, RFC 3339 in UTC.","type":"string"},"surfaces":{"description":"The surfaces that are on, by name, with the path each one is mounted at.","items":{"additionalProperties":false,"properties":{"name":{"description":"The key under protocol.surfaces.","type":"string"},"path":{"description":"Where it is mounted. Empty for grpc, which is told by its content type.","type":"string"}},"type":"object"},"type":"array"},"tls":{"description":"Whether it serves HTTPS (protocol.tls).","type":"boolean"},"version":{"description":"The build version of the gateway.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the status of the gateway: first GetInfo and ListServices as one message, then the whole status again each time it changes, such as a backend that gets ready or fails.","tags":["base"],"x-rpc":"ahto.base.v1.BaseService/WatchStatus"}},"/v1/base/update":{"get":{"description":"Says whether a newer ahto is published. A release build (v0.1.2) is compared with the\nnewest GitHub release, a build from source with the latest commit of the default branch\non GitHub against the commit it was made from. It asks GitHub at most once\nan hour and answers from that until then. Without network, or while the repository is\nnot public, it answers the error, not a failure. A gateway in public mode refuses it\n(PERMISSION_DENIED), so a visitor cannot make the server call GitHub.","operationId":"base.BaseService.CheckUpdate","parameters":[{"in":"query","name":"refresh","schema":{"description":"Ask GitHub now instead of answering from the last hour. Optional.","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"checked_time":{"description":"When GitHub was asked, RFC 3339 in UTC.","type":"string"},"current":{"description":"The version of the running gateway, as GetInfo says it.","type":"string"},"error":{"description":"Why GitHub gave no answer, or why current could not be compared.","type":"string"},"install":{"description":"How to update, as a shell command: `ahto upgrade` for a release build.","type":"string"},"known":{"description":"Whether current could be compared at all.","type":"boolean"},"latest":{"description":"For a release build the newest release, such as v0.1.2; for a build from source the\nlatest commit of the default branch, 12 hex digits, such as b937550015a1.\nEmpty when GitHub did not answer.","type":"string"},"latest_time":{"description":"When that release was published or that commit made, RFC 3339 in UTC.","type":"string"},"update_available":{"description":"True when latest is newer than the running build. False when either is unknown: a\n\"dev\" build with no commit, or a commit GitHub does not have, cannot tell.","type":"boolean"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Says whether a newer ahto is published.","tags":["base"],"x-rpc":"ahto.base.v1.BaseService/CheckUpdate"}},"/v1/base/watch":{"post":{"description":"Streams one tick per interval until the count is reached. Use it to check that\nstreaming works end to end.","operationId":"base.BaseService.Watch","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"count":{"description":"How many ticks to send. 0 means 3. The most is 100.","type":"integer"},"interval_ms":{"description":"Milliseconds between ticks. 0 means 100. The most is 10000.","type":"integer"}},"type":"object"}}}},"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"sequence":{"description":"The tick number, starting at 1.","type":"integer"},"time":{"description":"Server time of the tick, RFC 3339 in UTC.","type":"string"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams one tick per interval until the count is reached.","tags":["base"],"x-rpc":"ahto.base.v1.BaseService/Watch"}},"/v1/debug/crashes":{"get":{"description":"Lists crash groups (one per crashing stack and build), newest first. Filter by\nservice and since; page_size 0 is 50, at most 500, and next_page_token reads on.","operationId":"debug.DebugService.ListCrashes","parameters":[{"in":"query","name":"service","schema":{"description":"A service.name; empty is every service.","type":"string"}},{"in":"query","name":"since","schema":{"description":"Only groups that crashed at or after it; unset is the whole retention.","format":"date-time","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"0 is 50; at most 500.","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"crashes":{"description":"One page of crash groups, newest first.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many crashes joined the group.","type":"integer"},"first_seen":{"description":"When the group's first crash was seen.","format":"date-time","type":"string"},"id":{"description":"The group: a hash of the crashing stack and the build.","type":"string"},"last_seen":{"description":"When the group's last crash was seen.","format":"date-time","type":"string"},"panic":{"description":"The panic value, for example \"runtime error: index out of range [3] with length 3\".","type":"string"},"service":{"description":"The service.name that crashed.","type":"string"},"source":{"description":"report (ReportCrash) or otel (an exception event with exception.stacktrace).","type":"string"},"top":{"additionalProperties":false,"description":"The first frame in the service's own code (not the runtime or the standard library).","properties":{"code":{"additionalProperties":false,"description":"The file in the lake, when the build maps.","properties":{"commit":{"description":"The commit of the build (from vcs.revision or service.version).","type":"string"},"function":{"description":"The function's name, as the frame or span gave it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"},"modified":{"description":"The build had local changes (vcs.modified): the lines may not match the commit.","type":"boolean"},"path":{"description":"The file, relative to the repository root.","type":"string"},"repository":{"description":"The lake's repository id.","type":"string"}},"type":"object"},"file":{"description":"The file as the panic printed it.","type":"string"},"function":{"description":"The function's name, as the panic printed it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"}},"type":"object"},"version":{"description":"The build, as a commit or service.version.","type":"string"}},"type":"object"},"type":"array"},"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists crash groups (one per crashing stack and build), newest first.","tags":["debug"],"x-reason":"off in public mode","x-rpc":"ahto.debug.v1.DebugService/ListCrashes","x-served":false},"post":{"description":"Records a crash from the text of a Go panic or a goroutine dump, as it was written to\nstderr, and returns the crash group it joined (a new group, or one with a higher\ncount). Pass service, version and text. Writes to the debug store only; it runs\nnothing. INVALID_ARGUMENT when text is over 1 MiB or holds no panic or goroutine stack.","operationId":"debug.DebugService.ReportCrash","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"service":{"description":"service.name of the service that crashed.","type":"string"},"text":{"description":"The panic output, at most 1 MiB.","type":"string"},"version":{"description":"The build: a commit or a service.version.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"crash":{"additionalProperties":false,"description":"The crash group the report joined.","properties":{"count":{"description":"How many crashes joined the group.","type":"integer"},"first_seen":{"description":"When the group's first crash was seen.","format":"date-time","type":"string"},"id":{"description":"The group: a hash of the crashing stack and the build.","type":"string"},"last_seen":{"description":"When the group's last crash was seen.","format":"date-time","type":"string"},"panic":{"description":"The panic value, for example \"runtime error: index out of range [3] with length 3\".","type":"string"},"service":{"description":"The service.name that crashed.","type":"string"},"source":{"description":"report (ReportCrash) or otel (an exception event with exception.stacktrace).","type":"string"},"top":{"additionalProperties":false,"description":"The first frame in the service's own code (not the runtime or the standard library).","properties":{"code":{"additionalProperties":false,"description":"The file in the lake, when the build maps.","properties":{"commit":{"description":"The commit of the build (from vcs.revision or service.version).","type":"string"},"function":{"description":"The function's name, as the frame or span gave it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"},"modified":{"description":"The build had local changes (vcs.modified): the lines may not match the commit.","type":"boolean"},"path":{"description":"The file, relative to the repository root.","type":"string"},"repository":{"description":"The lake's repository id.","type":"string"}},"type":"object"},"file":{"description":"The file as the panic printed it.","type":"string"},"function":{"description":"The function's name, as the panic printed it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"}},"type":"object"},"version":{"description":"The build, as a commit or service.version.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Records a crash from the text of a Go panic or a goroutine dump, as it was written to stderr, and returns the crash group it joined (a new group, or one with a higher count).","tags":["debug"],"x-reason":"off in public mode","x-rpc":"ahto.debug.v1.DebugService/ReportCrash","x-served":false}},"/v1/debug/crashes/{id}":{"get":{"description":"Returns one crash group: the panic, the crashing goroutine, and every goroutine of\nits last crash grouped by state and stack. Pass the id from ListCrashes or\nReportCrash; NOT_FOUND when the store no longer has it.","operationId":"debug.DebugService.GetCrash","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"crashing":{"additionalProperties":false,"description":"The goroutine that crashed.","properties":{"created_by":{"description":"The function that started it, from its \"created by\" line.","type":"string"},"frames":{"description":"Its stack, the innermost frame first.","items":{"additionalProperties":false,"properties":{"code":{"additionalProperties":false,"description":"The file in the lake, when the build maps.","properties":{"commit":{"description":"The commit of the build (from vcs.revision or service.version).","type":"string"},"function":{"description":"The function's name, as the frame or span gave it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"},"modified":{"description":"The build had local changes (vcs.modified): the lines may not match the commit.","type":"boolean"},"path":{"description":"The file, relative to the repository root.","type":"string"},"repository":{"description":"The lake's repository id.","type":"string"}},"type":"object"},"file":{"description":"The file as the panic printed it.","type":"string"},"function":{"description":"The function's name, as the panic printed it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"}},"type":"object"},"type":"array"},"id":{"description":"The goroutine's number.","type":"integer"},"state":{"description":"running, chan receive, IO wait, ...","type":"string"},"wait_minutes":{"description":"How many minutes it had waited, when the dump says; 0 otherwise.","type":"integer"}},"type":"object"},"groups":{"description":"Every goroutine of the last crash, grouped by state and stack.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many goroutines are in the group.","type":"integer"},"frames":{"description":"The stack they share.","items":{"additionalProperties":false,"properties":{"code":{"additionalProperties":false,"description":"The file in the lake, when the build maps.","properties":{"commit":{"description":"The commit of the build (from vcs.revision or service.version).","type":"string"},"function":{"description":"The function's name, as the frame or span gave it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"},"modified":{"description":"The build had local changes (vcs.modified): the lines may not match the commit.","type":"boolean"},"path":{"description":"The file, relative to the repository root.","type":"string"},"repository":{"description":"The lake's repository id.","type":"string"}},"type":"object"},"file":{"description":"The file as the panic printed it.","type":"string"},"function":{"description":"The function's name, as the panic printed it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"}},"type":"object"},"type":"array"},"ids":{"description":"Their numbers.","items":{"type":"integer"},"type":"array"},"state":{"description":"The state they share.","type":"string"}},"type":"object"},"type":"array"},"raw":{"description":"The text as received, cut at 64 KiB.","type":"string"},"summary":{"additionalProperties":false,"description":"The group in brief.","properties":{"count":{"description":"How many crashes joined the group.","type":"integer"},"first_seen":{"description":"When the group's first crash was seen.","format":"date-time","type":"string"},"id":{"description":"The group: a hash of the crashing stack and the build.","type":"string"},"last_seen":{"description":"When the group's last crash was seen.","format":"date-time","type":"string"},"panic":{"description":"The panic value, for example \"runtime error: index out of range [3] with length 3\".","type":"string"},"service":{"description":"The service.name that crashed.","type":"string"},"source":{"description":"report (ReportCrash) or otel (an exception event with exception.stacktrace).","type":"string"},"top":{"additionalProperties":false,"description":"The first frame in the service's own code (not the runtime or the standard library).","properties":{"code":{"additionalProperties":false,"description":"The file in the lake, when the build maps.","properties":{"commit":{"description":"The commit of the build (from vcs.revision or service.version).","type":"string"},"function":{"description":"The function's name, as the frame or span gave it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"},"modified":{"description":"The build had local changes (vcs.modified): the lines may not match the commit.","type":"boolean"},"path":{"description":"The file, relative to the repository root.","type":"string"},"repository":{"description":"The lake's repository id.","type":"string"}},"type":"object"},"file":{"description":"The file as the panic printed it.","type":"string"},"function":{"description":"The function's name, as the panic printed it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"}},"type":"object"},"version":{"description":"The build, as a commit or service.version.","type":"string"}},"type":"object"},"trace_id":{"description":"The trace, when the crash came from a span's exception event.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns one crash group: the panic, the crashing goroutine, and every goroutine of its last crash grouped by state and stack.","tags":["debug"],"x-reason":"off in public mode","x-rpc":"ahto.debug.v1.DebugService/GetCrash","x-served":false}},"/v1/debug/logs":{"get":{"description":"Lists log records, newest first, or in time order when trace_id is set. All filters\nare optional and combine; page_size 0 is 100, at most 1000, and next_page_token reads\non. INVALID_ARGUMENT for a min_severity that is not a severity name.","operationId":"debug.DebugService.ListLogs","parameters":[{"in":"query","name":"service","schema":{"description":"A service.name; empty is every service.","type":"string"}},{"in":"query","name":"min_severity","schema":{"description":"TRACE, DEBUG, INFO, WARN, ERROR or FATAL; empty is every severity.","type":"string"}},{"in":"query","name":"trace_id","schema":{"description":"Only the records of this trace (hex), in time order.","type":"string"}},{"in":"query","name":"query","schema":{"description":"A case-insensitive part of the body.","type":"string"}},{"in":"query","name":"since","schema":{"description":"Only records at or after it; unset is the whole retention.","format":"date-time","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"0 is 100; at most 1000.","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"logs":{"description":"One page of log records.","items":{"additionalProperties":false,"properties":{"attributes":{"description":"The record's attributes.","items":{"additionalProperties":false,"properties":{"key":{"description":"The attribute's name, for example \"http.method\".","type":"string"},"value":{"description":"The value, as text.","type":"string"}},"type":"object"},"type":"array"},"body":{"description":"The message.","type":"string"},"code":{"additionalProperties":false,"description":"The code that wrote it, from the code.* attributes. Unset when it has none.","properties":{"commit":{"description":"The commit of the build (from vcs.revision or service.version).","type":"string"},"function":{"description":"The function's name, as the frame or span gave it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"},"modified":{"description":"The build had local changes (vcs.modified): the lines may not match the commit.","type":"boolean"},"path":{"description":"The file, relative to the repository root.","type":"string"},"repository":{"description":"The lake's repository id.","type":"string"}},"type":"object"},"service":{"description":"The service.name that sent it.","type":"string"},"severity":{"description":"TRACE, DEBUG, INFO, WARN, ERROR or FATAL.","type":"string"},"span_id":{"description":"The span it belongs to, hex; empty when it has none.","type":"string"},"time":{"description":"When the record was written.","format":"date-time","type":"string"},"trace_id":{"description":"The trace it belongs to, hex; empty when it has none.","type":"string"}},"type":"object"},"type":"array"},"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists log records, newest first, or in time order when trace_id is set.","tags":["debug"],"x-reason":"off in public mode","x-rpc":"ahto.debug.v1.DebugService/ListLogs","x-served":false}},"/v1/debug/targets":{"get":{"description":"Lists the services that sent traces, logs or crashes, with the builds they ran, their\ncounts, and whether the OTLP listener is on and where. Takes no input; it also tells\nhow many days the store keeps what it got.","operationId":"debug.DebugService.ListTargets","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"ingest_address":{"description":"Where it listens, a loopback address; empty when it is off.","type":"string"},"ingest_on":{"description":"The OTLP listener runs.","type":"boolean"},"retention_days":{"description":"How many days the store keeps what it got.","type":"integer"},"targets":{"description":"The services that sent anything, by name.","items":{"additionalProperties":false,"properties":{"builds":{"description":"Its builds, newest first.","items":{"additionalProperties":false,"properties":{"commit":{"description":"The commit it maps to; empty when it maps to none in the lake.","type":"string"},"first_seen":{"description":"When the store first saw this build.","format":"date-time","type":"string"},"last_seen":{"description":"When the store last saw this build.","format":"date-time","type":"string"},"modified":{"description":"The build had local changes (vcs.modified).","type":"boolean"},"repository":{"description":"The lake's repository id the commit belongs to; empty when it maps to none.","type":"string"},"version":{"description":"service.version as sent.","type":"string"}},"type":"object"},"type":"array"},"crashes":{"description":"Crash groups.","type":"integer"},"errors":{"description":"Traces with an error span.","type":"integer"},"last_seen":{"description":"When it last sent anything.","format":"date-time","type":"string"},"logs":{"description":"How many log records it sent that the store still has.","type":"integer"},"service":{"description":"service.name.","type":"string"},"traces":{"description":"How many traces it sent that the store still has.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the services that sent traces, logs or crashes, with the builds they ran, their counts, and whether the OTLP listener is on and where.","tags":["debug"],"x-reason":"off in public mode","x-rpc":"ahto.debug.v1.DebugService/ListTargets","x-served":false}},"/v1/debug/traces":{"get":{"description":"Finds traces, newest first, each with its root span, duration, span count and first\nerror. All filters are optional and combine; page_size 0 is 50, at most 500, and\nnext_page_token reads on. INVALID_ARGUMENT for a negative min_duration_us.","operationId":"debug.DebugService.FindTraces","parameters":[{"in":"query","name":"service","schema":{"description":"A service.name; empty is every service.","type":"string"}},{"in":"query","name":"errors_only","schema":{"description":"Only traces with an error span.","type":"boolean"}},{"in":"query","name":"min_duration_us","schema":{"description":"Only traces that took at least this long, in microseconds.","type":"integer"}},{"in":"query","name":"since","schema":{"description":"Only traces that started at or after it; unset is the whole retention.","format":"date-time","type":"string"}},{"in":"query","name":"query","schema":{"description":"A case-insensitive part of the root span's name.","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"0 is 50; at most 500.","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"},"traces":{"description":"One page of traces, newest first.","items":{"additionalProperties":false,"properties":{"duration_us":{"description":"How long the trace took, in microseconds.","type":"integer"},"error":{"description":"Whether any span has status ERROR.","type":"boolean"},"error_message":{"description":"The first error span's status message, or its exception.message.","type":"string"},"root":{"description":"The root span's name, for example \"POST /checkout\".","type":"string"},"service":{"description":"The service.name of the root span.","type":"string"},"spans":{"description":"How many spans it has.","type":"integer"},"start":{"description":"When the root span started.","format":"date-time","type":"string"},"trace_id":{"description":"The trace id, 32 hex digits.","type":"string"},"version":{"description":"The build, as service.version.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Finds traces, newest first, each with its root span, duration, span count and first error.","tags":["debug"],"x-reason":"off in public mode","x-rpc":"ahto.debug.v1.DebugService/FindTraces","x-served":false}},"/v1/debug/traces/{trace_id}":{"get":{"description":"Returns one trace: every span with its attributes, events and code, and the logs that\ncarry its trace id. Pass the trace_id as 32 hex digits (INVALID_ARGUMENT otherwise);\nNOT_FOUND when the store no longer has it.","operationId":"debug.DebugService.GetTrace","parameters":[{"in":"path","name":"trace_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"logs":{"description":"In time order.","items":{"additionalProperties":false,"properties":{"attributes":{"description":"The record's attributes.","items":{"additionalProperties":false,"properties":{"key":{"description":"The attribute's name, for example \"http.method\".","type":"string"},"value":{"description":"The value, as text.","type":"string"}},"type":"object"},"type":"array"},"body":{"description":"The message.","type":"string"},"code":{"additionalProperties":false,"description":"The code that wrote it, from the code.* attributes. Unset when it has none.","properties":{"commit":{"description":"The commit of the build (from vcs.revision or service.version).","type":"string"},"function":{"description":"The function's name, as the frame or span gave it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"},"modified":{"description":"The build had local changes (vcs.modified): the lines may not match the commit.","type":"boolean"},"path":{"description":"The file, relative to the repository root.","type":"string"},"repository":{"description":"The lake's repository id.","type":"string"}},"type":"object"},"service":{"description":"The service.name that sent it.","type":"string"},"severity":{"description":"TRACE, DEBUG, INFO, WARN, ERROR or FATAL.","type":"string"},"span_id":{"description":"The span it belongs to, hex; empty when it has none.","type":"string"},"time":{"description":"When the record was written.","format":"date-time","type":"string"},"trace_id":{"description":"The trace it belongs to, hex; empty when it has none.","type":"string"}},"type":"object"},"type":"array"},"spans":{"description":"In start order.","items":{"additionalProperties":false,"properties":{"attributes":{"description":"The span's attributes.","items":{"additionalProperties":false,"properties":{"key":{"description":"The attribute's name, for example \"http.method\".","type":"string"},"value":{"description":"The value, as text.","type":"string"}},"type":"object"},"type":"array"},"code":{"additionalProperties":false,"description":"From the code.* attributes, mapped to the lake. Unset when the span has none.","properties":{"commit":{"description":"The commit of the build (from vcs.revision or service.version).","type":"string"},"function":{"description":"The function's name, as the frame or span gave it.","type":"string"},"line":{"description":"The line, 1-based.","type":"integer"},"modified":{"description":"The build had local changes (vcs.modified): the lines may not match the commit.","type":"boolean"},"path":{"description":"The file, relative to the repository root.","type":"string"},"repository":{"description":"The lake's repository id.","type":"string"}},"type":"object"},"duration_us":{"description":"How long it took, in microseconds.","type":"integer"},"error":{"description":"The span's status is ERROR.","type":"boolean"},"events":{"description":"The span's events, in time order.","items":{"additionalProperties":false,"properties":{"attributes":{"description":"The event's attributes.","items":{"additionalProperties":false,"properties":{"key":{"description":"The attribute's name, for example \"http.method\".","type":"string"},"value":{"description":"The value, as text.","type":"string"}},"type":"object"},"type":"array"},"name":{"description":"The event's name.","type":"string"},"time":{"description":"When it happened.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"kind":{"description":"server, client, internal, producer or consumer.","type":"string"},"name":{"description":"The span's name.","type":"string"},"parent_span_id":{"description":"The parent's span_id, hex; empty for the root span.","type":"string"},"service":{"description":"The service.name that sent it.","type":"string"},"span_id":{"description":"Hex, as OTLP JSON writes it.","type":"string"},"start":{"description":"When the span started.","format":"date-time","type":"string"},"status_message":{"description":"The status message the service gave, usually for an error.","type":"string"}},"type":"object"},"type":"array"},"summary":{"additionalProperties":false,"description":"The trace in brief.","properties":{"duration_us":{"description":"How long the trace took, in microseconds.","type":"integer"},"error":{"description":"Whether any span has status ERROR.","type":"boolean"},"error_message":{"description":"The first error span's status message, or its exception.message.","type":"string"},"root":{"description":"The root span's name, for example \"POST /checkout\".","type":"string"},"service":{"description":"The service.name of the root span.","type":"string"},"spans":{"description":"How many spans it has.","type":"integer"},"start":{"description":"When the root span started.","format":"date-time","type":"string"},"trace_id":{"description":"The trace id, 32 hex digits.","type":"string"},"version":{"description":"The build, as service.version.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns one trace: every span with its attributes, events and code, and the logs that carry its trace id.","tags":["debug"],"x-reason":"off in public mode","x-rpc":"ahto.debug.v1.DebugService/GetTrace","x-served":false}},"/v1/functions":{"get":{"description":"Lists the functions the server keeps, built-in and added, by name, with facets that\ncount them per category, kind and tag. Every filter (query, category, kind, tag) is\noptional and they combine. There is no paging: the answer holds them all.","operationId":"function.FunctionService.List","parameters":[{"in":"query","name":"query","schema":{"description":"Words matched without case against the name, title, description, category and\ntags. Every word must match.","type":"string"}},{"in":"query","name":"category","schema":{"description":"Only this category.","type":"string"}},{"in":"query","name":"kind","schema":{"description":"Only \"wasm\" or \"builtin\".","type":"string"}},{"in":"query","name":"tag","schema":{"description":"Only functions with this tag.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"facets":{"description":"The counts per category, kind and tag over the functions the query matches, before\nthe category, kind and tag filters, so a client can draw its filter chips.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many functions have it.","type":"integer"},"field":{"description":"\"category\", \"kind\" or \"tag\".","type":"string"},"value":{"description":"The value of that field, for example \"security\".","type":"string"}},"type":"object"},"type":"array"},"functions":{"description":"The functions that match, by name.","items":{"additionalProperties":false,"properties":{"added_at":{"description":"When it was added or last replaced.","format":"date-time","type":"string"},"batch_rows":{"description":"How many rows go in one batch.","type":"integer"},"category":{"description":"The group it belongs to: \"observability\", \"security\", \"quality\", \"dependencies\"\nor \"history\". Empty for a wasm function.","type":"string"},"deadline_ms":{"description":"The deadline of one batch, in milliseconds.","type":"integer"},"description":{"description":"A sentence or two on what it answers.","type":"string"},"grants":{"description":"What it may call: \"blobs\" and \"sql\".","items":{"type":"string"},"type":"array"},"input_columns":{"description":"The names of the input columns it reads, in order. inputs has their types.","items":{"type":"string"},"type":"array"},"inputs":{"description":"The input columns with their types, in order. A Call sends each column with this\ntype. A manifest that lists names only (columns: [blob_oid]) makes each varchar.","items":{"additionalProperties":false,"properties":{"description":{"description":"What the column holds, for a built-in.","type":"string"},"name":{"description":"The column's name.","type":"string"},"type":{"description":"The column's type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"kind":{"description":"\"wasm\" for a module someone added, \"builtin\" for one the server ships. A built-in\nreads the lake itself: a Call gives it the repository, the commit and args, never\nrows. It cannot be removed or replaced.","type":"string"},"match_languages":{"description":"The languages, paths and size a blob must match, for a blob trigger. An empty list\nor a zero size matches all. Languages compare without case. A path pattern with a\nslash is Go path.Match against the whole path from the repository root; one without\na slash matches the base name at any depth, as in .gitignore. There is no **.","items":{"type":"string"},"type":"array"},"match_max_bytes":{"description":"The largest blob, in bytes, that matches; 0 matches any size.","type":"integer"},"match_paths":{"description":"Path patterns a blob must match, for a blob trigger; see match_languages.","items":{"type":"string"},"type":"array"},"memory_bytes":{"description":"Its memory limit in bytes, the deadline of one batch in milliseconds, and the rows of\none batch.","type":"integer"},"module_bytes":{"description":"The size of the module.","type":"integer"},"name":{"description":"The name in the manifest, which is also its folder.","type":"string"},"output_columns":{"description":"The output columns, in order.","items":{"additionalProperties":false,"properties":{"description":{"description":"What the column holds, for a built-in.","type":"string"},"name":{"description":"The column's name.","type":"string"},"type":{"description":"The column's type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"output_table":{"description":"The table its output goes to.","type":"string"},"params":{"description":"The args a Call takes, in order.","items":{"additionalProperties":false,"properties":{"choices":{"description":"The values a choice takes.","items":{"type":"string"},"type":"array"},"default":{"description":"The value used when the Call leaves it out.","type":"string"},"description":{"description":"What the argument means.","type":"string"},"name":{"description":"The argument's name, the key in CallRequest.args.","type":"string"},"required":{"description":"Whether a Call must give it.","type":"boolean"},"type":{"description":"\"string\", \"int\", \"path\" or \"choice\".","type":"string"}},"type":"object"},"type":"array"},"tags":{"description":"Words a search matches, like \"kev\" or \"ownership\".","items":{"type":"string"},"type":"array"},"title":{"description":"A short title.","type":"string"},"trigger":{"description":"What makes it run.","enum":["TRIGGER_UNSPECIFIED","TRIGGER_COMMIT","TRIGGER_BLOB","TRIGGER_SNAPSHOT","TRIGGER_VIEW","TRIGGER_CALL"],"type":"string"},"version":{"description":"\"sha256:\" and the hex SHA-256 of the module.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the functions the server keeps, built-in and added, by name, with facets that count them per category, kind and tag.","tags":["function"],"x-rpc":"ahto.function.v1.FunctionService/List"},"post":{"description":"Adds a function from a folder on the server's machine, an upload or a module URL,\nand returns it. Writes the manifest and module under the lake folder. The module must\ncompile (INVALID_ARGUMENT otherwise, or when it is over the size limit); a name that\nis taken is ALREADY_EXISTS unless replace is set, and a built-in's name is always\ntaken. A folder is PERMISSION_DENIED while the gateway accepts remote clients.","operationId":"function.FunctionService.Add","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"fetch":{"additionalProperties":false,"description":"The manifest and the module's URL.","properties":{"manifest":{"contentEncoding":"base64","description":"The bytes of function.yaml.","type":"string"},"module_sha256":{"description":"The hex SHA-256 of the module, if known; a download that does not match is refused.","type":"string"},"module_url":{"description":"Where the module is: an https URL, or an http one while the server allows local\nfolders (no remote clients). At most 64 MiB.","type":"string"}},"type":"object"},"folder":{"description":"A folder on the server's machine that holds function.yaml and its module, as an\nabsolute path or one starting with \"~/\". Refused unless the server allows local\nfolders.","type":"string"},"replace":{"description":"Replace a function of the same name. Without it, a taken name is refused.","type":"boolean"},"upload":{"additionalProperties":false,"description":"The manifest and module themselves.","properties":{"manifest":{"contentEncoding":"base64","description":"The bytes of function.yaml.","type":"string"},"module":{"contentEncoding":"base64","description":"The bytes of the WebAssembly module the manifest names.","type":"string"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"function":{"additionalProperties":false,"description":"The function as it is now kept.","properties":{"added_at":{"description":"When it was added or last replaced.","format":"date-time","type":"string"},"batch_rows":{"description":"How many rows go in one batch.","type":"integer"},"category":{"description":"The group it belongs to: \"observability\", \"security\", \"quality\", \"dependencies\"\nor \"history\". Empty for a wasm function.","type":"string"},"deadline_ms":{"description":"The deadline of one batch, in milliseconds.","type":"integer"},"description":{"description":"A sentence or two on what it answers.","type":"string"},"grants":{"description":"What it may call: \"blobs\" and \"sql\".","items":{"type":"string"},"type":"array"},"input_columns":{"description":"The names of the input columns it reads, in order. inputs has their types.","items":{"type":"string"},"type":"array"},"inputs":{"description":"The input columns with their types, in order. A Call sends each column with this\ntype. A manifest that lists names only (columns: [blob_oid]) makes each varchar.","items":{"additionalProperties":false,"properties":{"description":{"description":"What the column holds, for a built-in.","type":"string"},"name":{"description":"The column's name.","type":"string"},"type":{"description":"The column's type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"kind":{"description":"\"wasm\" for a module someone added, \"builtin\" for one the server ships. A built-in\nreads the lake itself: a Call gives it the repository, the commit and args, never\nrows. It cannot be removed or replaced.","type":"string"},"match_languages":{"description":"The languages, paths and size a blob must match, for a blob trigger. An empty list\nor a zero size matches all. Languages compare without case. A path pattern with a\nslash is Go path.Match against the whole path from the repository root; one without\na slash matches the base name at any depth, as in .gitignore. There is no **.","items":{"type":"string"},"type":"array"},"match_max_bytes":{"description":"The largest blob, in bytes, that matches; 0 matches any size.","type":"integer"},"match_paths":{"description":"Path patterns a blob must match, for a blob trigger; see match_languages.","items":{"type":"string"},"type":"array"},"memory_bytes":{"description":"Its memory limit in bytes, the deadline of one batch in milliseconds, and the rows of\none batch.","type":"integer"},"module_bytes":{"description":"The size of the module.","type":"integer"},"name":{"description":"The name in the manifest, which is also its folder.","type":"string"},"output_columns":{"description":"The output columns, in order.","items":{"additionalProperties":false,"properties":{"description":{"description":"What the column holds, for a built-in.","type":"string"},"name":{"description":"The column's name.","type":"string"},"type":{"description":"The column's type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"output_table":{"description":"The table its output goes to.","type":"string"},"params":{"description":"The args a Call takes, in order.","items":{"additionalProperties":false,"properties":{"choices":{"description":"The values a choice takes.","items":{"type":"string"},"type":"array"},"default":{"description":"The value used when the Call leaves it out.","type":"string"},"description":{"description":"What the argument means.","type":"string"},"name":{"description":"The argument's name, the key in CallRequest.args.","type":"string"},"required":{"description":"Whether a Call must give it.","type":"boolean"},"type":{"description":"\"string\", \"int\", \"path\" or \"choice\".","type":"string"}},"type":"object"},"type":"array"},"tags":{"description":"Words a search matches, like \"kev\" or \"ownership\".","items":{"type":"string"},"type":"array"},"title":{"description":"A short title.","type":"string"},"trigger":{"description":"What makes it run.","enum":["TRIGGER_UNSPECIFIED","TRIGGER_COMMIT","TRIGGER_BLOB","TRIGGER_SNAPSHOT","TRIGGER_VIEW","TRIGGER_CALL"],"type":"string"},"version":{"description":"\"sha256:\" and the hex SHA-256 of the module.","type":"string"}},"type":"object"},"replaced":{"description":"Whether a function of the same name was replaced.","type":"boolean"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Adds a function from a folder on the server's machine, an upload or a module URL, and returns it.","tags":["function"],"x-reason":"off in public mode","x-rpc":"ahto.function.v1.FunctionService/Add","x-served":false}},"/v1/functions/{name}":{"delete":{"description":"Removes a function, its files and its runs, and returns nothing. Pass its name;\nNOT_FOUND when there is none, FAILED_PRECONDITION for a built-in.","operationId":"function.FunctionService.Remove","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Removes a function, its files and its runs, and returns nothing.","tags":["function"],"x-reason":"off in public mode","x-rpc":"ahto.function.v1.FunctionService/Remove","x-served":false},"get":{"description":"Returns one function: its manifest, version, trigger, columns, params and limits.\nPass its name as List gives it; NOT_FOUND when there is none.","operationId":"function.FunctionService.Get","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"function":{"additionalProperties":false,"description":"The function.","properties":{"added_at":{"description":"When it was added or last replaced.","format":"date-time","type":"string"},"batch_rows":{"description":"How many rows go in one batch.","type":"integer"},"category":{"description":"The group it belongs to: \"observability\", \"security\", \"quality\", \"dependencies\"\nor \"history\". Empty for a wasm function.","type":"string"},"deadline_ms":{"description":"The deadline of one batch, in milliseconds.","type":"integer"},"description":{"description":"A sentence or two on what it answers.","type":"string"},"grants":{"description":"What it may call: \"blobs\" and \"sql\".","items":{"type":"string"},"type":"array"},"input_columns":{"description":"The names of the input columns it reads, in order. inputs has their types.","items":{"type":"string"},"type":"array"},"inputs":{"description":"The input columns with their types, in order. A Call sends each column with this\ntype. A manifest that lists names only (columns: [blob_oid]) makes each varchar.","items":{"additionalProperties":false,"properties":{"description":{"description":"What the column holds, for a built-in.","type":"string"},"name":{"description":"The column's name.","type":"string"},"type":{"description":"The column's type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"kind":{"description":"\"wasm\" for a module someone added, \"builtin\" for one the server ships. A built-in\nreads the lake itself: a Call gives it the repository, the commit and args, never\nrows. It cannot be removed or replaced.","type":"string"},"match_languages":{"description":"The languages, paths and size a blob must match, for a blob trigger. An empty list\nor a zero size matches all. Languages compare without case. A path pattern with a\nslash is Go path.Match against the whole path from the repository root; one without\na slash matches the base name at any depth, as in .gitignore. There is no **.","items":{"type":"string"},"type":"array"},"match_max_bytes":{"description":"The largest blob, in bytes, that matches; 0 matches any size.","type":"integer"},"match_paths":{"description":"Path patterns a blob must match, for a blob trigger; see match_languages.","items":{"type":"string"},"type":"array"},"memory_bytes":{"description":"Its memory limit in bytes, the deadline of one batch in milliseconds, and the rows of\none batch.","type":"integer"},"module_bytes":{"description":"The size of the module.","type":"integer"},"name":{"description":"The name in the manifest, which is also its folder.","type":"string"},"output_columns":{"description":"The output columns, in order.","items":{"additionalProperties":false,"properties":{"description":{"description":"What the column holds, for a built-in.","type":"string"},"name":{"description":"The column's name.","type":"string"},"type":{"description":"The column's type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"output_table":{"description":"The table its output goes to.","type":"string"},"params":{"description":"The args a Call takes, in order.","items":{"additionalProperties":false,"properties":{"choices":{"description":"The values a choice takes.","items":{"type":"string"},"type":"array"},"default":{"description":"The value used when the Call leaves it out.","type":"string"},"description":{"description":"What the argument means.","type":"string"},"name":{"description":"The argument's name, the key in CallRequest.args.","type":"string"},"required":{"description":"Whether a Call must give it.","type":"boolean"},"type":{"description":"\"string\", \"int\", \"path\" or \"choice\".","type":"string"}},"type":"object"},"type":"array"},"tags":{"description":"Words a search matches, like \"kev\" or \"ownership\".","items":{"type":"string"},"type":"array"},"title":{"description":"A short title.","type":"string"},"trigger":{"description":"What makes it run.","enum":["TRIGGER_UNSPECIFIED","TRIGGER_COMMIT","TRIGGER_BLOB","TRIGGER_SNAPSHOT","TRIGGER_VIEW","TRIGGER_CALL"],"type":"string"},"version":{"description":"\"sha256:\" and the hex SHA-256 of the module.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns one function: its manifest, version, trigger, columns, params and limits.","tags":["function"],"x-rpc":"ahto.function.v1.FunctionService/Get"}},"/v1/functions/{name}/call":{"post":{"description":"Calls a function over input rows and returns its output rows, the lines it logged\nand the run it made. Pass name; add repository and commit_oid, args, and rows or\ninput (not both: INVALID_ARGUMENT). The call is recorded as a run (see ListRuns). A\nfunction that fails is an answer with error set, not a failed call. A public gateway\n(GetInfo.public) calls built-ins only: any other kind is PERMISSION_DENIED.","operationId":"function.FunctionService.Call","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"args":{"additionalProperties":{"type":"string"},"description":"Named arguments for the function.","type":"object"},"commit_oid":{"description":"The commit the call is about, if any.","type":"string"},"input":{"contentEncoding":"base64","description":"The input rows as an Arrow IPC stream.","type":"string"},"name":{"description":"The function's name, as List gives it.","type":"string"},"repository":{"description":"The repository read_blob reads from: its id, or its name or identity key.","type":"string"},"rows":{"additionalProperties":false,"description":"The input rows, with the columns the manifest names. Give rows or input, not both.","properties":{"columns":{"description":"The columns, in the order of the manifest.","items":{"additionalProperties":false,"properties":{"blobs":{"description":"Values of a blob column.","items":{"contentEncoding":"base64","type":"string"},"type":"array"},"bools":{"description":"Values of a boolean column.","items":{"type":"boolean"},"type":"array"},"floats":{"description":"Values of a float64 column.","items":{"type":"number"},"type":"array"},"ints":{"description":"Values of an int32 or int64 column.","items":{"type":"integer"},"type":"array"},"name":{"description":"The column name.","type":"string"},"nulls":{"description":"Which rows are null; empty when none is. A null row still has a zero value above.","items":{"type":"boolean"},"type":"array"},"strings":{"description":"Values of a varchar column.","items":{"type":"string"},"type":"array"},"type":{"description":"The column type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"rows":{"description":"The number of rows. Every column has this many values.","type":"integer"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"cached":{"description":"Whether the answer came from the cache without running the module.","type":"boolean"},"error":{"additionalProperties":false,"description":"Set when the function failed; rows is then empty.","properties":{"code":{"description":"A stable code: permission_denied, deadline_exceeded, out_of_memory, trap, bad_output,\nbad_input, not_found, unavailable, or a code of the function's own.","type":"string"},"input_id":{"description":"The input id of the row that failed, when one did.","type":"string"},"message":{"description":"What went wrong, for a person.","type":"string"}},"type":"object"},"logs":{"description":"The lines the function logged.","items":{"type":"string"},"type":"array"},"rows":{"additionalProperties":false,"description":"The output rows, with the columns the manifest names.","properties":{"columns":{"description":"The columns, in the order of the manifest.","items":{"additionalProperties":false,"properties":{"blobs":{"description":"Values of a blob column.","items":{"contentEncoding":"base64","type":"string"},"type":"array"},"bools":{"description":"Values of a boolean column.","items":{"type":"boolean"},"type":"array"},"floats":{"description":"Values of a float64 column.","items":{"type":"number"},"type":"array"},"ints":{"description":"Values of an int32 or int64 column.","items":{"type":"integer"},"type":"array"},"name":{"description":"The column name.","type":"string"},"nulls":{"description":"Which rows are null; empty when none is. A null row still has a zero value above.","items":{"type":"boolean"},"type":"array"},"strings":{"description":"Values of a varchar column.","items":{"type":"string"},"type":"array"},"type":{"description":"The column type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"rows":{"description":"The number of rows. Every column has this many values.","type":"integer"}},"type":"object"},"run":{"additionalProperties":false,"description":"The run this call made.","properties":{"cached":{"description":"Whether the answer came from the cache without running the module.","type":"boolean"},"duration_ms":{"description":"How long it took, in milliseconds.","type":"integer"},"error":{"additionalProperties":false,"description":"Set when the function failed.","properties":{"code":{"description":"A stable code: permission_denied, deadline_exceeded, out_of_memory, trap, bad_output,\nbad_input, not_found, unavailable, or a code of the function's own.","type":"string"},"input_id":{"description":"The input id of the row that failed, when one did.","type":"string"},"message":{"description":"What went wrong, for a person.","type":"string"}},"type":"object"},"function":{"description":"The function's name.","type":"string"},"id":{"description":"The run id, a number that counts up per function.","type":"string"},"logs":{"description":"The lines the function logged.","items":{"type":"string"},"type":"array"},"repository":{"description":"The repository the call named, if any.","type":"string"},"rows_in":{"description":"How many input rows it read.","type":"integer"},"rows_out":{"description":"How many output rows it wrote.","type":"integer"},"started_at":{"description":"When the run started, on the server.","format":"date-time","type":"string"},"status":{"description":"\"ok\" or \"failed\".","type":"string"},"version":{"description":"The function's version (FunctionInfo.version) at the time of the run.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Calls a function over input rows and returns its output rows, the lines it logged and the run it made.","tags":["function"],"x-rpc":"ahto.function.v1.FunctionService/Call"}},"/v1/functions/{name}/runs":{"get":{"description":"Lists the last runs of a function, newest first. The server keeps the last 50 runs\nof each function in a file under the lake folder, so they survive a restart.\nNOT_FOUND for an unknown function.","operationId":"function.FunctionService.ListRuns","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"runs":{"description":"The runs the server keeps, newest first.","items":{"additionalProperties":false,"properties":{"cached":{"description":"Whether the answer came from the cache without running the module.","type":"boolean"},"duration_ms":{"description":"How long it took, in milliseconds.","type":"integer"},"error":{"additionalProperties":false,"description":"Set when the function failed.","properties":{"code":{"description":"A stable code: permission_denied, deadline_exceeded, out_of_memory, trap, bad_output,\nbad_input, not_found, unavailable, or a code of the function's own.","type":"string"},"input_id":{"description":"The input id of the row that failed, when one did.","type":"string"},"message":{"description":"What went wrong, for a person.","type":"string"}},"type":"object"},"function":{"description":"The function's name.","type":"string"},"id":{"description":"The run id, a number that counts up per function.","type":"string"},"logs":{"description":"The lines the function logged.","items":{"type":"string"},"type":"array"},"repository":{"description":"The repository the call named, if any.","type":"string"},"rows_in":{"description":"How many input rows it read.","type":"integer"},"rows_out":{"description":"How many output rows it wrote.","type":"integer"},"started_at":{"description":"When the run started, on the server.","format":"date-time","type":"string"},"status":{"description":"\"ok\" or \"failed\".","type":"string"},"version":{"description":"The function's version (FunctionInfo.version) at the time of the run.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the last runs of a function, newest first.","tags":["function"],"x-rpc":"ahto.function.v1.FunctionService/ListRuns"}},"/v1/functions/{name}/runs/watch":{"get":{"description":"Streams the runs of a function: first the runs ListRuns lists with reset set, then\neach new run as it finishes. When the function is replaced its runs start again, and\nthe next message has reset set. The stream never ends by itself; it ends with\nNOT_FOUND when the function is removed. Over REST it is a server-sent event stream.\nIt is declared before GetRun so that its route wins over runs/{id}.","operationId":"function.FunctionService.WatchRuns","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"reset":{"description":"Set on the first message and after a replace: runs is every run the server keeps,\nand a client replaces what it has.","type":"boolean"},"runs":{"description":"The new runs, newest first; with reset, all of them.","items":{"additionalProperties":false,"properties":{"cached":{"description":"Whether the answer came from the cache without running the module.","type":"boolean"},"duration_ms":{"description":"How long it took, in milliseconds.","type":"integer"},"error":{"additionalProperties":false,"description":"Set when the function failed.","properties":{"code":{"description":"A stable code: permission_denied, deadline_exceeded, out_of_memory, trap, bad_output,\nbad_input, not_found, unavailable, or a code of the function's own.","type":"string"},"input_id":{"description":"The input id of the row that failed, when one did.","type":"string"},"message":{"description":"What went wrong, for a person.","type":"string"}},"type":"object"},"function":{"description":"The function's name.","type":"string"},"id":{"description":"The run id, a number that counts up per function.","type":"string"},"logs":{"description":"The lines the function logged.","items":{"type":"string"},"type":"array"},"repository":{"description":"The repository the call named, if any.","type":"string"},"rows_in":{"description":"How many input rows it read.","type":"integer"},"rows_out":{"description":"How many output rows it wrote.","type":"integer"},"started_at":{"description":"When the run started, on the server.","format":"date-time","type":"string"},"status":{"description":"\"ok\" or \"failed\".","type":"string"},"version":{"description":"The function's version (FunctionInfo.version) at the time of the run.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the runs of a function: first the runs ListRuns lists with reset set, then each new run as it finishes.","tags":["function"],"x-rpc":"ahto.function.v1.FunctionService/WatchRuns"}},"/v1/functions/{name}/runs/{id}":{"get":{"description":"Returns one run of a function: its status, error, logs, row counts and duration.\nPass the function's name and the run's id from ListRuns; NOT_FOUND when the server no\nlonger keeps it (it keeps the last 50).","operationId":"function.FunctionService.GetRun","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"run":{"additionalProperties":false,"description":"The run.","properties":{"cached":{"description":"Whether the answer came from the cache without running the module.","type":"boolean"},"duration_ms":{"description":"How long it took, in milliseconds.","type":"integer"},"error":{"additionalProperties":false,"description":"Set when the function failed.","properties":{"code":{"description":"A stable code: permission_denied, deadline_exceeded, out_of_memory, trap, bad_output,\nbad_input, not_found, unavailable, or a code of the function's own.","type":"string"},"input_id":{"description":"The input id of the row that failed, when one did.","type":"string"},"message":{"description":"What went wrong, for a person.","type":"string"}},"type":"object"},"function":{"description":"The function's name.","type":"string"},"id":{"description":"The run id, a number that counts up per function.","type":"string"},"logs":{"description":"The lines the function logged.","items":{"type":"string"},"type":"array"},"repository":{"description":"The repository the call named, if any.","type":"string"},"rows_in":{"description":"How many input rows it read.","type":"integer"},"rows_out":{"description":"How many output rows it wrote.","type":"integer"},"started_at":{"description":"When the run started, on the server.","format":"date-time","type":"string"},"status":{"description":"\"ok\" or \"failed\".","type":"string"},"version":{"description":"The function's version (FunctionInfo.version) at the time of the run.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns one run of a function: its status, error, logs, row counts and duration.","tags":["function"],"x-rpc":"ahto.function.v1.FunctionService/GetRun"}},"/v1/functions:test":{"post":{"description":"Tries a function without adding it: compiles the module of the request, calls it\nonce over the request's rows and returns what Call returns. Pass a folder, an upload\nor a fetch as Add takes it, and the call's fields as Call takes them. Nothing is\nkept: the server's functions, runs and cache stay as they were, so a module can be\ntried while others use the function of the same name. A public gateway refuses it\n(PERMISSION_DENIED), as it refuses Call of a wasm function.","operationId":"function.FunctionService.Test","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"args":{"additionalProperties":{"type":"string"},"description":"Named arguments for the function.","type":"object"},"commit_oid":{"description":"The commit the call is about, if any.","type":"string"},"fetch":{"additionalProperties":false,"description":"The manifest and the module's URL.","properties":{"manifest":{"contentEncoding":"base64","description":"The bytes of function.yaml.","type":"string"},"module_sha256":{"description":"The hex SHA-256 of the module, if known; a download that does not match is refused.","type":"string"},"module_url":{"description":"Where the module is: an https URL, or an http one while the server allows local\nfolders (no remote clients). At most 64 MiB.","type":"string"}},"type":"object"},"folder":{"description":"A folder on the server's machine that holds function.yaml and its built module, as\nan absolute path or one starting with \"~/\". Refused unless the server allows local\nfolders.","type":"string"},"input":{"contentEncoding":"base64","description":"The input rows as an Arrow IPC stream.","type":"string"},"repository":{"description":"The repository read_blob reads from: its id, or its name or identity key.","type":"string"},"rows":{"additionalProperties":false,"description":"The input rows, with the columns the manifest names. Give rows or input, not both.","properties":{"columns":{"description":"The columns, in the order of the manifest.","items":{"additionalProperties":false,"properties":{"blobs":{"description":"Values of a blob column.","items":{"contentEncoding":"base64","type":"string"},"type":"array"},"bools":{"description":"Values of a boolean column.","items":{"type":"boolean"},"type":"array"},"floats":{"description":"Values of a float64 column.","items":{"type":"number"},"type":"array"},"ints":{"description":"Values of an int32 or int64 column.","items":{"type":"integer"},"type":"array"},"name":{"description":"The column name.","type":"string"},"nulls":{"description":"Which rows are null; empty when none is. A null row still has a zero value above.","items":{"type":"boolean"},"type":"array"},"strings":{"description":"Values of a varchar column.","items":{"type":"string"},"type":"array"},"type":{"description":"The column type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"rows":{"description":"The number of rows. Every column has this many values.","type":"integer"}},"type":"object"},"upload":{"additionalProperties":false,"description":"The manifest and module themselves.","properties":{"manifest":{"contentEncoding":"base64","description":"The bytes of function.yaml.","type":"string"},"module":{"contentEncoding":"base64","description":"The bytes of the WebAssembly module the manifest names.","type":"string"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"cached":{"description":"Always false: a test does not read or fill the cache.","type":"boolean"},"error":{"additionalProperties":false,"description":"Set when the function failed; rows is then empty.","properties":{"code":{"description":"A stable code: permission_denied, deadline_exceeded, out_of_memory, trap, bad_output,\nbad_input, not_found, unavailable, or a code of the function's own.","type":"string"},"input_id":{"description":"The input id of the row that failed, when one did.","type":"string"},"message":{"description":"What went wrong, for a person.","type":"string"}},"type":"object"},"logs":{"description":"The lines the function logged.","items":{"type":"string"},"type":"array"},"rows":{"additionalProperties":false,"description":"The output rows, with the columns the manifest names.","properties":{"columns":{"description":"The columns, in the order of the manifest.","items":{"additionalProperties":false,"properties":{"blobs":{"description":"Values of a blob column.","items":{"contentEncoding":"base64","type":"string"},"type":"array"},"bools":{"description":"Values of a boolean column.","items":{"type":"boolean"},"type":"array"},"floats":{"description":"Values of a float64 column.","items":{"type":"number"},"type":"array"},"ints":{"description":"Values of an int32 or int64 column.","items":{"type":"integer"},"type":"array"},"name":{"description":"The column name.","type":"string"},"nulls":{"description":"Which rows are null; empty when none is. A null row still has a zero value above.","items":{"type":"boolean"},"type":"array"},"strings":{"description":"Values of a varchar column.","items":{"type":"string"},"type":"array"},"type":{"description":"The column type.","enum":["COLUMN_TYPE_UNSPECIFIED","COLUMN_TYPE_VARCHAR","COLUMN_TYPE_INT32","COLUMN_TYPE_INT64","COLUMN_TYPE_FLOAT64","COLUMN_TYPE_BOOLEAN","COLUMN_TYPE_BLOB"],"type":"string"}},"type":"object"},"type":"array"},"rows":{"description":"The number of rows. Every column has this many values.","type":"integer"}},"type":"object"},"run":{"additionalProperties":false,"description":"The run the test made. It has no id: it is not kept.","properties":{"cached":{"description":"Whether the answer came from the cache without running the module.","type":"boolean"},"duration_ms":{"description":"How long it took, in milliseconds.","type":"integer"},"error":{"additionalProperties":false,"description":"Set when the function failed.","properties":{"code":{"description":"A stable code: permission_denied, deadline_exceeded, out_of_memory, trap, bad_output,\nbad_input, not_found, unavailable, or a code of the function's own.","type":"string"},"input_id":{"description":"The input id of the row that failed, when one did.","type":"string"},"message":{"description":"What went wrong, for a person.","type":"string"}},"type":"object"},"function":{"description":"The function's name.","type":"string"},"id":{"description":"The run id, a number that counts up per function.","type":"string"},"logs":{"description":"The lines the function logged.","items":{"type":"string"},"type":"array"},"repository":{"description":"The repository the call named, if any.","type":"string"},"rows_in":{"description":"How many input rows it read.","type":"integer"},"rows_out":{"description":"How many output rows it wrote.","type":"integer"},"started_at":{"description":"When the run started, on the server.","format":"date-time","type":"string"},"status":{"description":"\"ok\" or \"failed\".","type":"string"},"version":{"description":"The function's version (FunctionInfo.version) at the time of the run.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Tries a function without adding it: compiles the module of the request, calls it once over the request's rows and returns what Call returns.","tags":["function"],"x-rpc":"ahto.function.v1.FunctionService/Test"}},"/v1/identity/audit":{"get":{"description":"Lists audit events, newest first: who did what, with which outcome, never the\nrequest's content. Filter by action, person and time range (since, until). Admins\nonly. Paged: page_size 0 means 50, at most 200; next_page_token reads on, and\ntotal_size counts them all.","operationId":"identity.IdentityService.ListAuditEvents","parameters":[{"in":"query","name":"action","schema":{"description":"Only this action.","type":"string"}},{"in":"query","name":"person_id","schema":{"description":"Only actions by this person.","type":"string"}},{"in":"query","name":"since","schema":{"description":"Only events at or after this time.","format":"date-time","type":"string"}},{"in":"query","name":"until","schema":{"description":"Only events before this time.","format":"date-time","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 50, at most 200 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"events":{"description":"Newest first.","items":{"additionalProperties":false,"properties":{"action":{"description":"What happened, such as \"signin\", \"invite.accept\", \"grant\", \"revoke\".","type":"string"},"actor_credential_id":{"description":"The credential they used.","type":"string"},"actor_person_id":{"description":"The person who did it.","type":"string"},"entry_hash":{"contentEncoding":"base64","description":"The hash of the log entry, for network events.","type":"string"},"outcome":{"description":"Whether it worked, was denied or failed.","enum":["OUTCOME_UNSPECIFIED","OUTCOME_OK","OUTCOME_DENIED","OUTCOME_FAILED"],"type":"string"},"reason":{"description":"The reason the actor gave, as typed: at most 200 bytes of UTF-8 with no control\ncharacters. Empty for none.","type":"string"},"scope":{"description":"Where the event is recorded: the network's log or this node only.","enum":["SCOPE_UNSPECIFIED","SCOPE_NETWORK","SCOPE_NODE"],"type":"string"},"seq":{"description":"The log position for network events; the node's own counter for node events.","type":"integer"},"target":{"description":"The id the action was about.","type":"string"},"time":{"description":"When it happened.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"next_page_token":{"description":"Pass it as page_token for the next page; empty on the last.","type":"string"},"total_size":{"description":"How many events match, over all pages.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists audit events, newest first: who did what, with which outcome, never the request's content.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/ListAuditEvents","x-served":false}},"/v1/identity/audit/export":{"get":{"description":"Streams the audit events of a time range, oldest first, one per message, for a SIEM\nor an archive. Admins only. Server stream: it ends after the last event up to until\n(or now).","operationId":"identity.IdentityService.ExportAuditEvents","parameters":[{"in":"query","name":"since","schema":{"description":"Events at or after this time; empty from the first.","format":"date-time","type":"string"}},{"in":"query","name":"until","schema":{"description":"Empty: up to now.","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"event":{"additionalProperties":false,"description":"One audit event; the stream sends the oldest first.","properties":{"action":{"description":"What happened, such as \"signin\", \"invite.accept\", \"grant\", \"revoke\".","type":"string"},"actor_credential_id":{"description":"The credential they used.","type":"string"},"actor_person_id":{"description":"The person who did it.","type":"string"},"entry_hash":{"contentEncoding":"base64","description":"The hash of the log entry, for network events.","type":"string"},"outcome":{"description":"Whether it worked, was denied or failed.","enum":["OUTCOME_UNSPECIFIED","OUTCOME_OK","OUTCOME_DENIED","OUTCOME_FAILED"],"type":"string"},"reason":{"description":"The reason the actor gave, as typed: at most 200 bytes of UTF-8 with no control\ncharacters. Empty for none.","type":"string"},"scope":{"description":"Where the event is recorded: the network's log or this node only.","enum":["SCOPE_UNSPECIFIED","SCOPE_NETWORK","SCOPE_NODE"],"type":"string"},"seq":{"description":"The log position for network events; the node's own counter for node events.","type":"integer"},"target":{"description":"The id the action was about.","type":"string"},"time":{"description":"When it happened.","format":"date-time","type":"string"}},"type":"object"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the audit events of a time range, oldest first, one per message, for a SIEM or an archive.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/ExportAuditEvents","x-served":false}},"/v1/identity/authority":{"get":{"description":"Returns the network's authority as this node sees it: the lease state and expiry, the\nepoch and its certificate, the group of nodes and which are reachable, the newest log\nentry applied, and the outage policy. \"Reconnecting\" in the UI is lease_state\nRECONNECTING; nobody is signed out. lease_state OFF means the network has no v2 log\nand identity is off. Takes no input.","operationId":"identity.IdentityService.GetAuthorityStatus","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"certificate_not_after":{"description":"When the epoch certificate ends; the guardians renew it.","format":"date-time","type":"string"},"certificate_superseded":{"description":"A guardian change came after the certificate was made: the new guardians\nre-certify at once, and until the epoch installs, the certificate in force\nwas signed by guardians that no longer rule.","type":"boolean"},"epoch":{"description":"The epoch of the authority's certificate in force; it counts up.","type":"integer"},"head_hash":{"contentEncoding":"base64","description":"The hash of the newest entry this node has applied.","type":"string"},"head_seq":{"description":"The newest entry this node has applied.","type":"integer"},"last_verified_at":{"description":"When the last lease answer was verified.","format":"date-time","type":"string"},"lease_expires_at":{"description":"When the lease ends unless it is renewed.","format":"date-time","type":"string"},"lease_state":{"description":"Whether this node holds a lease from the authority.","enum":["LEASE_STATE_UNSPECIFIED","LEASE_STATE_OK","LEASE_STATE_RECONNECTING","LEASE_STATE_SERVING_LAST_VERIFIED","LEASE_STATE_OFF"],"type":"string"},"nodes":{"description":"The nodes of the authority group.","items":{"additionalProperties":false,"properties":{"leader":{"description":"Whether it is the leader of the group.","type":"boolean"},"peer_id":{"description":"The node's libp2p peer id.","type":"string"},"reachable":{"description":"Whether this node reaches it now.","type":"boolean"}},"type":"object"},"type":"array"},"outage":{"description":"What this node does while it holds no lease.","enum":["OUTAGE_POLICY_UNSPECIFIED","OUTAGE_POLICY_FAIL_CLOSED","OUTAGE_POLICY_SERVE_LAST_VERIFIED"],"type":"string"},"serve_last_verified_until":{"description":"With LEASE_STATE_SERVING_LAST_VERIFIED, when remote calls stop. Otherwise unset.","format":"date-time","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns the network's authority as this node sees it: the lease state and expiry, the epoch and its certificate, the group of nodes and which are reachable, the newest log entry applied, and the outage policy.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/GetAuthorityStatus","x-served":false}},"/v1/identity/credentials":{"get":{"description":"Lists the live device keys and passkeys ordered by key: of person_id when set, else\nof the whole network for an admin and the caller's own for anyone else. Only an admin\nmay name another person. The log keeps no label or times for a credential, so those\nstay empty. Paged: page_size 0 means 50, at most 200; next_page_token reads on.","operationId":"identity.IdentityService.ListCredentials","parameters":[{"in":"query","name":"person_id","schema":{"description":"Whose credentials; empty for the whole network to an admin, the caller's own to\nanyone else.","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 50, at most 200 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"credentials":{"description":"One page of credentials, ordered by key.","items":{"additionalProperties":false,"properties":{"aaguid":{"description":"Passkeys only: the authenticator model.","type":"string"},"created_at":{"description":"When it was added. Unset: the log keeps no time.","format":"date-time","type":"string"},"fingerprint":{"description":"The key's fingerprint.","type":"string"},"id":{"description":"The credential's id: a device key in hex, a passkey id in base64url.","type":"string"},"key_type":{"description":"The key's signature algorithm.","enum":["KEY_TYPE_UNSPECIFIED","KEY_TYPE_ED25519","KEY_TYPE_P256","KEY_TYPE_ML_DSA_65"],"type":"string"},"kind":{"description":"Whether it is a device key or a passkey.","enum":["KIND_UNSPECIFIED","KIND_DEVICE_KEY","KIND_PASSKEY"],"type":"string"},"label":{"description":"The name given when it was added. Empty: the log keeps no label.","type":"string"},"last_used_at":{"description":"When it last signed in. Unset: the log keeps no time.","format":"date-time","type":"string"},"peer_id":{"description":"Device keys only: the libp2p peer ID and what it may do on the transport.","type":"string"},"person_id":{"description":"The person it belongs to.","type":"string"},"state":{"description":"Whether the credential is in force or revoked.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"},"transport_role":{"description":"What the key may do on the transport. Device keys only.","enum":["TRANSPORT_ROLE_UNSPECIFIED","TRANSPORT_ROLE_MEMBER","TRANSPORT_ROLE_BOOTSTRAP","TRANSPORT_ROLE_RELAY","TRANSPORT_ROLE_CLIENT"],"type":"string"}},"type":"object"},"type":"array"},"next_page_token":{"description":"Pass it as page_token for the next page; empty on the last.","type":"string"},"total_size":{"description":"How many credentials there are, over all pages.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the live device keys and passkeys ordered by key: of person_id when set, else of the whole network for an admin and the caller's own for anyone else.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/ListCredentials","x-served":false},"post":{"description":"Adds a device key or a passkey to the signed-in person and returns it. Pass a nonce\nfrom CreateSignInChallenge and the new credential with its proof that its holder has\nthe key. The caller must have signed in within the last 5 minutes (UNAUTHENTICATED\notherwise). FAILED_PRECONDITION when the key or passkey is bound already. Writes to\nthe membership log.","operationId":"identity.IdentityService.AddCredential","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"credential":{"additionalProperties":false,"description":"The credential to add to the caller's own person.","properties":{"device_key":{"additionalProperties":false,"description":"A device key.","properties":{"key_type":{"description":"The key's signature algorithm.","enum":["KEY_TYPE_UNSPECIFIED","KEY_TYPE_ED25519","KEY_TYPE_P256","KEY_TYPE_ML_DSA_65"],"type":"string"},"public_key":{"contentEncoding":"base64","description":"The raw public key: 32 bytes for Ed25519, the 65-byte uncompressed point for P-256, the encoded key for ML-DSA-65.","type":"string"},"signature":{"contentEncoding":"base64","description":"The proof of possession described above.","type":"string"},"transport_role":{"description":"What the key may do on the transport; unspecified for a key that only signs in.","enum":["TRANSPORT_ROLE_UNSPECIFIED","TRANSPORT_ROLE_MEMBER","TRANSPORT_ROLE_BOOTSTRAP","TRANSPORT_ROLE_RELAY","TRANSPORT_ROLE_CLIENT"],"type":"string"}},"type":"object"},"label":{"description":"A name for the credential, such as the device it is on.","type":"string"},"passkey":{"additionalProperties":false,"description":"A passkey.","properties":{"attestation_object":{"contentEncoding":"base64","description":"attestationObject, as the browser returns it.","type":"string"},"client_data_json":{"contentEncoding":"base64","description":"clientDataJSON, as the browser returns it.","type":"string"}},"type":"object"}},"type":"object"},"nonce":{"contentEncoding":"base64","description":"The nonce from CreateSignInChallenge that the new key signed.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"credential":{"additionalProperties":false,"description":"The credential that was added.","properties":{"aaguid":{"description":"Passkeys only: the authenticator model.","type":"string"},"created_at":{"description":"When it was added. Unset: the log keeps no time.","format":"date-time","type":"string"},"fingerprint":{"description":"The key's fingerprint.","type":"string"},"id":{"description":"The credential's id: a device key in hex, a passkey id in base64url.","type":"string"},"key_type":{"description":"The key's signature algorithm.","enum":["KEY_TYPE_UNSPECIFIED","KEY_TYPE_ED25519","KEY_TYPE_P256","KEY_TYPE_ML_DSA_65"],"type":"string"},"kind":{"description":"Whether it is a device key or a passkey.","enum":["KIND_UNSPECIFIED","KIND_DEVICE_KEY","KIND_PASSKEY"],"type":"string"},"label":{"description":"The name given when it was added. Empty: the log keeps no label.","type":"string"},"last_used_at":{"description":"When it last signed in. Unset: the log keeps no time.","format":"date-time","type":"string"},"peer_id":{"description":"Device keys only: the libp2p peer ID and what it may do on the transport.","type":"string"},"person_id":{"description":"The person it belongs to.","type":"string"},"state":{"description":"Whether the credential is in force or revoked.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"},"transport_role":{"description":"What the key may do on the transport. Device keys only.","enum":["TRANSPORT_ROLE_UNSPECIFIED","TRANSPORT_ROLE_MEMBER","TRANSPORT_ROLE_BOOTSTRAP","TRANSPORT_ROLE_RELAY","TRANSPORT_ROLE_CLIENT"],"type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Adds a device key or a passkey to the signed-in person and returns it.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/AddCredential","x-served":false}},"/v1/identity/guardians":{"get":{"description":"Lists the guardians who can recover the network, the threshold, when a rehearsal last\npassed and the quorum requests still open. Admins only. Takes no input.","operationId":"identity.IdentityService.ListGuardians","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"guardians":{"description":"The guardians in force.","items":{"additionalProperties":false,"properties":{"fingerprint":{"description":"Output only.","type":"string"},"key_type":{"description":"The key's signature algorithm; only Ed25519 for now.","enum":["KEY_TYPE_UNSPECIFIED","KEY_TYPE_ED25519","KEY_TYPE_P256","KEY_TYPE_ML_DSA_65"],"type":"string"},"label":{"description":"A name for the guardian, such as who holds the key.","type":"string"},"last_signed_at":{"description":"Output only: the last time it signed a quorum request.","format":"date-time","type":"string"},"public_key":{"contentEncoding":"base64","description":"The raw 32-byte public key.","type":"string"}},"type":"object"},"type":"array"},"last_rehearsal_at":{"description":"When a rehearsal last passed. Empty: never.","format":"date-time","type":"string"},"open_requests":{"description":"The quorum requests that still take signatures.","items":{"additionalProperties":false,"properties":{"error":{"description":"Why it failed.","type":"string"},"expires_at":{"description":"When an open request stops accepting signatures.","format":"date-time","type":"string"},"id":{"description":"The request's id: 64 hex digits.","type":"string"},"kind":{"description":"Whether it changes the guardians or rehearses a recovery.","enum":["KIND_UNSPECIFIED","KIND_GUARDIAN_CHANGE","KIND_REHEARSAL"],"type":"string"},"payload":{"contentEncoding":"base64","description":"The exact tagged bytes each guardian signs. A guardian checks them and builds the\ndigest itself; it never signs a digest it was handed.","type":"string"},"signers":{"description":"Fingerprints of the guardians who have signed.","items":{"type":"string"},"type":"array"},"state":{"description":"Where the request is: open, done, failed, expired or cancelled.","enum":["STATE_UNSPECIFIED","STATE_OPEN","STATE_DONE","STATE_FAILED","STATE_EXPIRED","STATE_CANCELLED"],"type":"string"},"threshold":{"description":"How many guardians must sign it.","type":"integer"}},"type":"object"},"type":"array"},"threshold":{"description":"How many of them must sign a recovery or a guardian change.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the guardians who can recover the network, the threshold, when a rehearsal last passed and the quorum requests still open.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/ListGuardians","x-served":false},"post":{"description":"Proposes a new guardian set and threshold and returns the quorum request that carries\nit. The set replaces the one in force and applies once enough current guardians sign\nthe request (SignQuorumRequest). Admins only.","operationId":"identity.IdentityService.SetGuardians","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"guardians":{"description":"The whole new set: it replaces the one in force.","items":{"additionalProperties":false,"properties":{"fingerprint":{"description":"Output only.","type":"string"},"key_type":{"description":"The key's signature algorithm; only Ed25519 for now.","enum":["KEY_TYPE_UNSPECIFIED","KEY_TYPE_ED25519","KEY_TYPE_P256","KEY_TYPE_ML_DSA_65"],"type":"string"},"label":{"description":"A name for the guardian, such as who holds the key.","type":"string"},"last_signed_at":{"description":"Output only: the last time it signed a quorum request.","format":"date-time","type":"string"},"public_key":{"contentEncoding":"base64","description":"The raw 32-byte public key.","type":"string"}},"type":"object"},"type":"array"},"threshold":{"description":"How many guardians must sign a recovery or a guardian change.","type":"integer"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"request":{"additionalProperties":false,"description":"The quorum request that carries the change.","properties":{"error":{"description":"Why it failed.","type":"string"},"expires_at":{"description":"When an open request stops accepting signatures.","format":"date-time","type":"string"},"id":{"description":"The request's id: 64 hex digits.","type":"string"},"kind":{"description":"Whether it changes the guardians or rehearses a recovery.","enum":["KIND_UNSPECIFIED","KIND_GUARDIAN_CHANGE","KIND_REHEARSAL"],"type":"string"},"payload":{"contentEncoding":"base64","description":"The exact tagged bytes each guardian signs. A guardian checks them and builds the\ndigest itself; it never signs a digest it was handed.","type":"string"},"signers":{"description":"Fingerprints of the guardians who have signed.","items":{"type":"string"},"type":"array"},"state":{"description":"Where the request is: open, done, failed, expired or cancelled.","enum":["STATE_UNSPECIFIED","STATE_OPEN","STATE_DONE","STATE_FAILED","STATE_EXPIRED","STATE_CANCELLED"],"type":"string"},"threshold":{"description":"How many guardians must sign it.","type":"integer"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Proposes a new guardian set and threshold and returns the quorum request that carries it.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/SetGuardians","x-served":false}},"/v1/identity/guardians/rehearsal":{"post":{"description":"Starts a recovery rehearsal and returns its quorum request. The guardians sign a\nthrowaway successor, which proves the network can be recovered; it passes once the\nthreshold have signed (SignQuorumRequest). Admins only. Takes no input.","operationId":"identity.IdentityService.StartRecoveryRehearsal","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"request":{"additionalProperties":false,"description":"The quorum request for the rehearsal.","properties":{"error":{"description":"Why it failed.","type":"string"},"expires_at":{"description":"When an open request stops accepting signatures.","format":"date-time","type":"string"},"id":{"description":"The request's id: 64 hex digits.","type":"string"},"kind":{"description":"Whether it changes the guardians or rehearses a recovery.","enum":["KIND_UNSPECIFIED","KIND_GUARDIAN_CHANGE","KIND_REHEARSAL"],"type":"string"},"payload":{"contentEncoding":"base64","description":"The exact tagged bytes each guardian signs. A guardian checks them and builds the\ndigest itself; it never signs a digest it was handed.","type":"string"},"signers":{"description":"Fingerprints of the guardians who have signed.","items":{"type":"string"},"type":"array"},"state":{"description":"Where the request is: open, done, failed, expired or cancelled.","enum":["STATE_UNSPECIFIED","STATE_OPEN","STATE_DONE","STATE_FAILED","STATE_EXPIRED","STATE_CANCELLED"],"type":"string"},"threshold":{"description":"How many guardians must sign it.","type":"integer"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Starts a recovery rehearsal and returns its quorum request.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/StartRecoveryRehearsal","x-served":false}},"/v1/identity/invites":{"get":{"description":"Lists the invites of the network, open and used, oldest first. Admins only. Paged:\npage_size 0 means 50, at most 200; next_page_token reads on, and total_size counts\nthem all.","operationId":"identity.IdentityService.ListInvites","parameters":[{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 50, at most 200 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"invites":{"description":"One page of invites, oldest first.","items":{"additionalProperties":false,"properties":{"created_at":{"description":"When it was made.","format":"date-time","type":"string"},"created_by_person_id":{"description":"The person who made it.","type":"string"},"expires_at":{"description":"When it stops being valid.","format":"date-time","type":"string"},"id":{"description":"The invite's id: the hex SHA-256 of its token.","type":"string"},"role":{"description":"The role the new person gets.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"},"state":{"description":"Whether it is still open, used, revoked or expired.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"},"used_by_person_id":{"description":"Who joined with it, once used.","type":"string"}},"type":"object"},"type":"array"},"next_page_token":{"description":"Pass it as page_token for the next page; empty on the last.","type":"string"},"total_size":{"description":"How many invites there are, over all pages.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the invites of the network, open and used, oldest first.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/ListInvites","x-served":false},"post":{"description":"Creates an invite for a new person with a role and returns the invite and its token.\nThe token is in this answer only; the log keeps its hash. The invite lives for ttl, 0\nmeaning 7 days. Admins only. Writes to the membership log. INVALID_ARGUMENT for a\nrole that is not admin or member or a ttl over the longest an invite may live.","operationId":"identity.IdentityService.CreateInvite","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"role":{"description":"The role the person who accepts it gets.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"},"ttl":{"description":"How long it is valid; 0 means 7 days. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"invite":{"additionalProperties":false,"description":"The invite.","properties":{"created_at":{"description":"When it was made.","format":"date-time","type":"string"},"created_by_person_id":{"description":"The person who made it.","type":"string"},"expires_at":{"description":"When it stops being valid.","format":"date-time","type":"string"},"id":{"description":"The invite's id: the hex SHA-256 of its token.","type":"string"},"role":{"description":"The role the new person gets.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"},"state":{"description":"Whether it is still open, used, revoked or expired.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"},"used_by_person_id":{"description":"Who joined with it, once used.","type":"string"}},"type":"object"},"token":{"description":"Shown once. Only its hash is kept.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Creates an invite for a new person with a role and returns the invite and its token.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/CreateInvite","x-served":false}},"/v1/identity/invites/accept":{"post":{"description":"Joins the network with an invite: creates the person and their first credential,\nstarts a session and returns both. Pass the invite's token, a nonce from\nCreateSignInChallenge that the credential signed, a display_name and the credential.\nNeeds no session. UNAUTHENTICATED when the invite is unknown, used, revoked or\nexpired; FAILED_PRECONDITION when it was used meanwhile or the key is a credential\nalready.","operationId":"identity.IdentityService.AcceptInvite","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"credential":{"additionalProperties":false,"description":"The person's first credential.","properties":{"device_key":{"additionalProperties":false,"description":"A device key.","properties":{"key_type":{"description":"The key's signature algorithm.","enum":["KEY_TYPE_UNSPECIFIED","KEY_TYPE_ED25519","KEY_TYPE_P256","KEY_TYPE_ML_DSA_65"],"type":"string"},"public_key":{"contentEncoding":"base64","description":"The raw public key: 32 bytes for Ed25519, the 65-byte uncompressed point for P-256, the encoded key for ML-DSA-65.","type":"string"},"signature":{"contentEncoding":"base64","description":"The proof of possession described above.","type":"string"},"transport_role":{"description":"What the key may do on the transport; unspecified for a key that only signs in.","enum":["TRANSPORT_ROLE_UNSPECIFIED","TRANSPORT_ROLE_MEMBER","TRANSPORT_ROLE_BOOTSTRAP","TRANSPORT_ROLE_RELAY","TRANSPORT_ROLE_CLIENT"],"type":"string"}},"type":"object"},"label":{"description":"A name for the credential, such as the device it is on.","type":"string"},"passkey":{"additionalProperties":false,"description":"A passkey.","properties":{"attestation_object":{"contentEncoding":"base64","description":"attestationObject, as the browser returns it.","type":"string"},"client_data_json":{"contentEncoding":"base64","description":"clientDataJSON, as the browser returns it.","type":"string"}},"type":"object"}},"type":"object"},"display_name":{"description":"The name the person shows to others, as the network's names policy allows.","type":"string"},"nonce":{"contentEncoding":"base64","description":"The nonce from CreateSignInChallenge that the credential signed.","type":"string"},"token":{"description":"256 random bits from crypto/rand, base64url; the log keeps only its hash.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"person":{"additionalProperties":false,"description":"The person that was created.","properties":{"created_at":{"description":"When the person was admitted.","format":"date-time","type":"string"},"display_name":{"description":"The name shown, per the network's names policy. Empty where names are not shared.","type":"string"},"grants":{"description":"The roles the person holds.","items":{"additionalProperties":false,"properties":{"id":{"description":"The hash of the grant entry; RevokeRole takes it.","type":"string"},"principal_id":{"description":"A person or a workload id.","type":"string"},"resource":{"description":"A glob over the request's resource (a repo name); empty for the whole network.","type":"string"},"role":{"description":"The role granted.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"}},"type":"object"},"type":"array"},"id":{"description":"The person's id.","type":"string"},"owner":{"description":"The CA holder.","type":"boolean"},"state":{"description":"Whether the person is in force or revoked.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"}},"type":"object"},"session":{"additionalProperties":false,"description":"The session that was started for them.","properties":{"client":{"description":"The browser or client, as its User-Agent names it.","type":"string"},"created_at":{"description":"When the session started.","format":"date-time","type":"string"},"credential_id":{"description":"The credential it was signed in with.","type":"string"},"current":{"description":"Whether this is the caller's own session.","type":"boolean"},"expires_at":{"description":"When it ends regardless of use. Empty under the personal profile.","format":"date-time","type":"string"},"id":{"description":"A public handle: the hex SHA-256 of the session secret, never the secret itself.\nRevokeSession takes it.","type":"string"},"idle_expires_at":{"description":"When it ends without use (idle limit). Under the enterprise profile it does not end\nthen: it needs a reauthentication (needs_reauth).","format":"date-time","type":"string"},"last_used_at":{"description":"When the session last made a call.","format":"date-time","type":"string"},"needs_reauth":{"description":"The idle limit passed under the enterprise profile: every call but GetSession and\nSignOut is refused until the key this session was signed in with signs in again on\nit, through VerifySignIn, which keeps this session.","type":"boolean"},"person_id":{"description":"The person who is signed in.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Joins the network with an invite: creates the person and their first credential, starts a session and returns both.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/AcceptInvite","x-served":false}},"/v1/identity/persons":{"get":{"description":"Lists the people in the network in the order they were admitted: everyone for an\nadmin, only the caller for anyone else. Revoked people are left out unless\ninclude_revoked is set. Paged: page_size 0 means 50, at most 200; next_page_token\nreads on, and total_size counts them all.","operationId":"identity.IdentityService.ListPersons","parameters":[{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 50, at most 200 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}},{"in":"query","name":"include_revoked","schema":{"description":"Also revoked people.","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"Pass it as page_token for the next page; empty on the last.","type":"string"},"persons":{"description":"One page of people, in the order they were admitted.","items":{"additionalProperties":false,"properties":{"created_at":{"description":"When the person was admitted.","format":"date-time","type":"string"},"display_name":{"description":"The name shown, per the network's names policy. Empty where names are not shared.","type":"string"},"grants":{"description":"The roles the person holds.","items":{"additionalProperties":false,"properties":{"id":{"description":"The hash of the grant entry; RevokeRole takes it.","type":"string"},"principal_id":{"description":"A person or a workload id.","type":"string"},"resource":{"description":"A glob over the request's resource (a repo name); empty for the whole network.","type":"string"},"role":{"description":"The role granted.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"}},"type":"object"},"type":"array"},"id":{"description":"The person's id.","type":"string"},"owner":{"description":"The CA holder.","type":"boolean"},"state":{"description":"Whether the person is in force or revoked.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"}},"type":"object"},"type":"array"},"total_size":{"description":"How many people there are, over all pages.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the people in the network in the order they were admitted: everyone for an admin, only the caller for anyone else.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/ListPersons","x-served":false}},"/v1/identity/persons/{id}":{"get":{"description":"Returns one person with their roles (grants), by id. Anyone may read themselves;\nanother person is for an admin, and NOT_FOUND for anyone else, so ids cannot be\nprobed.","operationId":"identity.IdentityService.GetPerson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"person":{"additionalProperties":false,"description":"The person, with their grants.","properties":{"created_at":{"description":"When the person was admitted.","format":"date-time","type":"string"},"display_name":{"description":"The name shown, per the network's names policy. Empty where names are not shared.","type":"string"},"grants":{"description":"The roles the person holds.","items":{"additionalProperties":false,"properties":{"id":{"description":"The hash of the grant entry; RevokeRole takes it.","type":"string"},"principal_id":{"description":"A person or a workload id.","type":"string"},"resource":{"description":"A glob over the request's resource (a repo name); empty for the whole network.","type":"string"},"role":{"description":"The role granted.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"}},"type":"object"},"type":"array"},"id":{"description":"The person's id.","type":"string"},"owner":{"description":"The CA holder.","type":"boolean"},"state":{"description":"Whether the person is in force or revoked.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns one person with their roles (grants), by id.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/GetPerson","x-served":false}},"/v1/identity/policy":{"get":{"description":"Returns the network-wide rules: the session profile and its timeouts, the outage\npolicy and the passkey authenticator rules. Takes no input.","operationId":"identity.IdentityService.GetNetworkPolicy","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"policy":{"additionalProperties":false,"description":"The policy in force.","properties":{"absolute_timeout":{"description":"Output only: the longest a session lasts, renewals included; 0 for no limit. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"},"authenticators":{"additionalProperties":false,"description":"Which authenticators a passkey may come from.","properties":{"aaguids":{"description":"The AAGUIDs allowed, as UUID strings; none allows any. At most 64. Without\nattestation_roots an AAGUID is what the authenticator says it is; with them it is\nthe one the attestation certificate proves.","items":{"type":"string"},"type":"array"},"attestation_roots":{"description":"The DER SubjectPublicKeyInfo of each root a passkey's packed attestation must chain\nto, at registration; a passkey that registered under none of them is refused at\nsign-in. None, attestation is not required. At most 5. Enterprise attestation is not\nserved.","items":{"contentEncoding":"base64","type":"string"},"type":"array"},"refuse_synced":{"description":"Refuses a passkey backed up to a sync service, at registration and at every sign-in.","type":"boolean"}},"type":"object"},"epoch_lifetime":{"description":"How long an epoch certificate lasts. Not served yet: a non-zero value is refused with\nUNIMPLEMENTED. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"},"idle_timeout":{"description":"Output only: the limits the profile sets. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"},"names":{"description":"Who sees people's names. Not served yet: a value other than UNSPECIFIED is refused\nwith UNIMPLEMENTED.","enum":["NAMES_UNSPECIFIED","NAMES_SHARED","NAMES_ADMINS","NAMES_LOCAL"],"type":"string"},"outage":{"description":"What a node does while it holds no lease.","enum":["OUTAGE_POLICY_UNSPECIFIED","OUTAGE_POLICY_FAIL_CLOSED","OUTAGE_POLICY_SERVE_LAST_VERIFIED"],"type":"string"},"outage_minutes":{"description":"For OUTAGE_POLICY_SERVE_LAST_VERIFIED: 1 to 60; 0 means 15.","type":"integer"},"session_profile":{"description":"How long sessions last; unspecified keeps the network's.","enum":["SESSION_PROFILE_UNSPECIFIED","SESSION_PROFILE_PERSONAL","SESSION_PROFILE_ENTERPRISE"],"type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns the network-wide rules: the session profile and its timeouts, the outage policy and the passkey authenticator rules.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/GetNetworkPolicy","x-served":false},"post":{"description":"Changes the network-wide rules and returns the policy now in force. A field left\nUNSPECIFIED or zero keeps its value. Admins only. Writes to the membership log. names\nand epoch_lifetime are not served yet: setting them is UNIMPLEMENTED.\nFAILED_PRECONDITION when the change would refuse the caller's own passkey.","operationId":"identity.IdentityService.SetNetworkPolicy","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"policy":{"additionalProperties":false,"description":"The policy to sign into the log.","properties":{"absolute_timeout":{"description":"Output only: the longest a session lasts, renewals included; 0 for no limit. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"},"authenticators":{"additionalProperties":false,"description":"Which authenticators a passkey may come from.","properties":{"aaguids":{"description":"The AAGUIDs allowed, as UUID strings; none allows any. At most 64. Without\nattestation_roots an AAGUID is what the authenticator says it is; with them it is\nthe one the attestation certificate proves.","items":{"type":"string"},"type":"array"},"attestation_roots":{"description":"The DER SubjectPublicKeyInfo of each root a passkey's packed attestation must chain\nto, at registration; a passkey that registered under none of them is refused at\nsign-in. None, attestation is not required. At most 5. Enterprise attestation is not\nserved.","items":{"contentEncoding":"base64","type":"string"},"type":"array"},"refuse_synced":{"description":"Refuses a passkey backed up to a sync service, at registration and at every sign-in.","type":"boolean"}},"type":"object"},"epoch_lifetime":{"description":"How long an epoch certificate lasts. Not served yet: a non-zero value is refused with\nUNIMPLEMENTED. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"},"idle_timeout":{"description":"Output only: the limits the profile sets. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"},"names":{"description":"Who sees people's names. Not served yet: a value other than UNSPECIFIED is refused\nwith UNIMPLEMENTED.","enum":["NAMES_UNSPECIFIED","NAMES_SHARED","NAMES_ADMINS","NAMES_LOCAL"],"type":"string"},"outage":{"description":"What a node does while it holds no lease.","enum":["OUTAGE_POLICY_UNSPECIFIED","OUTAGE_POLICY_FAIL_CLOSED","OUTAGE_POLICY_SERVE_LAST_VERIFIED"],"type":"string"},"outage_minutes":{"description":"For OUTAGE_POLICY_SERVE_LAST_VERIFIED: 1 to 60; 0 means 15.","type":"integer"},"session_profile":{"description":"How long sessions last; unspecified keeps the network's.","enum":["SESSION_PROFILE_UNSPECIFIED","SESSION_PROFILE_PERSONAL","SESSION_PROFILE_ENTERPRISE"],"type":"string"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"policy":{"additionalProperties":false,"description":"The policy now in force.","properties":{"absolute_timeout":{"description":"Output only: the longest a session lasts, renewals included; 0 for no limit. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"},"authenticators":{"additionalProperties":false,"description":"Which authenticators a passkey may come from.","properties":{"aaguids":{"description":"The AAGUIDs allowed, as UUID strings; none allows any. At most 64. Without\nattestation_roots an AAGUID is what the authenticator says it is; with them it is\nthe one the attestation certificate proves.","items":{"type":"string"},"type":"array"},"attestation_roots":{"description":"The DER SubjectPublicKeyInfo of each root a passkey's packed attestation must chain\nto, at registration; a passkey that registered under none of them is refused at\nsign-in. None, attestation is not required. At most 5. Enterprise attestation is not\nserved.","items":{"contentEncoding":"base64","type":"string"},"type":"array"},"refuse_synced":{"description":"Refuses a passkey backed up to a sync service, at registration and at every sign-in.","type":"boolean"}},"type":"object"},"epoch_lifetime":{"description":"How long an epoch certificate lasts. Not served yet: a non-zero value is refused with\nUNIMPLEMENTED. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"},"idle_timeout":{"description":"Output only: the limits the profile sets. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"},"names":{"description":"Who sees people's names. Not served yet: a value other than UNSPECIFIED is refused\nwith UNIMPLEMENTED.","enum":["NAMES_UNSPECIFIED","NAMES_SHARED","NAMES_ADMINS","NAMES_LOCAL"],"type":"string"},"outage":{"description":"What a node does while it holds no lease.","enum":["OUTAGE_POLICY_UNSPECIFIED","OUTAGE_POLICY_FAIL_CLOSED","OUTAGE_POLICY_SERVE_LAST_VERIFIED"],"type":"string"},"outage_minutes":{"description":"For OUTAGE_POLICY_SERVE_LAST_VERIFIED: 1 to 60; 0 means 15.","type":"integer"},"session_profile":{"description":"How long sessions last; unspecified keeps the network's.","enum":["SESSION_PROFILE_UNSPECIFIED","SESSION_PROFILE_PERSONAL","SESSION_PROFILE_ENTERPRISE"],"type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Changes the network-wide rules and returns the policy now in force.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/SetNetworkPolicy","x-served":false}},"/v1/identity/quorum/{id}/cancel":{"post":{"description":"Cancels an open quorum request, which frees its slot at once, and returns the request\nin state CANCELLED. Admins only. FAILED_PRECONDITION when no open request has that\nid.","operationId":"identity.IdentityService.CancelQuorumRequest","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"description":"The quorum request's id.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"request":{"additionalProperties":false,"description":"The request, in state CANCELLED.","properties":{"error":{"description":"Why it failed.","type":"string"},"expires_at":{"description":"When an open request stops accepting signatures.","format":"date-time","type":"string"},"id":{"description":"The request's id: 64 hex digits.","type":"string"},"kind":{"description":"Whether it changes the guardians or rehearses a recovery.","enum":["KIND_UNSPECIFIED","KIND_GUARDIAN_CHANGE","KIND_REHEARSAL"],"type":"string"},"payload":{"contentEncoding":"base64","description":"The exact tagged bytes each guardian signs. A guardian checks them and builds the\ndigest itself; it never signs a digest it was handed.","type":"string"},"signers":{"description":"Fingerprints of the guardians who have signed.","items":{"type":"string"},"type":"array"},"state":{"description":"Where the request is: open, done, failed, expired or cancelled.","enum":["STATE_UNSPECIFIED","STATE_OPEN","STATE_DONE","STATE_FAILED","STATE_EXPIRED","STATE_CANCELLED"],"type":"string"},"threshold":{"description":"How many guardians must sign it.","type":"integer"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Cancels an open quorum request, which frees its slot at once, and returns the request in state CANCELLED.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/CancelQuorumRequest","x-served":false}},"/v1/identity/quorum/{id}/sign":{"post":{"description":"Adds one guardian's signature to an open quorum request (a guardian change or a\nrehearsal) and returns the request. Pass the request's id, the guardian's fingerprint\nand its signature over the request's payload. The signature is the authority, so any\nsigned-in caller may hand it in. FAILED_PRECONDITION when no open request has that\nid.","operationId":"identity.IdentityService.SignQuorumRequest","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"fingerprint":{"description":"The signing guardian's fingerprint.","type":"string"},"id":{"description":"The quorum request's id.","type":"string"},"signature":{"contentEncoding":"base64","description":"The guardian's signature over the request's payload.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"request":{"additionalProperties":false,"description":"The request with the signature added.","properties":{"error":{"description":"Why it failed.","type":"string"},"expires_at":{"description":"When an open request stops accepting signatures.","format":"date-time","type":"string"},"id":{"description":"The request's id: 64 hex digits.","type":"string"},"kind":{"description":"Whether it changes the guardians or rehearses a recovery.","enum":["KIND_UNSPECIFIED","KIND_GUARDIAN_CHANGE","KIND_REHEARSAL"],"type":"string"},"payload":{"contentEncoding":"base64","description":"The exact tagged bytes each guardian signs. A guardian checks them and builds the\ndigest itself; it never signs a digest it was handed.","type":"string"},"signers":{"description":"Fingerprints of the guardians who have signed.","items":{"type":"string"},"type":"array"},"state":{"description":"Where the request is: open, done, failed, expired or cancelled.","enum":["STATE_UNSPECIFIED","STATE_OPEN","STATE_DONE","STATE_FAILED","STATE_EXPIRED","STATE_CANCELLED"],"type":"string"},"threshold":{"description":"How many guardians must sign it.","type":"integer"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Adds one guardian's signature to an open quorum request (a guardian change or a rehearsal) and returns the request.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/SignQuorumRequest","x-served":false}},"/v1/identity/revoke":{"post":{"description":"Revokes a person, a credential, a workload or an invite, whichever target names, and\nreturns its position in the log. Open sessions and streams of what is revoked end at\nonce on every node the authority reaches. Pass a short reason with no names or\npersonal data: it is kept in the log for good. Admins only. FAILED_PRECONDITION when\nit would revoke the last admin or an invite that is used already.","operationId":"identity.IdentityService.Revoke","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"credential_id":{"description":"One credential, and the sessions signed in with it.","type":"string"},"invite_id":{"description":"An invite not yet accepted.","type":"string"},"person_id":{"description":"A person, with every credential and session of theirs.","type":"string"},"reason":{"description":"Why, in a few words. Kept in the log and the audit trail, so it must not carry\nnames or personal data.","type":"string"},"workload_id":{"description":"A workload.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"seq":{"description":"The log position of the revoke entry.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Revokes a person, a credential, a workload or an invite, whichever target names, and returns its position in the log.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/Revoke","x-served":false}},"/v1/identity/roles/grant":{"post":{"description":"Grants a role (admin or member) to a person or a workload and returns the grant.\nresource is a glob over a repository name, and empty means the whole network. Admins\nonly. Writes to the membership log.","operationId":"identity.IdentityService.GrantRole","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"principal_id":{"description":"A person or a workload id.","type":"string"},"resource":{"description":"A glob over the request's resource (a repo name); empty for the whole network.","type":"string"},"role":{"description":"The role to grant.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"grant":{"additionalProperties":false,"description":"The grant that was made.","properties":{"id":{"description":"The hash of the grant entry; RevokeRole takes it.","type":"string"},"principal_id":{"description":"A person or a workload id.","type":"string"},"resource":{"description":"A glob over the request's resource (a repo name); empty for the whole network.","type":"string"},"role":{"description":"The role granted.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Grants a role (admin or member) to a person or a workload and returns the grant.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/GrantRole","x-served":false}},"/v1/identity/roles/revoke":{"post":{"description":"Takes back a grant by its id and returns nothing. Admins only. NOT_FOUND for an\nunknown grant; FAILED_PRECONDITION when it would leave the network with no admin.","operationId":"identity.IdentityService.RevokeRole","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"grant_id":{"description":"The grant's id.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Takes back a grant by its id and returns nothing.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/RevokeRole","x-served":false}},"/v1/identity/session":{"get":{"description":"Returns the caller's session and person. UNAUTHENTICATED when there is none. Works\nfor a session that needs reauthentication, so a client can read needs_reauth.","operationId":"identity.IdentityService.GetSession","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"person":{"additionalProperties":false,"description":"The person it belongs to.","properties":{"created_at":{"description":"When the person was admitted.","format":"date-time","type":"string"},"display_name":{"description":"The name shown, per the network's names policy. Empty where names are not shared.","type":"string"},"grants":{"description":"The roles the person holds.","items":{"additionalProperties":false,"properties":{"id":{"description":"The hash of the grant entry; RevokeRole takes it.","type":"string"},"principal_id":{"description":"A person or a workload id.","type":"string"},"resource":{"description":"A glob over the request's resource (a repo name); empty for the whole network.","type":"string"},"role":{"description":"The role granted.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"}},"type":"object"},"type":"array"},"id":{"description":"The person's id.","type":"string"},"owner":{"description":"The CA holder.","type":"boolean"},"state":{"description":"Whether the person is in force or revoked.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"}},"type":"object"},"session":{"additionalProperties":false,"description":"The caller's session.","properties":{"client":{"description":"The browser or client, as its User-Agent names it.","type":"string"},"created_at":{"description":"When the session started.","format":"date-time","type":"string"},"credential_id":{"description":"The credential it was signed in with.","type":"string"},"current":{"description":"Whether this is the caller's own session.","type":"boolean"},"expires_at":{"description":"When it ends regardless of use. Empty under the personal profile.","format":"date-time","type":"string"},"id":{"description":"A public handle: the hex SHA-256 of the session secret, never the secret itself.\nRevokeSession takes it.","type":"string"},"idle_expires_at":{"description":"When it ends without use (idle limit). Under the enterprise profile it does not end\nthen: it needs a reauthentication (needs_reauth).","format":"date-time","type":"string"},"last_used_at":{"description":"When the session last made a call.","format":"date-time","type":"string"},"needs_reauth":{"description":"The idle limit passed under the enterprise profile: every call but GetSession and\nSignOut is refused until the key this session was signed in with signs in again on\nit, through VerifySignIn, which keeps this session.","type":"boolean"},"person_id":{"description":"The person who is signed in.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns the caller's session and person.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/GetSession","x-served":false}},"/v1/identity/sessions":{"get":{"description":"Lists the sessions on this node, newest first: the caller's own, or, for an admin who\nnames person_id, another person's. Sessions are kept on this node only, not in the\nnetwork's log. Paged: page_size 0 means 50, at most 200; next_page_token reads on,\nand total_size counts them all.","operationId":"identity.IdentityService.ListSessions","parameters":[{"in":"query","name":"person_id","schema":{"description":"Whose sessions; empty for the caller's own. Other people's need the admin role.","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 50, at most 200 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"Pass it as page_token for the next page; empty on the last.","type":"string"},"sessions":{"description":"One page of sessions, newest first.","items":{"additionalProperties":false,"properties":{"client":{"description":"The browser or client, as its User-Agent names it.","type":"string"},"created_at":{"description":"When the session started.","format":"date-time","type":"string"},"credential_id":{"description":"The credential it was signed in with.","type":"string"},"current":{"description":"Whether this is the caller's own session.","type":"boolean"},"expires_at":{"description":"When it ends regardless of use. Empty under the personal profile.","format":"date-time","type":"string"},"id":{"description":"A public handle: the hex SHA-256 of the session secret, never the secret itself.\nRevokeSession takes it.","type":"string"},"idle_expires_at":{"description":"When it ends without use (idle limit). Under the enterprise profile it does not end\nthen: it needs a reauthentication (needs_reauth).","format":"date-time","type":"string"},"last_used_at":{"description":"When the session last made a call.","format":"date-time","type":"string"},"needs_reauth":{"description":"The idle limit passed under the enterprise profile: every call but GetSession and\nSignOut is refused until the key this session was signed in with signs in again on\nit, through VerifySignIn, which keeps this session.","type":"boolean"},"person_id":{"description":"The person who is signed in.","type":"string"}},"type":"object"},"type":"array"},"total_size":{"description":"How many sessions there are, over all pages.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the sessions on this node, newest first: the caller's own, or, for an admin who names person_id, another person's.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/ListSessions","x-served":false}},"/v1/identity/sessions/revoke":{"post":{"description":"Ends one session on this node by its id and returns nothing. A member may end only\ntheir own sessions; an admin may end any. Needs no lease, since sessions are local.\nErrors: INVALID_ARGUMENT for an id that is not a session id; NOT_FOUND when there is\nno such session.","operationId":"identity.IdentityService.RevokeSession","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"description":"The session's id (its public handle).","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Ends one session on this node by its id and returns nothing.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/RevokeSession","x-served":false}},"/v1/identity/signin":{"post":{"description":"Checks a signed challenge (a device key signature, a passkey assertion or the local\none-time code) and starts a session, returning the session and the person. The\nsession secret is set as a cookie, never in the answer. With a session cookie present\nit renews that session instead: the one tap the enterprise profile asks for after an\nhour idle. Needs no session. The one-time code is refused whenever allow_remote is\ntrue, and over a remote connection.","operationId":"identity.IdentityService.VerifySignIn","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"key":{"additionalProperties":false,"description":"With a session cookie present this must be a credential of that session's own\nperson (reauthentication); any other is refused. A session idle past the\nenterprise limit takes only the very key it was signed in with.","properties":{"credential_id":{"description":"The device key, in hex, as the log holds it.","type":"string"},"signature":{"contentEncoding":"base64","description":"The key's signature over the sign-in text.","type":"string"}},"type":"object"},"nonce":{"contentEncoding":"base64","description":"The nonce from CreateSignInChallenge.","type":"string"},"one_time_code":{"description":"The code `ahto ui` prints after # in the address. It only attaches the owner\nidentity to a caller the gateway already sees on loopback; it never decides\nwhether a caller is on loopback. Not accepted for reauthentication, and refused\nwhenever allow_remote is true.","type":"string"},"passkey":{"additionalProperties":false,"description":"The same rule applies to a passkey. WebAuthn user verification is required.","properties":{"authenticator_data":{"contentEncoding":"base64","description":"authenticatorData, as the browser returns it.","type":"string"},"client_data_json":{"contentEncoding":"base64","description":"clientDataJSON, as the browser returns it.","type":"string"},"credential_id":{"description":"The passkey's credential id, base64url without padding.","type":"string"},"signature":{"contentEncoding":"base64","description":"The assertion's signature, as the browser returns it.","type":"string"},"user_handle":{"contentEncoding":"base64","description":"userHandle, if the browser returns one; it must be the passkey's person.","type":"string"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"person":{"additionalProperties":false,"description":"The person it belongs to.","properties":{"created_at":{"description":"When the person was admitted.","format":"date-time","type":"string"},"display_name":{"description":"The name shown, per the network's names policy. Empty where names are not shared.","type":"string"},"grants":{"description":"The roles the person holds.","items":{"additionalProperties":false,"properties":{"id":{"description":"The hash of the grant entry; RevokeRole takes it.","type":"string"},"principal_id":{"description":"A person or a workload id.","type":"string"},"resource":{"description":"A glob over the request's resource (a repo name); empty for the whole network.","type":"string"},"role":{"description":"The role granted.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"}},"type":"object"},"type":"array"},"id":{"description":"The person's id.","type":"string"},"owner":{"description":"The CA holder.","type":"boolean"},"state":{"description":"Whether the person is in force or revoked.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"}},"type":"object"},"session":{"additionalProperties":false,"description":"The session that was started or renewed.","properties":{"client":{"description":"The browser or client, as its User-Agent names it.","type":"string"},"created_at":{"description":"When the session started.","format":"date-time","type":"string"},"credential_id":{"description":"The credential it was signed in with.","type":"string"},"current":{"description":"Whether this is the caller's own session.","type":"boolean"},"expires_at":{"description":"When it ends regardless of use. Empty under the personal profile.","format":"date-time","type":"string"},"id":{"description":"A public handle: the hex SHA-256 of the session secret, never the secret itself.\nRevokeSession takes it.","type":"string"},"idle_expires_at":{"description":"When it ends without use (idle limit). Under the enterprise profile it does not end\nthen: it needs a reauthentication (needs_reauth).","format":"date-time","type":"string"},"last_used_at":{"description":"When the session last made a call.","format":"date-time","type":"string"},"needs_reauth":{"description":"The idle limit passed under the enterprise profile: every call but GetSession and\nSignOut is refused until the key this session was signed in with signs in again on\nit, through VerifySignIn, which keeps this session.","type":"boolean"},"person_id":{"description":"The person who is signed in.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Checks a signed challenge (a device key signature, a passkey assertion or the local one-time code) and starts a session, returning the session and the person.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/VerifySignIn","x-served":false}},"/v1/identity/signin/challenge":{"post":{"description":"Creates a sign-in challenge and returns its one-time nonce, the network fingerprint\nand the relying party id. The nonce is valid for 5 minutes and bound to this network\nand the caller's origin. The device key or passkey signs it, and VerifySignIn checks\nthe signature. Needs no session and takes no input.","operationId":"identity.IdentityService.CreateSignInChallenge","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"attestation_required":{"description":"The network requires an attested passkey: create one with attestation \"direct\", as an\nattestation of \"none\" is refused.","type":"boolean"},"expires_at":{"description":"When the nonce stops being valid, 5 minutes after it was made.","format":"date-time","type":"string"},"network_fingerprint":{"description":"The network's fingerprint, to show and to sign.","type":"string"},"nonce":{"contentEncoding":"base64","description":"What the device signs, with the network fingerprint and origin, under\n\"ahto/signin/v1\". For a passkey it is the WebAuthn challenge.","type":"string"},"rp_id":{"description":"The WebAuthn relying party ID.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Creates a sign-in challenge and returns its one-time nonce, the network fingerprint and the relying party id.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/CreateSignInChallenge","x-served":false}},"/v1/identity/signin/code":{"post":{"description":"Returns the one-time code that `ahto ui` prints. The node's own key signs a challenge\nfrom CreateSignInChallenge and gets a code that signs one browser in as the node\nowner through VerifySignIn within 5 minutes. A new code replaces the last. Needs no\nsession, but works over loopback only: it is refused from any other address, and\nwhenever allow_remote is true.","operationId":"identity.IdentityService.CreateOneTimeCode","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"key":{"additionalProperties":false,"description":"The node's own key over the sign-in text, as VerifySignIn takes it.","properties":{"credential_id":{"description":"The device key, in hex, as the log holds it.","type":"string"},"signature":{"contentEncoding":"base64","description":"The key's signature over the sign-in text.","type":"string"}},"type":"object"},"nonce":{"contentEncoding":"base64","description":"The nonce from CreateSignInChallenge.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"code":{"description":"Shown once and never logged.","type":"string"},"expires_at":{"description":"When the code stops working, 5 minutes after it was made.","format":"date-time","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns the one-time code that `ahto ui` prints.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/CreateOneTimeCode","x-served":false}},"/v1/identity/signout":{"post":{"description":"Ends the caller's own session and clears the session cookie. Takes no input and\nreturns nothing. Works for a session that needs reauthentication.","operationId":"identity.IdentityService.SignOut","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Ends the caller's own session and clears the session cookie.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/SignOut","x-served":false}},"/v1/identity/workloads":{"get":{"description":"Lists the workloads, that is the service principals such as build nodes. A workload\nis never a person. Paged: page_size 0 means 50, at most 200; next_page_token reads\non.","operationId":"identity.IdentityService.ListWorkloads","parameters":[{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 50, at most 200 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"Pass it as page_token for the next page; empty on the last.","type":"string"},"total_size":{"description":"How many workloads there are, over all pages.","type":"integer"},"workloads":{"description":"One page of workloads.","items":{"additionalProperties":false,"properties":{"created_at":{"description":"When it was admitted.","format":"date-time","type":"string"},"grants":{"description":"The roles it holds.","items":{"additionalProperties":false,"properties":{"id":{"description":"The hash of the grant entry; RevokeRole takes it.","type":"string"},"principal_id":{"description":"A person or a workload id.","type":"string"},"resource":{"description":"A glob over the request's resource (a repo name); empty for the whole network.","type":"string"},"role":{"description":"The role granted.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"}},"type":"object"},"type":"array"},"id":{"description":"The workload's id.","type":"string"},"name":{"description":"The name it was admitted under.","type":"string"},"owner_person_id":{"description":"The person who admitted it.","type":"string"},"peer_id":{"description":"The workload's libp2p peer id.","type":"string"},"state":{"description":"Whether the workload is in force or revoked.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"},"transport_role":{"description":"What it may do on the transport.","enum":["TRANSPORT_ROLE_UNSPECIFIED","TRANSPORT_ROLE_MEMBER","TRANSPORT_ROLE_BOOTSTRAP","TRANSPORT_ROLE_RELAY","TRANSPORT_ROLE_CLIENT"],"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the workloads, that is the service principals such as build nodes.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/ListWorkloads","x-served":false},"post":{"description":"Admits a service principal by its peer id and returns it. It gets no role until\nGrantRole gives it one (default deny). Admins only. Writes to the membership log.","operationId":"identity.IdentityService.AdmitWorkload","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"description":"A name for the workload.","type":"string"},"peer_id":{"description":"The workload's libp2p peer id.","type":"string"},"transport_role":{"description":"What the workload may do on the transport.","enum":["TRANSPORT_ROLE_UNSPECIFIED","TRANSPORT_ROLE_MEMBER","TRANSPORT_ROLE_BOOTSTRAP","TRANSPORT_ROLE_RELAY","TRANSPORT_ROLE_CLIENT"],"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"workload":{"additionalProperties":false,"description":"The workload that was admitted.","properties":{"created_at":{"description":"When it was admitted.","format":"date-time","type":"string"},"grants":{"description":"The roles it holds.","items":{"additionalProperties":false,"properties":{"id":{"description":"The hash of the grant entry; RevokeRole takes it.","type":"string"},"principal_id":{"description":"A person or a workload id.","type":"string"},"resource":{"description":"A glob over the request's resource (a repo name); empty for the whole network.","type":"string"},"role":{"description":"The role granted.","enum":["ROLE_UNSPECIFIED","ROLE_ADMIN","ROLE_MEMBER"],"type":"string"}},"type":"object"},"type":"array"},"id":{"description":"The workload's id.","type":"string"},"name":{"description":"The name it was admitted under.","type":"string"},"owner_person_id":{"description":"The person who admitted it.","type":"string"},"peer_id":{"description":"The workload's libp2p peer id.","type":"string"},"state":{"description":"Whether the workload is in force or revoked.","enum":["STATE_UNSPECIFIED","STATE_ACTIVE","STATE_REVOKED","STATE_EXPIRED"],"type":"string"},"transport_role":{"description":"What it may do on the transport.","enum":["TRANSPORT_ROLE_UNSPECIFIED","TRANSPORT_ROLE_MEMBER","TRANSPORT_ROLE_BOOTSTRAP","TRANSPORT_ROLE_RELAY","TRANSPORT_ROLE_CLIENT"],"type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Admits a service principal by its peer id and returns it.","tags":["identity"],"x-reason":"identity is off here","x-rpc":"ahto.identity.v1.IdentityService/AdmitWorkload","x-served":false}},"/v1/security/advisories":{"get":{"description":"Searches the advisories and returns one page of matches with facet counts for the\nwhole result. Pass words, an ecosystem, a package, a minimum severity, KEV or EPSS\nfilters, an order, and page_size and page_token (default 50, at most 200). Withdrawn\nadvisories are left out unless asked for. Fails with INVALID_ARGUMENT for a bad page\nsize or token, and with UNAVAILABLE while the lake is not open.","operationId":"security.SecurityService.SearchAdvisories","parameters":[{"in":"query","name":"query","schema":{"description":"Words that must all appear in the id, aliases, summary or package names, ignoring\ncase. An id or alias such as \"CVE-2024-1086\" or \"GO-2025-4272\" matches it exactly.","type":"string"}},{"in":"query","name":"ecosystem","schema":{"description":"Only advisories of this ecosystem, such as \"Go\", \"crates.io\" or \"Linux\".","type":"string"}},{"in":"query","name":"package","schema":{"description":"Only advisories that name this package exactly.","type":"string"}},{"in":"query","name":"severity_min","schema":{"description":"Only this severity and above; unknown is below low.","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"}},{"in":"query","name":"kev_only","schema":{"description":"Only advisories whose CVE is in CISA's KEV catalog.","type":"boolean"}},{"in":"query","name":"include_withdrawn","schema":{"description":"Also withdrawn advisories.","type":"boolean"}},{"in":"query","name":"order","schema":{"description":"The order of the answer: exact id or alias matches first, then the newest, when unset.","enum":["ORDER_UNSPECIFIED","ORDER_MODIFIED","ORDER_SCORE","ORDER_EPSS","ORDER_PUBLISHED"],"type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 50, at most 200 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}},{"in":"query","name":"epss_min","schema":{"description":"Only advisories with an EPSS score at least this, 0 to 1.","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"advisories":{"description":"This page of the matches.","items":{"additionalProperties":false,"properties":{"aliases":{"description":"Other ids of the same issue (CVE, GHSA).","items":{"type":"string"},"type":"array"},"cve":{"description":"The CVE id among the id and aliases; empty when there is none.","type":"string"},"cwes":{"description":"Weakness classes (CWE) it is filed under.","items":{"type":"string"},"type":"array"},"ecosystems":{"description":"The ecosystems of the packages it affects.","items":{"type":"string"},"type":"array"},"epss":{"description":"The chance its CVE is exploited in the next 30 days, 0 to 1; absent when unscored.","type":"number"},"epss_percentile":{"description":"Its EPSS rank among all scored CVEs, 0 to 1; absent when unscored.","type":"number"},"feed":{"description":"The feed it came from, such as \"osv:Go\".","type":"string"},"id":{"description":"The OSV id, such as \"GO-2025-4272\", \"RUSTSEC-2024-0001\" or \"CVE-2024-1086\".","type":"string"},"kev":{"description":"Whether its CVE is in CISA's KEV catalog.","type":"boolean"},"modified":{"description":"When the feed last changed it.","format":"date-time","type":"string"},"packages":{"description":"The packages it affects.","items":{"type":"string"},"type":"array"},"published":{"description":"When the feed first published it.","format":"date-time","type":"string"},"score":{"description":"The CVSS base score, 0 to 10; absent when unknown.","type":"number"},"severity":{"description":"The rating: the feed's own, else from its CVSS v3 score.","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"},"summary":{"description":"A one-line description.","type":"string"},"vector":{"description":"The CVSS vector the feed gives; empty when none.","type":"string"},"withdrawn":{"description":"Set when the advisory was withdrawn.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"cwes":{"description":"The ten weaknesses (CWE ids) the results name most, the most first.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"ecosystems":{"description":"Results per ecosystem and per severity (critical, high, medium, low, none, unknown;\nevery key present), with every filter applied; and how many are in KEV.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"epss_buckets":{"description":"Results per EPSS range of their CVE: 0-0.01, 0.01-0.1, 0.1-0.5 and 0.5-1 (the last\nclosed), every key present, in that order; results without an EPSS are not counted.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"kev":{"description":"Matches whose CVE is in KEV, over every page.","type":"integer"},"kev_by_month":{"description":"Results per month (value YYYY-MM) their CVE was added to CISA KEV, the same months.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"manifest_seq":{"description":"The lake manifest the answer was read from.","type":"integer"},"next_page_token":{"description":"Pass it as page_token for the next page; empty on the last.","type":"string"},"published_by_month":{"description":"Results per month (value YYYY-MM) of publication, over the 36 months up to the\ncurrent one in UTC, oldest first, every month present, with every filter applied.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"severities":{"description":"Matches per severity, over every page.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"total":{"description":"All results, over every page.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Searches the advisories and returns one page of matches with facet counts for the whole result.","tags":["security"],"x-rpc":"ahto.security.v1.SecurityService/SearchAdvisories"}},"/v1/security/advisories/{id}":{"get":{"description":"Gets one advisory by its id or any alias, with its affected ranges, references, the\nKEV entry and EPSS score of its CVE, and the lake repositories that hold its commits.\nFails with INVALID_ARGUMENT when id is empty and with NOT_FOUND when no advisory has\nthat id or alias.","operationId":"security.SecurityService.GetAdvisory","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"advisory":{"additionalProperties":false,"description":"The advisory as a search lists it.","properties":{"aliases":{"description":"Other ids of the same issue (CVE, GHSA).","items":{"type":"string"},"type":"array"},"cve":{"description":"The CVE id among the id and aliases; empty when there is none.","type":"string"},"cwes":{"description":"Weakness classes (CWE) it is filed under.","items":{"type":"string"},"type":"array"},"ecosystems":{"description":"The ecosystems of the packages it affects.","items":{"type":"string"},"type":"array"},"epss":{"description":"The chance its CVE is exploited in the next 30 days, 0 to 1; absent when unscored.","type":"number"},"epss_percentile":{"description":"Its EPSS rank among all scored CVEs, 0 to 1; absent when unscored.","type":"number"},"feed":{"description":"The feed it came from, such as \"osv:Go\".","type":"string"},"id":{"description":"The OSV id, such as \"GO-2025-4272\", \"RUSTSEC-2024-0001\" or \"CVE-2024-1086\".","type":"string"},"kev":{"description":"Whether its CVE is in CISA's KEV catalog.","type":"boolean"},"modified":{"description":"When the feed last changed it.","format":"date-time","type":"string"},"packages":{"description":"The packages it affects.","items":{"type":"string"},"type":"array"},"published":{"description":"When the feed first published it.","format":"date-time","type":"string"},"score":{"description":"The CVSS base score, 0 to 10; absent when unknown.","type":"number"},"severity":{"description":"The rating: the feed's own, else from its CVSS v3 score.","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"},"summary":{"description":"A one-line description.","type":"string"},"vector":{"description":"The CVSS vector the feed gives; empty when none.","type":"string"},"withdrawn":{"description":"Set when the advisory was withdrawn.","format":"date-time","type":"string"}},"type":"object"},"affected":{"description":"The packages and ranges it affects.","items":{"additionalProperties":false,"properties":{"ecosystem":{"description":"Empty for a bare GIT range.","type":"string"},"package":{"description":"The package name.","type":"string"},"purl":{"description":"The package URL, when the advisory gives one.","type":"string"},"ranges":{"description":"The affected ranges.","items":{"additionalProperties":false,"properties":{"events":{"description":"The events that open and close the range, in order.","items":{"additionalProperties":false,"properties":{"kind":{"description":"introduced, fixed, last_affected or limit.","type":"string"},"value":{"description":"A version, a commit id, or \"0\" for the beginning of history.","type":"string"}},"type":"object"},"type":"array"},"repo":{"description":"The repository URL of a GIT range.","type":"string"},"type":{"description":"GIT, SEMVER or ECOSYSTEM.","type":"string"}},"type":"object"},"type":"array"},"versions":{"description":"Affected versions listed by name.","items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"},"commits":{"description":"Commits it names that a lake repository holds.","items":{"additionalProperties":false,"properties":{"commit":{"description":"The full commit id.","type":"string"},"repo":{"description":"The lake repository that holds the commit.","type":"string"},"role":{"description":"fix (a reference), introduced, fixed or last_affected (a GIT range).","type":"string"}},"type":"object"},"type":"array"},"details":{"description":"The long description, Markdown.","type":"string"},"kev_entry":{"additionalProperties":false,"description":"Set when its CVE is in KEV.","properties":{"date_added":{"description":"YYYY-MM-DD.","type":"string"},"description":{"description":"What the flaw is.","type":"string"},"due_date":{"description":"YYYY-MM-DD.","type":"string"},"name":{"description":"The vulnerability's name.","type":"string"},"product":{"description":"The affected product.","type":"string"},"ransomware":{"description":"Known when it is used in ransomware campaigns, else Unknown.","type":"string"},"required_action":{"description":"What CISA says to do.","type":"string"},"vendor":{"description":"The vendor of the product.","type":"string"}},"type":"object"},"references":{"description":"Links it gives.","items":{"additionalProperties":false,"properties":{"commit":{"description":"The commit id a fix link names; empty when none.","type":"string"},"type":{"description":"ADVISORY, ARTICLE, FIX, PACKAGE, REPORT, WEB and the other OSV types.","type":"string"},"url":{"description":"The link.","type":"string"}},"type":"object"},"type":"array"},"related":{"description":"Ids of related issues.","items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Gets one advisory by its id or any alias, with its affected ranges, references, the KEV entry and EPSS score of its CVE, and the lake repositories that hold its commits.","tags":["security"],"x-rpc":"ahto.security.v1.SecurityService/GetAdvisory"}},"/v1/security/dependencies":{"get":{"description":"Lists the packages a repository's manifests and lockfiles pin at a commit, one entry\nper ecosystem, name and version. Filter by ecosystem, words in the name, direct only,\nor vulnerable only. Paged with page_size (default 200, at most 1000) and page_token.\nFails with INVALID_ARGUMENT for a bad argument and with NOT_FOUND when the repository\nor commit is not in the lake.","operationId":"security.SecurityService.ListDependencies","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository, as the source service names it.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A full commit id or a ref; empty means the default branch head.","type":"string"}},{"in":"query","name":"ecosystem","schema":{"description":"Only this ecosystem, such as \"Go\" or \"npm\".","type":"string"}},{"in":"query","name":"query","schema":{"description":"Words that must all appear in the package name, ignoring case.","type":"string"}},{"in":"query","name":"direct_only","schema":{"description":"Only the dependencies the manifest names itself, not those they pull in.","type":"boolean"}},{"in":"query","name":"vulnerable_only","schema":{"description":"Only packages with a finding.","type":"boolean"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 200, at most 1000 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"commit":{"description":"The full commit id read.","type":"string"},"dependencies":{"description":"This page of the dependencies.","items":{"additionalProperties":false,"properties":{"direct":{"description":"Whether a manifest names it itself.","type":"boolean"},"ecosystem":{"description":"The package's ecosystem, such as Go or npm.","type":"string"},"findings":{"description":"Its findings.","type":"integer"},"kev":{"description":"Whether one of them is known exploited.","type":"boolean"},"max_severity":{"description":"The worst of them; unspecified when none.","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"},"name":{"description":"The package name.","type":"string"},"paths":{"description":"The manifests that pin it.","items":{"type":"string"},"type":"array"},"version":{"description":"The pinned version.","type":"string"}},"type":"object"},"type":"array"},"ecosystems":{"description":"Per ecosystem, with the other filters applied.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"next_page_token":{"description":"Pass it as page_token for the next page; empty on the last page.","type":"string"},"repo":{"description":"The repository, as the source service names it.","type":"string"},"total":{"description":"All that match, over every page.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the packages a repository's manifests and lockfiles pin at a commit, one entry per ecosystem, name and version.","tags":["security"],"x-rpc":"ahto.security.v1.SecurityService/ListDependencies"}},"/v1/security/findings":{"get":{"description":"Lists what is wrong in a repository at a commit, riskiest first: a dependency pinned\nat an affected version (vulnerable_dependency), the commit inside an advisory's GIT\nrange (vulnerable_commit), and, when asked for by kinds, secrets, dangerous calls and\nsensitive files found in the files. Filters, order and paging (page_size default 100,\nat most 500) are in the request. Fails with INVALID_ARGUMENT for a bad argument and\nwith NOT_FOUND when the repository or commit is not in the lake.","operationId":"security.SecurityService.ListFindings","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository, as the source service names it.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A full commit id or a ref; empty means the default branch head.","type":"string"}},{"in":"query","name":"severity_min","schema":{"description":"Only this severity and above.","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"}},{"in":"query","name":"kev_only","schema":{"description":"Only findings whose CVE is in CISA's KEV catalog: known to be exploited.","type":"boolean"}},{"in":"query","name":"fixable_only","schema":{"description":"Only findings with a fix known: a fixed version, or a fixed commit.","type":"boolean"}},{"in":"query","name":"direct_only","schema":{"description":"Leaves out the dependencies that are not direct; the other kinds stay.","type":"boolean"}},{"in":"query","name":"ecosystem","schema":{"description":"Only dependencies of this ecosystem, such as \"Go\" or \"npm\".","type":"string"}},{"in":"query","name":"query","schema":{"description":"Words that must all appear in the package, advisory ids or summary, ignoring case.","type":"string"}},{"in":"query","name":"order","schema":{"description":"The order of the answer: riskiest first when unset.","enum":["FINDING_ORDER_UNSPECIFIED","FINDING_ORDER_EPSS","FINDING_ORDER_PUBLISHED","FINDING_ORDER_PACKAGE"],"type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 100, at most 500 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}},{"in":"query","name":"kinds","schema":{"description":"Only these kinds (vulnerable_dependency, vulnerable_commit, secret, dangerous_call,\nsensitive_file); empty means all. The files are scanned only when a code kind is asked.","items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"commit":{"description":"The full commit id read.","type":"string"},"ecosystems":{"description":"Matches per ecosystem.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"findings":{"description":"This page of the findings.","items":{"additionalProperties":false,"properties":{"advisory":{"additionalProperties":false,"description":"The advisory that describes the flaw best (severity, score, KEV, EPSS, published);\nnot set for a code finding (secret, dangerous_call, sensitive_file).","properties":{"aliases":{"description":"Other ids of the same issue (CVE, GHSA).","items":{"type":"string"},"type":"array"},"cve":{"description":"The CVE id among the id and aliases; empty when there is none.","type":"string"},"cwes":{"description":"Weakness classes (CWE) it is filed under.","items":{"type":"string"},"type":"array"},"ecosystems":{"description":"The ecosystems of the packages it affects.","items":{"type":"string"},"type":"array"},"epss":{"description":"The chance its CVE is exploited in the next 30 days, 0 to 1; absent when unscored.","type":"number"},"epss_percentile":{"description":"Its EPSS rank among all scored CVEs, 0 to 1; absent when unscored.","type":"number"},"feed":{"description":"The feed it came from, such as \"osv:Go\".","type":"string"},"id":{"description":"The OSV id, such as \"GO-2025-4272\", \"RUSTSEC-2024-0001\" or \"CVE-2024-1086\".","type":"string"},"kev":{"description":"Whether its CVE is in CISA's KEV catalog.","type":"boolean"},"modified":{"description":"When the feed last changed it.","format":"date-time","type":"string"},"packages":{"description":"The packages it affects.","items":{"type":"string"},"type":"array"},"published":{"description":"When the feed first published it.","format":"date-time","type":"string"},"score":{"description":"The CVSS base score, 0 to 10; absent when unknown.","type":"number"},"severity":{"description":"The rating: the feed's own, else from its CVSS v3 score.","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"},"summary":{"description":"A one-line description.","type":"string"},"vector":{"description":"The CVSS vector the feed gives; empty when none.","type":"string"},"withdrawn":{"description":"Set when the advisory was withdrawn.","format":"date-time","type":"string"}},"type":"object"},"also":{"description":"Ids of the other advisories of the same flaw.","items":{"type":"string"},"type":"array"},"cwe":{"description":"The rule's CWE, such as CWE-798.","type":"string"},"direct":{"description":"For a dependency: named by a manifest itself. Always false for the other kinds, whose\nflaw is in the repository's own history or code.","type":"boolean"},"ecosystem":{"description":"For a commit, the ecosystem and package of the advisory's affected entry; empty, or\nGIT, when the range names only a repository.","type":"string"},"fingerprint":{"description":"For a secret: \"sha256:\" and 16 hex digits that identify it without holding it. The\nsame token in two files has one fingerprint; a password assigned by name is hashed with\nits name and file, never its value. The secret itself is never stored or sent.","type":"string"},"fixed_commit":{"description":"The commit that fixes it, for a commit finding: the first of fixed_commits; empty for a\ndependency.","type":"string"},"fixed_commits":{"description":"For a commit finding: every commit the advisory says fixes it (one per stable branch\nfor the kernel), none reachable from the commit read; the ones the lake holds first.","items":{"type":"string"},"type":"array"},"fixed_version":{"description":"The lowest version above it that fixes it; empty when none is known.","type":"string"},"id":{"description":"Stable for the same flaw and place: for a dependency the kind, advisory id, ecosystem,\npackage and version joined; for a commit the kind and advisory id; for a secret or a\ndangerous call the kind, rule, path and line; for a sensitive file the kind, rule and\npath.","type":"string"},"introduced_commit":{"description":"For a commit finding: the commit the range says brought the flaw in, reachable from the\ncommit read (\"0\" when the range starts at the beginning of history).","type":"string"},"kind":{"description":"vulnerable_dependency, vulnerable_commit, secret, dangerous_call or sensitive_file.","type":"string"},"line":{"description":"The line, from 1.","type":"integer"},"package":{"description":"The package name.","type":"string"},"path":{"description":"For a code finding: the file, from the repository root, and the 1-based line (0 for a\nfinding on the whole file).","type":"string"},"paths":{"description":"The manifests that pin it.","items":{"type":"string"},"type":"array"},"rule":{"description":"How versions were compared: semver, pep440 or generic; git for a commit finding.","type":"string"},"rule_id":{"description":"For a code finding: the rule that found it, its CWE (such as CWE-798) and title.","type":"string"},"severity":{"description":"The severity of every kind: the advisory's for an advisory finding, the rule's for a\ncode finding (low in a test file).","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"},"title":{"description":"What the rule looks for.","type":"string"},"version":{"description":"The pinned version.","type":"string"}},"type":"object"},"type":"array"},"fixable":{"description":"Matches with a fix known.","type":"integer"},"folders":{"description":"With every filter applied, per top folder of the finding's file (a code finding's path,\na dependency's first manifest), the largest first; \".\" for a file at the root. A commit\nfinding has no file and is not counted.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"kev":{"description":"Matches whose CVE is in KEV.","type":"integer"},"kinds":{"description":"Per kind, with the other filters applied, every kind present.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"manifest_seq":{"description":"The lake manifest the advisories were read from.","type":"integer"},"next_page_token":{"description":"Pass it as page_token for the next page; empty on the last page.","type":"string"},"repo":{"description":"The repository, as the source service names it.","type":"string"},"severities":{"description":"With the filters applied: per severity (every key present), per ecosystem, and how\nmany are known exploited and fixable.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"total":{"description":"All findings that match, over every page.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists what is wrong in a repository at a commit, riskiest first: a dependency pinned at an affected version (vulnerable_dependency), the commit inside an advisory's GIT range (vulnerable_commit), and, when asked for by kinds, secrets, dangerous calls and sensitive files found in the files.","tags":["security"],"x-rpc":"ahto.security.v1.SecurityService/ListFindings"}},"/v1/security/findings/stream":{"get":{"description":"Streams the findings of a repository at a commit as they are found, with the filters\nof ListFindings but no paging: the advisory findings first, then the code findings as\nthe files are scanned, then a last message with phase done and the counts. Fails like\nListFindings. Over REST it is a server-sent event stream.","operationId":"security.SecurityService.StreamFindings","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository, as the source service names it.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A full commit id or a ref; empty means the default branch head.","type":"string"}},{"in":"query","name":"severity_min","schema":{"description":"The filters of ListFindingsRequest: only this severity and above.","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"}},{"in":"query","name":"kev_only","schema":{"description":"Only findings whose CVE is in CISA's KEV catalog.","type":"boolean"}},{"in":"query","name":"fixable_only","schema":{"description":"Only findings with a fix known.","type":"boolean"}},{"in":"query","name":"direct_only","schema":{"description":"Leaves out the dependencies that are not direct; the other kinds stay.","type":"boolean"}},{"in":"query","name":"ecosystem","schema":{"description":"Only dependencies of this ecosystem, such as \"Go\" or \"npm\".","type":"string"}},{"in":"query","name":"query","schema":{"description":"Words that must all appear in the package, advisory ids or summary, ignoring case.","type":"string"}},{"in":"query","name":"kinds","schema":{"description":"Only these kinds; empty means all. The files are scanned only when a code kind is\nasked.","items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"code":{"additionalProperties":false,"description":"The code scan; set on the last message when a code kind was asked.","properties":{"bytes":{"description":"Bytes read.","type":"integer"},"counted":{"description":"Code signals counted, not listed as findings: the audit rules (Rust unsafe blocks and\ntransmute, Go's unsafe) that mark code to review rather than a fault, and dangerous\ncalls in tests. Most matched rule first. A match is either counted here or listed\namong the findings, never both: a rule's count is its matches in tests (and every\nmatch of an audit rule), and the list holds its other matches. To see every match of\na rule, add its count to its findings.","items":{"additionalProperties":false,"properties":{"count":{"description":"How often it matched.","type":"integer"},"cwe":{"description":"The rule's CWE, such as CWE-798.","type":"string"},"documented":{"description":"Matches with the safety comment the language asks for (Rust: a SAFETY comment above\nan unsafe block, a Safety section in an unsafe function's documentation).","type":"integer"},"in_tests":{"description":"Matches in a test file or a test region (#[cfg(test)], #[test]).","type":"integer"},"rule_id":{"description":"The rule's id.","type":"string"},"title":{"description":"What the rule looks for.","type":"string"}},"type":"object"},"type":"array"},"files":{"description":"Files read and scanned.","type":"integer"},"skipped":{"description":"Files not read: vendored, binary, an asset, minified, or above 1 MiB.","type":"integer"},"truncated":{"description":"A bound (200,000 files or 2 GiB) stopped the scan; some files were not read.","type":"boolean"}},"type":"object"},"commit":{"description":"The full commit id read; set on the last message.","type":"string"},"finding":{"additionalProperties":false,"description":"Set on every message but the last.","properties":{"advisory":{"additionalProperties":false,"description":"The advisory that describes the flaw best (severity, score, KEV, EPSS, published);\nnot set for a code finding (secret, dangerous_call, sensitive_file).","properties":{"aliases":{"description":"Other ids of the same issue (CVE, GHSA).","items":{"type":"string"},"type":"array"},"cve":{"description":"The CVE id among the id and aliases; empty when there is none.","type":"string"},"cwes":{"description":"Weakness classes (CWE) it is filed under.","items":{"type":"string"},"type":"array"},"ecosystems":{"description":"The ecosystems of the packages it affects.","items":{"type":"string"},"type":"array"},"epss":{"description":"The chance its CVE is exploited in the next 30 days, 0 to 1; absent when unscored.","type":"number"},"epss_percentile":{"description":"Its EPSS rank among all scored CVEs, 0 to 1; absent when unscored.","type":"number"},"feed":{"description":"The feed it came from, such as \"osv:Go\".","type":"string"},"id":{"description":"The OSV id, such as \"GO-2025-4272\", \"RUSTSEC-2024-0001\" or \"CVE-2024-1086\".","type":"string"},"kev":{"description":"Whether its CVE is in CISA's KEV catalog.","type":"boolean"},"modified":{"description":"When the feed last changed it.","format":"date-time","type":"string"},"packages":{"description":"The packages it affects.","items":{"type":"string"},"type":"array"},"published":{"description":"When the feed first published it.","format":"date-time","type":"string"},"score":{"description":"The CVSS base score, 0 to 10; absent when unknown.","type":"number"},"severity":{"description":"The rating: the feed's own, else from its CVSS v3 score.","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"},"summary":{"description":"A one-line description.","type":"string"},"vector":{"description":"The CVSS vector the feed gives; empty when none.","type":"string"},"withdrawn":{"description":"Set when the advisory was withdrawn.","format":"date-time","type":"string"}},"type":"object"},"also":{"description":"Ids of the other advisories of the same flaw.","items":{"type":"string"},"type":"array"},"cwe":{"description":"The rule's CWE, such as CWE-798.","type":"string"},"direct":{"description":"For a dependency: named by a manifest itself. Always false for the other kinds, whose\nflaw is in the repository's own history or code.","type":"boolean"},"ecosystem":{"description":"For a commit, the ecosystem and package of the advisory's affected entry; empty, or\nGIT, when the range names only a repository.","type":"string"},"fingerprint":{"description":"For a secret: \"sha256:\" and 16 hex digits that identify it without holding it. The\nsame token in two files has one fingerprint; a password assigned by name is hashed with\nits name and file, never its value. The secret itself is never stored or sent.","type":"string"},"fixed_commit":{"description":"The commit that fixes it, for a commit finding: the first of fixed_commits; empty for a\ndependency.","type":"string"},"fixed_commits":{"description":"For a commit finding: every commit the advisory says fixes it (one per stable branch\nfor the kernel), none reachable from the commit read; the ones the lake holds first.","items":{"type":"string"},"type":"array"},"fixed_version":{"description":"The lowest version above it that fixes it; empty when none is known.","type":"string"},"id":{"description":"Stable for the same flaw and place: for a dependency the kind, advisory id, ecosystem,\npackage and version joined; for a commit the kind and advisory id; for a secret or a\ndangerous call the kind, rule, path and line; for a sensitive file the kind, rule and\npath.","type":"string"},"introduced_commit":{"description":"For a commit finding: the commit the range says brought the flaw in, reachable from the\ncommit read (\"0\" when the range starts at the beginning of history).","type":"string"},"kind":{"description":"vulnerable_dependency, vulnerable_commit, secret, dangerous_call or sensitive_file.","type":"string"},"line":{"description":"The line, from 1.","type":"integer"},"package":{"description":"The package name.","type":"string"},"path":{"description":"For a code finding: the file, from the repository root, and the 1-based line (0 for a\nfinding on the whole file).","type":"string"},"paths":{"description":"The manifests that pin it.","items":{"type":"string"},"type":"array"},"rule":{"description":"How versions were compared: semver, pep440 or generic; git for a commit finding.","type":"string"},"rule_id":{"description":"For a code finding: the rule that found it, its CWE (such as CWE-798) and title.","type":"string"},"severity":{"description":"The severity of every kind: the advisory's for an advisory finding, the rule's for a\ncode finding (low in a test file).","enum":["SEVERITY_UNSPECIFIED","SEVERITY_UNKNOWN","SEVERITY_NONE","SEVERITY_LOW","SEVERITY_MEDIUM","SEVERITY_HIGH","SEVERITY_CRITICAL"],"type":"string"},"title":{"description":"What the rule looks for.","type":"string"},"version":{"description":"The pinned version.","type":"string"}},"type":"object"},"phase":{"description":"advisories while the advisory findings are sent, code while the files are scanned,\ndone on the last message.","type":"string"},"repo":{"description":"On the last message: the repository, the commit read, and the code scan (not set\nwhen no code kind was asked).","type":"string"},"sent":{"description":"The findings sent so far.","type":"integer"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the findings of a repository at a commit as they are found, with the filters of ListFindings but no paging: the advisory findings first, then the code findings as the files are scanned, then a last message with phase done and the counts.","tags":["security"],"x-rpc":"ahto.security.v1.SecurityService/StreamFindings"}},"/v1/security/posture":{"get":{"description":"Gets how safe a repository is at a commit: a grade from A to F, its findings by\nseverity, its dependencies, its manifests, and what the advisories say of the\npackages it uses. Pass repo and, optionally, a commit or ref (the default branch head\nwhen empty). Fails with INVALID_ARGUMENT for a bad argument and with NOT_FOUND when\nthe repository or commit is not in the lake.","operationId":"security.SecurityService.GetPosture","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository, as the source service names it.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A full commit id or a ref (branch or tag); empty means the default branch head.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"advisories":{"description":"Distinct advisories (after folding) among the findings.","type":"integer"},"by_kind":{"description":"Findings per kind, every kind present (vulnerable_dependency, vulnerable_commit,\nsecret, dangerous_call, sensitive_file).","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"by_severity":{"description":"Findings per severity, every key present (critical, high, medium, low, none, unknown).","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"code":{"additionalProperties":false,"description":"The scan of the files for code findings. Dangerous calls are counted in findings but\nnot graded: a call that is often a flaw is not a flaw found.","properties":{"bytes":{"description":"Bytes read.","type":"integer"},"counted":{"description":"Code signals counted, not listed as findings: the audit rules (Rust unsafe blocks and\ntransmute, Go's unsafe) that mark code to review rather than a fault, and dangerous\ncalls in tests. Most matched rule first. A match is either counted here or listed\namong the findings, never both: a rule's count is its matches in tests (and every\nmatch of an audit rule), and the list holds its other matches. To see every match of\na rule, add its count to its findings.","items":{"additionalProperties":false,"properties":{"count":{"description":"How often it matched.","type":"integer"},"cwe":{"description":"The rule's CWE, such as CWE-798.","type":"string"},"documented":{"description":"Matches with the safety comment the language asks for (Rust: a SAFETY comment above\nan unsafe block, a Safety section in an unsafe function's documentation).","type":"integer"},"in_tests":{"description":"Matches in a test file or a test region (#[cfg(test)], #[test]).","type":"integer"},"rule_id":{"description":"The rule's id.","type":"string"},"title":{"description":"What the rule looks for.","type":"string"}},"type":"object"},"type":"array"},"files":{"description":"Files read and scanned.","type":"integer"},"skipped":{"description":"Files not read: vendored, binary, an asset, minified, or above 1 MiB.","type":"integer"},"truncated":{"description":"A bound (200,000 files or 2 GiB) stopped the scan; some files were not read.","type":"boolean"}},"type":"object"},"commit":{"description":"The full commit id read.","type":"string"},"dependencies":{"additionalProperties":false,"description":"How many packages it pins.","properties":{"by_ecosystem":{"description":"Packages per ecosystem.","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"direct":{"description":"Named by a manifest itself, not only pulled in by another package.","type":"integer"},"total":{"description":"Distinct packages.","type":"integer"}},"type":"object"},"exposure":{"description":"What the advisories say of its packages, per ecosystem.","items":{"additionalProperties":false,"properties":{"advisories":{"description":"Flaws that name one of them.","type":"integer"},"by_severity":{"description":"Per severity, every key present (critical, high, medium, low, none, unknown).","items":{"additionalProperties":false,"properties":{"count":{"description":"How many match it.","type":"integer"},"value":{"description":"The value counted, such as an ecosystem or a severity.","type":"string"}},"type":"object"},"type":"array"},"ecosystem":{"description":"The ecosystem, such as Go or npm.","type":"string"},"kev":{"description":"Of them, known exploited.","type":"integer"},"packages":{"description":"Distinct packages the repository uses in it.","type":"integer"}},"type":"object"},"type":"array"},"findings":{"description":"Findings, one per flaw and package version, or per flaw for the commit itself.","type":"integer"},"fixable":{"description":"Findings with a fix known: a fixed version, or a fixed commit.","type":"integer"},"grade":{"description":"The safety level, A (no finding) to F (a known exploited flaw).","enum":["GRADE_UNSPECIFIED","GRADE_A","GRADE_B","GRADE_C","GRADE_D","GRADE_E","GRADE_F"],"type":"string"},"grade_reason":{"description":"Why the grade, in words.","type":"string"},"kev":{"description":"Findings whose CVE is in KEV.","type":"integer"},"manifest_seq":{"description":"The lake manifest the advisories were read from.","type":"integer"},"manifests":{"description":"The manifests and lockfiles read.","items":{"additionalProperties":false,"properties":{"dependencies":{"description":"Packages it pins.","type":"integer"},"ecosystem":{"description":"The ecosystem it belongs to, such as Go or npm.","type":"string"},"error":{"description":"Why it could not be read; empty when it was.","type":"string"},"path":{"description":"The file, from the repository root.","type":"string"}},"type":"object"},"type":"array"},"manifests_truncated":{"description":"More manifests than the server reads (5000); the rest were not read.","type":"boolean"},"oldest_open_published":{"description":"When the oldest advisory among the findings was published: how long a known flaw has\nbeen left open.","format":"date-time","type":"string"},"repo":{"description":"The repository, as the source service names it.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Gets how safe a repository is at a commit: a grade from A to F, its findings by severity, its dependencies, its manifests, and what the advisories say of the packages it uses.","tags":["security"],"x-rpc":"ahto.security.v1.SecurityService/GetPosture"}},"/v1/security/sources":{"get":{"description":"Lists the advisory feeds as the last sync left them, with how each one went. Takes no\narguments. The list is empty before the first sync. Fails with UNAVAILABLE while the\nlake is not open.","operationId":"security.SecurityService.GetSources","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"known":{"description":"The feeds a sync can name.","items":{"type":"string"},"type":"array"},"manifest_seq":{"description":"The lake manifest the answer was read from.","type":"integer"},"sources":{"description":"The feeds by name. Empty before the first sync.","items":{"additionalProperties":false,"properties":{"bytes":{"description":"The downloaded size.","type":"integer"},"changed":{"description":"When the copy read was downloaded.","format":"date-time","type":"string"},"duration_ms":{"description":"Time to fetch and read it.","type":"integer"},"error":{"description":"Why it failed; empty otherwise.","type":"string"},"fetched":{"description":"When the copy read was last checked with the feed.","format":"date-time","type":"string"},"name":{"description":"The feed, such as \"osv:Go\", \"kev\" or \"epss\".","type":"string"},"records":{"description":"Rows it gave: advisories, KEV entries or EPSS scores.","type":"integer"},"status":{"description":"ok, unchanged (the feed answered 304 Not Modified) or failed (the copy before is kept).","type":"string"},"url":{"description":"Where it is downloaded from.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the advisory feeds as the last sync left them, with how each one went.","tags":["security"],"x-rpc":"ahto.security.v1.SecurityService/GetSources"}},"/v1/security/sync":{"post":{"description":"Downloads the advisory feeds and replaces the advisory tables of the lake in one run.\nPass feeds to sync only some of them, or offline to read the kept copies without\ndownloading. This writes the lake. It is a server stream: each message reports one\nstep of one feed, and the last message has report set. A feed that fails keeps its\nearlier copy; the call fails only when no feed could be read. Fails with\nINVALID_ARGUMENT for an unknown feed name, and with PERMISSION_DENIED in public mode.\nOver REST it is a server-sent event stream.","operationId":"security.SecurityService.SyncAdvisories","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"feeds":{"description":"Feeds to download, by name or by ecosystem (\"Go\", \"osv:Go\", \"kev\"); empty means the\ndefaults. Feeds synced before and not named are read again from their kept copy.","items":{"type":"string"},"type":"array"},"offline":{"description":"Read only the kept copies; download nothing.","type":"boolean"}},"type":"object"}}}},"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"error":{"description":"When failed: why.","type":"string"},"feed":{"description":"The feed this step is about.","type":"string"},"phase":{"description":"fetch, read or done.","type":"string"},"records":{"description":"Rows read so far.","type":"integer"},"report":{"additionalProperties":false,"description":"Set on the last message only.","properties":{"advisories":{"description":"Advisories written, after duplicates.","type":"integer"},"duplicates":{"description":"Records an earlier feed already gave (one advisory in two ecosystems).","type":"integer"},"manifest_seq":{"description":"The manifest the sync published.","type":"integer"},"skipped":{"description":"Records that did not decode.","type":"integer"},"sources":{"description":"The feeds as the sync left them.","items":{"additionalProperties":false,"properties":{"bytes":{"description":"The downloaded size.","type":"integer"},"changed":{"description":"When the copy read was downloaded.","format":"date-time","type":"string"},"duration_ms":{"description":"Time to fetch and read it.","type":"integer"},"error":{"description":"Why it failed; empty otherwise.","type":"string"},"fetched":{"description":"When the copy read was last checked with the feed.","format":"date-time","type":"string"},"name":{"description":"The feed, such as \"osv:Go\", \"kev\" or \"epss\".","type":"string"},"records":{"description":"Rows it gave: advisories, KEV entries or EPSS scores.","type":"integer"},"status":{"description":"ok, unchanged (the feed answered 304 Not Modified) or failed (the copy before is kept).","type":"string"},"url":{"description":"Where it is downloaded from.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"status":{"description":"When done: ok, unchanged or failed.","type":"string"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Downloads the advisory feeds and replaces the advisory tables of the lake in one run.","tags":["security"],"x-reason":"off in public mode","x-rpc":"ahto.security.v1.SecurityService/SyncAdvisories","x-served":false}},"/v1/settings":{"get":{"description":"Lists every setting of the gateway: the value in effect, the value the files give\nnow, its default, where it came from, and whether a change applies at once or after a\nrestart. Takes no input. Also says whether settings can be saved here (writable) and\nwhy not. A setting that holds a secret is shown as a fingerprint, never its value.","operationId":"settings.SettingsService.ListSettings","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"read_only_reason":{"description":"Why it may not, when writable is false: public mode, no saved file.","type":"string"},"restart_needed":{"description":"Whether a saved value waits for a restart (some setting has pending set).","type":"boolean"},"saved_file":{"description":"The saved file. Empty in public mode.","type":"string"},"settings":{"description":"Every setting, by key.","items":{"additionalProperties":false,"properties":{"apply":{"description":"When a change takes effect: live (at once) or restart.","type":"string"},"default_value":{"description":"The value when nothing sets it, as YAML text.","type":"string"},"editable":{"description":"Whether UpdateSettings may change it on a writable gateway.","type":"boolean"},"env":{"description":"The variable that sets it, for example AHTO_PROTOCOL_LISTEN.","type":"string"},"key":{"description":"The key path, for example protocol.listen.","type":"string"},"kind":{"description":"The YAML kind of the value: scalar, list or map. Only scalars and lists of scalars\nare editable.","type":"string"},"locked_reason":{"description":"Why it may not, when editable is false.","type":"string"},"next_value":{"description":"The value the files and variables give now. It differs from value when a change\nwaits for a restart (pending).","type":"string"},"pending":{"description":"A saved value waits for a restart.","type":"boolean"},"secret":{"description":"The value holds a secret: value, next_value and default_value are a fingerprint.","type":"boolean"},"source":{"description":"Where next_value comes from: default, file, saved, environment or flag.","type":"string"},"source_file":{"description":"The file it was read from, for file and saved. Empty in public mode.","type":"string"},"value":{"description":"The value in effect, as YAML text: 127.0.0.1:8080, true, 5m0s, [a, b].","type":"string"}},"type":"object"},"type":"array"},"writable":{"description":"Whether UpdateSettings may save here.","type":"boolean"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists every setting of the gateway: the value in effect, the value the files give now, its default, where it came from, and whether a change applies at once or after a restart.","tags":["settings"],"x-rpc":"ahto.settings.v1.SettingsService/ListSettings"},"post":{"description":"Saves values to the saved file, takes the keys in unset out of it, and applies the\nchanges that can apply while the gateway runs; the rest wait for a restart. Returns\nevery setting after the save and the keys applied and waiting. All the values are\nchecked together first; one bad value saves nothing. Errors: INVALID_ARGUMENT for\nnothing to change, an unknown or locked key, or a value that does not read;\nFAILED_PRECONDITION when settings are not writable (public mode, no saved file).","operationId":"settings.SettingsService.UpdateSettings","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"unset":{"description":"Keys to take out of the saved file, so the files below it and the default apply.","items":{"type":"string"},"type":"array"},"values":{"additionalProperties":{"type":"string"},"description":"New values by key, as YAML text, read the way the config file reads them.","type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"applied":{"description":"The keys whose change is in effect now.","items":{"type":"string"},"type":"array"},"restart":{"description":"The keys whose change waits for a restart.","items":{"type":"string"},"type":"array"},"settings":{"additionalProperties":false,"description":"Every setting after the save, as ListSettings answers.","properties":{"read_only_reason":{"description":"Why it may not, when writable is false: public mode, no saved file.","type":"string"},"restart_needed":{"description":"Whether a saved value waits for a restart (some setting has pending set).","type":"boolean"},"saved_file":{"description":"The saved file. Empty in public mode.","type":"string"},"settings":{"description":"Every setting, by key.","items":{"additionalProperties":false,"properties":{"apply":{"description":"When a change takes effect: live (at once) or restart.","type":"string"},"default_value":{"description":"The value when nothing sets it, as YAML text.","type":"string"},"editable":{"description":"Whether UpdateSettings may change it on a writable gateway.","type":"boolean"},"env":{"description":"The variable that sets it, for example AHTO_PROTOCOL_LISTEN.","type":"string"},"key":{"description":"The key path, for example protocol.listen.","type":"string"},"kind":{"description":"The YAML kind of the value: scalar, list or map. Only scalars and lists of scalars\nare editable.","type":"string"},"locked_reason":{"description":"Why it may not, when editable is false.","type":"string"},"next_value":{"description":"The value the files and variables give now. It differs from value when a change\nwaits for a restart (pending).","type":"string"},"pending":{"description":"A saved value waits for a restart.","type":"boolean"},"secret":{"description":"The value holds a secret: value, next_value and default_value are a fingerprint.","type":"boolean"},"source":{"description":"Where next_value comes from: default, file, saved, environment or flag.","type":"string"},"source_file":{"description":"The file it was read from, for file and saved. Empty in public mode.","type":"string"},"value":{"description":"The value in effect, as YAML text: 127.0.0.1:8080, true, 5m0s, [a, b].","type":"string"}},"type":"object"},"type":"array"},"writable":{"description":"Whether UpdateSettings may save here.","type":"boolean"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Saves values to the saved file, takes the keys in unset out of it, and applies the changes that can apply while the gateway runs; the rest wait for a restart.","tags":["settings"],"x-rpc":"ahto.settings.v1.SettingsService/UpdateSettings"}},"/v1/source/activity":{"get":{"description":"Counts the commits that change a file or a directory along the first-parent history\nof a commit, and their distinct authors, per day, week, month or year of author time,\noldest first. The same rows are at /arrow/v1/\u003crepo\u003e/activity as Arrow.","operationId":"source.SourceService.GetActivity","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"The commit to walk from: an id (full or short), a branch, a tag or HEAD; empty is the\ndefault branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A file or a directory. Empty counts every commit.","type":"string"}},{"in":"query","name":"bucket","schema":{"description":"hour, day, week (from Monday), month or year, in UTC. month when empty.","type":"string"}},{"in":"query","name":"since","schema":{"description":"Count only the commits whose author time is at or after since. Open when unset.","format":"date-time","type":"string"}},{"in":"query","name":"until","schema":{"description":"Count only the commits whose author time is before until. Open when unset. With\nsince, the window is half-open, [since, until), and until must be after since.","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"buckets":{"description":"The buckets with at least one commit, oldest first.","items":{"additionalProperties":false,"properties":{"author_time":{"description":"The author time of commit.","format":"date-time","type":"string"},"authors":{"description":"How many distinct authors made them.","type":"integer"},"commit":{"description":"The newest commit of the bucket: the first ListHistory gives for the bucket's window,\nso a client opens the bucket without reading its history.","type":"string"},"commits":{"description":"How many commits changed the path in the bucket, and how many distinct authors\n(by email) made them.","type":"integer"},"first_commit":{"description":"The oldest commit of the bucket. Its parent is the state before the bucket.","type":"string"},"start":{"description":"The first moment of the bucket, in UTC.","format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Counts the commits that change a file or a directory along the first-parent history of a commit, and their distinct authors, per day, week, month or year of author time, oldest first.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetActivity"}},"/v1/source/activity/stream":{"get":{"description":"Streams the activity of several paths, one message per path in the order asked, each\nwith the buckets GetActivity answers for it. The last message has done set. Over REST\nit is a server-sent event stream; repeat paths in the query (?paths=a\u0026paths=b).","operationId":"source.SourceService.StreamActivity","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"The commit to walk from: an id (full or short), a branch, a tag or HEAD; empty is the\ndefault branch head.","type":"string"}},{"in":"query","name":"paths","schema":{"description":"Files or directories, at most 1000. None is the root alone.","items":{"type":"string"},"type":"array"}},{"in":"query","name":"bucket","schema":{"description":"The size of a bucket, as in GetActivity: hour, day, week, month or year. month when\nempty.","type":"string"}},{"in":"query","name":"since","schema":{"description":"The earliest author time. Open when unset.","format":"date-time","type":"string"}},{"in":"query","name":"until","schema":{"description":"The latest author time, included. Open when unset.","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"buckets":{"description":"The buckets with at least one commit, oldest first, as GetActivity answers.","items":{"additionalProperties":false,"properties":{"author_time":{"description":"The author time of commit.","format":"date-time","type":"string"},"authors":{"description":"How many distinct authors made them.","type":"integer"},"commit":{"description":"The newest commit of the bucket: the first ListHistory gives for the bucket's window,\nso a client opens the bucket without reading its history.","type":"string"},"commits":{"description":"How many commits changed the path in the bucket, and how many distinct authors\n(by email) made them.","type":"integer"},"first_commit":{"description":"The oldest commit of the bucket. Its parent is the state before the bucket.","type":"string"},"start":{"description":"The first moment of the bucket, in UTC.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"done":{"description":"Set on the last message.","type":"boolean"},"path":{"description":"The path this message is about.","type":"string"},"sent":{"description":"The paths sent so far, this one included, and how many were asked.","type":"integer"},"total":{"description":"How many paths were asked.","type":"integer"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the activity of several paths, one message per path in the order asked, each with the buckets GetActivity answers for it.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/StreamActivity"}},"/v1/source/authors":{"get":{"description":"Lists every author of the commits that change a file or a directory along the\nfirst-parent history of a commit, the most commits first, with the author times of\ntheir first and last such commit.","operationId":"source.SourceService.ListAuthors","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"The commit to walk from: an id (full or short), a branch, a tag or HEAD; empty is the\ndefault branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A file or a directory. Empty counts every commit.","type":"string"}},{"in":"query","name":"since","schema":{"description":"Count only the commits whose author time is at or after since. Open when unset.\nUnlike ListHistory this is the full history, not the first-parent chain, so a\nrepository that lands every change through a merge bot still lists its people.","format":"date-time","type":"string"}},{"in":"query","name":"until","schema":{"description":"Count only the commits whose author time is before until. Open when unset. With\nsince, the window is half-open, [since, until), and until must be after since.","format":"date-time","type":"string"}},{"in":"query","name":"limit","schema":{"description":"The most authors to answer, the most commits first; every author when 0.","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"authors":{"description":"The authors, the most commits first, the first limit of them. An author is one email,\nor one name when the email is empty.","items":{"additionalProperties":false,"properties":{"commits":{"description":"The number of first-parent commits by the author that changed the file.","type":"integer"},"email":{"description":"The author's email; empty in public mode.","type":"string"},"first_time":{"description":"The author times of the first and the last of those commits.","format":"date-time","type":"string"},"last_time":{"description":"The author time of the author's latest commit that changed the file.","format":"date-time","type":"string"},"name":{"description":"The author's name and email. The email is empty in public mode, where no address\nleaves the server.","type":"string"},"name_source":{"description":"Where name came from when it is not the name the commits carry. A client shows a\nname from SIGNED_OFF_BY, EMAIL, COMMITTER or UNKNOWN as derived, not as the author's own.","enum":["NAME_SOURCE_UNSPECIFIED","NAME_SOURCE_MAILMAP","NAME_SOURCE_SIGNED_OFF_BY","NAME_SOURCE_EMAIL","NAME_SOURCE_COMMITTER","NAME_SOURCE_UNKNOWN"],"type":"string"},"profile":{"additionalProperties":false,"description":"The author's account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"total":{"description":"How many authors there are in all, limit or not.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists every author of the commits that change a file or a directory along the first-parent history of a commit, the most commits first, with the author times of their first and last such commit.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/ListAuthors"}},"/v1/source/blame":{"get":{"description":"Says which commit last changed each line of a file at a commit, as\n`git blame --porcelain` does on the repository's mirror: the runs of lines (hunks) in\nfile order and each commit they name once. Lines carried across a rename keep the path\nthey had then.","operationId":"source.SourceService.GetBlame","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"The path of a file or symlink.","type":"string"}},{"in":"query","name":"start_line","schema":{"description":"The first line to blame, from 1; 0 means the first line.","type":"integer"}},{"in":"query","name":"end_line","schema":{"description":"The last line to blame, included; 0 means the last line. A hunk across either end is\ncut to the range.","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"commits":{"description":"The commits the hunks name, each once, in the order the hunks first name them.","items":{"additionalProperties":false,"properties":{"author":{"description":"The author's name and email. The email is empty in public mode, where no address\nleaves the server.","type":"string"},"author_time":{"description":"When the author made it.","format":"date-time","type":"string"},"boundary":{"description":"Whether the commit is a root: git blames on it every line it found no older change\nfor.","type":"boolean"},"commit":{"description":"The commit id.","type":"string"},"email":{"description":"The author's email; empty in public mode.","type":"string"},"previous":{"description":"The parent the lines came from and their path there; empty for a commit that added\nthe lines.","type":"string"},"previous_path":{"description":"The path in the previous commit.","type":"string"},"profile":{"additionalProperties":false,"description":"The author's account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"},"subject":{"description":"The first line of the message.","type":"string"}},"type":"object"},"type":"array"},"hunks":{"description":"The hunks, in file order; together they cover every line of the range once.","items":{"additionalProperties":false,"properties":{"commit":{"description":"The commit id.","type":"string"},"line":{"description":"The line, from 1, of the first of them in the file.","type":"integer"},"lines":{"description":"How many lines.","type":"integer"},"original_line":{"description":"The line, from 1, of the first of them in that commit.","type":"integer"},"path":{"description":"The path of the lines in that commit; another path when the file was renamed since.","type":"string"}},"type":"object"},"type":"array"},"next_start_line":{"description":"With truncated: the start_line that reads on from where the hunks stopped.","type":"integer"},"total_lines":{"description":"The number of lines in the whole file.","type":"integer"},"truncated":{"description":"Whether the hunks stop before end_line because of a size cap (over MCP, max_bytes).","type":"boolean"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Says which commit last changed each line of a file at a commit, as `git blame --porcelain` does on the repository's mirror: the runs of lines (hunks) in file order and each commit they name once.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetBlame"}},"/v1/source/commit":{"get":{"description":"Returns a commit: its author, committer, message, parents, and the files it changed\nagainst its first parent.","operationId":"source.SourceService.GetCommit","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"author":{"additionalProperties":false,"description":"Who wrote the change and who committed it.","properties":{"email":{"description":"The email; empty in public mode, where no address leaves the server.","type":"string"},"name":{"description":"The name and email. The email is empty in public mode, where no address leaves the\nserver.","type":"string"},"time":{"description":"When.","format":"date-time","type":"string"},"tz_minutes":{"description":"The offset of the local time zone from UTC, in minutes.","type":"integer"}},"type":"object"},"changes":{"description":"The files changed against the first parent, by path.","items":{"additionalProperties":false,"properties":{"additions":{"description":"The lines the change adds and deletes, as `git diff-tree --numstat` counts them on the\nrepository's mirror against the first parent. Unset when they were not counted (no\nmirror, or git failed) and for a binary file.","type":"integer"},"binary":{"description":"Whether git counts the file as binary: no line counts then.","type":"boolean"},"deletions":{"description":"Lines deleted; unset for a binary file or when the line counts are not known.","type":"integer"},"new_mode":{"description":"The Git mode after the change.","type":"string"},"new_oid":{"description":"The blob id after the change; empty for a deleted file.","type":"string"},"old_mode":{"description":"The mode and blob id before and after. Empty for the side that does not exist.","type":"string"},"old_oid":{"description":"The blob id before the change; empty for an added file.","type":"string"},"path":{"description":"The path.","type":"string"},"status":{"description":"A (added), D (deleted), M (modified) or T (type changed).","type":"string"}},"type":"object"},"type":"array"},"commit":{"description":"The commit id and its tree id.","type":"string"},"committer":{"additionalProperties":false,"description":"Who committed it; the same as the author unless the commit says otherwise.","properties":{"email":{"description":"The email; empty in public mode, where no address leaves the server.","type":"string"},"name":{"description":"The name and email. The email is empty in public mode, where no address leaves the\nserver.","type":"string"},"time":{"description":"When.","format":"date-time","type":"string"},"tz_minutes":{"description":"The offset of the local time zone from UTC, in minutes.","type":"integer"}},"type":"object"},"message":{"description":"The whole message.","type":"string"},"parents":{"description":"The parent ids, first parent first.","items":{"type":"string"},"type":"array"},"tree":{"description":"The id of the commit's tree.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns a commit: its author, committer, message, parents, and the files it changed against its first parent.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetCommit"}},"/v1/source/file":{"get":{"description":"Returns one file at a commit: the fields of its tree entry, the authors who changed\nit most and the files most often changed with it. The bytes are at raw_url; with\ncontent set the text is in the answer too, whole or a range of lines, so a client\nthat cannot fetch a URL (an MCP tool call) still reads the file. Use it to read code.","operationId":"source.SourceService.GetFile","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"The path of a file, symlink or submodule.","type":"string"}},{"in":"query","name":"content","schema":{"description":"Put the text of the file in the answer (text). A binary file answers binary instead.","type":"boolean"}},{"in":"query","name":"start_line","schema":{"description":"With content: the first line to return, from 1; 0 means the first line.","type":"integer"}},{"in":"query","name":"end_line","schema":{"description":"With content: the last line to return, included; 0 means the last line. At most 2000\nlines come back in one answer: past that the answer is truncated and next_start_line\nsays where to go on.","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"binary":{"description":"With content: whether the file is binary (a NUL in its first 8000 bytes).","type":"boolean"},"co_changes":{"description":"The files changed most often in the same commits, at most 10.","items":{"additionalProperties":false,"properties":{"commits":{"description":"The number of commits that changed both.","type":"integer"},"path":{"description":"The path.","type":"string"}},"type":"object"},"type":"array"},"commit":{"description":"The commit and the file's tree entry with its history.","type":"string"},"entry":{"additionalProperties":false,"description":"The file's entry, as GetTree lists it.","properties":{"authors":{"description":"How many distinct authors made those commits.","type":"integer"},"binary":{"description":"Whether the blob is binary, when the crawl scanned it.","type":"boolean"},"commits":{"description":"How many first-parent commits up to the request's commit changed the entry, and\nhow many distinct authors made them.","type":"integer"},"documentation":{"description":"Whether the file is documentation.","type":"boolean"},"generated":{"description":"Whether the file is generated.","type":"boolean"},"kind":{"description":"tree, file, exec, symlink or gitlink.","type":"string"},"language":{"description":"The language of the file, such as \"Go\". Empty when unknown.","type":"string"},"last_change":{"additionalProperties":false,"description":"The newest first-parent commit up to the request's commit that changed the entry.","properties":{"author":{"description":"The author's name.","type":"string"},"author_time":{"description":"When the author made it.","format":"date-time","type":"string"},"commit":{"description":"The commit id.","type":"string"},"commit_time":{"description":"When it was committed (the committer time): the time it landed on the line a\nhistory follows, so a history, newest first, is in this order. author_time can be\nmuch older, as on a reviewed change that waited before it landed. Set by\nListHistory and StreamHistory; empty elsewhere and when the lake has no committer time.","format":"date-time","type":"string"},"profile":{"additionalProperties":false,"description":"The author's account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"},"subject":{"description":"The first line of the message.","type":"string"}},"type":"object"},"lines":{"description":"The number of lines of a text blob the crawl scanned.","type":"integer"},"mode":{"description":"The Git mode, such as \"100644\".","type":"string"},"name":{"description":"The name in the directory and the full path.","type":"string"},"oid":{"description":"The tree, blob or (for a gitlink) commit id.","type":"string"},"path":{"description":"The full path from the repository root.","type":"string"},"role":{"description":"The part the file plays in the repository: code, test, docs, config, build, ci,\ndeploy, data, asset, generated, vendor or other. The crawl tags it (src/filerole);\nthe first rule that holds wins, so a Dockerfile is build and a test's JSON is test.","type":"string"},"size":{"description":"The size of a blob in bytes. Unset for a tree or a gitlink.","type":"integer"},"symlink_target":{"description":"Where a symlink points.","type":"string"},"test":{"description":"Whether the file is a test.","type":"boolean"},"vendored":{"description":"Whether the path is vendored, generated, a test or documentation.","type":"boolean"}},"type":"object"},"next_start_line":{"description":"With truncated: the start_line that reads on from where text stopped.","type":"integer"},"owners":{"description":"The authors who changed the file most along the first-parent history, at most 10.","items":{"additionalProperties":false,"properties":{"commits":{"description":"The number of first-parent commits by the author that changed the file.","type":"integer"},"email":{"description":"The author's email; empty in public mode.","type":"string"},"first_time":{"description":"The author times of the first and the last of those commits.","format":"date-time","type":"string"},"last_time":{"description":"The author time of the author's latest commit that changed the file.","format":"date-time","type":"string"},"name":{"description":"The author's name and email. The email is empty in public mode, where no address\nleaves the server.","type":"string"},"name_source":{"description":"Where name came from when it is not the name the commits carry. A client shows a\nname from SIGNED_OFF_BY, EMAIL, COMMITTER or UNKNOWN as derived, not as the author's own.","enum":["NAME_SOURCE_UNSPECIFIED","NAME_SOURCE_MAILMAP","NAME_SOURCE_SIGNED_OFF_BY","NAME_SOURCE_EMAIL","NAME_SOURCE_COMMITTER","NAME_SOURCE_UNKNOWN"],"type":"string"},"profile":{"additionalProperties":false,"description":"The author's account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"raw_url":{"description":"Where the bytes are: /raw/v1/\u003crepo\u003e/blob/\u003coid\u003e?path=\u003cpath\u003e. Empty for a gitlink.","type":"string"},"text":{"description":"With content: the lines asked for, at most 2000 lines and 256 KiB of them (over MCP,\nas many whole lines as fit max_bytes). Empty for a binary file.","type":"string"},"total_lines":{"description":"With content: the number of lines in the whole file.","type":"integer"},"truncated":{"description":"With content: whether text stops before end_line because of the 2000-line or the\n256 KiB cap, or over MCP because of max_bytes.","type":"boolean"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns one file at a commit: the fields of its tree entry, the authors who changed it most and the files most often changed with it.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetFile"}},"/v1/source/files/find":{"get":{"description":"Finds the files of a commit whose path holds a text, ignoring case, by path; every\nfile when the text is empty. It answers the first page and the total; the whole list\nis at /arrow/v1/\u003crepo\u003e/files?commit=\u003ccommit\u003e\u0026text=\u003ctext\u003e as an Arrow IPC stream.","operationId":"source.SourceService.FindFiles","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}},{"in":"query","name":"text","schema":{"description":"The text a path holds, ignoring case. Empty finds every file.","type":"string"}},{"in":"query","name":"limit","schema":{"description":"The most files in the answer: 50 when 0, at most 1000.","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"files":{"description":"The first files found, by path.","items":{"additionalProperties":false,"properties":{"kind":{"description":"file, exec, symlink or gitlink.","type":"string"},"mode":{"description":"The Git mode, such as \"100644\".","type":"string"},"oid":{"description":"The blob or (for a gitlink) commit id.","type":"string"},"path":{"description":"The full path.","type":"string"}},"type":"object"},"type":"array"},"total":{"description":"How many files hold the text in all.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Finds the files of a commit whose path holds a text, ignoring case, by path; every file when the text is empty.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/FindFiles"}},"/v1/source/files/stats":{"get":{"description":"Lists every file of the tree of a commit under a path, by path, with its size, lines\nand language and its history along the first-parent chain up to the commit: how many\ncommits changed it, by how many authors, and its last change. It is the data of the\ncode city; every row is at /arrow/v1/\u003crepo\u003e/stats as Arrow.","operationId":"source.SourceService.ListFileStats","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A directory to list the files under. Empty lists every file.","type":"string"}},{"in":"query","name":"limit","schema":{"description":"The most files in the answer: 50 when 0, at most 1000. The Arrow route has every file.","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"files":{"description":"The first files, by path.","items":{"additionalProperties":false,"properties":{"authors":{"description":"How many distinct authors made those commits.","type":"integer"},"commits":{"description":"The first-parent commits up to the commit that changed the path, and their distinct\nauthors; 0 when its changes are out of the lake.","type":"integer"},"kind":{"description":"file, exec, symlink or gitlink.","type":"string"},"language":{"description":"The go-enry language; empty when none.","type":"string"},"last_commit":{"description":"The last of those commits and its author time; unset when commits is 0.","type":"string"},"last_time":{"description":"The author time of last_commit.","format":"date-time","type":"string"},"lines":{"description":"The number of lines of a text blob.","type":"integer"},"path":{"description":"The full path. A path that is not valid UTF-8 is left out.","type":"string"},"role":{"description":"The part the file plays in the repository: code, test, docs, config, build, ci,\ndeploy, data, asset, generated, vendor or other. The crawl tags it (src/filerole);\nthe first rule that holds wins, so a Dockerfile is build and a test's JSON is test.","type":"string"},"size":{"description":"The blob's size in bytes and its lines when it is text; unset when the lake does not\ndescribe the blob, and for a gitlink.","type":"integer"}},"type":"object"},"type":"array"},"total":{"description":"How many files there are under the path in all.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists every file of the tree of a commit under a path, by path, with its size, lines and language and its history along the first-parent chain up to the commit: how many commits changed it, by how many authors, and its last change.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/ListFileStats"}},"/v1/source/files/stats/stream":{"get":{"description":"Streams every file of the tree of a commit under a path, by path, with the fields of\nListFileStats, in chunks, as DuckDB reads them: the first chunk arrives before the\nlast file is read. Each message says how many files were sent and how many there are;\nthe last one has done set. Over REST it is a server-sent event stream.","operationId":"source.SourceService.StreamFileStats","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A directory to stream the files under. Empty streams every file.","type":"string"}},{"in":"query","name":"chunk","schema":{"description":"The most files in one message: 2000 when 0, at most 5000.","type":"integer"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"done":{"description":"Set on the last message; it may carry no files.","type":"boolean"},"files":{"description":"The next files, by path.","items":{"additionalProperties":false,"properties":{"authors":{"description":"How many distinct authors made those commits.","type":"integer"},"commits":{"description":"The first-parent commits up to the commit that changed the path, and their distinct\nauthors; 0 when its changes are out of the lake.","type":"integer"},"kind":{"description":"file, exec, symlink or gitlink.","type":"string"},"language":{"description":"The go-enry language; empty when none.","type":"string"},"last_commit":{"description":"The last of those commits and its author time; unset when commits is 0.","type":"string"},"last_time":{"description":"The author time of last_commit.","format":"date-time","type":"string"},"lines":{"description":"The number of lines of a text blob.","type":"integer"},"path":{"description":"The full path. A path that is not valid UTF-8 is left out.","type":"string"},"role":{"description":"The part the file plays in the repository: code, test, docs, config, build, ci,\ndeploy, data, asset, generated, vendor or other. The crawl tags it (src/filerole);\nthe first rule that holds wins, so a Dockerfile is build and a test's JSON is test.","type":"string"},"size":{"description":"The blob's size in bytes and its lines when it is text; unset when the lake does not\ndescribe the blob, and for a gitlink.","type":"integer"}},"type":"object"},"type":"array"},"sent":{"description":"The files sent so far, these included.","type":"integer"},"total":{"description":"Every file under the path. 0 until the first file is read.","type":"integer"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams every file of the tree of a commit under a path, by path, with the fields of ListFileStats, in chunks, as DuckDB reads them: the first chunk arrives before the last file is read.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/StreamFileStats"}},"/v1/source/files/summary":{"get":{"description":"Sums up the files of the tree of a commit under a path, as ListFileStats lists them:\nhow many files, bytes, lines and folders there are, and the files changed by the\nmost commits. For a page that shows totals, without sending every file.","operationId":"source.SourceService.GetFileSummary","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A directory to sum up the files under. Empty sums up every file.","type":"string"}},{"in":"query","name":"top","schema":{"description":"How many of the files changed most often to send: 10 when 0, at most 50.","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"bytes":{"description":"The sum of their sizes and of their lines, where the lake knows them.","type":"integer"},"files":{"description":"How many files there are under the path: ListFileStats's total.","type":"integer"},"folders":{"description":"How many folders hold them under the path, the path itself left out.","type":"integer"},"lines":{"description":"The number of lines of the file.","type":"integer"},"top":{"description":"The files changed by the most commits, the most first, then by path.","items":{"additionalProperties":false,"properties":{"authors":{"description":"How many distinct authors made those commits.","type":"integer"},"commits":{"description":"The first-parent commits up to the commit that changed the path, and their distinct\nauthors; 0 when its changes are out of the lake.","type":"integer"},"kind":{"description":"file, exec, symlink or gitlink.","type":"string"},"language":{"description":"The go-enry language; empty when none.","type":"string"},"last_commit":{"description":"The last of those commits and its author time; unset when commits is 0.","type":"string"},"last_time":{"description":"The author time of last_commit.","format":"date-time","type":"string"},"lines":{"description":"The number of lines of a text blob.","type":"integer"},"path":{"description":"The full path. A path that is not valid UTF-8 is left out.","type":"string"},"role":{"description":"The part the file plays in the repository: code, test, docs, config, build, ci,\ndeploy, data, asset, generated, vendor or other. The crawl tags it (src/filerole);\nthe first rule that holds wins, so a Dockerfile is build and a test's JSON is test.","type":"string"},"size":{"description":"The blob's size in bytes and its lines when it is text; unset when the lake does not\ndescribe the blob, and for a gitlink.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Sums up the files of the tree of a commit under a path, as ListFileStats lists them: how many files, bytes, lines and folders there are, and the files changed by the most commits.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetFileSummary"}},"/v1/source/folders":{"get":{"description":"Lists the folders in a folder on the machine the server runs on, so a client can pick\none for AddRepository; a browser cannot give an absolute path itself. Folders only,\nsorted by name, at most 2000. PermissionDenied while the gateway accepts remote\nclients (protocol.allow_remote), as a folder in AddRepository is.","operationId":"source.SourceService.ListFolders","parameters":[{"in":"query","name":"path","schema":{"description":"An absolute path or one starting with \"~/\"; empty is the home folder.","type":"string"}},{"in":"query","name":"hidden","schema":{"description":"List folders whose name starts with a dot too.","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"folders":{"description":"The folders in it, sorted by name. Folders that cannot be read are left out.","items":{"additionalProperties":false,"properties":{"name":{"description":"The name in its parent.","type":"string"},"path":{"description":"The absolute path.","type":"string"},"repository":{"description":"Whether it is a git repository: it has .git, or it is a bare repository.","type":"boolean"}},"type":"object"},"type":"array"},"home":{"description":"The home folder of the user the server runs as.","type":"string"},"parent":{"description":"Its parent; empty for the root.","type":"string"},"path":{"description":"The folder listed, absolute and cleaned.","type":"string"},"repository":{"description":"Whether the folder listed is a git repository.","type":"boolean"},"truncated":{"description":"Whether there were more than the folders listed.","type":"boolean"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the folders in a folder on the machine the server runs on, so a client can pick one for AddRepository; a browser cannot give an absolute path itself.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/ListFolders"}},"/v1/source/history":{"get":{"description":"Lists the commits that change a file or a directory along the first-parent history\nof a commit, newest first, as `git log --no-renames --first-parent \u003ccommit\u003e -- \u003cpath\u003e`,\none page at a time.","operationId":"source.SourceService.ListHistory","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"The commit to walk from: an id (full or short), a branch, a tag or HEAD; empty is the\ndefault branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A file or a directory. The root (\"\", \"/\", \".\" or \"./\") lists every commit of the\nfirst-parent history.","type":"string"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}},{"in":"query","name":"limit","schema":{"description":"The same as page_size, kept for clients that already send it; used when page_size is 0.","type":"integer"}},{"in":"query","name":"since","schema":{"description":"List only the commits whose author time is at or after since. Open when unset.","format":"date-time","type":"string"}},{"in":"query","name":"until","schema":{"description":"List only the commits whose author time is before until. Open when unset. With\nsince, the window is half-open, [since, until), and until must be after since.","format":"date-time","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"The most commits in the page: 50 when 0, at most 1000.","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"commits":{"description":"The commits, newest first along the first-parent chain.","items":{"additionalProperties":false,"properties":{"author":{"description":"The author's name.","type":"string"},"author_time":{"description":"When the author made it.","format":"date-time","type":"string"},"commit":{"description":"The commit id.","type":"string"},"commit_time":{"description":"When it was committed (the committer time): the time it landed on the line a\nhistory follows, so a history, newest first, is in this order. author_time can be\nmuch older, as on a reviewed change that waited before it landed. Set by\nListHistory and StreamHistory; empty elsewhere and when the lake has no committer time.","format":"date-time","type":"string"},"profile":{"additionalProperties":false,"description":"The author's account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"},"subject":{"description":"The first line of the message.","type":"string"}},"type":"object"},"type":"array"},"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the commits that change a file or a directory along the first-parent history of a commit, newest first, as `git log --no-renames --first-parent \u003ccommit\u003e -- \u003cpath\u003e`, one page at a time.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/ListHistory"}},"/v1/source/history/stream":{"get":{"description":"Streams the commits ListHistory lists, newest first, every page of them, each with\nhow many files it changed, added and deleted against its first parent. The last\nmessage has done set. Over REST it is a server-sent event stream.","operationId":"source.SourceService.StreamHistory","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"The commit to walk from: an id (full or short), a branch, a tag or HEAD; empty is the\ndefault branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A file or a directory, as in ListHistory. The root streams every commit of the\nfirst-parent history.","type":"string"}},{"in":"query","name":"since","schema":{"description":"The window on author time, as in ListHistory: the earliest. Open when unset.","format":"date-time","type":"string"}},{"in":"query","name":"until","schema":{"description":"The latest author time, included. Open when unset.","format":"date-time","type":"string"}},{"in":"query","name":"chunk","schema":{"description":"The most commits in one message: 500 when 0, at most 2000.","type":"integer"}},{"in":"query","name":"paths","schema":{"description":"Also send each commit's changed paths under path (HistoryCommit.paths).","type":"boolean"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"commits":{"description":"The next commits, newest first along the first-parent chain.","items":{"additionalProperties":false,"properties":{"added":{"description":"Files the commit added.","type":"integer"},"changed":{"description":"The files the commit changed against its first parent, and how many of them it\nadded and deleted. A root commit counts against the empty tree.","type":"integer"},"commit":{"additionalProperties":false,"description":"The commit.","properties":{"author":{"description":"The author's name.","type":"string"},"author_time":{"description":"When the author made it.","format":"date-time","type":"string"},"commit":{"description":"The commit id.","type":"string"},"commit_time":{"description":"When it was committed (the committer time): the time it landed on the line a\nhistory follows, so a history, newest first, is in this order. author_time can be\nmuch older, as on a reviewed change that waited before it landed. Set by\nListHistory and StreamHistory; empty elsewhere and when the lake has no committer time.","format":"date-time","type":"string"},"profile":{"additionalProperties":false,"description":"The author's account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"},"subject":{"description":"The first line of the message.","type":"string"}},"type":"object"},"deleted":{"description":"Files the commit deleted.","type":"integer"},"paths":{"description":"With paths in the request: the paths the commit changed against its first parent\nunder the request's path, sorted, at most 1000. paths_cut says there were more.","items":{"type":"string"},"type":"array"},"paths_cut":{"description":"Whether the commit changed more paths than paths lists.","type":"boolean"}},"type":"object"},"type":"array"},"done":{"description":"Set on the last message; it may carry no commits.","type":"boolean"},"sent":{"description":"The commits sent so far, these included.","type":"integer"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the commits ListHistory lists, newest first, every page of them, each with how many files it changed, added and deleted against its first parent.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/StreamHistory"}},"/v1/source/query":{"post":{"description":"Runs one read-only SELECT (or WITH) statement over the views of the lake, one per\ntable, as `ahto query sql` does, and returns its first rows as JSON values. Any other\nstatement, or more than one, is refused. The rows are also at /arrow/v1/\u003crepo\u003e/query\nas Arrow (GET with ?sql=, or POST with the SQL as the body). A query that fails is\nINVALID_ARGUMENT; unless the gateway runs in public mode (GetInfo.public) the message\nis DuckDB's and the error carries a QueryError detail with where it points.","operationId":"source.SourceService.RunQuery","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"limit":{"description":"The most rows in the answer: 1000 when 0, at most 100000.","type":"integer"},"sql":{"description":"One SELECT or WITH statement over the views of the lake, such as\n\"SELECT count(*) FROM commits\". ahto never logs it.","type":"string"},"timeout":{"description":"How long the query may run: 10 s when unset, at most 60 s. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"}},"required":["sql"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"columns":{"description":"The column names.","items":{"type":"string"},"type":"array"},"rows":{"description":"The rows, each a list of JSON values in column order. A time is an RFC 3339 string,\nbytes are base64, an integer beyond 2^53 is a decimal string.","items":{"type":"array"},"type":"array"},"truncated":{"description":"Whether the query has more rows than the limit.","type":"boolean"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Runs one read-only SELECT (or WITH) statement over the views of the lake, one per table, as `ahto query sql` does, and returns its first rows as JSON values.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/RunQuery"}},"/v1/source/query/stream":{"get":{"description":"Streams the rows of one query, with the rules of RunQuery, as DuckDB reads them: the\nfirst message has the column names, and each message carries up to chunk rows and\nsays how many were sent. The last message has done set, and truncated when the query\nhas more rows than the limit. A query that fails is an error of the stream, as RunQuery\nsays it. ahto never logs the SQL. Over REST it is a server-sent event stream:\n?sql=\u003csql\u003e\u0026limit=\u003cn\u003e\u0026timeout=10s.","operationId":"source.SourceService.StreamQuery","parameters":[{"in":"query","name":"sql","schema":{"description":"One SELECT or WITH statement over the views of the lake, as RunQuery takes it.","type":"string"}},{"in":"query","name":"limit","schema":{"description":"The most rows in the stream: 1000 when 0, at most 100000.","type":"integer"}},{"in":"query","name":"timeout","schema":{"description":"How long the query may run, the whole stream included: 10 s when unset, at most 60 s. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"}},{"in":"query","name":"chunk","schema":{"description":"The most rows in one message: 500 when 0, at most 5000.","type":"integer"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"columns":{"description":"The column names, on the first message only.","items":{"type":"string"},"type":"array"},"done":{"description":"Set on the last message.","type":"boolean"},"rows":{"description":"The next rows, each a list of JSON values in column order, encoded as RunQuery does.","items":{"type":"array"},"type":"array"},"sent":{"description":"How many rows were sent so far, these included.","type":"integer"},"truncated":{"description":"On the last message: whether the query has more rows than the limit.","type":"boolean"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the rows of one query, with the rules of RunQuery, as DuckDB reads them: the first message has the column names, and each message carries up to chunk rows and says how many were sent.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/StreamQuery"}},"/v1/source/refs":{"get":{"description":"Lists the branches and tags of a repository as the last snapshot has them, in name\norder, each with the object it points at and the commit it leads to. Pass kind to keep\nonly branches or only tags. Refs whose name is not valid UTF-8 are left out. Returns\nNOT_FOUND when the repository is unknown or has no snapshot, and INVALID_ARGUMENT for\na kind that is not branch or tag or a page_token this server did not give. total_size counts every match, over all pages.","operationId":"source.SourceService.ListRefs","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"kind","schema":{"description":"branch or tag keeps only that kind of ref. Empty keeps both.","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"The most refs to return; 0 is 200, at most 1000.","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous answer, to read the next page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"The page_token of the next page; empty on the last page.","type":"string"},"refs":{"description":"The refs of one page, in name order.","items":{"additionalProperties":false,"properties":{"commit":{"description":"The commit the ref leads to, after peeling an annotated tag. Equal to target for a\nbranch and a lightweight tag.","type":"string"},"kind":{"description":"branch or tag.","type":"string"},"name":{"description":"The full ref name, such as \"refs/heads/main\" or \"refs/tags/v1\".","type":"string"},"selected":{"description":"Whether the crawl selected the ref, so that its history is in the lake.","type":"boolean"},"short_name":{"description":"The name without its refs/heads/ or refs/tags/ prefix.","type":"string"},"target":{"description":"The id of the object the ref points at: a commit, or the tag object of an annotated tag.","type":"string"}},"type":"object"},"type":"array"},"repo":{"description":"The repository id.","type":"string"},"snapshot":{"description":"The snapshot the answer comes from.","type":"string"},"total_size":{"description":"How many refs match kind, over every page.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the branches and tags of a repository as the last snapshot has them, in name order, each with the object it points at and the commit it leads to.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/ListRefs"}},"/v1/source/repositories":{"get":{"description":"Lists the repositories of the lake that are not removed, with their default branch\nand last snapshot: a page at a time, by name or by a stat, filtered by name and state,\nwith the stats of each when stats is true (stats is null without it).","operationId":"source.SourceService.ListRepositories","parameters":[{"in":"query","name":"query","schema":{"description":"Words that must all appear in the name, ignoring case.","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 1000, at most 1000 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}},{"in":"query","name":"order_by","schema":{"description":"name (A to Z), last_change (the newest first), changes (the most first) or size (the\nmost bytes first). Empty is name. Each order breaks ties by name. Any order but name\nreads the stats of every repository that matches.","type":"string"}},{"in":"query","name":"state","schema":{"description":"ok or needs_attention; empty is both. needs_attention is a repository with no\nsnapshot yet or whose last sync job failed.","type":"string"}},{"in":"query","name":"stats","schema":{"description":"Fill Repository.stats on the repositories of the page.","type":"boolean"}},{"in":"query","name":"totals","schema":{"description":"Fill ListRepositoriesResponse.totals: reads the stats of every repository that\nmatches, not only the page, so ask for it once rather than on every page.","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"needs_attention_count":{"description":"Repositories with no snapshot yet or whose last sync failed, over the whole match.","type":"integer"},"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"},"ok_count":{"description":"How many repositories match query in each state, whatever state asks.","type":"integer"},"repositories":{"description":"The repositories of the page, in order_by order.","items":{"additionalProperties":false,"properties":{"default_branch":{"description":"The ref the remote's HEAD points at in the last snapshot, such as\n\"refs/heads/master\". Empty when the remote had no HEAD.","type":"string"},"id":{"description":"The repository id, stable across crawls.","type":"string"},"identity_key":{"description":"The normalized remote URL or path the repository is known by.","type":"string"},"last_snapshot":{"description":"The id of the last snapshot. Empty before the first crawl.","type":"string"},"last_sync_status":{"description":"How the last sync ended, such as ok or failed.","type":"string"},"last_sync_time":{"description":"When the last crawl of the repository finished, and its status (\"published\" or\n\"unchanged\").","format":"date-time","type":"string"},"name":{"description":"The display name, such as \"github.com/golang/go\".","type":"string"},"next_sync_time":{"description":"When the schedule syncs it next; unset without a schedule. A time in the past means\nthe sync is due and starts within the next half minute.","format":"date-time","type":"string"},"object_format":{"description":"\"sha1\" or \"sha256\".","type":"string"},"stats":{"additionalProperties":false,"description":"The stats, when ListRepositories was asked for them (stats: true); null otherwise,\nwhich is not \"no stats\".","properties":{"bytes":{"description":"The size of the files at the head, in bytes.","type":"integer"},"changes":{"description":"The commits reachable from the head, merges left out.","type":"integer"},"files":{"description":"The files at the head and the sum of their sizes.","type":"integer"},"first_month":{"description":"The month of monthly_commits[0], such as \"2023-12\".","type":"string"},"head_commit":{"description":"The commit at the head of the default branch.","type":"string"},"last_change_author":{"description":"The author of the newest change.","type":"string"},"last_change_time":{"description":"The author time and author name of the head commit.","format":"date-time","type":"string"},"last_error":{"description":"The error of the last sync job when it failed; empty otherwise.","type":"string"},"monthly_commits":{"description":"First-parent commits per calendar month (UTC), 36 months, the oldest first; the last\nis the current month.","items":{"type":"integer"},"type":"array"},"people":{"description":"How many people authored them, one per name, and the names of the three with the\nmost commits. Never an email.","type":"integer"},"top_people":{"description":"The people with the most commits, most first.","items":{"type":"string"},"type":"array"}},"type":"object"},"sync_interval_seconds":{"description":"Seconds between scheduled syncs; 0 when the repository has no schedule.","type":"integer"},"sync_job":{"additionalProperties":false,"description":"The add or sync job waiting or running for it, if any.","properties":{"error":{"description":"Why the job failed.","type":"string"},"finish_time":{"description":"When it ended; unset while it runs.","format":"date-time","type":"string"},"id":{"description":"The job id.","type":"string"},"input":{"description":"The URL or folder crawled, without credentials.","type":"string"},"kind":{"description":"\"add\" or \"sync\".","type":"string"},"queue_time":{"description":"When the job was queued.","format":"date-time","type":"string"},"repo":{"description":"The repository id and name; empty for an add until its crawl starts.","type":"string"},"repo_name":{"description":"The repository's display name.","type":"string"},"result":{"additionalProperties":false,"description":"What the crawl did, once the job is done.","properties":{"new_blobs":{"description":"Blobs this run added.","type":"integer"},"new_changes":{"description":"File changes this run added.","type":"integer"},"new_commits":{"description":"Commits this run added to the lake.","type":"integer"},"new_file_versions":{"description":"File versions this run added.","type":"integer"},"new_tags":{"description":"Tags this run added.","type":"integer"},"new_trees":{"description":"Trees this run added.","type":"integer"},"refs_selected":{"description":"How many refs (branches and tags) the run read.","type":"integer"},"run_id":{"description":"The id of the sync run.","type":"string"},"snapshot_id":{"description":"The id of the snapshot the run wrote.","type":"string"},"status":{"description":"\"published\", or \"unchanged\" when the remote had nothing new.","type":"string"},"warning":{"description":"A note the crawl logged, such as a selection that matched no ref.","type":"string"}},"type":"object"},"stage":{"description":"While running: \"waiting\" (for the lake's write lock), \"crawling\", \"deriving\" or\n\"parsing\".","type":"string"},"start_time":{"description":"When it started running; unset while queued.","format":"date-time","type":"string"},"state":{"description":"\"queued\", \"running\", \"done\" or \"failed\".","type":"string"},"step":{"additionalProperties":false,"description":"While running: the crawl step the job is on, with its counts.","properties":{"detail":{"description":"What is happening in words: the refs selected, git's progress line, the counts.","type":"string"},"done":{"description":"done of total; total is 0 when not known (git's fetch, the listing).","type":"integer"},"name":{"description":"One of discover, fetch, keep, list, read, diff, blobs, write, publish (the crawl),\nderive or parse (after it).","type":"string"},"start_time":{"description":"When the step started.","format":"date-time","type":"string"},"total":{"description":"How many there are in all; 0 when not known.","type":"integer"}},"type":"object"},"trigger":{"description":"\"manual\" (a call) or \"schedule\" (the sync interval).","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"total_size":{"description":"How many repositories match query and state, over every page.","type":"integer"},"totals":{"additionalProperties":false,"description":"The sums over every repository that matches query and state, when totals is asked.","properties":{"bytes":{"description":"The size of all files at their repositories' heads, in bytes.","type":"integer"},"changes":{"description":"The commits reachable from each head, merges left out, added up.","type":"integer"},"files":{"description":"The files and their bytes at each head, added up.","type":"integer"},"first_change_time":{"description":"The author time of the earliest and of the latest change in any of them.","format":"date-time","type":"string"},"last_change_time":{"description":"The author time of the newest change.","format":"date-time","type":"string"},"people":{"description":"How many people authored them, one per name across every repository. Never a name\nor an email.","type":"integer"},"repositories":{"description":"How many repositories the sums cover.","type":"integer"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the repositories of the lake that are not removed, with their default branch and last snapshot: a page at a time, by name or by a stat, filtered by name and state, with the stats of each when stats is true (stats is null without it).","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/ListRepositories"},"post":{"description":"Adds a repository from a git URL, or from a folder on the machine the server runs on,\nas `ahto crawl` does. It checks the input, queues the crawl and returns the job at\nonce; GetSyncJob follows it. A URL the lake has already syncs that repository. A folder\nis PermissionDenied while the gateway accepts remote clients (protocol.allow_remote).","operationId":"source.SourceService.AddRepository","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"all_branches":{"description":"Every branch.","type":"boolean"},"branches":{"description":"Branches to crawl, refs/heads/NAME or a glob where * does not cross /. With no\nbranches, tags or all_branches, the default branch.","items":{"type":"string"},"type":"array"},"depth":{"description":"Fetch only the last N commits of each ref; 0 fetches the whole history.","type":"integer"},"sync_interval_seconds":{"description":"The sync interval to set once the repository is in the lake, as SetSyncSchedule\ntakes it. Absent: the lake default (lake.sync_interval); 0: off, synced only when\nasked; else 60 to 2592000.","type":"integer"},"tags":{"description":"Tags to crawl, refs/tags/NAME or a glob.","items":{"type":"string"},"type":"array"},"url":{"description":"A git URL (https, ssh, git or scp-like user@host:path), or a folder on the server's\nmachine as an absolute path or one starting with \"~/\".","type":"string"}},"required":["url"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"additionalProperties":false,"description":"The queued job.","properties":{"error":{"description":"Why the job failed.","type":"string"},"finish_time":{"description":"When it ended; unset while it runs.","format":"date-time","type":"string"},"id":{"description":"The job id.","type":"string"},"input":{"description":"The URL or folder crawled, without credentials.","type":"string"},"kind":{"description":"\"add\" or \"sync\".","type":"string"},"queue_time":{"description":"When the job was queued.","format":"date-time","type":"string"},"repo":{"description":"The repository id and name; empty for an add until its crawl starts.","type":"string"},"repo_name":{"description":"The repository's display name.","type":"string"},"result":{"additionalProperties":false,"description":"What the crawl did, once the job is done.","properties":{"new_blobs":{"description":"Blobs this run added.","type":"integer"},"new_changes":{"description":"File changes this run added.","type":"integer"},"new_commits":{"description":"Commits this run added to the lake.","type":"integer"},"new_file_versions":{"description":"File versions this run added.","type":"integer"},"new_tags":{"description":"Tags this run added.","type":"integer"},"new_trees":{"description":"Trees this run added.","type":"integer"},"refs_selected":{"description":"How many refs (branches and tags) the run read.","type":"integer"},"run_id":{"description":"The id of the sync run.","type":"string"},"snapshot_id":{"description":"The id of the snapshot the run wrote.","type":"string"},"status":{"description":"\"published\", or \"unchanged\" when the remote had nothing new.","type":"string"},"warning":{"description":"A note the crawl logged, such as a selection that matched no ref.","type":"string"}},"type":"object"},"stage":{"description":"While running: \"waiting\" (for the lake's write lock), \"crawling\", \"deriving\" or\n\"parsing\".","type":"string"},"start_time":{"description":"When it started running; unset while queued.","format":"date-time","type":"string"},"state":{"description":"\"queued\", \"running\", \"done\" or \"failed\".","type":"string"},"step":{"additionalProperties":false,"description":"While running: the crawl step the job is on, with its counts.","properties":{"detail":{"description":"What is happening in words: the refs selected, git's progress line, the counts.","type":"string"},"done":{"description":"done of total; total is 0 when not known (git's fetch, the listing).","type":"integer"},"name":{"description":"One of discover, fetch, keep, list, read, diff, blobs, write, publish (the crawl),\nderive or parse (after it).","type":"string"},"start_time":{"description":"When the step started.","format":"date-time","type":"string"},"total":{"description":"How many there are in all; 0 when not known.","type":"integer"}},"type":"object"},"trigger":{"description":"\"manual\" (a call) or \"schedule\" (the sync interval).","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Adds a repository from a git URL, or from a folder on the machine the server runs on, as `ahto crawl` does.","tags":["source"],"x-reason":"off in public mode","x-rpc":"ahto.source.v1.SourceService/AddRepository","x-served":false}},"/v1/source/repositories/{repo}":{"delete":{"description":"Removes a repository from the lake, as `ahto repo rm` does, and drops its sync\ninterval. Its rows stay in the files until `ahto storage gc`; it no longer lists.","operationId":"source.SourceService.RemoveRepository","parameters":[{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"description":"The id of the removed repository.","type":"string"},"name":{"description":"Its display name.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Removes a repository from the lake, as `ahto repo rm` does, and drops its sync interval.","tags":["source"],"x-reason":"off in public mode","x-rpc":"ahto.source.v1.SourceService/RemoveRepository","x-served":false}},"/v1/source/repositories/{repo}/schedule":{"put":{"description":"Sets how often the server syncs a repository while it runs: 0 turns it off, else from\none minute to 30 days. ListRepositories reads it back with the next sync time.","operationId":"source.SourceService.SetSyncSchedule","parameters":[{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"interval_seconds":{"description":"Seconds between syncs: 0 turns the schedule off, else 60 to 2592000 (30 days).","type":"integer"},"repo":{"description":"The repository: its id, or its name or identity key.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"repository":{"additionalProperties":false,"description":"The repository with its new interval and next sync time.","properties":{"default_branch":{"description":"The ref the remote's HEAD points at in the last snapshot, such as\n\"refs/heads/master\". Empty when the remote had no HEAD.","type":"string"},"id":{"description":"The repository id, stable across crawls.","type":"string"},"identity_key":{"description":"The normalized remote URL or path the repository is known by.","type":"string"},"last_snapshot":{"description":"The id of the last snapshot. Empty before the first crawl.","type":"string"},"last_sync_status":{"description":"How the last sync ended, such as ok or failed.","type":"string"},"last_sync_time":{"description":"When the last crawl of the repository finished, and its status (\"published\" or\n\"unchanged\").","format":"date-time","type":"string"},"name":{"description":"The display name, such as \"github.com/golang/go\".","type":"string"},"next_sync_time":{"description":"When the schedule syncs it next; unset without a schedule. A time in the past means\nthe sync is due and starts within the next half minute.","format":"date-time","type":"string"},"object_format":{"description":"\"sha1\" or \"sha256\".","type":"string"},"stats":{"additionalProperties":false,"description":"The stats, when ListRepositories was asked for them (stats: true); null otherwise,\nwhich is not \"no stats\".","properties":{"bytes":{"description":"The size of the files at the head, in bytes.","type":"integer"},"changes":{"description":"The commits reachable from the head, merges left out.","type":"integer"},"files":{"description":"The files at the head and the sum of their sizes.","type":"integer"},"first_month":{"description":"The month of monthly_commits[0], such as \"2023-12\".","type":"string"},"head_commit":{"description":"The commit at the head of the default branch.","type":"string"},"last_change_author":{"description":"The author of the newest change.","type":"string"},"last_change_time":{"description":"The author time and author name of the head commit.","format":"date-time","type":"string"},"last_error":{"description":"The error of the last sync job when it failed; empty otherwise.","type":"string"},"monthly_commits":{"description":"First-parent commits per calendar month (UTC), 36 months, the oldest first; the last\nis the current month.","items":{"type":"integer"},"type":"array"},"people":{"description":"How many people authored them, one per name, and the names of the three with the\nmost commits. Never an email.","type":"integer"},"top_people":{"description":"The people with the most commits, most first.","items":{"type":"string"},"type":"array"}},"type":"object"},"sync_interval_seconds":{"description":"Seconds between scheduled syncs; 0 when the repository has no schedule.","type":"integer"},"sync_job":{"additionalProperties":false,"description":"The add or sync job waiting or running for it, if any.","properties":{"error":{"description":"Why the job failed.","type":"string"},"finish_time":{"description":"When it ended; unset while it runs.","format":"date-time","type":"string"},"id":{"description":"The job id.","type":"string"},"input":{"description":"The URL or folder crawled, without credentials.","type":"string"},"kind":{"description":"\"add\" or \"sync\".","type":"string"},"queue_time":{"description":"When the job was queued.","format":"date-time","type":"string"},"repo":{"description":"The repository id and name; empty for an add until its crawl starts.","type":"string"},"repo_name":{"description":"The repository's display name.","type":"string"},"result":{"additionalProperties":false,"description":"What the crawl did, once the job is done.","properties":{"new_blobs":{"description":"Blobs this run added.","type":"integer"},"new_changes":{"description":"File changes this run added.","type":"integer"},"new_commits":{"description":"Commits this run added to the lake.","type":"integer"},"new_file_versions":{"description":"File versions this run added.","type":"integer"},"new_tags":{"description":"Tags this run added.","type":"integer"},"new_trees":{"description":"Trees this run added.","type":"integer"},"refs_selected":{"description":"How many refs (branches and tags) the run read.","type":"integer"},"run_id":{"description":"The id of the sync run.","type":"string"},"snapshot_id":{"description":"The id of the snapshot the run wrote.","type":"string"},"status":{"description":"\"published\", or \"unchanged\" when the remote had nothing new.","type":"string"},"warning":{"description":"A note the crawl logged, such as a selection that matched no ref.","type":"string"}},"type":"object"},"stage":{"description":"While running: \"waiting\" (for the lake's write lock), \"crawling\", \"deriving\" or\n\"parsing\".","type":"string"},"start_time":{"description":"When it started running; unset while queued.","format":"date-time","type":"string"},"state":{"description":"\"queued\", \"running\", \"done\" or \"failed\".","type":"string"},"step":{"additionalProperties":false,"description":"While running: the crawl step the job is on, with its counts.","properties":{"detail":{"description":"What is happening in words: the refs selected, git's progress line, the counts.","type":"string"},"done":{"description":"done of total; total is 0 when not known (git's fetch, the listing).","type":"integer"},"name":{"description":"One of discover, fetch, keep, list, read, diff, blobs, write, publish (the crawl),\nderive or parse (after it).","type":"string"},"start_time":{"description":"When the step started.","format":"date-time","type":"string"},"total":{"description":"How many there are in all; 0 when not known.","type":"integer"}},"type":"object"},"trigger":{"description":"\"manual\" (a call) or \"schedule\" (the sync interval).","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Sets how often the server syncs a repository while it runs: 0 turns it off, else from one minute to 30 days.","tags":["source"],"x-reason":"off in public mode","x-rpc":"ahto.source.v1.SourceService/SetSyncSchedule","x-served":false}},"/v1/source/repositories/{repo}/sync":{"post":{"description":"Crawls a repository again now, from the remote of its last crawl with that crawl's\nrefs and depth, then derives the read models and parses the new Go files. It returns\nthe job at once; a repository with a job already waiting or running gets that job.","operationId":"source.SourceService.SyncRepository","parameters":[{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"repo":{"description":"The repository: its id, or its name or identity key.","type":"string"},"wait_seconds":{"description":"Wait up to this many seconds (at most 600) for the job to finish, and answer it as it\nis then: an agent that committed in a folder repository syncs it and reads its own\ncommit in one call. 0 answers at once with the queued job.","type":"integer"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"additionalProperties":false,"description":"The queued job, or the one already waiting or running.","properties":{"error":{"description":"Why the job failed.","type":"string"},"finish_time":{"description":"When it ended; unset while it runs.","format":"date-time","type":"string"},"id":{"description":"The job id.","type":"string"},"input":{"description":"The URL or folder crawled, without credentials.","type":"string"},"kind":{"description":"\"add\" or \"sync\".","type":"string"},"queue_time":{"description":"When the job was queued.","format":"date-time","type":"string"},"repo":{"description":"The repository id and name; empty for an add until its crawl starts.","type":"string"},"repo_name":{"description":"The repository's display name.","type":"string"},"result":{"additionalProperties":false,"description":"What the crawl did, once the job is done.","properties":{"new_blobs":{"description":"Blobs this run added.","type":"integer"},"new_changes":{"description":"File changes this run added.","type":"integer"},"new_commits":{"description":"Commits this run added to the lake.","type":"integer"},"new_file_versions":{"description":"File versions this run added.","type":"integer"},"new_tags":{"description":"Tags this run added.","type":"integer"},"new_trees":{"description":"Trees this run added.","type":"integer"},"refs_selected":{"description":"How many refs (branches and tags) the run read.","type":"integer"},"run_id":{"description":"The id of the sync run.","type":"string"},"snapshot_id":{"description":"The id of the snapshot the run wrote.","type":"string"},"status":{"description":"\"published\", or \"unchanged\" when the remote had nothing new.","type":"string"},"warning":{"description":"A note the crawl logged, such as a selection that matched no ref.","type":"string"}},"type":"object"},"stage":{"description":"While running: \"waiting\" (for the lake's write lock), \"crawling\", \"deriving\" or\n\"parsing\".","type":"string"},"start_time":{"description":"When it started running; unset while queued.","format":"date-time","type":"string"},"state":{"description":"\"queued\", \"running\", \"done\" or \"failed\".","type":"string"},"step":{"additionalProperties":false,"description":"While running: the crawl step the job is on, with its counts.","properties":{"detail":{"description":"What is happening in words: the refs selected, git's progress line, the counts.","type":"string"},"done":{"description":"done of total; total is 0 when not known (git's fetch, the listing).","type":"integer"},"name":{"description":"One of discover, fetch, keep, list, read, diff, blobs, write, publish (the crawl),\nderive or parse (after it).","type":"string"},"start_time":{"description":"When the step started.","format":"date-time","type":"string"},"total":{"description":"How many there are in all; 0 when not known.","type":"integer"}},"type":"object"},"trigger":{"description":"\"manual\" (a call) or \"schedule\" (the sync interval).","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Crawls a repository again now, from the remote of its last crawl with that crawl's refs and depth, then derives the read models and parses the new Go files.","tags":["source"],"x-reason":"off in public mode","x-rpc":"ahto.source.v1.SourceService/SyncRepository","x-served":false}},"/v1/source/resolve":{"get":{"description":"Resolves a branch, a tag, HEAD or an object id of a repository, and a path in it, to\nthe commit id, the id of what the path names, its kind and the snapshot. Call it once\nper page, then call the other rpcs with the commit id.","operationId":"source.SourceService.Resolve","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"rev","schema":{"description":"HEAD (the default), a branch or tag of the last snapshot such as \"main\" or\n\"refs/tags/v1\", or a full commit or tag id.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A path in the commit's tree. Empty is the root.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"commit":{"description":"The commit rev names, after peeling tags.","type":"string"},"kind":{"description":"tree, file, exec, symlink or gitlink.","type":"string"},"mode":{"description":"The Git mode, such as \"100644\" or \"040000\".","type":"string"},"object":{"description":"The id of what the path names: the commit's tree for the empty path, a tree, a blob\nor, for a submodule, a commit of another repository.","type":"string"},"path":{"description":"The path without leading and trailing slashes.","type":"string"},"repo":{"description":"The repository id.","type":"string"},"snapshot":{"description":"The snapshot the answer comes from.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Resolves a branch, a tag, HEAD or an object id of a repository, and a path in it, to the commit id, the id of what the path names, its kind and the snapshot.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/Resolve"}},"/v1/source/review":{"get":{"description":"Returns the review that landed a commit: the GitHub pull request (by the commit, or\n\"(#N)\" in its subject) or the Gerrit change of its Reviewed-on trailer, with its\nreviewers, conversation and inline comments. Public forges only; names, never emails.","operationId":"source.SourceService.GetReview","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"review":{"additionalProperties":false,"description":"The review; unset when the forge has none for the commit.","properties":{"author":{"description":"The author's name or login.","type":"string"},"comments":{"description":"Inline comments on lines of files.","items":{"additionalProperties":false,"properties":{"author":{"description":"The author's name or login.","type":"string"},"body":{"description":"The text.","type":"string"},"line":{"description":"The line, 0 for a comment on the whole file.","type":"integer"},"path":{"description":"The file the comment is on.","type":"string"},"side":{"description":"\"old\" (the parent's side) or \"new\".","type":"string"},"time":{"description":"When it was written.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"fetched":{"description":"When the forge was asked.","format":"date-time","type":"string"},"kind":{"description":"\"github_pr\" or \"gerrit_change\".","type":"string"},"messages":{"description":"The conversation, oldest first: the description, comments and review summaries.","items":{"additionalProperties":false,"properties":{"author":{"description":"The author's name or login.","type":"string"},"body":{"description":"The text.","type":"string"},"time":{"description":"When it was written.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"number":{"description":"The pull request or change number on the forge.","type":"integer"},"reviewers":{"description":"Who reviewed it, with their verdicts.","items":{"additionalProperties":false,"properties":{"name":{"description":"The reviewer's name or login.","type":"string"},"verdict":{"description":"GitHub: \"approved\", \"changes_requested\" or \"commented\", the latest of the person.\nGerrit: one label vote, such as \"Code-Review+2\".","type":"string"}},"type":"object"},"type":"array"},"state":{"description":"\"open\", \"merged\", \"closed\" or \"abandoned\".","type":"string"},"title":{"description":"The review's title.","type":"string"},"url":{"description":"The review's page on its forge.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns the review that landed a commit: the GitHub pull request (by the commit, or \"(#N)\" in its subject) or the Gerrit change of its Reviewed-on trailer, with its reviewers, conversation and inline comments.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetReview"}},"/v1/source/schema":{"get":{"description":"Lists the tables RunQuery and StreamQuery read, with each column, its SQL type and\nwhat it holds, as `ahto query schema` prints them; table names one. Read it before\nwriting SQL. Commits, trees and blobs are shared by every repository; repo_commits,\nrefs and snapshots say which repository has them. The tables the lake's functions\nwrote (fn_\u003cname\u003e) come last, with the columns their manifests gave them.","operationId":"source.SourceService.GetSchema","parameters":[{"in":"query","name":"table","schema":{"description":"One table by name. Empty lists every table.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"tables":{"description":"The tables, in the order of the lake.","items":{"additionalProperties":false,"properties":{"columns":{"description":"Its columns, in order.","items":{"additionalProperties":false,"properties":{"description":{"description":"What the column holds.","type":"string"},"name":{"description":"The name, the SQL type (VARCHAR, BIGINT, TIMESTAMP and so on) and what it holds.","type":"string"},"type":{"description":"The SQL type, such as VARCHAR, BIGINT or TIMESTAMP.","type":"string"}},"type":"object"},"type":"array"},"name":{"description":"The name to use in SQL.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the tables RunQuery and StreamQuery read, with each column, its SQL type and what it holds, as `ahto query schema` prints them; table names one.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetSchema"}},"/v1/source/search":{"get":{"description":"Finds files, symbols, commits, people and lines of code that hold every word of a\ntext, ignoring case, in one repository or in all of them. It reads each repository's\ndefault branch at its last snapshot: the files, the symbols and the lines of its tree,\nand the commits and authors of its first-parent history. It answers one group per\nkind, best first. A person it finds carries no email, only the name it matched\n(ListAuthors gives the emails). Its answer changes with each crawl, so it carries no\nimmutable cache headers.","operationId":"source.SourceService.Search","parameters":[{"in":"query","name":"text","schema":{"description":"The words to find, separated by spaces, ignoring case. Every word must match. An empty\ntext finds nothing.","type":"string"}},{"in":"query","name":"repo","schema":{"description":"The repository id or name. Empty searches every repository of the lake.","type":"string"}},{"in":"query","name":"kinds","schema":{"description":"The kinds to find. Empty finds every kind.","items":{"enum":["SEARCH_KIND_UNSPECIFIED","SEARCH_KIND_FILE","SEARCH_KIND_SYMBOL","SEARCH_KIND_COMMIT","SEARCH_KIND_PERSON","SEARCH_KIND_CODE"],"type":"string"},"type":"array"}},{"in":"query","name":"limit","schema":{"description":"The most hits of each kind: 8 when 0, at most 100.","type":"integer"}},{"in":"query","name":"timeout","schema":{"description":"How long the search of code may run in each repository, a duration such as \"2s\":\n150 ms when unset (the UI searches while someone types), at most 10 s. A big\nrepository needs seconds; when the time runs out the CODE group is partial. A duration: seconds with an \"s\" suffix, for example \"30s\" or \"1.5s\".","pattern":"^-?[0-9]+(\\.[0-9]{1,9})?s$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"groups":{"description":"One group per kind asked for, in the order of SearchKind.","items":{"additionalProperties":false,"properties":{"hits":{"description":"The first hits, best first. A name is ranked by how the text matches it: the whole\nname, then its start, then the start of a word in it, then anywhere. Commits are\nnewest first after a commit whose id starts with the text.","items":{"additionalProperties":false,"properties":{"code":{"additionalProperties":false,"description":"Set when the hit is a line of code.","properties":{"cut":{"description":"Whether text was cut to 400 characters.","type":"boolean"},"line":{"description":"The line, from 1.","type":"integer"},"path":{"description":"The file, and the line, from 1.","type":"string"},"ranges":{"description":"Where the words are in text, in Unicode code points (not bytes, not UTF-16 units),\nin order.","items":{"additionalProperties":false,"properties":{"end":{"description":"The code point after the last one of the match.","type":"integer"},"start":{"description":"The first code point of the match.","type":"integer"}},"type":"object"},"type":"array"},"text":{"description":"The line, without its line ending. A line longer than 400 characters is cut to the\n400 around the first match, and cut says so.","type":"string"}},"type":"object"},"commit":{"description":"The commit searched: the head of the default branch, a full id.","type":"string"},"commit_hit":{"additionalProperties":false,"description":"Set when the hit is a commit.","properties":{"author_name":{"description":"The author's name.","type":"string"},"author_time":{"description":"When the author made the commit.","format":"date-time","type":"string"},"oid":{"description":"The full commit id.","type":"string"},"subject":{"description":"The first line of the message.","type":"string"}},"type":"object"},"file":{"additionalProperties":false,"description":"Set when the hit is a file.","properties":{"language":{"description":"The go-enry language, when known.","type":"string"},"path":{"description":"The full path.","type":"string"}},"type":"object"},"person":{"additionalProperties":false,"description":"Set when the hit is a person.","properties":{"commits":{"description":"How many first-parent commits of the default branch they authored.","type":"integer"},"last_time":{"description":"The author time of the last of them.","format":"date-time","type":"string"},"name":{"description":"The person's name.","type":"string"},"profile":{"additionalProperties":false,"description":"Their account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"}},"type":"object"},"repo":{"description":"The repository's display name, such as \"github.com/golang/go\".","type":"string"},"symbol":{"additionalProperties":false,"description":"Set when the hit is a symbol.","properties":{"container":{"description":"The receiver type of a method, the type of a field; empty otherwise.","type":"string"},"kind":{"description":"function, method, type, interface, struct, constant, variable, field or\ninterface_method.","type":"string"},"name":{"description":"The declared name.","type":"string"},"path":{"description":"The file it is declared in, and the line of its declaration, from 1.","type":"string"},"signature":{"description":"The parameters and results of a function or method, as written.","type":"string"},"start_line":{"description":"The line where the symbol starts, from 1.","type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"kind":{"description":"What the hits are: files, symbols, commits, people or code.","enum":["SEARCH_KIND_UNSPECIFIED","SEARCH_KIND_FILE","SEARCH_KIND_SYMBOL","SEARCH_KIND_COMMIT","SEARCH_KIND_PERSON","SEARCH_KIND_CODE"],"type":"string"},"more":{"description":"There are more hits than total counts: the search stopped at its limit or, when\npartial is set, ran out of time.","type":"boolean"},"partial":{"description":"The search of code ran out of time in at least one repository, so total and the hits\ncover only what it read in time, and 0 hits does not mean the text is not there.\nAsk again with a longer timeout, or use RunQuery over blob_contents.","type":"boolean"},"partial_repos":{"description":"The repositories, by display name, whose search ran out of time.","items":{"type":"string"},"type":"array"},"total":{"description":"How many hits there are in all. When more is true it is a lower bound: the search\nstopped counting.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Finds files, symbols, commits, people and lines of code that hold every word of a text, ignoring case, in one repository or in all of them.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/Search"}},"/v1/source/snapshots/watch":{"get":{"description":"Streams the state of the lake: first the current one, then one message each time a\ncrawl publishes. A page that receives one resolves its refs again.","operationId":"source.SourceService.WatchSnapshots","responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"manifest_seq":{"description":"The manifest version the server reads. It grows with every publish.","type":"integer"},"repositories":{"description":"Each repository with its last snapshot.","items":{"additionalProperties":false,"properties":{"repo":{"description":"The repository id.","type":"string"},"snapshot":{"description":"The id of its last snapshot.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the state of the lake: first the current one, then one message each time a crawl publishes.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/WatchSnapshots"}},"/v1/source/sync-jobs":{"get":{"description":"Lists the add and sync jobs the server remembers, newest first.","operationId":"source.SourceService.ListSyncJobs","parameters":[{"in":"query","name":"repo","schema":{"description":"Keep the jobs of this repository: its id, or its name or identity key. Optional.","type":"string"}},{"in":"query","name":"per_repo","schema":{"description":"Keep, for each repository, its queued and running jobs and its last per_repo finished\nones (an add with no repository yet counts under its input). 0 keeps every job.","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"jobs":{"description":"The jobs, newest first.","items":{"additionalProperties":false,"properties":{"error":{"description":"Why the job failed.","type":"string"},"finish_time":{"description":"When it ended; unset while it runs.","format":"date-time","type":"string"},"id":{"description":"The job id.","type":"string"},"input":{"description":"The URL or folder crawled, without credentials.","type":"string"},"kind":{"description":"\"add\" or \"sync\".","type":"string"},"queue_time":{"description":"When the job was queued.","format":"date-time","type":"string"},"repo":{"description":"The repository id and name; empty for an add until its crawl starts.","type":"string"},"repo_name":{"description":"The repository's display name.","type":"string"},"result":{"additionalProperties":false,"description":"What the crawl did, once the job is done.","properties":{"new_blobs":{"description":"Blobs this run added.","type":"integer"},"new_changes":{"description":"File changes this run added.","type":"integer"},"new_commits":{"description":"Commits this run added to the lake.","type":"integer"},"new_file_versions":{"description":"File versions this run added.","type":"integer"},"new_tags":{"description":"Tags this run added.","type":"integer"},"new_trees":{"description":"Trees this run added.","type":"integer"},"refs_selected":{"description":"How many refs (branches and tags) the run read.","type":"integer"},"run_id":{"description":"The id of the sync run.","type":"string"},"snapshot_id":{"description":"The id of the snapshot the run wrote.","type":"string"},"status":{"description":"\"published\", or \"unchanged\" when the remote had nothing new.","type":"string"},"warning":{"description":"A note the crawl logged, such as a selection that matched no ref.","type":"string"}},"type":"object"},"stage":{"description":"While running: \"waiting\" (for the lake's write lock), \"crawling\", \"deriving\" or\n\"parsing\".","type":"string"},"start_time":{"description":"When it started running; unset while queued.","format":"date-time","type":"string"},"state":{"description":"\"queued\", \"running\", \"done\" or \"failed\".","type":"string"},"step":{"additionalProperties":false,"description":"While running: the crawl step the job is on, with its counts.","properties":{"detail":{"description":"What is happening in words: the refs selected, git's progress line, the counts.","type":"string"},"done":{"description":"done of total; total is 0 when not known (git's fetch, the listing).","type":"integer"},"name":{"description":"One of discover, fetch, keep, list, read, diff, blobs, write, publish (the crawl),\nderive or parse (after it).","type":"string"},"start_time":{"description":"When the step started.","format":"date-time","type":"string"},"total":{"description":"How many there are in all; 0 when not known.","type":"integer"}},"type":"object"},"trigger":{"description":"\"manual\" (a call) or \"schedule\" (the sync interval).","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the add and sync jobs the server remembers, newest first.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/ListSyncJobs"}},"/v1/source/sync-jobs/watch":{"get":{"description":"Streams the add and sync jobs the server remembers: first all of them with reset set,\nnewest first, then a message each time jobs change, with the jobs that are new or\nchanged and the ids of the jobs the server forgot. A running job changes with its\nstep, at most about ten times a second. Over REST it is a server-sent event stream.\nIt is declared before GetSyncJob so that its route wins over sync-jobs/{id}.","operationId":"source.SourceService.WatchSyncJobs","parameters":[{"in":"query","name":"repo","schema":{"description":"Keep the jobs of this repository: its id, or its name or identity key. Optional. An\nadd job has no repository until its crawl starts, so it shows up then.","type":"string"}},{"in":"query","name":"per_repo","schema":{"description":"Keep, for each repository, its queued and running jobs and its last per_repo finished\nones (an add with no repository yet counts under its input). 0 keeps every job.\nA job that leaves that window, as newer ones finish, is in removed.","type":"integer"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"jobs":{"description":"The jobs that are new or changed since the last message, newest first; with reset,\nall of them.","items":{"additionalProperties":false,"properties":{"error":{"description":"Why the job failed.","type":"string"},"finish_time":{"description":"When it ended; unset while it runs.","format":"date-time","type":"string"},"id":{"description":"The job id.","type":"string"},"input":{"description":"The URL or folder crawled, without credentials.","type":"string"},"kind":{"description":"\"add\" or \"sync\".","type":"string"},"queue_time":{"description":"When the job was queued.","format":"date-time","type":"string"},"repo":{"description":"The repository id and name; empty for an add until its crawl starts.","type":"string"},"repo_name":{"description":"The repository's display name.","type":"string"},"result":{"additionalProperties":false,"description":"What the crawl did, once the job is done.","properties":{"new_blobs":{"description":"Blobs this run added.","type":"integer"},"new_changes":{"description":"File changes this run added.","type":"integer"},"new_commits":{"description":"Commits this run added to the lake.","type":"integer"},"new_file_versions":{"description":"File versions this run added.","type":"integer"},"new_tags":{"description":"Tags this run added.","type":"integer"},"new_trees":{"description":"Trees this run added.","type":"integer"},"refs_selected":{"description":"How many refs (branches and tags) the run read.","type":"integer"},"run_id":{"description":"The id of the sync run.","type":"string"},"snapshot_id":{"description":"The id of the snapshot the run wrote.","type":"string"},"status":{"description":"\"published\", or \"unchanged\" when the remote had nothing new.","type":"string"},"warning":{"description":"A note the crawl logged, such as a selection that matched no ref.","type":"string"}},"type":"object"},"stage":{"description":"While running: \"waiting\" (for the lake's write lock), \"crawling\", \"deriving\" or\n\"parsing\".","type":"string"},"start_time":{"description":"When it started running; unset while queued.","format":"date-time","type":"string"},"state":{"description":"\"queued\", \"running\", \"done\" or \"failed\".","type":"string"},"step":{"additionalProperties":false,"description":"While running: the crawl step the job is on, with its counts.","properties":{"detail":{"description":"What is happening in words: the refs selected, git's progress line, the counts.","type":"string"},"done":{"description":"done of total; total is 0 when not known (git's fetch, the listing).","type":"integer"},"name":{"description":"One of discover, fetch, keep, list, read, diff, blobs, write, publish (the crawl),\nderive or parse (after it).","type":"string"},"start_time":{"description":"When the step started.","format":"date-time","type":"string"},"total":{"description":"How many there are in all; 0 when not known.","type":"integer"}},"type":"object"},"trigger":{"description":"\"manual\" (a call) or \"schedule\" (the sync interval).","type":"string"}},"type":"object"},"type":"array"},"removed":{"description":"The ids of the jobs the server forgot since the last message (it keeps the last 200).","items":{"type":"string"},"type":"array"},"reset":{"description":"Set on the first message: jobs is every job, and a client replaces what it has.","type":"boolean"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the add and sync jobs the server remembers: first all of them with reset set, newest first, then a message each time jobs change, with the jobs that are new or changed and the ids of the jobs the server forgot.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/WatchSyncJobs"}},"/v1/source/sync-jobs/{id}":{"get":{"description":"Returns one add or sync job: its state, its stage while it runs, and the counts of\nthe crawl when it is done. The server remembers the last 200 jobs until it restarts.","operationId":"source.SourceService.GetSyncJob","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"additionalProperties":false,"description":"The job.","properties":{"error":{"description":"Why the job failed.","type":"string"},"finish_time":{"description":"When it ended; unset while it runs.","format":"date-time","type":"string"},"id":{"description":"The job id.","type":"string"},"input":{"description":"The URL or folder crawled, without credentials.","type":"string"},"kind":{"description":"\"add\" or \"sync\".","type":"string"},"queue_time":{"description":"When the job was queued.","format":"date-time","type":"string"},"repo":{"description":"The repository id and name; empty for an add until its crawl starts.","type":"string"},"repo_name":{"description":"The repository's display name.","type":"string"},"result":{"additionalProperties":false,"description":"What the crawl did, once the job is done.","properties":{"new_blobs":{"description":"Blobs this run added.","type":"integer"},"new_changes":{"description":"File changes this run added.","type":"integer"},"new_commits":{"description":"Commits this run added to the lake.","type":"integer"},"new_file_versions":{"description":"File versions this run added.","type":"integer"},"new_tags":{"description":"Tags this run added.","type":"integer"},"new_trees":{"description":"Trees this run added.","type":"integer"},"refs_selected":{"description":"How many refs (branches and tags) the run read.","type":"integer"},"run_id":{"description":"The id of the sync run.","type":"string"},"snapshot_id":{"description":"The id of the snapshot the run wrote.","type":"string"},"status":{"description":"\"published\", or \"unchanged\" when the remote had nothing new.","type":"string"},"warning":{"description":"A note the crawl logged, such as a selection that matched no ref.","type":"string"}},"type":"object"},"stage":{"description":"While running: \"waiting\" (for the lake's write lock), \"crawling\", \"deriving\" or\n\"parsing\".","type":"string"},"start_time":{"description":"When it started running; unset while queued.","format":"date-time","type":"string"},"state":{"description":"\"queued\", \"running\", \"done\" or \"failed\".","type":"string"},"step":{"additionalProperties":false,"description":"While running: the crawl step the job is on, with its counts.","properties":{"detail":{"description":"What is happening in words: the refs selected, git's progress line, the counts.","type":"string"},"done":{"description":"done of total; total is 0 when not known (git's fetch, the listing).","type":"integer"},"name":{"description":"One of discover, fetch, keep, list, read, diff, blobs, write, publish (the crawl),\nderive or parse (after it).","type":"string"},"start_time":{"description":"When the step started.","format":"date-time","type":"string"},"total":{"description":"How many there are in all; 0 when not known.","type":"integer"}},"type":"object"},"trigger":{"description":"\"manual\" (a call) or \"schedule\" (the sync interval).","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns one add or sync job: its state, its stage while it runs, and the counts of the crawl when it is done.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetSyncJob"}},"/v1/source/syntax":{"get":{"description":"Returns the syntax tree of a file at a commit in a language ahto parses (Go and the\ntree-sitter languages), every node in preorder with its byte span: from the\nsyntax_nodes table when `ahto parse` stored the blob's nodes, else parsed for this call.\nA file in any other language is FAILED_PRECONDITION (\"is not in a language ahto parses\").","operationId":"source.SourceService.GetSyntax","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"The path of a file in a language ahto parses.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"blob":{"description":"The blob id the path names at the commit.","type":"string"},"commit":{"description":"The commit, the path and the blob it names.","type":"string"},"error":{"description":"The first syntax error; empty when status is ok.","type":"string"},"language":{"description":"The language, Go, and the parser with ahto's extraction version, such as\ngo/parser go1.27.4 v1.","type":"string"},"nodes":{"description":"The nodes in preorder, as go/ast.Inspect visits them; a node's index is its place in\nthis list, and the root File is node 0.","items":{"additionalProperties":false,"properties":{"depth":{"description":"0 for the root, the parent's depth plus 1 otherwise.","type":"integer"},"end":{"description":"The end of the node's bytes in the blob, exclusive.","type":"integer"},"kind":{"description":"The go/ast type, such as FuncDecl, Ident or BasicLit.","type":"string"},"name":{"description":"Ident: the name; BasicLit: the literal as written; the operator or keyword of a\nBinaryExpr, UnaryExpr, AssignStmt, IncDecStmt, BranchStmt or GenDecl; else empty.","type":"string"},"name_raw":{"contentEncoding":"base64","description":"The name's bytes when they are not valid UTF-8; name is empty then.","type":"string"},"parent":{"description":"The parent's index, -1 for the root.","type":"integer"},"start":{"description":"The node's bytes in the blob: start inclusive, end exclusive.","type":"integer"}},"type":"object"},"type":"array"},"parser":{"description":"The parser and the version of ahto's extraction, such as go/parser go1.27.4 v1.","type":"string"},"path":{"description":"The file, from the repository root.","type":"string"},"status":{"description":"ok, or syntax_error with the first error in error: the tree is then what go/parser\nrecovered.","type":"string"},"stored":{"description":"Whether the tree came from the syntax_nodes table; false when it was parsed for this\ncall. Only stored and parser can differ between two answers to the same request,\nafter `ahto parse` stores the blob: the nodes are the same.","type":"boolean"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Returns the syntax tree of a file at a commit in a language ahto parses (Go and the tree-sitter languages), every node in preorder with its byte span: from the syntax_nodes table when `ahto parse` stored the blob's nodes, else parsed for this call.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetSyntax"}},"/v1/source/timelapse/stream":{"get":{"description":"Streams the time-lapse of a path: one frame per bucket of author time with at least\none commit, oldest first, each with the bucket's newest commit, its commit and author\ncounts (those of GetActivity) and what it changed under the path, one entry per path\nwith its net status over the bucket. A frame of more than 2000 changes comes in parts;\nthe last part has frame_end set. The last message has done set. Over REST it is a\nserver-sent event stream.","operationId":"source.SourceService.StreamTimeLapse","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"The commit to walk from: an id (full or short), a branch, a tag or HEAD; empty is the\ndefault branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A file or a directory. Empty is the whole tree.","type":"string"}},{"in":"query","name":"bucket","schema":{"description":"hour, day, week (from Monday), month or year, in UTC, as in GetActivity. month when\nempty.","type":"string"}},{"in":"query","name":"since","schema":{"description":"The window on author time, as in GetActivity: the earliest. Open when unset.","format":"date-time","type":"string"}},{"in":"query","name":"until","schema":{"description":"The latest author time, included. Open when unset.","format":"date-time","type":"string"}},{"in":"query","name":"from_commit","schema":{"description":"A commit of the history, as commit takes it: the time-lapse starts at its author time, as since\ndoes, so a client can go on from a commit it has. Not together with since.","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"authors":{"description":"How many distinct authors made them.","type":"integer"},"changes":{"description":"The changes of this part, by path.","items":{"additionalProperties":false,"properties":{"language":{"description":"The language and the role at the end of the bucket, as in ListFileStats. A deleted\npath has no language; its role comes from its path.","type":"string"},"lines":{"description":"The number of lines of a text blob.","type":"integer"},"path":{"description":"The full path from the repository root.","type":"string"},"role":{"description":"The part the file plays, as in FileStat.","type":"string"},"size":{"description":"The size in bytes and the lines at the end of the bucket; unset when deleted, for a\ngitlink, or when the lake does not describe the blob.","type":"integer"},"status":{"description":"A when the path is new in the bucket, D when the bucket ends with it deleted, else the\nlast change: M or T (a change of kind, such as a file to a symlink). A path added and\ndeleted in the same bucket is left out.","type":"string"}},"type":"object"},"type":"array"},"commit":{"description":"The newest commit of the bucket that changed the path: the tree to show at the\nframe's end.","type":"string"},"commits":{"description":"How many commits changed the path in the bucket, and how many distinct authors (by\nemail) made them.","type":"integer"},"done":{"description":"Set on the last message.","type":"boolean"},"frame":{"description":"The frame's place, from 1 to frames, and how many frames there are.","type":"integer"},"frame_end":{"description":"Set on the last part of a frame.","type":"boolean"},"frames":{"description":"How many frames there are in all.","type":"integer"},"start":{"description":"The first moment of the bucket, in UTC. Unset on a last message with no frames.","format":"date-time","type":"string"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the time-lapse of a path: one frame per bucket of author time with at least one commit, oldest first, each with the bucket's newest commit, its commit and author counts (those of GetActivity) and what it changed under the path, one entry per path with its net status over the bucket.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/StreamTimeLapse"}},"/v1/source/tree":{"get":{"description":"Lists one directory at a commit, in Git's order, each entry with its size, lines,\nlanguage and flags, and its first-parent history up to the commit: the number of\ncommits and authors that changed it and the last of those commits.","operationId":"source.SourceService.GetTree","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"A commit id (full or short), a branch, a tag or HEAD; empty is the default branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"The directory. Empty is the root.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"commit":{"description":"The commit and the directory listed.","type":"string"},"entries":{"description":"The entries in Git's order.","items":{"additionalProperties":false,"properties":{"authors":{"description":"How many distinct authors made those commits.","type":"integer"},"binary":{"description":"Whether the blob is binary, when the crawl scanned it.","type":"boolean"},"commits":{"description":"How many first-parent commits up to the request's commit changed the entry, and\nhow many distinct authors made them.","type":"integer"},"documentation":{"description":"Whether the file is documentation.","type":"boolean"},"generated":{"description":"Whether the file is generated.","type":"boolean"},"kind":{"description":"tree, file, exec, symlink or gitlink.","type":"string"},"language":{"description":"The language of the file, such as \"Go\". Empty when unknown.","type":"string"},"last_change":{"additionalProperties":false,"description":"The newest first-parent commit up to the request's commit that changed the entry.","properties":{"author":{"description":"The author's name.","type":"string"},"author_time":{"description":"When the author made it.","format":"date-time","type":"string"},"commit":{"description":"The commit id.","type":"string"},"commit_time":{"description":"When it was committed (the committer time): the time it landed on the line a\nhistory follows, so a history, newest first, is in this order. author_time can be\nmuch older, as on a reviewed change that waited before it landed. Set by\nListHistory and StreamHistory; empty elsewhere and when the lake has no committer time.","format":"date-time","type":"string"},"profile":{"additionalProperties":false,"description":"The author's account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"},"subject":{"description":"The first line of the message.","type":"string"}},"type":"object"},"lines":{"description":"The number of lines of a text blob the crawl scanned.","type":"integer"},"mode":{"description":"The Git mode, such as \"100644\".","type":"string"},"name":{"description":"The name in the directory and the full path.","type":"string"},"oid":{"description":"The tree, blob or (for a gitlink) commit id.","type":"string"},"path":{"description":"The full path from the repository root.","type":"string"},"role":{"description":"The part the file plays in the repository: code, test, docs, config, build, ci,\ndeploy, data, asset, generated, vendor or other. The crawl tags it (src/filerole);\nthe first rule that holds wins, so a Dockerfile is build and a test's JSON is test.","type":"string"},"size":{"description":"The size of a blob in bytes. Unset for a tree or a gitlink.","type":"integer"},"symlink_target":{"description":"Where a symlink points.","type":"string"},"test":{"description":"Whether the file is a test.","type":"boolean"},"vendored":{"description":"Whether the path is vendored, generated, a test or documentation.","type":"boolean"}},"type":"object"},"type":"array"},"path":{"description":"The directory read, from the repository root; empty for the root.","type":"string"},"tree":{"description":"The id of the directory's tree.","type":"string"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists one directory at a commit, in Git's order, each entry with its size, lines, language and flags, and its first-parent history up to the commit: the number of commits and authors that changed it and the last of those commits.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetTree"}},"/v1/source/upkeep":{"get":{"description":"Says whether a file or a directory is still kept up: its last change, the whole\nmonths since, and the authors who changed it in the twelve months before a moment\n(now by default). Only the changes authored at or before that moment count, and one\nperson with several emails is one author (merged by name, the email they used most).\nIts answer changes with the moment, so it carries no immutable cache headers.","operationId":"source.SourceService.GetUpkeep","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"The commit to walk from: an id (full or short), a branch, a tag or HEAD; empty is the\ndefault branch head.","type":"string"}},{"in":"query","name":"path","schema":{"description":"A file or a directory. Empty is the whole repository.","type":"string"}},{"in":"query","name":"as_of","schema":{"description":"The moment to measure from; now when unset (rounded down to the minute). Changes\nauthored after it are not counted.","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"active_authors":{"description":"The authors whose last change is in the twelve months before as_of, the most commits\nfirst.","items":{"additionalProperties":false,"properties":{"commits":{"description":"The number of first-parent commits by the author that changed the file.","type":"integer"},"email":{"description":"The author's email; empty in public mode.","type":"string"},"first_time":{"description":"The author times of the first and the last of those commits.","format":"date-time","type":"string"},"last_time":{"description":"The author time of the author's latest commit that changed the file.","format":"date-time","type":"string"},"name":{"description":"The author's name and email. The email is empty in public mode, where no address\nleaves the server.","type":"string"},"name_source":{"description":"Where name came from when it is not the name the commits carry. A client shows a\nname from SIGNED_OFF_BY, EMAIL, COMMITTER or UNKNOWN as derived, not as the author's own.","enum":["NAME_SOURCE_UNSPECIFIED","NAME_SOURCE_MAILMAP","NAME_SOURCE_SIGNED_OFF_BY","NAME_SOURCE_EMAIL","NAME_SOURCE_COMMITTER","NAME_SOURCE_UNKNOWN"],"type":"string"},"profile":{"additionalProperties":false,"description":"The author's account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"as_of":{"description":"The moment measured from.","format":"date-time","type":"string"},"authors":{"description":"How many authors changed the path up to as_of, one per name.","type":"integer"},"last_change":{"description":"The author time of the last change; unset when no commit of the lake changes the path.","format":"date-time","type":"string"},"months_idle":{"description":"The whole calendar months from the last change to as_of.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Says whether a file or a directory is still kept up: its last change, the whole months since, and the authors who changed it in the twelve months before a moment (now by default).","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/GetUpkeep"}},"/v1/source/upkeep/stream":{"get":{"description":"Streams the upkeep of several paths, one message per path in the order asked, each\nthe answer GetUpkeep gives for it, all measured from one moment. The last message has\ndone set. Over REST it is a server-sent event stream; repeat paths in the query\n(?paths=a\u0026paths=b).","operationId":"source.SourceService.StreamUpkeep","parameters":[{"in":"query","name":"repo","schema":{"description":"The repository id or name. Optional when the lake has one repository.","type":"string"}},{"in":"query","name":"commit","schema":{"description":"The commit to walk from: an id (full or short), a branch, a tag or HEAD; empty is the\ndefault branch head.","type":"string"}},{"in":"query","name":"paths","schema":{"description":"Files or directories, at most 1000. None is the root alone.","items":{"type":"string"},"type":"array"}},{"in":"query","name":"as_of","schema":{"description":"The moment every path is measured from, as in GetUpkeep; now when unset.","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"done":{"description":"Set on the last message.","type":"boolean"},"path":{"description":"The path this message is about.","type":"string"},"sent":{"description":"The paths sent so far, this one included, and how many were asked.","type":"integer"},"total":{"description":"How many paths were asked.","type":"integer"},"upkeep":{"additionalProperties":false,"description":"What GetUpkeep answers for the path.","properties":{"active_authors":{"description":"The authors whose last change is in the twelve months before as_of, the most commits\nfirst.","items":{"additionalProperties":false,"properties":{"commits":{"description":"The number of first-parent commits by the author that changed the file.","type":"integer"},"email":{"description":"The author's email; empty in public mode.","type":"string"},"first_time":{"description":"The author times of the first and the last of those commits.","format":"date-time","type":"string"},"last_time":{"description":"The author time of the author's latest commit that changed the file.","format":"date-time","type":"string"},"name":{"description":"The author's name and email. The email is empty in public mode, where no address\nleaves the server.","type":"string"},"name_source":{"description":"Where name came from when it is not the name the commits carry. A client shows a\nname from SIGNED_OFF_BY, EMAIL, COMMITTER or UNKNOWN as derived, not as the author's own.","enum":["NAME_SOURCE_UNSPECIFIED","NAME_SOURCE_MAILMAP","NAME_SOURCE_SIGNED_OFF_BY","NAME_SOURCE_EMAIL","NAME_SOURCE_COMMITTER","NAME_SOURCE_UNKNOWN"],"type":"string"},"profile":{"additionalProperties":false,"description":"The author's account on the forge, when known.","properties":{"bot":{"description":"Whether the account is a bot: a login ending in [bot], a known bot, or a role address\nwhose local part stands in for a missing name (NAME_SOURCE_EMAIL).","type":"boolean"},"forge":{"description":"github or gitlab.","type":"string"},"login":{"description":"The account name, such as \"octocat\" or \"dependabot[bot]\".","type":"string"},"unlinked":{"description":"Whether the forge was asked and no account is linked to the author's email: show\n\"This author's email is not linked to a GitHub account\". Login is then empty.","type":"boolean"},"url":{"description":"The account's page, such as \"https://github.com/octocat\".","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"as_of":{"description":"The moment measured from.","format":"date-time","type":"string"},"authors":{"description":"How many authors changed the path up to as_of, one per name.","type":"integer"},"last_change":{"description":"The author time of the last change; unset when no commit of the lake changes the path.","format":"date-time","type":"string"},"months_idle":{"description":"The whole calendar months from the last change to as_of.","type":"integer"}},"type":"object"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams the upkeep of several paths, one message per path in the order asked, each the answer GetUpkeep gives for it, all measured from one moment.","tags":["source"],"x-rpc":"ahto.source.v1.SourceService/StreamUpkeep"}},"/v1/tasks":{"get":{"description":"Lists tasks in tree order (a parent before its children, siblings by rank). With\nparent_id, the subtree under that task to depth levels; without it, every task.\nThe filters combine with AND. Paged with page_size and page_token.","operationId":"task.TaskService.ListTasks","parameters":[{"in":"query","name":"parent_id","schema":{"description":"Only the subtree under this task, the task itself left out. Empty is every task.","type":"string"}},{"in":"query","name":"depth","schema":{"description":"How many levels under parent_id: 1 is its children. 0 is every level. At most 100.","type":"integer"}},{"in":"query","name":"roots","schema":{"description":"Only projects (tasks without a parent).","type":"boolean"}},{"in":"query","name":"states","schema":{"description":"Only tasks in one of these states.","items":{"enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"type":"array"}},{"in":"query","name":"label","schema":{"description":"Only tasks with this label.","type":"string"}},{"in":"query","name":"repository_id","schema":{"description":"Only tasks about this repository.","type":"string"}},{"in":"query","name":"assignee","schema":{"description":"Only tasks of this assignee.","type":"string"}},{"in":"query","name":"include_deleted","schema":{"description":"Include removed tasks.","type":"boolean"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 200, at most 1000 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"},"tasks":{"description":"This page of tasks, in tree order.","items":{"additionalProperties":false,"properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"},"type":"array"},"total":{"description":"How many tasks match, over every page.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists tasks in tree order (a parent before its children, siblings by rank).","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/ListTasks"},"post":{"description":"Adds a task. Without parent_id it is a new project. It goes last among its\nsiblings unless before_id or after_id names a sibling to stand next to. The state\nis backlog unless given; it cannot start as done or dropped.","operationId":"task.TaskService.AddTask","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"acceptance":{"description":"What must be true when it is done.","items":{"type":"string"},"type":"array"},"after_id":{"description":"Place it just after this sibling.","type":"string"},"assignee":{"description":"Who works on it.","type":"string"},"before_id":{"description":"Place it just before this sibling.","type":"string"},"body":{"description":"What the task is, in Markdown.","type":"string"},"due_on":{"description":"As 2026-12-01.","type":"string"},"hours":{"description":"The estimate in hours; 0 is none.","type":"number"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent. Empty adds a project.","type":"string"},"repository_id":{"description":"The repository it is about, as source_list_repositories names it.","type":"string"},"size":{"description":"A size, such as S, M or L.","type":"string"},"start_on":{"description":"As 2026-12-01.","type":"string"},"state":{"description":"backlog when not given. Not done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title. Required.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"task":{"additionalProperties":false,"description":"The task as it is now.","properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Adds a task.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/AddTask"}},"/v1/tasks/chain":{"get":{"description":"Gets the longest chain of open tasks under root_id by hours: each task in it waits\nfor the one before (it depends on it, or it is its parent). The first task is the\none to start first. Paged with page_size and page_token.","operationId":"task.TaskService.GetChain","parameters":[{"in":"query","name":"root_id","schema":{"description":"The task whose chain to find: it and its open subtree. Empty is every open task.","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 100, at most 1000 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"cycle_ids":{"description":"Tasks left out because their dependencies loop.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours of the whole chain, summed.","type":"number"},"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"},"tasks":{"description":"The chain, the task to start first first.","items":{"additionalProperties":false,"properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Gets the longest chain of open tasks under root_id by hours: each task in it waits for the one before (it depends on it, or it is its parent).","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/GetChain"}},"/v1/tasks/export":{"get":{"description":"Exports the node's op log: every op, oldest first. Import reads it back, here or on\nanother node, and the tree, the links and the history come back the same.","operationId":"task.TaskService.Export","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"export":{"additionalProperties":false,"description":"The node's op log.","properties":{"exported_at":{"description":"When it was exported.","format":"date-time","type":"string"},"format":{"description":"Always ahto.task.v1; Import refuses any other.","type":"string"},"ops":{"description":"Every op, oldest first.","items":{"additionalProperties":false,"properties":{"at":{"description":"When it was written, from hlc.","format":"date-time","type":"string"},"body":{"description":"What changed, as a JSON object. A forced write keeps its force_reason here.","type":"string"},"hlc":{"description":"The hybrid logical clock when it was written. Ops apply in (hlc, peer_id) order.","type":"string"},"kind":{"description":"What it does: create, set, move, state, link, unlink, comment or delete.","enum":["OP_KIND_UNSPECIFIED","OP_KIND_CREATE","OP_KIND_SET","OP_KIND_MOVE","OP_KIND_STATE","OP_KIND_LINK","OP_KIND_UNLINK","OP_KIND_COMMENT","OP_KIND_DELETE"],"type":"string"},"op_id":{"description":"The SHA-256 of the op's fields, in hex. It names the op on every node.","type":"string"},"peer_id":{"description":"The node that wrote it.","type":"string"},"seq":{"description":"The node's count of its own ops: 1, 2, 3.","type":"integer"},"sig":{"contentEncoding":"base64","description":"The node's ed25519 signature of op_id, when the node has a p2p key. Empty otherwise.","type":"string"},"task_id":{"description":"The task it changes.","type":"string"}},"type":"object"},"type":"array"},"peer_id":{"description":"The node that exported it.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Exports the node's op log: every op, oldest first.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/Export"}},"/v1/tasks/history":{"get":{"description":"Lists the ops of a task (or of its subtree, or of every task), newest first: who\nchanged what and when, the comments, and the force_reason of each forced write.\nPaged with page_size and page_token.","operationId":"task.TaskService.ListHistory","parameters":[{"in":"query","name":"task_id","schema":{"description":"Only the ops of this task. Empty is every task.","type":"string"}},{"in":"query","name":"subtree","schema":{"description":"With task_id, the ops of its subtree too.","type":"boolean"}},{"in":"query","name":"kinds","schema":{"description":"Only ops of these kinds, for example OP_KIND_COMMENT for the comments.","items":{"enum":["OP_KIND_UNSPECIFIED","OP_KIND_CREATE","OP_KIND_SET","OP_KIND_MOVE","OP_KIND_STATE","OP_KIND_LINK","OP_KIND_UNLINK","OP_KIND_COMMENT","OP_KIND_DELETE"],"type":"string"},"type":"array"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 100, at most 1000 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"},"ops":{"description":"Newest first.","items":{"additionalProperties":false,"properties":{"at":{"description":"When it was written, from hlc.","format":"date-time","type":"string"},"body":{"description":"What changed, as a JSON object. A forced write keeps its force_reason here.","type":"string"},"hlc":{"description":"The hybrid logical clock when it was written. Ops apply in (hlc, peer_id) order.","type":"string"},"kind":{"description":"What it does: create, set, move, state, link, unlink, comment or delete.","enum":["OP_KIND_UNSPECIFIED","OP_KIND_CREATE","OP_KIND_SET","OP_KIND_MOVE","OP_KIND_STATE","OP_KIND_LINK","OP_KIND_UNLINK","OP_KIND_COMMENT","OP_KIND_DELETE"],"type":"string"},"op_id":{"description":"The SHA-256 of the op's fields, in hex. It names the op on every node.","type":"string"},"peer_id":{"description":"The node that wrote it.","type":"string"},"seq":{"description":"The node's count of its own ops: 1, 2, 3.","type":"integer"},"sig":{"contentEncoding":"base64","description":"The node's ed25519 signature of op_id, when the node has a p2p key. Empty otherwise.","type":"string"},"task_id":{"description":"The task it changes.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists the ops of a task (or of its subtree, or of every task), newest first: who changed what and when, the comments, and the force_reason of each forced write.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/ListHistory"}},"/v1/tasks/import":{"post":{"description":"Imports an Export of ahto's: the ops not already here are added and the tasks are\nworked out again from the whole log. Any other format is refused. Importing the\nsame export twice is the same as once.","operationId":"task.TaskService.Import","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"export":{"additionalProperties":false,"description":"What Export answered, on this node or another.","properties":{"exported_at":{"description":"When it was exported.","format":"date-time","type":"string"},"format":{"description":"Always ahto.task.v1; Import refuses any other.","type":"string"},"ops":{"description":"Every op, oldest first.","items":{"additionalProperties":false,"properties":{"at":{"description":"When it was written, from hlc.","format":"date-time","type":"string"},"body":{"description":"What changed, as a JSON object. A forced write keeps its force_reason here.","type":"string"},"hlc":{"description":"The hybrid logical clock when it was written. Ops apply in (hlc, peer_id) order.","type":"string"},"kind":{"description":"What it does: create, set, move, state, link, unlink, comment or delete.","enum":["OP_KIND_UNSPECIFIED","OP_KIND_CREATE","OP_KIND_SET","OP_KIND_MOVE","OP_KIND_STATE","OP_KIND_LINK","OP_KIND_UNLINK","OP_KIND_COMMENT","OP_KIND_DELETE"],"type":"string"},"op_id":{"description":"The SHA-256 of the op's fields, in hex. It names the op on every node.","type":"string"},"peer_id":{"description":"The node that wrote it.","type":"string"},"seq":{"description":"The node's count of its own ops: 1, 2, 3.","type":"integer"},"sig":{"contentEncoding":"base64","description":"The node's ed25519 signature of op_id, when the node has a p2p key. Empty otherwise.","type":"string"},"task_id":{"description":"The task it changes.","type":"string"}},"type":"object"},"type":"array"},"peer_id":{"description":"The node that exported it.","type":"string"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"added":{"description":"Ops that were not here before.","type":"integer"},"skipped":{"description":"Ops that were here already.","type":"integer"},"tasks":{"description":"The tasks the store holds after the import, removed ones left out.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Imports an Export of ahto's: the ops not already here are added and the tasks are worked out again from the whole log.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/Import"}},"/v1/tasks/late":{"get":{"description":"Lists what is late: open tasks past their due day, and tasks the plan (as\nPlanTasks makes it) ends after their due day. Soonest due first. Paged with page_size and page_token.","operationId":"task.TaskService.ListLate","parameters":[{"in":"query","name":"root_id","schema":{"description":"Only root_id and its subtree. Empty is every open task.","type":"string"}},{"in":"query","name":"hours_per_day","schema":{"description":"As in PlanTasks: the hours a day holds; 0 means 8.","type":"number"}},{"in":"query","name":"start_on","schema":{"description":"As in PlanTasks: the day the plan starts, which is also the day a due day before it\nis overdue. Empty is today (UTC).","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 100, at most 1000 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"},"tasks":{"description":"Each with the reason overdue or after_due, soonest due first.","items":{"additionalProperties":false,"properties":{"ends_on":{"description":"The day the plan ends it. Empty when it is not planned.","type":"string"},"reason":{"description":"overdue (its due day is before the plan starts), after_due (the plan ends it after\nits due day), dependency_cycle (its dependencies loop, so it cannot be ordered) or\nbeyond_horizon (it would end more than 3660 days after the plan starts).","type":"string"},"task":{"additionalProperties":false,"description":"The task that cannot be planned in time.","properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"},"task_ids":{"description":"For dependency_cycle: the tasks it waits on that cannot be ordered either.","items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists what is late: open tasks past their due day, and tasks the plan (as PlanTasks makes it) ends after their due day.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/ListLate"}},"/v1/tasks/next":{"get":{"description":"Lists what to work on next: ready tasks whose dependencies are all done, soonest\ndue first (tasks without a due date last), then by rank. Paged with page_size and page_token.","operationId":"task.TaskService.ListNext","parameters":[{"in":"query","name":"parent_id","schema":{"description":"Only tasks under this one.","type":"string"}},{"in":"query","name":"assignee","schema":{"description":"Only tasks of this assignee.","type":"string"}},{"in":"query","name":"label","schema":{"description":"Only tasks with this label.","type":"string"}},{"in":"query","name":"repository_id","schema":{"description":"Only tasks about this repository.","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many to return: 0 means 20, at most 1000 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"},"tasks":{"description":"This page of ready tasks, most urgent first.","items":{"additionalProperties":false,"properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Lists what to work on next: ready tasks whose dependencies are all done, soonest due first (tasks without a due date last), then by rank.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/ListNext"}},"/v1/tasks/plan":{"get":{"description":"Plans the open tasks of root_id and its subtree into days from start_on, at\nhours_per_day: dependencies first, then soonest due (a task is as urgent as the\nmost urgent task waiting on it), a parent after its open children, no task before\nits own start_on. Answers what each day holds (days with nothing planned are left\nout) and, on the first page, what cannot fit: tasks the plan ends after their due\nday, tasks already overdue, tasks whose dependencies loop and tasks past the\nhorizon. A task without hours takes none and is counted in unestimated. Every day\ncounts as a work day. Paged by day with page_size and page_token.","operationId":"task.TaskService.PlanTasks","parameters":[{"in":"query","name":"root_id","schema":{"description":"The task to plan: it and its open subtree. Empty is every open task.","type":"string"}},{"in":"query","name":"hours_per_day","schema":{"description":"The hours of work a day holds, above 0 and at most 24; 0 means 8.","type":"number"}},{"in":"query","name":"start_on","schema":{"description":"The first day of the plan, as 2026-12-01. Empty is today (UTC).","type":"string"}},{"in":"query","name":"page_size","schema":{"description":"How many days to return: 0 means 100, at most 1000 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"days":{"description":"The days with work planned, in order.","items":{"additionalProperties":false,"properties":{"day":{"description":"The day, as 2026-12-01.","type":"string"},"hours":{"description":"The hours planned on it.","type":"number"},"items":{"description":"The work of the day, in the order it is done.","items":{"additionalProperties":false,"properties":{"due_on":{"description":"The task's due day. Empty is none.","type":"string"},"ends":{"description":"Whether the task ends on this day.","type":"boolean"},"hours":{"description":"The hours of the task planned on this day.","type":"number"},"task_id":{"description":"The task's id.","type":"string"},"title":{"description":"The task's title.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"ends_on":{"description":"The last day with work planned. Empty when nothing is.","type":"string"},"misses":{"description":"What cannot fit, soonest due first. On the first page only.","items":{"additionalProperties":false,"properties":{"ends_on":{"description":"The day the plan ends it. Empty when it is not planned.","type":"string"},"reason":{"description":"overdue (its due day is before the plan starts), after_due (the plan ends it after\nits due day), dependency_cycle (its dependencies loop, so it cannot be ordered) or\nbeyond_horizon (it would end more than 3660 days after the plan starts).","type":"string"},"task":{"additionalProperties":false,"description":"The task that cannot be planned in time.","properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"},"task_ids":{"description":"For dependency_cycle: the tasks it waits on that cannot be ordered either.","items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"},"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"},"planned":{"description":"How many tasks are planned.","type":"integer"},"unestimated":{"description":"How many of planned have no hours, and so take none.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Plans the open tasks of root_id and its subtree into days from start_on, at hours_per_day: dependencies first, then soonest due (a task is as urgent as the most urgent task waiting on it), a parent after its open children, no task before its own start_on.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/PlanTasks"}},"/v1/tasks/tree":{"get":{"description":"Gets a subtree as a flat list in tree order, each node with its depth and the\nrollup of everything under it. Without id, every project and what is under it.\nPaged with page_size and page_token.","operationId":"task.TaskService.GetTree","parameters":[{"in":"query","name":"id","schema":{"description":"The task at the top. Empty is every project.","type":"string"}},{"in":"query","name":"depth","schema":{"description":"How many levels under it: 0 is every level. At most 100.","type":"integer"}},{"in":"query","name":"include_deleted","schema":{"description":"Include removed tasks.","type":"boolean"}},{"in":"query","name":"page_size","schema":{"description":"How many nodes to return: 0 means 1000, at most 10000 (more is INVALID_ARGUMENT).","type":"integer"}},{"in":"query","name":"page_token","schema":{"description":"The next_page_token of the previous page. Empty for the first page.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_page_token":{"description":"Pass it as page_token for the next page. Empty on the last page.","type":"string"},"nodes":{"description":"The nodes in tree order: each after its parent, siblings by rank.","items":{"additionalProperties":false,"properties":{"depth":{"description":"0 for the top of the tree, 1 for its children.","type":"integer"},"rollup":{"additionalProperties":false,"description":"The totals over this node's subtree.","properties":{"done":{"description":"How many of total are done.","type":"integer"},"dropped":{"description":"How many are dropped.","type":"integer"},"hours":{"description":"The hours of total, summed.","type":"number"},"latest_due_on":{"description":"The latest due_on of total. Empty when none has one.","type":"string"},"total":{"description":"The tasks under it, dropped ones left out.","type":"integer"}},"type":"object"},"task":{"additionalProperties":false,"description":"The task.","properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"total":{"description":"How many nodes the tree has, over every page.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Gets a subtree as a flat list in tree order, each node with its depth and the rollup of everything under it.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/GetTree"}},"/v1/tasks/watch":{"get":{"description":"Streams each op as it is written, from now on, or from after after_hlc first. With\ntask_id, only the ops of that task and its subtree.","operationId":"task.TaskService.WatchTasks","parameters":[{"in":"query","name":"task_id","schema":{"description":"Only ops of this task and its subtree, as it is when each op is written.","type":"string"}},{"in":"query","name":"after_hlc","schema":{"description":"Send the ops after this hlc first, then the new ones. Empty is only new ones.","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"additionalProperties":false,"properties":{"op":{"additionalProperties":false,"description":"The op that was written.","properties":{"at":{"description":"When it was written, from hlc.","format":"date-time","type":"string"},"body":{"description":"What changed, as a JSON object. A forced write keeps its force_reason here.","type":"string"},"hlc":{"description":"The hybrid logical clock when it was written. Ops apply in (hlc, peer_id) order.","type":"string"},"kind":{"description":"What it does: create, set, move, state, link, unlink, comment or delete.","enum":["OP_KIND_UNSPECIFIED","OP_KIND_CREATE","OP_KIND_SET","OP_KIND_MOVE","OP_KIND_STATE","OP_KIND_LINK","OP_KIND_UNLINK","OP_KIND_COMMENT","OP_KIND_DELETE"],"type":"string"},"op_id":{"description":"The SHA-256 of the op's fields, in hex. It names the op on every node.","type":"string"},"peer_id":{"description":"The node that wrote it.","type":"string"},"seq":{"description":"The node's count of its own ops: 1, 2, 3.","type":"integer"},"sig":{"contentEncoding":"base64","description":"The node's ed25519 signature of op_id, when the node has a p2p key. Empty otherwise.","type":"string"},"task_id":{"description":"The task it changes.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"server-sent events: \"message\" carries one answer, \"error\" a problem, \"end\" closes the stream"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Streams each op as it is written, from now on, or from after after_hlc first.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/WatchTasks"}},"/v1/tasks/{from_id}/links":{"post":{"description":"Links two tasks: from_id depends on, relates to or duplicates to_id. Both must\nexist, and a dependency that would close a loop is refused. Linking twice is the\nsame as once.","operationId":"task.TaskService.AddLink","parameters":[{"in":"path","name":"from_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"from_id":{"description":"The task the link starts at: for depends_on, the one that waits.","type":"string"},"kind":{"description":"depends_on, relates or duplicates.","enum":["LINK_KIND_UNSPECIFIED","LINK_KIND_DEPENDS_ON","LINK_KIND_RELATES","LINK_KIND_DUPLICATES"],"type":"string"},"to_id":{"description":"The task it points to.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"link":{"additionalProperties":false,"description":"The link, as it is now.","properties":{"from_id":{"description":"The id of the task that depends on, relates to or duplicates the other.","type":"string"},"kind":{"description":"How from_id stands to to_id.","enum":["LINK_KIND_UNSPECIFIED","LINK_KIND_DEPENDS_ON","LINK_KIND_RELATES","LINK_KIND_DUPLICATES"],"type":"string"},"state":{"description":"The state of the task at the other end.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"The title of the task at the other end, for reading. Empty in exports.","type":"string"},"to_id":{"description":"The id of the task at the other end.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Links two tasks: from_id depends on, relates to or duplicates to_id.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/AddLink"}},"/v1/tasks/{from_id}/links/remove":{"post":{"description":"Removes a link. Removing a link that is not there does nothing.","operationId":"task.TaskService.RemoveLink","parameters":[{"in":"path","name":"from_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"from_id":{"description":"The task the link starts at.","type":"string"},"kind":{"description":"The kind of the link.","enum":["LINK_KIND_UNSPECIFIED","LINK_KIND_DEPENDS_ON","LINK_KIND_RELATES","LINK_KIND_DUPLICATES"],"type":"string"},"to_id":{"description":"The task it points to.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Removes a link.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/RemoveLink"}},"/v1/tasks/{id}":{"delete":{"description":"Removes a task and everything under it. They are marked removed (a tombstone)\nrather than deleted, so the history keeps them; lists leave them out.","operationId":"task.TaskService.RemoveTask","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"expected_version","schema":{"description":"The version read before; a stale one answers ABORTED with the task as it is.","type":"string"}},{"in":"query","name":"reason","schema":{"description":"Why, kept in the op.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"removed":{"description":"How many tasks were removed: the task and its subtree.","type":"integer"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Removes a task and everything under it.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/RemoveTask"},"get":{"description":"Gets one task with the path from its root, its children counts, the rollup of its\nsubtree (done of total, hours, latest due date) and its links both ways. Pass its\nversion as expected_version to the write that follows.","operationId":"task.TaskService.GetTask","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"children":{"description":"How many children it has.","type":"integer"},"comments":{"description":"How many comments it has (ListHistory reads them).","type":"integer"},"links":{"description":"Its links: the ones from it, then the ones to it.","items":{"additionalProperties":false,"properties":{"from_id":{"description":"The id of the task that depends on, relates to or duplicates the other.","type":"string"},"kind":{"description":"How from_id stands to to_id.","enum":["LINK_KIND_UNSPECIFIED","LINK_KIND_DEPENDS_ON","LINK_KIND_RELATES","LINK_KIND_DUPLICATES"],"type":"string"},"state":{"description":"The state of the task at the other end.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"The title of the task at the other end, for reading. Empty in exports.","type":"string"},"to_id":{"description":"The id of the task at the other end.","type":"string"}},"type":"object"},"type":"array"},"open_children":{"description":"How many of them are not done or dropped.","type":"integer"},"path":{"description":"The ancestors, the project first and the parent last.","items":{"additionalProperties":false,"properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"},"type":"array"},"rollup":{"additionalProperties":false,"description":"The totals over the task's subtree.","properties":{"done":{"description":"How many of total are done.","type":"integer"},"dropped":{"description":"How many are dropped.","type":"integer"},"hours":{"description":"The hours of total, summed.","type":"number"},"latest_due_on":{"description":"The latest due_on of total. Empty when none has one.","type":"string"},"total":{"description":"The tasks under it, dropped ones left out.","type":"integer"}},"type":"object"},"task":{"additionalProperties":false,"description":"The task as it is now.","properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Gets one task with the path from its root, its children counts, the rollup of its subtree (done of total, hours, latest due date) and its links both ways.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/GetTask"},"patch":{"description":"Changes the fields update_mask names, to their values in task. Fields the mask does\nnot name keep their values. The state, the parent and the place are changed with\nSetState and MoveTask. The old values stay in the history.","operationId":"task.TaskService.UpdateTask","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expected_version":{"description":"The version the change was made on, as GetTask gave it. Empty skips the check.","type":"string"},"id":{"description":"The task.","type":"string"},"task":{"additionalProperties":false,"description":"The new values of the fields update_mask names.","properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"},"update_mask":{"description":"The fields to change: title, body, size, hours, start_on, due_on, labels,\nassignee, repository_id, acceptance, evidence and pr.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"task":{"additionalProperties":false,"description":"The task as it is now.","properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Changes the fields update_mask names, to their values in task.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/UpdateTask"}},"/v1/tasks/{id}/move":{"post":{"description":"Moves a task, with its subtree, under another parent (or to the top as a project)\nand places it among its new siblings. A move under its own subtree is refused.","operationId":"task.TaskService.MoveTask","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"after_id":{"description":"Place it just after this sibling under the new parent.","type":"string"},"before_id":{"description":"Place it just before this sibling under the new parent.","type":"string"},"expected_version":{"description":"The version read before; a stale one answers ABORTED with the task as it is.","type":"string"},"id":{"description":"The task.","type":"string"},"parent_id":{"description":"The new parent. Empty makes it a project.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"task":{"additionalProperties":false,"description":"The task as it is now.","properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Moves a task, with its subtree, under another parent (or to the top as a project) and places it among its new siblings.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/MoveTask"}},"/v1/tasks/{id}/state":{"post":{"description":"Sets a task's state: backlog, ready, doing, review, done or dropped. The rules:\ndoing needs every dependency done; done needs evidence or a pr, and no open\nchildren; dropped, and leaving done, need a reason. force_reason skips them.\nEvidence given here is added to the task's evidence.","operationId":"task.TaskService.SetState","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"evidence":{"description":"Added to the task's evidence: what shows it is done.","items":{"type":"string"},"type":"array"},"expected_version":{"description":"The version read before; a stale one answers ABORTED with the task as it is.","type":"string"},"force_reason":{"description":"Skips the rules and is kept in the op: why they do not apply here.","type":"string"},"id":{"description":"The task.","type":"string"},"pr":{"description":"The pull request that does it.","type":"string"},"reason":{"description":"Why: needed to drop a task and to leave done.","type":"string"},"state":{"description":"The new state.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"task":{"additionalProperties":false,"description":"The task as it is now.","properties":{"acceptance":{"description":"What must be true for it to be done, one line each.","items":{"type":"string"},"type":"array"},"assignee":{"description":"Who does it, in any form the team uses.","type":"string"},"body":{"description":"Markdown.","type":"string"},"created_at":{"description":"When it was added.","format":"date-time","type":"string"},"created_by":{"description":"The peer id of the node that added it.","type":"string"},"deleted":{"description":"Whether it was removed. Lists leave removed tasks out unless asked.","type":"boolean"},"due_on":{"description":"The day it is due, as 2026-12-01. Empty is none.","type":"string"},"evidence":{"description":"What shows it is done: links, commands and their output, notes.","items":{"type":"string"},"type":"array"},"hours":{"description":"The hours it is expected to take. 0 is none.","type":"number"},"id":{"description":"A ULID: 26 characters, sortable by creation time.","type":"string"},"labels":{"description":"Labels, such as docs or bug.","items":{"type":"string"},"type":"array"},"parent_id":{"description":"The parent's id. Empty for a project (a root).","type":"string"},"pr":{"description":"The pull request that does it, as a URL or a number.","type":"string"},"rank":{"description":"The place among its siblings: siblings sort by rank, as bytes.","type":"string"},"repository_id":{"description":"The repository it is about, as ListRepositories gives its id. Empty is none.","type":"string"},"size":{"description":"A size in the team's own words, for example S, M, L or 3.","type":"string"},"start_on":{"description":"The day work is planned to start, as 2026-12-01. Empty is none.","type":"string"},"state":{"description":"Where the task is: backlog, ready, doing, review, done or dropped.","enum":["STATE_UNSPECIFIED","STATE_BACKLOG","STATE_READY","STATE_DOING","STATE_REVIEW","STATE_DONE","STATE_DROPPED"],"type":"string"},"title":{"description":"A short title.","type":"string"},"updated_at":{"description":"When the last op changed it.","format":"date-time","type":"string"},"version":{"description":"The hybrid logical clock of the last op that changed it (links and comments do\nnot). Pass it as expected_version.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Sets a task's state: backlog, ready, doing, review, done or dropped.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/SetState"}},"/v1/tasks/{task_id}/comments":{"post":{"description":"Adds a comment to a task. Comments are ops: ListHistory with kinds COMMENT reads\nthem back.","operationId":"task.TaskService.AddComment","parameters":[{"in":"path","name":"task_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"task_id":{"description":"The task.","type":"string"},"text":{"description":"Markdown.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"op":{"additionalProperties":false,"description":"The comment, as the op that was written.","properties":{"at":{"description":"When it was written, from hlc.","format":"date-time","type":"string"},"body":{"description":"What changed, as a JSON object. A forced write keeps its force_reason here.","type":"string"},"hlc":{"description":"The hybrid logical clock when it was written. Ops apply in (hlc, peer_id) order.","type":"string"},"kind":{"description":"What it does: create, set, move, state, link, unlink, comment or delete.","enum":["OP_KIND_UNSPECIFIED","OP_KIND_CREATE","OP_KIND_SET","OP_KIND_MOVE","OP_KIND_STATE","OP_KIND_LINK","OP_KIND_UNLINK","OP_KIND_COMMENT","OP_KIND_DELETE"],"type":"string"},"op_id":{"description":"The SHA-256 of the op's fields, in hex. It names the op on every node.","type":"string"},"peer_id":{"description":"The node that wrote it.","type":"string"},"seq":{"description":"The node's count of its own ops: 1, 2, 3.","type":"integer"},"sig":{"contentEncoding":"base64","description":"The node's ed25519 signature of op_id, when the node has a p2p key. Empty otherwise.","type":"string"},"task_id":{"description":"The task it changes.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"the answer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"the call failed"}},"summary":"Adds a comment to a task.","tags":["task"],"x-rpc":"ahto.task.v1.TaskService/AddComment"}}},"servers":[{"url":"/api"}]}