From fcef18f3c7f9a8024b5411979415dc856fa36e1d Mon Sep 17 00:00:00 2001 From: Aadil Abdul Ghani Date: Tue, 15 Sep 2026 15:13:51 +0200 Subject: [PATCH 1/3] docs: add Pushary customer approval integration --- integrations/pushary.md | 95 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 integrations/pushary.md diff --git a/integrations/pushary.md b/integrations/pushary.md new file mode 100644 index 00000000..528a2413 --- /dev/null +++ b/integrations/pushary.md @@ -0,0 +1,95 @@ +--- +layout: integration +name: Pushary +description: Customer phone approvals and one-use execution permits for Haystack actions. +authors: + - name: Aadil Abdul Ghani + socials: + github: aadilghani1 +repo: https://github.com/Pushary/pushary-haystack +type: Custom Component +report_issue: https://github.com/Pushary/pushary-haystack/issues +version: Haystack 3.0 +toc: true +--- + +## Overview + +Pushary sends an approval request to an enrolled customer's phone. +`PusharyProtectedAction` executes an application-owned action only after the +customer approves and the component consumes a one-use execution permit. It uses +the existing Pushary Python SDK and is maintained by Pushary. + +The component supports Haystack 3.1+ and Python 3.10+. Its repository includes +a serialized-pipeline example that stops the worker before the customer answers +and resumes in another process, plus offline checks for refusal and retry behavior. + +## Installation + +Install the versioned GitHub package: + +```bash +pip install 'pushary-haystack @ git+https://github.com/Pushary/pushary-haystack.git@v0.1.0' +``` + +Phone delivery requires a Pushary Partner account, a server-side `PUSHARY_API_KEY`, +and a customer enrolled by your application. The package's offline checks require +neither an account nor a real key. + +## Usage + +### Components + +- `PusharyProtectedAction`: protects its registered handler with customer + approval. It emits `result` after execution or `blocked` on a refusal. + Haystack's `ComponentTool` can expose it to an Agent without exposing the + recipient or operation identity as model-controlled tool arguments. + +### Request an order approval + +The following example uses an enrolled `customer-1` and a configured +`PUSHARY_API_KEY`. Replace the demonstration handler with your application's +idempotent order service. + +```python +import time + +from haystack import Pipeline +from pushary_haystack import PusharyProtectedAction + + +def release_order(parameters, idempotency_key): + return {"order_id": parameters["order_id"], "status": "released"} + + +pipeline = Pipeline() +pipeline.add_component("approve", PusharyProtectedAction( + release_order, + tenant_id="store-1", external_id="customer-1", + run_id="persisted-order-workflow-1", call_id="release-1", + action="order.release", target="order-1", revision="release-v1", + expires_at=int(time.time()) + 3600, +)) +result = pipeline.run({"approve": {"parameters": { + "order_id": "order-1", "amount_cents": 1900, +}}}) +print(result) +``` + +By default, the component does not wait for a phone response. Persist the +pipeline configuration, input and deadline once, then re-enter that saved +operation after the customer answers. Do not regenerate IDs or extend the +deadline on retry. The [complete restart demonstration](https://github.com/Pushary/pushary-haystack/blob/main/examples/order_approval.py) +does this with an application-owned state file and a local SQLite order record. + +Changed arguments require fresh approval. Duplicate workers cannot reuse a spent +permit. A crash after consumption requires reconciliation with the business +service; it does not guarantee exactly-once business effects. Only the registered +handler is protected: do not expose an alternative ungated action tool. + +See the [package documentation](https://github.com/Pushary/pushary-haystack#readme) +for supported inputs, trusted snapshot loading, agent usage, and offline checks. + +## License + +[MIT](https://github.com/Pushary/pushary-haystack/blob/main/LICENSE). From 69b79b46c06335f75e3c437bed264ac02a507875 Mon Sep 17 00:00:00 2001 From: Aadil Ghani Date: Tue, 15 Sep 2026 21:19:26 +0200 Subject: [PATCH 2/3] docs: install Pushary Haystack from PyPI --- integrations/pushary.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/pushary.md b/integrations/pushary.md index 528a2413..cf031289 100644 --- a/integrations/pushary.md +++ b/integrations/pushary.md @@ -26,10 +26,10 @@ and resumes in another process, plus offline checks for refusal and retry behavi ## Installation -Install the versioned GitHub package: +Install the versioned PyPI package: ```bash -pip install 'pushary-haystack @ git+https://github.com/Pushary/pushary-haystack.git@v0.1.0' +pip install pushary-haystack==0.1.0 ``` Phone delivery requires a Pushary Partner account, a server-side `PUSHARY_API_KEY`, From 5b7578ebde2df395ecaf0b89abd5ccf23241591d Mon Sep 17 00:00:00 2001 From: Aadil Ghani Date: Fri, 2 Oct 2026 17:53:01 +0200 Subject: [PATCH 3/3] Pin current published Pushary Haystack component --- integrations/pushary.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/pushary.md b/integrations/pushary.md index cf031289..38297345 100644 --- a/integrations/pushary.md +++ b/integrations/pushary.md @@ -29,7 +29,7 @@ and resumes in another process, plus offline checks for refusal and retry behavi Install the versioned PyPI package: ```bash -pip install pushary-haystack==0.1.0 +pip install pushary-haystack==0.1.1 ``` Phone delivery requires a Pushary Partner account, a server-side `PUSHARY_API_KEY`,