@apilift/cli 1.10.2 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apilift-capture-server.js +51 -69
- package/dist/apilift-collector.js +18 -0
- package/dist/apilift.js +583 -467
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/skills/discover/references/html-forms-navigation.md +1 -1
- package/dist/plugin/skills/discover/references/operation-contract.md +1 -1
- package/package.json +3 -2
|
@@ -4,7 +4,7 @@ Use these contracts when the task needs fields extracted from markup, form input
|
|
|
4
4
|
|
|
5
5
|
## HTML, forms and navigation
|
|
6
6
|
|
|
7
|
-
For fields extracted from returned HTML, declare `response.format: "html"` and `response.html: {marker:"#observed-page",fields:{title:{selector:"h1",read:"text"}}}`. Replace selectors with observed structure. The marker must match exactly once and distinguish the signed-in page from login. Fields support `read` values `text`, `attribute` with `attribute`, `value`, `checked`, or `json` for embedded JSON; `fields` nests objects and `many:true` returns records. Use explicit `type` conversion for numbers or booleans
|
|
7
|
+
For fields extracted from returned HTML, declare `response.format: "html"` and `response.html: {marker:"#observed-page",fields:{title:{selector:"h1",read:"text"}}}`. Replace selectors with observed structure. The marker must match exactly once and distinguish the signed-in page from login. Fields support `read` values `text`, `attribute` with `attribute`, `value`, `checked`, or `json` for embedded JSON; `fields` nests objects and `many:true` returns records. Use explicit `type` conversion for numbers or booleans. Use `optional:true` only for observed optional fields. A missing optional match or value is returned as a present key with a null value. A `many:true` field with no matches returns an empty array. Permit null in the schema for optional values the response can emit. Extraction produces JSON before existing `path`, `fields` and `schema` validation. Declare `html.errors` for observed form-validation messages. Scripts never run; rendered-only data needs an observed structured request. Capture show accepts `--selector <CSS-selector>` for bounded retained HTML inspection; declare extraction only after choosing the fields needed by the task.
|
|
8
8
|
|
|
9
9
|
Use `request.form` for observed `application/x-www-form-urlencoded` submissions, excluding `body`. Arrays become repeated fields; empty strings remain present and absent optional inputs are omitted. For a structured value that the app expects as JSON text, use `{"$json":{"$input":"settings"}}` to serialize a typed object or array once; the same binding works in multipart scalar parts. Explain in the parameter description how consumers obtain complete replacement state through a published read. A string input with contentMediaType application/json and contentSchema requires caller serialization; ordinary strings do not imply JSON conversion. Represent checkbox wire values, omitted controls and the selected submit button explicitly; do not map caller booleans to browser behavior by assumption. One optional `request.prepare: {request:{method:"GET",url:"/settings/edit"},response:{...}}` extracts fresh internal values. Bind them with `{"$prepared":"/csrf"}` or a preservation path. Prepared values are refreshed per submission and never caller inputs. Declare unrelated non-default fields that a complete-form replacement must preserve. Transport form authentication uses `to:{in:"form",name:"csrf"}` on form submissions; read requests omit that form-only injection. Use the [multipart contract](file-actions.md#file-uploads-and-exports) for uploads. A single action dispatches one primary mutation; publish multiple-write workflows as separate callable actions.
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ Entities and full action definitions live in the version-2 file. Action names us
|
|
|
4
4
|
|
|
5
5
|
## Request and result
|
|
6
6
|
|
|
7
|
-
Use the documented or captured method, destination and wire structure. Bind a path value inside `request.url` with `{input.name}`. Bind query and JSON body values with `{"$input":"name"}`, generated values with `{"$generated":"name"}` and fresh preparation fields with `{"$prepared":"/pointer"}`. Use `{"$json":...}` only when the wire expects JSON text. Literal objects with binding-like keys use `{"$object":...}`. Keep auth on the connection, never in action inputs, literals or public samples. Fixed destinations remain within verified transport origins.
|
|
7
|
+
Use the documented or captured method, destination and wire structure. Bind a raw path value inside `request.url` with `{input.name}`. Apilift percent-encodes the value once. If the app documents that a lookup returns an already encoded path segment, explain in the input description how to decode that segment once before passing it. Bind query and JSON body values with `{"$input":"name"}`, generated values with `{"$generated":"name"}` and fresh preparation fields with `{"$prepared":"/pointer"}`. Use `{"$json":...}` only when the wire expects JSON text. Literal objects with binding-like keys use `{"$object":...}`. Keep auth on the connection, never in action inputs, literals or public samples. Fixed destinations remain within verified transport origins.
|
|
8
8
|
|
|
9
9
|
Declare inputs as an object schema with `properties` and a `required` list when needed. Record identifiers belong to inputs; their description explains how to choose them using published reads. An absent optional binding omits its field. Include `"null"` in the property's type if the app accepts explicit null. JSON body bindings preserve supplied `false`, `0`, empty strings and `null`. Declare defaults, enums, constants and formats only when supported by the app's contract. Generated values use supported runtime generators, not arbitrary code.
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apilift/cli",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"cheerio": "1.1.2",
|
|
24
24
|
"gpt-tokenizer": "4.0.0",
|
|
25
25
|
"jsonc-parser": "3.3.1",
|
|
26
|
+
"koffi": "3.3.8",
|
|
26
27
|
"tinyexec": "1.3.1"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"engines": {
|
|
38
39
|
"node": ">=24.16.0 <27"
|
|
39
40
|
},
|
|
40
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "6d0fd10a3db49e459f451c6ed939a5f24e5fcf8e",
|
|
41
42
|
"repository": {
|
|
42
43
|
"type": "git",
|
|
43
44
|
"url": "git+https://github.com/egor-sergeev/apilift.git",
|