Skip to content

feat(public-apps): share the start-process shape between public and direct modes - #730

Draft
Raina451 wants to merge 1 commit into
feat/public-coded-app-sdk-modefrom
feat/public-app-thin-proxy
Draft

feat(public-apps): share the start-process shape between public and direct modes#730
Raina451 wants to merge 1 commit into
feat/public-coded-app-sdk-modefrom
feat/public-app-thin-proxy

Conversation

@Raina451

Copy link
Copy Markdown
Collaborator

this pr makes public (anonymous) mode use the same request and response shape as the direct path, so the Apps service can stay a thin gate instead of owning its own contract.

stacked on #645 (SDK public mode).

the problem

public mode built its own body ({ inputArguments }) and returned the gateway response untouched, then cast it to ProcessStartResponse[]. the direct path meanwhile builds { startInfo } via transformRequest and maps the response back through ProcessMap. so the same processes.start(...) call gave a public app raw PascalCase Orchestrator json and a direct app the camelCase typed model. the cast was quietly lying.

it also pushed the shaping onto the server: apps had to hand-build ReleaseKey / startInfo per endpoint, which means the request contract lives in two repos and drifts.

what this does

public mode now runs the same transform on both ends:

  • request{ startInfo: transformRequest(request, ProcessMap) }, same as direct.
  • response — both paths go through one toProcessStartResponses helper, so the cast is honest.
  • PublicAppClient is now transport only. it posts the body as given and returns the response as given.

why apps stays thin

with the SDK owning the shape, the integration endpoint only has to gate and forward: fence the process, check the body's releaseKey is the process it just fenced (so a fenced route can't start a different one), attach the app token + folder, forward untouched, stamp the job for the session. no per-method body building on the server, and no SDK dependency in the backend.

paired change

apps side is UiPath/business-apps-jamjam#18118 — it moves to accepting startInfo and forwarding as-is. these two need to land together since they share the wire contract.

tests

public-app-client.test.ts updated for the pass-through body; the direct-path processes.test.ts suite is unchanged and still green (33 passed).

…irect modes

Public mode built its own request (`{ inputArguments }`) and returned the
gateway response untransformed while casting it to `ProcessStartResponse[]`,
so a public app and a direct app got different shapes from the same call.

Public mode now builds the same `{ startInfo }` body via `transformRequest`
and reads the response through the same mapping as the direct path, which
also makes the existing cast honest. The Apps service keeps ownership of
nothing but the gate and the forward.

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant