From 1877eefcf49daa14dcae820b77d0c78d2ab7b222 Mon Sep 17 00:00:00 2001 From: alex-w-99 Date: Wed, 22 Jul 2026 06:06:43 +0000 Subject: [PATCH] Align contacts with organization-wide access --- .github/workflows/tests.yml | 2 +- README.md | 2 +- inkbox_codex/doctor.py | 2 +- inkbox_codex/gateway.py | 2 +- inkbox_codex/prompts.py | 4 ++-- inkbox_codex/setup_wizard.py | 2 +- pyproject.toml | 2 +- tests/test_prompts.py | 3 ++- tests/test_setup_wizard.py | 8 ++++---- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ba74cf0..b37b0ba 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -62,7 +62,7 @@ jobs: - name: Install bridge + test deps run: | uv pip install --system \ - "inkbox @ git+https://github.com/inkbox-ai/inkbox.git@8f4b37c56cd153a2acc6cfabe27dbbeb43510f00#subdirectory=sdk/python" \ + "inkbox @ git+https://github.com/inkbox-ai/inkbox.git@199bbd27c8dab2f70e379de52ca9cc910b0e141d#subdirectory=sdk/python" \ -e . pytest # @alpha is the prerelease channel cut from codex main near-daily — the diff --git a/README.md b/README.md index e47b14c..64eb514 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,7 @@ The agent reaches you (or third parties) through an in-process MCP server: - `inkbox_list_text_conversations` · `inkbox_get_text_conversation` — browse SMS threads and history. - `inkbox_list_imessage_conversations` · `inkbox_get_imessage_conversation` — browse iMessage threads and history (find the `conversation_id` to send into). - `inkbox_lookup_contact` · `inkbox_list_contacts` · `inkbox_get_contact` — resolve and read address-book contacts (reverse-lookup by email/phone, free-text search, or full record by id). -- `inkbox_create_contact` · `inkbox_update_contact` · `inkbox_delete_contact` — save, edit, and remove contacts. Reads and writes are filtered server-side to what this identity may see. vCard export/import is not exposed. +- `inkbox_create_contact` · `inkbox_update_contact` · `inkbox_delete_contact` — save, edit, and remove organization-wide contacts. Changes affect the shared address book. vCard export/import is not exposed. On a live call, the OpenAI Realtime voice agent additionally gets `consult_agent`, `register_post_call_action` / `edit_post_call_action` / `delete_post_call_action`, and `hang_up_call` — see [Voice](#voice). diff --git a/inkbox_codex/doctor.py b/inkbox_codex/doctor.py index df3f45e..8768934 100644 --- a/inkbox_codex/doctor.py +++ b/inkbox_codex/doctor.py @@ -33,7 +33,7 @@ def run_doctor() -> List[Tuple[str, bool, str]]: import inkbox # noqa: F401 checks.append(("inkbox SDK", True, "installed")) except ImportError: - checks.append(("inkbox SDK", False, "pip install 'inkbox>=0.5.0,<1.0.0'")) + checks.append(("inkbox SDK", False, "pip install 'inkbox>=0.5.1,<1.0.0'")) try: import aiohttp # noqa: F401 diff --git a/inkbox_codex/gateway.py b/inkbox_codex/gateway.py index 5615932..f099421 100644 --- a/inkbox_codex/gateway.py +++ b/inkbox_codex/gateway.py @@ -509,7 +509,7 @@ async def run(self) -> None: if not AIOHTTP_AVAILABLE: raise RuntimeError("aiohttp is not installed; run: pip install aiohttp") if not INKBOX_AVAILABLE: - raise RuntimeError("inkbox SDK is not installed; run: pip install 'inkbox>=0.5.0,<1.0.0'") + raise RuntimeError("inkbox SDK is not installed; run: pip install 'inkbox>=0.5.1,<1.0.0'") if not self.cfg.api_key or not self.cfg.identity: raise RuntimeError("INKBOX_API_KEY and INKBOX_IDENTITY must be set (see README)") diff --git a/inkbox_codex/prompts.py b/inkbox_codex/prompts.py index e21ab61..6d1d654 100644 --- a/inkbox_codex/prompts.py +++ b/inkbox_codex/prompts.py @@ -91,7 +91,7 @@ # Inkbox contacts -Codex can read and write Inkbox contacts visible to this configured identity. +Codex can read and write the organization's shared Inkbox contacts. - Use inkbox_list_contacts for name-based searches like "who is Alex?". - Use inkbox_lookup_contact when you have an exact or partial email/phone filter. @@ -100,7 +100,7 @@ - Use inkbox_update_contact when the user asks you to change an existing contact; look up the contact first if you do not already have its UUID. - Use inkbox_delete_contact only after the target contact is explicit and confirmed. - There is no vCard export/import, contact access, or contact rule tool in this harness. -- Contact tools operate only on contacts visible/writable to the configured identity. +- Every identity in the organization can read contacts. Creating, updating, or deleting a contact affects the shared address book. """.strip() diff --git a/inkbox_codex/setup_wizard.py b/inkbox_codex/setup_wizard.py index 6a98784..87e7121 100644 --- a/inkbox_codex/setup_wizard.py +++ b/inkbox_codex/setup_wizard.py @@ -35,7 +35,7 @@ # Packages the wizard itself needs to talk to Inkbox during setup. The # gateway's Codex CLI dependency is checked by doctor. -INKBOX_REQUIREMENTS = ("inkbox>=0.5.0,<1.0.0", "aiohttp>=3.9") +INKBOX_REQUIREMENTS = ("inkbox>=0.5.1,<1.0.0", "aiohttp>=3.9") MIN_INKBOX_VERSION = (0, 5, 0) _BRACKETED_PASTE_PATTERN = re.compile(r"\x1b\[\s*200~|\x1b\[\s*201~") diff --git a/pyproject.toml b/pyproject.toml index 853e7c0..bb2b7a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Inkbox bridge for Codex — talk to your coding agent over email, requires-python = ">=3.11" dependencies = [ "aiohttp>=3.9", - "inkbox>=0.5.0,<1.0.0", + "inkbox>=0.5.1,<1.0.0", "segno>=1.5", # terminal QR codes for the iMessage connect step ] diff --git a/tests/test_prompts.py b/tests/test_prompts.py index a02bbe4..b3ea651 100644 --- a/tests/test_prompts.py +++ b/tests/test_prompts.py @@ -79,7 +79,8 @@ def test_channel_prompt_mentions_identity_and_dir(): assert "regardless of whether the request arrived by email" in text assert "Do not merely text that" in text assert "replace the call with an SMS reply" in text - assert "Codex can read and write Inkbox contacts" in text + assert "shared Inkbox contacts" in text + assert "shared address book" in text assert "inkbox_create_contact" in text assert "inkbox_update_contact" in text assert "inkbox_delete_contact" in text diff --git a/tests/test_setup_wizard.py b/tests/test_setup_wizard.py index 3bd2386..1ed37a1 100644 --- a/tests/test_setup_wizard.py +++ b/tests/test_setup_wizard.py @@ -88,7 +88,7 @@ def test_install_command_prefers_uv_when_available(monkeypatch): "install", "--python", "/tmp/venv/bin/python", - "inkbox>=0.5.0,<1.0.0", + "inkbox>=0.5.1,<1.0.0", "aiohttp>=3.9", ]] @@ -98,10 +98,10 @@ def test_install_command_falls_back_to_pip_and_ensurepip(monkeypatch): monkeypatch.setattr(setup_wizard.shutil, "which", lambda _name: None) assert setup_wizard._install_commands() == [ - [["/tmp/venv/bin/python", "-m", "pip", "install", "inkbox>=0.5.0,<1.0.0", "aiohttp>=3.9"]], + [["/tmp/venv/bin/python", "-m", "pip", "install", "inkbox>=0.5.1,<1.0.0", "aiohttp>=3.9"]], [ ["/tmp/venv/bin/python", "-m", "ensurepip", "--upgrade"], - ["/tmp/venv/bin/python", "-m", "pip", "install", "inkbox>=0.5.0,<1.0.0", "aiohttp>=3.9"], + ["/tmp/venv/bin/python", "-m", "pip", "install", "inkbox>=0.5.1,<1.0.0", "aiohttp>=3.9"], ], ] @@ -120,7 +120,7 @@ def fail_import(): out = capsys.readouterr().out assert "/tmp/venv/bin/python" in out assert "uv pip install --python" in out - assert "inkbox>=0.5.0,<1.0.0" in out + assert "inkbox>=0.5.1,<1.0.0" in out # ----------------------------------------------------------------------