Download the PHP package iroute/sdk without Composer
On this page you can find all versions of the php package iroute/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package sdk
Short Description Thin PHP client for the iRoute runtime
License Apache-2.0
Homepage https://iroute.dev/docs/sdk/php
Informations about the package sdk
iRoute PHP SDK
iroute/sdk is the PHP client for the iRoute v1 HTTP and SSE API. It uses cURL,
returns associative arrays, and supports execution, polling, cancellation,
approvals, artifacts, gateway health, observability, and buffered event replay.
Routing, provider selection, validation, workflow retries, and fallback remain server-side.
Status and requirements
- SDK version:
0.1.0-alpha.3 - Minimum PHP:
8.3 - Verified baseline: PHP
8.5 - Required extension:
ext-curl - Composer package:
iroute/sdk
The public alpha is published on Packagist through this official PHP mirror. The source installation below remains available.
Start iRoute
Run the iRoute runtime from the main repository:
The default API URL is http://localhost:8080. See the
PHP guide on iroute.dev for runtime and
authentication options.
Install from Packagist
Install from source
Add the SDK checkout as a Composer path repository in the application's
composer.json:
Then run:
To develop this SDK locally, install its own autoloader:
Create a client
In Development the identity options become headers. In JWT mode the server derives identity and scopes from token claims and will not allow headers to elevate them.
Submit an execution
The shorthand form is available when no additional request fields are needed:
Prefer the array form so the request includes a stable idempotency key.
Poll until terminal
WaitingForApproval is non-terminal.
Read event replay
The default cURL transport returns the response body after the server closes it, so the generator parses a buffered terminal replay rather than yielding live network chunks. Applications requiring long-lived incremental events should inject a streaming transport or consume the SSE endpoint through their HTTP stack. Persist the sequence for reconnects and ignore unknown fields.
Cancel an execution
Poll or replay events to confirm the durable terminal result.
Approve or deny an action
Read actionId from an approval.required event:
The deciding token needs approval:grant and the action's required scope.
Retrieve an artifact
Not found returns null, including for cross-tenant access.
Health and observability
Gateway health returns a decoded body for HTTP 200 and 503. Summary query
keys are from, to, taskType, and policyVersion. Observability is tenant
scoped, and reported cost has no currency in v1.
Errors and timeouts
cURL failures throw RuntimeException. Configure the transport deadline with
timeoutSeconds. The SDK does not retry automatically; retrying a submission
requires the same idempotency key.
Custom transport
The constructor's optional transport is a callable accepting IRouteRequest
and returning IRouteResponse. Use it for tests, proxies, streaming, metrics, or
application-specific TLS settings. SDK headers and problem-detail mapping remain
unchanged.
Method reference
| Method | Result |
|---|---|
execute(array|string, input?) |
Execution array |
get(executionId) |
Array or null |
cancel(executionId) |
false when not found |
submitApproval(executionId, decision) |
Approval result array |
streamEvents(executionId, afterSequence=0) |
Buffered event generator |
getArtifact(artifactId) |
Array or null |
getModelGatewayHealth() |
Health array |
getObservabilitySummary(query=[]) |
Summary array |
getExecutionTimeline(executionId) |
Timeline or null |
Run the example and tests
From this repository:
Public wire shapes are defined by the OpenAPI document and JSON Schemas.
All versions of sdk with dependencies
ext-curl Version *