Skip to content

v0.39.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 00:58
· 223 commits to main since this release
f0779a0

@pipelex/sdk on npm

Added

  • runMayHaveStarted and runMayHaveStartedOf: every SDK error carries runMayHaveStarted, true when a failed start or blocking execute, the ones startAndWaitForResult sends included, may have created a run whose id never reached the caller, and false otherwise; runMayHaveStartedOf reads it from anything a catch holds. It is true for an answer the SDK could not read, a 408, every 5xx but a 501 and the platform's 503 coded pipeline_start_unavailable, a transport failure that does not prove the request never left, and PipelineExecuteTimeoutError, whatever the timing (docs/errors.md).
  • RunRead.degradation and DegradationReason: getRunStatus types the degradation the platform sends with degraded, as RunDegradation (reason, message, failed_attempts, failing_since, ends_at), each field checked so a malformed one never fails the poll. degraded no longer means only that the platform could not reach the workflow engine (status_unavailable): workflow_task_failing means the run is stuck and the platform ends it FAILED at ends_at, so code that branches on degraded now reads degradation.reason as well (docs/run-results.md).
  • request_id on a run: RunRead.request_id and RunDetail.request_id type the id of the request that started the run, the one to quote to support.
  • prepareInputs without uploads: allowUploads: false makes prepareInputs refuse every value at a file input that would need an upload — a local path, a data: URL, bytes — with the new UploadNotAllowedError, which names the input (inputName), where inside it the value sits (inputPath, such as dossier.attachments[1]) and what it is (valueKind: local_path, data_url or bytes), before anything is read from disk, decoded or uploaded; http(s) URLs and pipelex-storage:// references pass through as before. A server preparing inputs on a caller's behalf uses it to never read a file of its own because the caller named it (docs/input-preparation.md).

Changed

  • A run that may have started is not retryable (Breaking): on an error whose runMayHaveStarted is true, retryable is false, whatever the problem document sent and whatever the status says, so a caller that retries on retryable alone no longer starts a second paid run; errorDomain is unchanged and the server's members stay on problemDocument. A start or execute answered with a 500, a 502, an uncoded 503, a 504 or a 408, or cut off once the request had left, was retryable and no longer is.
  • The command's "a run may have started" line follows the SDK: pipelex-sdk run prints it when the failed request's error says runMayHaveStarted, so it now prints it for a 500, a 503 without the platform's pipeline_start_unavailable code however soon it came, and a 408, and no longer times the start itself.
  • A failed run's report is documented as the platform's STRICT projection: the doc comments of RunErrorReport, ProviderErrorMetadata, RunFailedError, the run records' error and RunDegradation.message, with docs/errors.md, docs/run-results.md and the README, now say what the hosted platform serves, where they said it served the runner's VERBOSE report: message and user_action are the author's only when caller_facing_message is true and the placeholder An internal error occurred. otherwise, provider_metadata keeps only status_code and retry_after_seconds, model, provider and migration are absent, and a workflow_task_failing degradation's message does not quote the worker's failure. They also say that a cancelled, terminated or timed-out run holds a report when a completion callback carried one, and a timed-out run otherwise the platform's timeout report, and ApiResponseError.providerMetadata says that the hosted runner's problem documents carry only status_code and retry_after_seconds, the whole of it coming only from a runner that discloses errors VERBOSE; the types are unchanged.
  • The .mthds check hook's lint engine moves to @pipelex/tools-wasm 0.5.0: the bundle built by npm run build:hook now embeds @pipelex/tools-wasm 0.5.0, whose MTHDS schema follows the reworked PipeJudge and holds stored names to the plain input-name form, so the hook no longer blocks a PipeJudge that carries a prompt beside its question, asks several named questions in a questions table, or gives its levels as { label, description } tables, and now blocks with a schema error a PipeJudge that does not carry both a prompt and a question or questions table, which is every judge the previous engine accepted, a judge's criteria table missing its yes or its no side, and a result or batch_as on a PipeSequence step or a PipeParallel branch, or an input_item_name on a PipeBatch, that is not a plain input name, such as ShoppingList or round.parcel.

Fixed

  • start and execute refuse an answer that is not the run they created: a start acknowledgement whose pipeline_run_id is not a string or is empty, an execute 202 whose body is not JSON or names no run (an empty id included), and an execute 2xx that is not the completed run (no string pipeline_run_id, or a pipe_output without its pipeline_run_id or its working_memory with root and aliases) are each an ApiResponseError the SDK could not read, runtime, not retryable and runMayHaveStarted, as the Python twin raises them. The acknowledgement was returned naming no run, the 202 was a retryable RunStillRunningError with an empty runId, and the incomplete result failed later with a bare TypeError or a MissingMainStuffError.

pipelex-sdk on PyPI

