Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andrewyng/openworker
/ functions
Functions
8,537 in github.com/andrewyng/openworker
⨍
Functions
8,537
◇
Types & classes
636
↳
Endpoints
260
↓ 2 callers
Function
_resolve_slack_channel
#all-openworker' (a NAME the user said) → the team-qualified chat_id, via the same cached conversations.list roster the GUI's channel picker uses.
coworker/connectors/tools.py:70
↓ 2 callers
Function
_resolve_within
Resolve `path` (relative → tried against each base) and require the result to live inside one of the allowed bases. None → outside every base or n
coworker/connectors/tools.py:234
↓ 2 callers
Function
_restrict_to_user
Restrict a path so only the current user can access it. POSIX expresses this with mode bits (0700 dir / 0600 file). Windows has no such bits —
coworker/secrets.py:67
↓ 2 callers
Method
_resume_wake
(self, wake)
coworker/server/manager.py:6343
↓ 2 callers
Method
_routing_targets
The channel address(es) this session's Inbox routes OUT to — used to warn when a subscription (inbound) collides with Inbox routing (outbound)
coworker/server/manager.py:1018
↓ 2 callers
Function
_row_to_item
(row: sqlite3.Row)
coworker/memory/sqlite_store.py:150
↓ 2 callers
Function
_run
(engine, text)
tests/test_message_timestamps.py:66
↓ 2 callers
Function
_run
(tmp_path, provider, **engine_kwargs)
tests/test_reasoning_effort.py:435
↓ 2 callers
Function
_run
(state: Path, controller: str, name: str, token=None, on_welcome=None)
coworker/remote/joiner.py:784
↓ 2 callers
Method
_run
(self)
coworker/sandbox/setup_job.py:75
↓ 2 callers
Method
_run_claimed
( self, task: ScheduledTask, *, trigger: str )
coworker/automation/scheduler.py:108
↓ 2 callers
Function
_run_engine
(tmp_path)
tests/test_token_usage.py:319
↓ 2 callers
Function
_run_engine
(tmp_path, turn: AssistantTurn)
tests/test_finish_reason.py:46
↓ 2 callers
Function
_run_piped
(tmp_path: Path, stdin: str, extra: list[str] | None = None)
tests/test_headless_run.py:426
↓ 2 callers
Method
_run_scheduled_task
(self, task, trigger: str)
coworker/server/manager.py:6930
↓ 2 callers
Function
_run_until_pending
(mgr, sid, engine)
tests/test_durable_resume.py:34
↓ 2 callers
Method
_save
(self)
coworker/mentions.py:49
↓ 2 callers
Method
_save
(self)
coworker/connections.py:48
↓ 2 callers
Method
_save
(self)
coworker/connectors/parked.py:57
↓ 2 callers
Method
_save
(self, entries: dict[str, dict[str, Any]])
coworker/teams/tokens.py:89
↓ 2 callers
Method
_save_cursor
(self)
coworker/connectors/machine_poll.py:122
↓ 2 callers
Function
_scripted_box_app
(tmp_path, name, texts)
tests/test_remote_home.py:1109
↓ 2 callers
Function
_scripted_provider
(turns)
tests/test_remote_home.py:1091
↓ 2 callers
Function
_seal_kdf
(shared: bytes, ephemeral_pub: bytes, recipient_pub: bytes)
coworker/remote/identity.py:159
↓ 2 callers
Function
_seed
(tmp_path)
tests/test_code_tools.py:21
↓ 2 callers
Function
_seed_github_install
(secrets, installation_id="9001")
tests/test_machine_poll.py:262
↓ 2 callers
Method
_seed_task_permissions
Apply a task's standing allowances to an engine: target-bound rules feed the permission engine's matcher (connector tools included — the targe
coworker/server/manager.py:6109
↓ 2 callers
Function
_send_offloop
Run an adapter send. The stateless senders are blocking httpx (they run in a worker thread in production); calling them on the loop that hosts the
tests/test_fake_slack.py:26
↓ 2 callers
Function
_served_by
OpenRouter (and compatible routers) put the upstream host's name in a top-level `provider` field on responses and stream chunks; the OpenAI SDK ke
coworker/providers/openai_provider.py:184
↓ 2 callers
Method
_session_site_engine
(engine, "host:port") for a change to the session's own sites, or an error text. Exact host names only, as on the agent's card: wildcards stay
coworker/server/manager.py:7516
↓ 2 callers
Method
_set_cursor
(self, key: str, seq: int)
coworker/teams/store.py:454
↓ 2 callers
Function
_sha256
(data: bytes)
coworker/sandbox/runner/fsops.py:25
↓ 2 callers
Function
_short
(value: Any, limit: int = 80)
coworker/tui/app.py:28
↓ 2 callers
Method
_shutdown
(self)
coworker/sandbox/runner/daemon.py:442
↓ 2 callers
Function
_sid_text
(sid: int)
coworker/sandbox/winsec.py:154
↓ 2 callers
Function
_sig_call_part
(name, args, sig)
tests/test_gemini_provider.py:508
↓ 2 callers
Function
_signature_extras
Captured signatures → the `_gemini` assistant-message sidecar (empty when none).
coworker/providers/gemini_provider.py:333
↓ 2 callers
Function
_slack_blocks
A Block Kit message: a text section + a row of action buttons (action_id `ocw_<i>`, value = the encoded item id + resolution).
coworker/connectors/senders.py:89
↓ 2 callers
Function
_slack_chat_id
(workspace: str, channel_id: str)
coworker/connectors/chat_tools.py:118
↓ 2 callers
Function
_slack_workspaces
(secrets: SecretStore)
coworker/connectors/setup.py:185
↓ 2 callers
Method
_sleep
Interruptible sleep: close() ends it immediately.
coworker/connectors/machine_poll.py:70
↓ 2 callers
Function
_snapshot
(page, max_chars: int)
coworker/connectors/browser_automation.py:316
↓ 2 callers
Method
_spawn
Start (or restart) the shell process and its reader. Reused for self-healing: if a command times out and the shell is hard-closed, the next `r
coworker/sandbox/runner/executor.py:195
↓ 2 callers
Method
_split
(model: str)
coworker/providers/vertex_provider.py:113
↓ 2 callers
Method
_split
`claude/<id>` → the native path; anything else (including a raw Bedrock id with no family segment) → Converse, which serves every Bedrock mode
coworker/providers/bedrock_provider.py:512
↓ 2 callers
Function
_split_commands
Split a compound command on its separators. Longest separators first so `&&` isn't read as two `&`. Purely textual — quoted separators are not res
coworker/permissions.py:49
↓ 2 callers
Function
_stages
Tokenize with operators surfaced; split into pipeline stages. None = reject.
coworker/readonly.py:76
↓ 2 callers
Function
_status_error
(status: int, message: str = "")
tests/test_codex_provider.py:286
↓ 2 callers
Method
_stop_daemon
(self)
coworker/sandbox/providers/runner_local.py:58
↓ 2 callers
Method
_stop_daemon
(self)
coworker/sandbox/providers/windows.py:370
↓ 2 callers
Function
_store_cloud_tokens
(secrets: SecretStore, token: dict)
coworker/cloud.py:206
↓ 2 callers
Function
_strlist
(meta: dict, key: str)
coworker/personas/manifest.py:229
↓ 2 callers
Function
_sub_commands
Every sub-command of a compound command, tokenized. Splitting is textual and deliberately over-eager (see `permissions._split_commands`): more par
coworker/provenance.py:133
↓ 2 callers
Method
_subscription_event
(event: dict, subscriber: str)
coworker/teams/store.py:377
↓ 2 callers
Method
_suggested_models
Bare model-name suggestions for the 'add model' form (datalist), per provider. Ollama → live `/api/tags` (best-effort); everyone else → the cu
coworker/server/manager.py:4144
↓ 2 callers
Method
_supersede_locked
(cls, item: InboxItem, source: InboxItem)
coworker/inbox.py:389
↓ 2 callers
Method
_surfaces
Which session surfaces are shown in the sidebar. Cowork is always on; Chat and Code are opt-in (default off) so a new user sees Cowork only.
coworker/server/manager.py:4687
↓ 2 callers
Function
_systemd_unit
A user unit running `up`: restart forever, state dir pinned explicitly so the unit survives shells/relogins with a different environment.
coworker/remote/joiner.py:884
↓ 2 callers
Method
_tail_is_retriable_error
True when the history tail is an error notice, looking through any model_switch notices appended after it (a switch must not consume the retry
coworker/engine.py:494
↓ 2 callers
Method
_team_options_tool
Registry-injected staffing knowledge: the lead's options come from the persona registry at call time — installing a worker coworker automatica
coworker/server/manager.py:2892
↓ 2 callers
Function
_text
(text)
tests/test_message_source.py:37
↓ 2 callers
Function
_text
(text="done")
tests/test_dangerous_mode.py:60
↓ 2 callers
Function
_text_of
A message's text, whether plain or content-parts (images become a placeholder).
coworker/compaction.py:300
↓ 2 callers
Function
_text_response
(text="hello", stop_reason="end_turn")
tests/test_finish_reason.py:119
↓ 2 callers
Function
_text_turn
(text)
tests/test_subagent.py:16
↓ 2 callers
Function
_text_turn
(text)
tests/test_tui.py:16
↓ 2 callers
Function
_token_info
(token: int, kind: int)
coworker/sandbox/winsec.py:145
↓ 2 callers
Function
_token_post
One POST to the token endpoint (module-level so tests stub the wire here).
coworker/providers/codex_auth.py:146
↓ 2 callers
Function
_tool
(name, args, call_id="call_1")
tests/test_message_timestamps.py:46
↓ 2 callers
Function
_tool_loop
()
tests/test_cache_breakpoint_placement.py:15
↓ 2 callers
Function
_tool_results
(engine)
tests/test_engine_stop.py:64
↓ 2 callers
Function
_tool_turn
(calls)
tests/test_engine_stop.py:44
↓ 2 callers
Function
_touch
(machine_id: str)
coworker/remote/acceptor.py:238
↓ 2 callers
Function
_truncate
(text: str, limit: int = 500)
coworker/audit.py:276
↓ 2 callers
Function
_try_lock
(fh)
coworker/statelock.py:67
↓ 2 callers
Function
_turn_on_proposals
What OpenShell writes when `agent_policy_proposals_enabled` is set.
tests/test_openshell_inside.py:51
↓ 2 callers
Function
_unique
(rows, key, label)
coworker/teams/proposals.py:86
↓ 2 callers
Function
_usage_from
Converse `usage` dict → normalized counts (`inputTokens` excludes cache).
coworker/providers/bedrock_provider.py:52
↓ 2 callers
Function
_usage_from
Messages-API usage object → normalized counts (input_tokens excludes cache).
coworker/providers/anthropic_provider.py:41
↓ 2 callers
Function
_usage_from
`usage_metadata` → normalized counts. `prompt_token_count` INCLUDES the cached share; thinking tokens are billed as output, so they fold into `out
coworker/providers/gemini_provider.py:39
↓ 2 callers
Function
_usage_from
chat.completions usage → normalized counts. `prompt_tokens` INCLUDES cached tokens, so the cached share is subtracted into `cache_read`; no write-
coworker/providers/openai_provider.py:198
↓ 2 callers
Function
_user_parts
User content (str or OpenAI parts list) → Gemini parts.
coworker/providers/gemini_provider.py:138
↓ 2 callers
Function
_validate
(data: bytes, filename: str)
coworker/teams/attachments.py:158
↓ 2 callers
Function
_varint
(value: int)
coworker/sandbox/providers/openshell_wire.py:27
↓ 2 callers
Function
_verify_with_backend
(tmp_path, monkeypatch, status: int)
tests/test_codex_provider.py:428
↓ 2 callers
Function
_vet
(refusal reason, address to pin the connection to). The reason is None when the URL may be fetched. The address is None for literal-IP URLs (
coworker/web/guard.py:56
↓ 2 callers
Method
_visible
(self, e: PersonaEntry)
coworker/personas/registry.py:247
↓ 2 callers
Method
_wanted_entries
Every entry this sandbox needs right now: Modify on writable roots and the private folder, Read on read-only roots and the tool folders, and T
coworker/sandbox/providers/windows.py:288
↓ 2 callers
Function
_websocket_authenticated
(ws: WebSocket)
coworker/server/app.py:224
↓ 2 callers
Function
_wfp_arguments
()
coworker/sandbox/providers/windows_setup.py:339
↓ 2 callers
Function
_write
(**kwargs)
tests/test_todo_tool.py:12
↓ 2 callers
Method
_write
(self, store: dict[str, Any])
coworker/secrets.py:319
↓ 2 callers
Function
_write_records
Compute the summary from the events so far and (re)write summary.json, messages.json, answers.json, and trajectory.json. Called after every iterat
coworker/headless/runner.py:1290
↓ 2 callers
Function
_zip_b64
(entries: dict[str, str])
tests/test_skills_api.py:42
↓ 2 callers
Function
account
(name, sid, password) of the `open` or `closed` account when the full mode can be used by THIS user: setup of this version has run and the credent
coworker/sandbox/providers/windows_setup.py:187
↓ 2 callers
Function
account_id_from
The ChatGPT account id, from the auth claim of the id/access token.
coworker/providers/codex_auth.py:122
↓ 2 callers
Method
aclose
(self)
coworker/remote/channel.py:207
↓ 2 callers
Method
aclose
(self)
coworker/mcp/client.py:124
↓ 2 callers
Function
acquire
Take the engine lock for `state`, waiting up to `timeout` seconds for a dying predecessor (a supervisor restarting us while the old process is
coworker/statelock.py:92
↓ 2 callers
Function
action_tools
(row: dict[str, Any])
scripts/validate_layered_corpora.py:68
← previous
next →
1,601–1,700 of 8,537, ranked by callers