You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
@pipelex/sdk on npm
Added
The pipelex-sdk command reads a catalog id's version suffix: run --method and script --method take mt_…@<n> and mt_…@draft beside a bare mt_… and send the suffix whole, and a suffix that is neither a positive number without a leading zero nor draft is a usage error made before any request, as parseMethodSelector reads it. script reads the method's name by its bare id and keeps the suffix in the script it writes. docs/cli.md describes it.
Publishing a saved method: publishMethod, listMethodVersions and getMethodVersion: publishMethod(methodId, { expected_draft_updated_at }) publishes the draft the caller last saw as the method's next immutable version and answers a MethodPublishResult discriminated on outcome: published with the new version, unchanged when the draft's digest equals the latest version's, or refused with a reason, a message and the runner's validation verdict. listMethodVersions pages a method's versions newest first and getMethodVersion reads one with its sources. docs/architecture.md describes the model.
parseMethodSelector: splits a method selector, mt_…, mt_…@<n> or mt_…@draft, into its bare id and the version it names (a number, "draft" or null for the latest published version), and refuses a malformed suffix with a RequestArgumentError before anything is sent, for a caller that reads by its bare id the method a pinned id names.
Which version a run ran: every run record (RunPublic, RunRead, PipelineRun, RunDetail, RunHistoryItem) carries an optional method_version, a number, "draft" or null for an inline source, and source_digest, the digest of what ran; the start acknowledgement and the blocking execute result carry method_version for a method_id run. A platform that does not record them yet leaves them absent. listRuns and iterateRuns take the bare id, under which the history lists the runs of every version and of the draft together.
MethodErrorCode: names the platform codes a method caller branches on in ApiResponseError.code: method_update_conflict, method_being_deleted, and the new method_not_published, a bare id of a method never published, and method_version_not_found, a version the method never published.
Changed
A saved method has a draft and published versions, and updateMethod is replaced by writeDraft and renameMethod (Breaking): the whole-method PUT is gone. writeDraft(methodId, { mthds, python?, input_data?, expected_updated_at? }) replaces the draft without validating it, and with expected_updated_at refuses a draft that moved since with a 409method_update_conflict, writing nothing; renameMethod(methodId, { name }) changes the name alone. MethodData gains the required draft_digest, latest_version and latest_published, its updated_at is the draft's token, moved by a draft write only, and getMethodClosure reads the draft, which a bare id no longer runs once the method is published. The method calls take a bare id, refusing a suffixed one with a RequestArgumentError before anything is sent.
The script pipelex-sdk script writes: its line now runs exec npx --yes --no-update-notifier --loglevel=warn @pipelex/sdk@X.Y.Z run …, so the script's stderr carries the command's own lines without npm's update notice, which npm 10 and 11 print wherever their cache starts empty, or the npm notice run … lines npm 12 prints at every run; npm's warnings and errors still print. A script written before keeps its line, and takes the same quiet by adding the two flags after --yes.
pipelex-sdk on PyPI
Added
The pipelex-sdk command reads a catalog id's version suffix: run --method and script --method take mt_…@<n> and mt_…@draft beside a bare mt_… and send the suffix whole, and a suffix that is neither a positive number without a leading zero nor draft, or a number past 2^53 − 1, is a usage error made before any request, as parse_method_selector reads it, so both commands answer the same value with the same line. script reads the method's name by its bare id and keeps the suffix in the script it writes. docs/cli.md describes it.
Publishing a saved method: publish_method, list_method_versions and get_method_version: publish_method(method_id, expected_draft_updated_at=…) publishes the draft the caller last saw as the method's next immutable version, refusing a token that is not a str with a PipelineRequestError before anything is sent, and answers a MethodPublishResult discriminated on outcome: MethodPublished with the new version, MethodPublishUnchanged when the draft's digest equals the latest version's, or MethodPublishRefused with a reason, a message and the runner's validation verdict. list_method_versions pages a method's versions newest first and get_method_version reads one with its sources. docs/architecture.md describes the model.
parse_method_selector: pipelex_sdk.method_selector splits a method selector, mt_…, mt_…@<n> or mt_…@draft, into its bare id and the version it names (an int, "draft" or None for the latest published version), and refuses a malformed suffix, or a value that is not a str at all, with a PipelineRequestError before anything is sent, for a caller that reads by its bare id the method a pinned id names.
Which version a run ran: every run record (RunPublic, RunRead, PipelineRun, RunDetail, RunHistoryItem) carries method_version, an int, "draft" or None for an inline source, and source_digest, the digest of what ran; the start acknowledgement PipelexRunResultStart and the blocking PipelexExecuteResult carry method_version for a method_id run. Both default to None, so a platform that does not record them yet still parses. list_runs and iterate_runs take the bare id, under which the history lists the runs of every version and of the draft together.
MethodErrorCode: a StrEnum in pipelex_sdk.errors naming the platform codes a method caller branches on in ApiResponseError.code: method_update_conflict, method_being_deleted, and the new method_not_published, a bare id of a method never published, and method_version_not_found, a version the method never published.
Changed
A saved method has a draft and published versions, and update_method is replaced by write_draft and rename_method (Breaking): the whole-method PUT is gone. write_draft(method_id, MethodDraftInput(mthds=…, python=…, input_data=…, expected_updated_at=…)) replaces the draft without validating it, sending only the fields set, and with expected_updated_at refuses a draft that moved since with a 409method_update_conflict, writing nothing; rename_method(method_id, name) changes the name alone. MethodData gains the required draft_digest, latest_version and latest_published, its updated_at is the draft's token, moved by a draft write only, and MethodWriteInput is the create payload alone. A bare method_id on a run or tooling route now runs the latest published version, and the method calls take a bare id, refusing a suffixed one with a PipelineRequestError before anything is sent.
The script pipelex-sdk script writes: its line now runs exec uvx --quiet pipelex-sdk@X.Y.Z run …, so the script's stderr carries the command's own lines without the download and install lines uv prints wherever its cache starts empty; uv's errors still print, and a first run on a cold machine now waits without a word while uv fetches Python and the packages. A script written before keeps its line, and takes the same quiet by adding --quiet after uvx.
@pipelex/create-method-app on npm, with the method-app templates
Added
A catalog id may pin a version in both templates: make create and the web app template's make add-method take mt_…@<version> and mt_…@draft beside a bare mt_…, which runs the method's latest published version, and keep the suffix in method.json, so the app or the CLI runs the version it was made from. The name and the label still come from the method's catalog entry, read by the bare id, but the description now comes from the files the app or the CLI runs, the version its selector names, where it came from the catalog entry, which carries the draft's description and would have described a pinned version in words its draft had since replaced. A malformed suffix is refused before anything is sent. The usage lines, make help, the CLI's empty state, the initializer's own usage and the READMEs name the suffixed forms.
Fixed
A catalog id holding a dot is refused before anything is sent, in both templates: make create and the web app template's make add-method took mt_review.mthds, a path that is not on disk, for a catalog id, probed the API with it and reported that the API could not resolve it. No catalog id holds a dot, and the templates now read one as the platform and the SDK's selector grammar do, so it is refused locally as not a well-formed catalog id.
The JavaScript starter, Pipelex/pipelex-starter-js
Added
A catalog id may pin a version: make add-method takes mt_…@<version> and mt_…@draft beside a bare mt_…, which runs the method's latest published version, and keeps the suffix in method.json, so the tab runs the version it was scaffolded against; the slug and the label still come from the method's catalog name, read by the bare id. A malformed suffix is refused before anything is sent. docs/add-method.md describes the forms, and the Makefile's usage line and make help name them.
Fixed
A catalog id holding a dot is refused before anything is sent: make add-method took mt_review.mthds, a path that is not on disk, for a catalog id, probed the API with it and reported that the API could not resolve it. No catalog id holds a dot, and the starter now reads one as the platform and the SDK's selector grammar do, so it is refused locally as not a well-formed catalog id.
The Python starter, Pipelex/pipelex-starter-python
Added
A catalog id may pin a version: make add-method takes mt_…@<version> and mt_…@draft beside a bare mt_…, which runs the method's latest published version, and keeps the suffix in method.json, so the command runs the version it was scaffolded against. A malformed suffix is refused. docs/add-method.md describes the forms, and the Makefile's usage line names them.