Added

  • run_may_have_started and run_may_have_started_of: every SDK error carries run_may_have_started, True when a failed start or blocking execute, the ones start_and_wait sends included, may have created a run whose id never reached the caller, and False otherwise; pipelex_sdk.error_verdicts.run_may_have_started_of reads it from anything an except holds. It is True for an answer the SDK could not read, a 408, every 5xx but a 501 and the platform's 503 coded pipeline_start_unavailable, a transport failure that does not prove the request never left, and PipelineExecuteTimeoutError, whatever the timing (docs/errors.md).
  • RunRead.degradation and DegradationReason: get_run_status types the degradation the platform sends with degraded, as RunDegradation (reason, message, failed_attempts, failing_since, ends_at) in pipelex_sdk.runs, read leniently so a malformed one never fails the poll. degraded no longer means only that the platform could not reach the workflow engine (STATUS_UNAVAILABLE): WORKFLOW_TASK_FAILING means the run is stuck and the platform ends it FAILED at ends_at, so code that branches on degraded now reads degradation.reason as well (docs/run-results.md).
  • request_id on a run: RunRead.request_id and RunDetail.request_id type the id of the request that started the run, the one to quote to support.
  • prepare_inputs without uploads: allow_uploads=False makes prepare_inputs refuse every value at a file input that would need an upload — a local path (a str or a Path), a data: URL, bytes — with the new UploadNotAllowedError, which names the input (input_name), where inside it the value sits (input_path, such as dossier.attachments[1]) and what it is (value_kind, an UploadNotAllowedKind), before anything is read from disk, decoded or uploaded; http(s) URLs and pipelex-storage:// references pass through as before. A server preparing inputs on a caller's behalf uses it to never read a file of its own because the caller named it (docs/input-preparation.md).

Changed

  • A run that may have started is not retryable (Breaking): on an error whose run_may_have_started is True, retryable is False, whatever the problem document sent and whatever the status says, so a caller that retries on retryable alone no longer starts a second paid run; error_domain is unchanged and the server's members stay on problem. A start or execute answered with a 500, a 502, an uncoded 503, a 504 or a 408, or cut off once the request had left, was retryable and no longer is.
  • The command's "a run may have started" line follows the SDK: pipelex-sdk run prints it when the failed request's error says run_may_have_started, so it now prints it for a 500, a 503 without the platform's pipeline_start_unavailable code however soon it came, and a 408, and no longer times the start itself.
  • A failed run's report is documented as the platform's STRICT projection: the docstrings of RunErrorReport, ProviderErrorMetadata, RunFailedError, the run records' error and RunDegradation.message, with docs/run-results.md, docs/architecture.md and the README, now say what the hosted platform serves, where they said it served the runner's VERBOSE report: message and user_action are the author's only when caller_facing_message is True and the placeholder An internal error occurred. otherwise, provider_metadata keeps only status_code and retry_after_seconds, model, provider and migration are None, and a WORKFLOW_TASK_FAILING degradation's message does not quote the worker's failure. They also say that a cancelled, terminated or timed-out run holds a report when a completion callback carried one, and a timed-out run otherwise the platform's timeout report; the models are unchanged.

Fixed

  • An acknowledgement that names no run is an answer the SDK could not read: an execute 202 whose body is not JSON, or does not carry a non-empty string pipeline_run_id, raises an ApiResponseError, runtime, not retryable and run_may_have_started, where it raised a retryable RunStillRunningError with an empty run_id, and a start acknowledgement whose pipeline_run_id is empty raises the same error, where it was returned naming no run, as @pipelex/sdk now does too.

@pipelex/create-method-app on npm, with the method-app templates

Changed

  • A failed run's report is described as the platform serves it: the web app template's docs/errors.md, CLAUDE.md and the comments of classifyRunFailed, visibleReportMessage and reportDetails, and the docstring of the CLI template's report_lines, say that the platform serves the runner's STRICT projection of a run's report, whose message is the author's copy only when caller_facing_message is true and An internal error occurred. otherwise, and whose provider_metadata keeps only status_code and retry_after_seconds, so a hosted report never carries a provider's raw text. The web app's cut of that text and its omission of provider_metadata from the technical details stay as defence in depth for a report served whole, and neither template's display changes. The web app's docs also say which runs hold no report, since a cancelled, terminated or timed-out run holds one when a completion callback carried one.

The JavaScript starter, Pipelex/pipelex-starter-js

Changed

  • A failed run's report is described as the platform serves it: docs/errors.md, CLAUDE.md and the comments of classifyRunFailed, visibleReportMessage and reportDetails say that the platform serves the runner's STRICT projection of a run's report, whose message is the author's copy only when caller_facing_message is true and An internal error occurred. otherwise, and whose provider_metadata keeps only status_code and retry_after_seconds, so a hosted report never carries a provider's raw text. The cut of that text and the omission of provider_metadata from the technical details stay as defence in depth for a report served whole, and the display is unchanged. They also say which runs hold no report, since a cancelled, terminated or timed-out run holds one when a completion callback carried one.

The Python starter, Pipelex/pipelex-starter-python

Changed

  • A failed run's report is described as the platform serves it: docs/cli-architecture.md and the docstrings of present_failed_run and report_lines say that the platform serves the runner's STRICT projection of a run's report, whose message is the author's copy only when caller_facing_message is true and An internal error occurred. otherwise, so a provider's raw text no longer reaches the terminal from a hosted run; the report is still printed as it came. They also say which runs hold no report, since a cancelled, terminated or timed-out run holds one when a completion callback carried one.