archivebox.opencode.views

Module Contents

Functions

_stop_owned_process

_machine_config

_archivebox_data_dir_default

_archivebox_route_urls

_config_value

_opencode_enabled

_require_enabled

_require_superuser

_origin_allowed

_same_host

_settings

_resolve_binary

_project_route

_ensure_project_files

_ensure_default_session

_recent_session_id

_health

_ensure_opencode

agent_view

_proxy_url

_request_header

_request_headers

_request_params

_event_chunks

_rewrite_text

_response_headers

opencode_proxy_view

Data

_PROCESS

_PROCESS_LOCK

_PROXY_PREFIX

_PROXY_PREFIX_REGEX

_PROXY_PREFIX_NO_SLASH_REGEX

_CONFIG_PATH

_TEXT_CONTENT_TYPES

_HOP_BY_HOP_HEADERS

_ARCHIVEBOX_SKILL

API

archivebox.opencode.views._PROCESS: subprocess.Popen | None[source]

None

archivebox.opencode.views._PROCESS_LOCK[source]

‘Lock(…)’

archivebox.opencode.views._PROXY_PREFIX[source]

‘/admin/agent/opencode’

archivebox.opencode.views._PROXY_PREFIX_REGEX[source]

‘replace(…)’

archivebox.opencode.views._PROXY_PREFIX_NO_SLASH_REGEX[source]

‘replace(…)’

archivebox.opencode.views._CONFIG_PATH[source]

‘with_name(…)’

archivebox.opencode.views._TEXT_CONTENT_TYPES[source]

(‘text/’, ‘application/javascript’, ‘application/json’, ‘application/x-javascript’)

archivebox.opencode.views._HOP_BY_HOP_HEADERS[source]

None

archivebox.opencode.views._ARCHIVEBOX_SKILL = <Multiline-String>[source]
archivebox.opencode.views._stop_owned_process(process: subprocess.Popen | None = None) None[source]
archivebox.opencode.views._machine_config() dict[str, Any][source]
archivebox.opencode.views._archivebox_data_dir_default() pathlib.Path[source]
archivebox.opencode.views._archivebox_route_urls(request: django.http.HttpRequest, route_config) tuple[str, str, str][source]
archivebox.opencode.views._config_value(config: dict, key: str, default)[source]
archivebox.opencode.views._opencode_enabled(config: dict) bool[source]
archivebox.opencode.views._require_enabled(config: dict) None[source]
archivebox.opencode.views._require_superuser(request: django.http.HttpRequest)[source]
archivebox.opencode.views._origin_allowed(request: django.http.HttpRequest, path: str | None = None) bool[source]
archivebox.opencode.views._same_host(value: str, expected_host: str) bool[source]
archivebox.opencode.views._settings(config: dict) dict[source]
archivebox.opencode.views._resolve_binary(binary: str, config: dict) tuple[Any, Any, dict[str, str]][source]
archivebox.opencode.views._project_route(workdir: pathlib.Path, session_id: str = '') str[source]
archivebox.opencode.views._ensure_project_files(settings: dict) None[source]
archivebox.opencode.views._ensure_default_session(settings: dict) str[source]
archivebox.opencode.views._recent_session_id(settings: dict) str[source]
archivebox.opencode.views._health(settings: dict) bool[source]
archivebox.opencode.views._ensure_opencode(settings: dict) tuple[bool, str][source]
archivebox.opencode.views.agent_view(request: django.http.HttpRequest)[source]
archivebox.opencode.views._proxy_url(settings: dict, path: str | None) str[source]
archivebox.opencode.views._request_header(request: django.http.HttpRequest, name: str) str | None[source]
archivebox.opencode.views._request_headers(request: django.http.HttpRequest, settings: dict) dict[str, str][source]
archivebox.opencode.views._request_params(request: django.http.HttpRequest) tuple[tuple[str, str], ...][source]
async archivebox.opencode.views._event_chunks(request: django.http.HttpRequest, settings: dict, path: str | None)[source]
archivebox.opencode.views._rewrite_text(body: bytes, settings: dict) bytes[source]
archivebox.opencode.views._response_headers(upstream: requests.Response, settings: dict) dict[str, str][source]
archivebox.opencode.views.opencode_proxy_view(request: django.http.HttpRequest, path: str | None = None)[source]