Skip to content

librarian v0.23.1

Choose a tag to compare

@github-actions github-actions released this 17 Nov 23:20
· 6 commits to main since this release

Two things from live runs against what 0.23.0 tells agents about request bodies.

Fixed

  • A list field is named by its key, and its type says that it is a list. 0.23.0 named a list field of a body expand[] (the notation of a registry entry). A model asked to make a Stripe refund sent just that as the key: {"expand[]": ["charge"]}. capabilities now answers {"name": "expand", "type": "list of string"}, and a field of each item of a list as items.price under items, a list of object. With that, a small and a large Claude model both sent {"expand": ["charge"]}, and a small one built a GitHub tree of two files as a list of objects at the first attempt. Upgrade if agents use 0.23.0's body fields.

New

  • A body is sent as a form where the API takes one. An agent gives a body as an object, whatever the API takes. APIs such as Stripe's take a form (application/x-www-form-urlencoded) and refuse JSON, so a write that was read, approved and sent as JSON failed there. librarian now sends it the way the API's description says: a field inside another in brackets (metadata[order]=6735), a list of objects numbered (items[0][price]=p1), and a list of plain values as that description writes lists: the name repeated (tag=a&tag=b, OpenAPI's default), numbered in brackets (expand[0]=charge, where the description gives the style deepObject, as Stripe's does), or joined by commas (Swagger 2).
  • The approval page shows the fields as they go over the wire, under the body, for such a write.
  • A body that cannot be a form (a list, for an operation that takes a form) is refused in words before anyone is asked to approve it.
  • capabilities with api and operation says "sent_as": "form" for such an operation. For one whose description wants a file upload (multipart) it says that librarian does not send that; 0.23.0 said "sent_as": "multipart", which was not true.
  • In an entry: body.lists (repeated, brackets or commas) beside body.encoding (the format).
  • The skill tells agents to give body as an object and not to write names like metadata[order] themselves. A kagent Agent takes it from this release's image by digest: oci: ghcr.io/kultar/librarian@sha256:159bb5ccaeb8fddfe11d3e24b9ee399cfd5046c46e1b127f34b6563f4355ffc5, path: skills/librarian.

Checked with a real HTTP client against a real server (the bytes on the wire), through agentgateway against an echo server in the weekly stack, and on Stripe's own description: 306 of its operations are read as forms with bracketed lists. Not checked against Stripe itself.

Upgrade

  • No configuration changes are needed.
  • An API learned by 0.23.0 knows that it takes a form, and not how its lists are written. Have its description read again: Re-check now on the console's API page, or librarian registry recheck <api>. For an approved API an approver then takes the update, which touches nothing else. An API learned before 0.23.0 gets both at the same step.
  • An entry with lists: brackets or lists: commas cannot be read by 0.23.0, which reports it invalid and goes on serving the others. That concerns APIs that take forms; an entry without it is written as before.
  • A change in how a body is taken, at the source, is listed like any other change in a body, and holds no operation back.