Skip to content

feat(org): customer/org/access-token write tools - #191

Merged
millsmillsymills merged 2 commits into
mainfrom
feat/166-org-writes
Jun 23, 2026
Merged

millsmillsymills merged 2 commits into
mainfrom
feat/166-org-writes

Conversation

@millsmillsymills

Copy link
Copy Markdown
Collaborator

Summary

Adds the organization write surface — the module was read-only before this PR.

Tool Method Endpoint
gandi_org_create_customer POST /organizations/{id}/customers
gandi_org_update_customer PATCH /organizations/{id}/customers/{cid}
gandi_org_update_organization PATCH /organizations/{id}
gandi_org_renew_access_token POST /access-tokens
  • New register_organization_write_tools, wired into register_write_tools, so server.py gates it behind GANDI_MODE=readwrite like every other write area (defense-in-depth: handlers also call assert_readwrite).
  • Naming: uses the repo's gandi_org_ prefix rather than the issue's gandi_organization_*, to match the existing read tools.
  • Bodies use dict pass-through (repo convention). Client methods use _seg().
  • respx tests cover happy/error/_seg. Schema matrix regenerated.

Deferred per issue: create/delete organization, run-action, delete-customer. Cassette recording deferred to #102.

Test plan

  • pytest tests/ -m "not live" — 658 passed, 1 skipped
  • ruff / ty check clean
  • consistency-check audit — MUST 0 fail

Closes #166

🤖 Generated with Claude Code

millsmillsymills and others added 2 commits June 23, 2026 14:40
Adds the organization write surface (the module was read-only before):

- gandi_org_create_customer       (POST /organizations/{id}/customers)
- gandi_org_update_customer       (PATCH /organizations/{id}/customers/{cid})
- gandi_org_update_organization   (PATCH /organizations/{id})
- gandi_org_renew_access_token    (POST /access-tokens)

Adds register_organization_write_tools and wires it into register_write_tools
so server.py gates it behind GANDI_MODE=readwrite like every other write area.
Tool names use the repo's gandi_org_ prefix (not the issue's gandi_organization_).
Bodies use dict pass-through (repo convention). Client methods use _seg();
tools call assert_readwrite. Adds respx tests and regenerates the schema
matrix. Deferred per issue: create/delete org, run-action, delete-customer.
Cassette recording deferred to #102.

Closes #166

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@millsmillsymills
millsmillsymills merged commit b3fc7cf into main Jun 23, 2026
7 checks passed
@millsmillsymills
millsmillsymills deleted the feat/166-org-writes branch June 23, 2026 23:06
millsmillsymills added a commit that referenced this pull request Jun 24, 2026
Add TestWriteToolRuntimeGate, parametrized over the comment (#192) and
organization (#191) non-purchasing write tools, asserting each handler
raises ToolError ("read-only mode") when GANDI_MODE=readonly. Closes the
runtime-gate coverage gap for these merged write tools; no source change.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat(org): customer/org/access-token write tools

1 participant