Call one Bowmark function and keep the session open for the next call
session_callRuns ONE library function in a Bowmark session, so a flow that needs several calls in the SAME session can finish: a booking that texts the user a code, a cart filled over several steps, a form that waits on an answer from the user. run cannot do these, because every run starts fresh and nothing it held survives to the next run.
path is the function as a script writes it after bowmark., split on the dots: ["providers","opentable","startBooking"]. args are its arguments, in order. Look both up in get_library first. Omit sessionId on the first call: a session opens and its sessionId comes back. Pass that sessionId on every later call so it runs in the same session. A session runs one call at a time: never send parallel calls to the same sessionId with Promise.all. Each call waits for the previous one. For parallel work, open separate sessions or use run instead.
The answer is { sessionId, ok, status, result, logs, error?, code? }. status is ok, error or needs_user. needs_user pauses only this call for a sign-in and the session stays open: give the user meta.handoff.url, then repeat the call. A session closes itself after a few idle minutes, so ask the user for anything you need (a texted code) right away and make the next call as soon as they answer. Call session_close when the task is done.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | The function's arguments, in order, exactly as a script passes them. | |
| path | Yes | The function to call, as the path a script writes after `bowmark.`: `["providers","opentable","startBooking"]` for `bowmark.providers.opentable.startBooking`. | |
| sessionId | No | The `sessionId` an earlier `session_call` returned. Omit it on the first call and a new session opens. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | True when the call completed without an error. | |
| error | No | What went wrong, when it did. | |
| runId | No | The run's id; pass it back to resume or collect it. | |
| result | No | What the call returned. | |
| status | No | How the call ended: `ok`, `partial`, `error`, `paused`… | |
| message | No | Why the call failed, when `ok` is false. | |
| expiresAt | No | When an idle session ends (ISO 8601). | |
| sessionId | No | Pass it to the next `session_call` and to `session_close`. |