Repository navigation
feat(control-plane): request governed actions, including Paystack - #15
Merged
Merged
Conversation
Adds requestCapability and getCapabilityExecution to ControlPlaneGateway, calling the control plane's /gateway/requests and /gateway/executions. The agent names the action and its parameters; the provider key stays in IdentArk, and grants, budgets and human approval apply before execution. CapabilityProvider covers stripe, paystack, github and aws. Paystack is the payment rail for Nigerian merchants (payment links, refunds and transfers on the control plane, identArk/backend#43). The AgentGateway interface is unchanged. Mirrors request_capability in the Python SDK. Signed-off-by: Gold Okpa <okpagold@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds two methods to
ControlPlaneGateway:requestCapability(capability, provider, payload, idempotencyKey)→POST /gateway/requestsgetCapabilityExecution(executionId)→GET /gateway/executions/{id}(the id is URL-encoded)It also adds a new exported type,
CapabilityProvider = "stripe" | "paystack" | "github" | "aws".Why
An agent should be able to ask for a payment, a payment link or a refund without ever holding the provider key. The control plane checks the grant, reserves any budget, waits for human approval where the grant requires it, then executes. Paystack is the payment rail for Nigerian merchants, and the control plane now supports Paystack payment links, refunds and transfers.
Scope
AgentGatewayinterface is unchanged. OnlyControlPlaneGatewaygains methods.request_capabilityandget_capability_execution.Checks
npm run lint: cleannpm run typecheck: cleanvitest: 243 passed, including 2 new tests (the Paystack payment-link request body, and an encoded execution read).