feat(sdk): phase card reads, create_card phase_id/title, get_pipe inventory#281
Conversation
…entory Expose get_phase_cards, get_phase_cards_count, get_phase_allowed_move_targets; extend create_card with phase_id and CreateCardInput.title; enrich get_pipe with start_form_phase and per-phase cards_count.
Address review on #281: get_pipe no longer surfaces the private start-form phase or adds an extra GraphQL round trip; cards_count stays on workflow phases via GET_PIPE_QUERY. Rename get_phase_cards_count_payload to get_phase with get_phase_cards_count delegating to it.
|
Thanks @gbrlcustodio — both points addressed in
Holding merge until we get another review pass on the stack. |
Align query and private helper names with get_phase, which returns the full phase row (id, name, cards_count), not a count-only projection.
|
Thanks @gbrlcustodio — addressed in |
Remove test that mocked get_phase and asserted internal delegation; observable contract is already covered by test_get_phase_cards_count_returns_native_scalar.
|
All review feedback on this PR is addressed:
SDK unit tests green locally ( |
During agent-seeding of the Analytics pipe (
306996636), agents usedexecute_graphqlandintrospect_type/search_schemawhen first-class tools lacked card/phase workflows. Spec:.cursor/dev-planning/specs/archive/card-phase-ergonomics/Stack replacing closed #277. Merge prior PRs in the stack before this one.
Depends on: #280
Objective
SDK + facade for the GraphQL capabilities agents used via raw queries:
get_phase_cards,get_phase_cards_count,get_phase_allowed_move_targetscreate_card(..., phase_id=, title=)onCreateCardInputget_pipeselectscards_counton workflow phases (single GraphQL round trip)Improvements
phase { cards_count }/createCardescape hatches for these reads/writes.get_phase(phase_id)returns{phase_id, phase_name, cards_count};get_phase_cards_countdelegates to it.start_form_fields+startFormPhaseId(nostart_form_phasenode — private API).Review follow-up
Addresses @gbrlcustodio review (2026-06-09): dropped
pipe_inventoryenrichment and renamedget_phase_cards_count_payload→get_phase.