@apilift/cli 1.5.4 → 1.5.5-dev.1792427693.37eceded937e76934ee957dae4e8ea4e72935825

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.js CHANGED
@@ -30492,7 +30492,7 @@ function draftTemplate(kind) {
30492
30492
  ""
30493
30493
  ].join("\n") : "";
30494
30494
  const tabGuidance = ["action", "transport"].includes(kind) ? "// capture.tab is a selector returned by browser tabs; it selects the same signed-in Chrome tab for capture and discover run, including connection probes. Leave other sessions' tabs untouched.\n" : "";
30495
- const captureGuidance = kind === "action" ? '// Public descriptions explain behavior, consequences and limits; do not instruct consumers to repeat runtime proof or browser checks. Author verification is separate from consumer judgment.\n// Request JSON/query uses typed {"$input":"name"} bindings; URL segments use {input.name}. Resolve every {unresolved.N} marker from retained evidence before running.\n// App-owned input source annotation: {"x-source":{"action":"ticket.list","path":"/*/id"}}. Run the source explicitly; it never runs implicitly.\n// Keep only invariant protocol values constant; selected app values are inputs, even when public. Generalize one action across its supported choices.\n// Before discover run, construct verification.inputs from the consumer contract and published value sources. Use a materially different selection and configuration from the captured or documented example, not just another label. Resolve missing configuration sources first; unexplained JSON is not a substitute.\n// Accept verification.review only when the result confirms that selection and configuration and consumers can obtain the required inputs.\n// A readback through POST requires proof.effect: "read" alongside proof.request; HTTP method alone does not determine semantic effect.\n// JSON object keys may use {input.name}, e.g. {"{input.attribute_id}":{"$input":"value"}}.\n// Discovery-only mutation proof compares a readback path with exactly one input, primary result path or internal JSON value: equals: [{"path":"/ready","value":true}]. Public literals require semantic review; fixed proof expectations are not caller flags.\n// Proof URLs bind returned identifiers with {result./id}; JSON bodies/query use {"$result":"/id"}. Readback pointers may use a complete {input.name} segment for a dynamic key; slashes and tildes in its value are escaped.\n// For one member of a nested list: select: {"path":"/ticket/fields","where":[{"path":"/id","result":"/id"}]}; equals paths then refer to the single matching member. Compare identity and meaningful changed fields, not entire objects.\n// For valid readback variants, keep identity equals and add proof.response: {path:"/state",schema:{enum:["ready","empty"]}}, relative to the selected member. Exclude pending states; use proof-only reads after completion.\n// Repair a failed response/proof with discover run --proof-only; it reuses the saved primary response and sends only the readback. Publication still needs a successful test and accepted semantic review.\n// For large collections, investigate native search/filter/detail routes before enumeration. Search saved results locally and inspect only matching records; preserve structured dynamic fields.\n// After selecting a captured request, discover capture auth runs a bounded default search without authField or authScope. Set either only to narrow an observed field or location; browser-managed cookies need no locator.\n' : "";
30495
+ const captureGuidance = kind === "action" ? '// Public descriptions explain behavior, consequences and limits; do not instruct consumers to repeat runtime proof or browser checks. Author verification is separate from consumer judgment.\n// Request JSON/query uses typed {"$input":"name"} bindings; URL segments use {input.name}. Resolve every {unresolved.N} marker from retained evidence before running.\n// App-owned input source annotation: {"x-source":{"action":"ticket.list","path":"/*/id"}}. Run the source explicitly; it never runs implicitly.\n// Keep only invariant protocol values constant; selected app values are inputs, even when public. Generalize one action across its supported choices.\n// Before discover run, construct verification.inputs from the consumer contract and published value sources. Use a materially different selection and configuration from the captured or documented example, not just another label. Resolve missing configuration sources first; unexplained JSON is not a substitute.\n// Trace the requested consumer path through existing-target lookup, configuration and the result needed next; publish verified prerequisites independently and require the complete path at task completion. Compare related actions by effect and choices, not endpoint.\n// For updates, read relevant non-default state before the existing test; confirm the requested change and preservation of settings outside it. Omitted inputs preserve state unless replacement/reset is explicit.\n// Require essential identity/result members in response.schema. Validate intact saved output, then remove each essential member independently in disposable copies and confirm rejection; preserve saved evidence and preserve valid empty collections, optional fields and bodyless results.\n// Accept verification.review only when the result confirms that selection and configuration, preservation, and this action\u2019s usable step in the consumer path. Review affected descriptions and source/result paths together.\n// A readback through POST requires proof.effect: "read" alongside proof.request; HTTP method alone does not determine semantic effect.\n// JSON object keys may use {input.name}, e.g. {"{input.attribute_id}":{"$input":"value"}}.\n// Discovery-only mutation proof compares a readback path with exactly one input, primary result path or internal JSON value: equals: [{"path":"/ready","value":true}]. Public literals require semantic review; fixed proof expectations are not caller flags.\n// Proof URLs bind returned identifiers with {result./id}; JSON bodies/query use {"$result":"/id"}. Readback pointers may use a complete {input.name} segment for a dynamic key; slashes and tildes in its value are escaped.\n// For one member of a nested list: select: {"path":"/ticket/fields","where":[{"path":"/id","result":"/id"}]}; equals paths then refer to the single matching member. Compare identity and meaningful changed fields, not entire objects.\n// For valid readback variants, keep identity equals and add proof.response: {path:"/state",schema:{enum:["ready","empty"]}}, relative to the selected member. Exclude pending states; use proof-only reads after completion.\n// Repair a failed response/proof with discover run --proof-only; it reuses the saved primary response and sends only the readback. Publication still needs a successful test and accepted semantic review.\n// For large collections, investigate native search/filter/detail routes before enumeration. Search saved results locally and inspect only matching records; preserve structured dynamic fields.\n// After selecting a captured request, discover capture auth runs a bounded default search without authField or authScope. Set either only to narrow an observed field or location; browser-managed cookies need no locator.\n' : "";
30496
30496
  return `${head}${probeGuidance}${tabGuidance}${captureGuidance}${JSON.stringify(templates[kind], null, 2)}
30497
30497
  `;
30498
30498
  }
@@ -34750,7 +34750,7 @@ File: ${checked.draft.filePath}
34750
34750
  The file is structurally valid, but its configured request has no current successful test and accepted semantic review.
34751
34751
  File: ${draft.filePath}
34752
34752
  Test explicitly: ${command4(invocation, "discover run")}
34753
- Inspect the saved output and set verification.review to accepted only if ${draft.kind === "action" ? "it confirms the selected behavior and configuration and consumers can obtain the required inputs from the contract and published sources" : "it has the intended meaning"}, then publish again.
34753
+ Inspect the saved output and set verification.review to accepted only if ${draft.kind === "action" ? "it confirms the selected behavior, configuration and any promised preservation, and supports its step in the requested consumer path using published sources and usable results" : "it has the intended meaning"}, then publish again.
34754
34754
  `);
34755
34755
  if (draft.kind === "action") verification = { executableHash: identity2.executable, closureHash: identity2.closure, outcome: "success", semanticConfirmed: true, proof: checked.definition.effect === "read" ? "not-applicable" : "passed", verifiedAt: evidence.verifiedAt, clientVersion: cliVersion };
34756
34756
  else {
@@ -34976,7 +34976,7 @@ ${responsePath ? `Saved primary response and test inputs: ${responsePath}
34976
34976
  Saved output: ${resultPath}
34977
34977
 
34978
34978
  Review the actual objects and field meanings against the official docs or UI.
34979
- Edit ${draft.filePath}: set verification.review to accepted only if ${draft.kind === "action" ? "this result confirms the selected behavior and configuration and consumers can obtain the required inputs from the contract and published sources" : "this result has the intended meaning"}; otherwise rejected with verification.notes.
34979
+ Edit ${draft.filePath}: set verification.review to accepted only if ${draft.kind === "action" ? "this result confirms the selected behavior, configuration and any promised preservation, and supports its step in the requested consumer path using published sources and usable results" : "this result has the intended meaning"}; otherwise rejected with verification.notes.
34980
34980
  ${draft.kind === "transport" && draft.baseVersion ? `If this task requires publishing connection changes or renewed verification, publish: ${command4(invocation, "discover publish")}. If you only checked the existing connection, discard this local draft: ${command4(invocation, "discover discard")}.` : `Then publish: ${command4(invocation, "discover publish")}`}
34981
34981
  Publication does not send another app request.
34982
34982
  `, exitCode: 0, stdoutJson: true, dispatched: true };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apilift",
3
- "version": "1.5.4",
3
+ "version": "1.5.5-dev.1792427693.37eceded937e76934ee957dae4e8ea4e72935825",
4
4
  "description": "Use logged-in apps and discover missing actions with Apilift.",
5
5
  "author": {
6
6
  "name": "Apilift"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apilift",
3
- "version": "1.5.4",
3
+ "version": "1.5.5-dev.1792427693.37eceded937e76934ee957dae4e8ea4e72935825",
4
4
  "description": "Use logged-in apps and discover missing actions with Apilift.",
5
5
  "author": {
6
6
  "name": "Apilift"
@@ -17,10 +17,10 @@ For every requested action, assess current first-party operation and access docu
17
17
 
18
18
  Use `apilift discover draft <kind> [name]` for `app`, `entity`, `transport`, `browser-page`, or `action`. Its response gives a private JSONC path; edit that file. The file contains the published `definition` and local `dependencies`, `verification`, and `capture` settings. App origin is its primary UI location, not every request destination. Publish missing entity and connection resources before an action that depends on them; a browser connection also needs a published browser page. Keep credential values and recurring local context values out of every definition. Read [operation-contract.md](references/operation-contract.md) before defining an action.
19
19
 
20
- Check the selected file with `apilift discover check`; it sends no app request and reports independent field errors. Before the existing `apilift discover run`, construct `verification.inputs` as a consumer using the public contract and published value sources. When choices vary, use a materially different selection from the captured or documented example, including its configuration, rather than only changing a label. Resolve missing configuration sources before accepting review; an unexplained JSON object is not usable coverage. A connection instead selects `verification.probeOrigin`. Inspect saved output against official documentation or observed app state and accept `verification.review` only when it confirms the selected behavior and configuration. For a mutation, assess its separate readback proof and never repeat the write merely to improve evidence. After repairing a failed response or proof, `apilift discover run --proof-only` checks the saved response and sends only the readback. Metadata resources need no app execution. `apilift discover publish` publishes the exact selected version after its gates and sends no app request.
20
+ Check the selected file with `apilift discover check`; it sends no app request and reports independent field errors. Before the existing `apilift discover run`, construct `verification.inputs` as a consumer using the public contract and published value sources. When choices vary, use a materially different selection from the captured or documented example, including its configuration, rather than only changing a label. Resolve missing configuration sources before accepting review; an unexplained JSON object is not usable coverage. Trace the requested consumer path through target lookup, configuration and the usable result. For updates, use relevant non-default state and confirm preservation of settings outside the requested change. Locally confirm that removing each essential result member from a disposable copy fails the response schema; preserve saved evidence. Publish verified prerequisites independently and require the complete path at task completion. A connection instead selects `verification.probeOrigin`. Inspect saved output against official documentation or observed app state and accept `verification.review` only when it confirms the selected behavior and configuration. For a mutation, assess its separate readback proof and never repeat the write merely to improve evidence. After repairing a failed response or proof, `apilift discover run --proof-only` checks the saved response and sends only the readback. Metadata resources need no app execution. `apilift discover publish` publishes the exact selected version after its gates and sends no app request.
21
21
 
22
22
  ## Recover and finish
23
23
 
24
24
  Use `apilift discover status` to recover the selected draft, result path, recording phase, or pending publication. A lost publication response is reconciled with the exact retained `discover publish` request before editing, deferring, or discarding. `discover rebase` is for a version conflict after reviewing the current resource. `discover defer` retains owned work, `discover discard` abandons only its unpublished draft, and `discover close` abandons that session’s selected and deferred drafts and leaves the app when owned in-flight work has settled. Publication and abandonment delete that draft and temporary verification/capture evidence. Use `discover defer` before switching resources to preserve unfinished work and its evidence while discovery stays open; resuming it requires no new capture. Closing discovery ends that retention and preserves other sessions’ drafts. A stopped recording must be confirmed or canceled before changing drafts or tabs. Follow [recovery.md](references/recovery.md) before treating a failed route as a terminal blocker.
25
25
 
26
- Completion means the requested actions are published and the original authorized outcome is handled, or a specific human-only or external prerequisite is identified. Review consumer descriptions for behavior, consequences and limits: author verification establishes publication evidence, while published execution validates its response without automatic readback. Do not prescribe routine browser inspection. Consumers decide whether their task needs additional verification. Inspect published consumer help from a fresh session and obtain required values through its published source actions; the author's local verification inputs are not consumer coverage. Do not send an extra mutation merely to demonstrate publication. Report actual verification, authorized test state, one optional cleanup attempt if relevant, and remaining gaps.
26
+ Completion means the requested actions are published and the original authorized outcome is handled, or a specific human-only or external prerequisite is identified. Review names and descriptions across affected actions and dependencies for actual effects, usable source/result paths, access requirements and coverage limits: author verification establishes publication evidence, while published execution validates its response without automatic readback. Do not prescribe routine browser inspection. Consumers decide whether their task needs additional verification. Inspect published consumer help from a fresh session and obtain required values through its published source actions; the author's local verification inputs are not consumer coverage. Do not send an extra mutation merely to demonstrate publication. Report actual verification, authorized test state, one optional cleanup attempt if relevant, and remaining gaps.
@@ -1,21 +1,21 @@
1
1
  # Define and prove an action
2
2
 
3
- Name a precise domain `entity.verb` for the requested outcome. Before transport capture, define its entity, semantic effect, caller decisions, useful returned result, and independent proof of a mutation. Do not expand one read into general CRUD coverage. Check whether returned objects are the requested entities or containers requiring traversal and pagination. HTTP success and a matching title do not establish complete coverage.
3
+ Name a precise domain `entity.verb` for the requested outcome. Before transport capture, define its entity, semantic effect, caller decisions, useful returned result, and independent proof of a mutation. Compare related published actions by effect and supported choices before drafting; extend the same operation rather than duplicate a selection, but do not merge distinct effects merely because they share an endpoint. Do not expand one read into general CRUD coverage. Check whether returned objects are the requested entities or containers requiring traversal and pagination. HTTP success and a matching title do not establish complete coverage.
4
4
 
5
5
  An action's published `definition` describes its effect, JSON Schema `inputs`, request, response and, for a mutation, readback proof. `dependencies.transport` selects one published connection and is translated to the action's selected transport at publication. Request fields include method, URL, optional headers, query and JSON body. Use typed `{"$input":"name"}` and encoded `{input.name}` bindings for caller values. Constants must be invariant for the operation: a public catalog selection is still an input. Generalize the same action when selections vary instead of adding example-specific or generic duplicates. Captured account identifiers, credential values and local defaults are not protocol constants. Use generated bindings for fresh request identifiers, never a caller flag invented from a captured identifier.
6
6
 
7
- Public action descriptions state behavior, consequences and limits. Author verification establishes publication evidence; published execution validates the response without automatic readback. Consumers decide whether their task needs state confirmation through a published read; do not prescribe routine browser inspection.
7
+ Public action names and descriptions state actual behavior, consequences and limits. Review the affected actions and dependencies together: source and result instructions must match consumer-visible paths, app/entity prose must distinguish domain capabilities from available coverage, and transport instructions must describe supported access requirements. Author verification establishes publication evidence; published execution validates the response without automatic readback. Consumers decide whether their task needs state confirmation through a published read; do not prescribe routine browser inspection.
8
8
 
9
9
  Each visible input and response field needs a semantic description; caller inputs also need synthetic examples. A value owned by the app needs a published source action with a compatible selected result path. Producers never run implicitly: the consumer runs the documented source and supplies its selected value. Do not use a prose-only dependency, a published context-variable resource, or the author's local verification value as a source. Per-app scalar `context` defaults are a consumer convenience with exact input-name matching, not an action contract or account model. Ambiguous generic names are passed explicitly.
10
10
 
11
- Select the useful response subtree with `response.path` when needed and validate it with `response.schema`; projected fields use paths relative to the selected subtree or array member. Preserve meaningful variants and nullable fields observed in real results. If verification reports a mismatch, inspect the selected value and correct its type or projection rather than weakening the contract to pass. Keep identity and relationship fields needed for further discovery.
11
+ Select the useful response subtree with `response.path` when needed and validate it with `response.schema`; projected fields use paths relative to the selected subtree or array member. Preserve meaningful variants and nullable fields observed in real results. If verification reports a mismatch, inspect the selected value and correct its type or projection rather than weakening the contract to pass. Keep identity and relationship fields needed for further discovery. Captured properties are provisional: require the identity, result container or acknowledgement that establishes this operation’s result. Validate the intact saved output locally, then remove each essential member independently in disposable copies and confirm schema rejection; preserve the saved evidence and send no additional app request. Preserve legitimate empty collections, optional fields, nullable values, dynamic maps and bodyless responses; do not require every observed field.
12
12
 
13
- During discovery, a mutation needs a separate read-only proof request and meaningful comparisons to the intended state. A proof failure leaves the write possibly applied. Repair the proof and use `apilift discover run --proof-only` against the saved primary response; this sends only the readback. Never repeat a possibly sent write just to get stronger proof. For a delete, an explicit absence proof may establish success. A readback or probe using POST may declare semantic `effect: "read"`; method alone is not the effect.
13
+ During discovery, a mutation needs a separate read-only proof request and meaningful comparisons to the intended state. An update changes only requested settings: omitted values preserve existing state unless the contract explicitly describes replacement or reset semantics. For the existing verification run, choose an object with relevant non-default settings, read its state before the write, and compare the readback for both the intended change and preservation of settings the request could overwrite. Full replacement requires a consumer-accessible complete state; do not copy create defaults or unrelated empty objects into a narrow update. A proof failure leaves the write possibly applied. Repair the proof and use `apilift discover run --proof-only` against the saved primary response; this sends only the readback. Never repeat a possibly sent write just to get stronger proof. For a delete, an explicit absence proof may establish success. A readback or probe using POST may declare semantic `effect: "read"`; method alone is not the effect.
14
14
 
15
15
  Bind a returned identifier in the proof URL with `{result./id}`, or in its JSON body/query with `{"$result":"/id"}`; result pointers refer to the projected primary result. For a nested collection, use `proof.select: {"path":"/ticket/fields","where":[{"path":"/id","result":"/id"}]}` and compare `equals` paths relative to its single matching member. The selector must match exactly one item. Check identity and the fields that establish the intended effect, not an entire server-maintained object or a fixed array position. For a dynamic object key, use `{"attributes":{"{input.attribute_id}":{"$input":"value"}}}` in the request body. A proof path such as `/attributes/{input.attribute_id}` substitutes one complete pointer segment and escapes `/` and `~` in its value; other pointer segments remain literal. Prefer a targeted detail or search read; absence from a partial list does not prove deletion.
16
16
 
17
17
  When the task needs a few records from a large collection, look for native search, filters or a detail endpoint in documentation or observed UI requests before enumerating the list. Expose observed parameters and verify that they narrow the results. If only a full response is available, search its saved file and extract matching records or fields; do not load the entire catalog into context. Keep stable identity and summary fields in list results; inspect variable configuration only for the selected item. Preserve dynamic configuration as structured JSON with an appropriate schema, rather than enumerating catalog entries or removing validation to pass.
18
18
 
19
- Before `apilift discover run`, construct `verification.inputs` from the consumer contract and published source actions, not private author knowledge. When choices vary, select a materially different valid configuration from the captured or documented example for this existing test; changing only its label does not test generalization. Resolve missing value or configuration sources first. Judge the saved output and mutation readback against the selected behavior and configuration before accepting `verification.review`; otherwise reject it with notes. The general contract defines the supported choices; another successful example alone does not prove them all. After publication, inspect `actions show` as a fresh consumer and finish the originally authorized outcome. Do not send a second mutation merely to test publication.
19
+ Before `apilift discover run`, construct `verification.inputs` from the consumer contract and published source actions, not private author knowledge. Trace the requested consumer path: locate an existing target when applicable, obtain its configuration, perform the operation and obtain the result needed for the next step. Publish each prerequisite when its own contract is usable and verified; require the complete path at task completion, not before publishing every source action. Resolve missing dependencies before claiming coverage; a successful isolated action is insufficient. When choices vary, select a materially different valid configuration from the captured or documented example for this existing test; changing only its label does not test generalization. Resolve missing value or configuration sources first. Judge the saved output and mutation readback against the selected behavior and configuration before accepting `verification.review`; otherwise reject it with notes. The general contract defines the supported choices; another successful example alone does not prove them all. After publication, inspect `actions show` as a fresh consumer and finish the originally authorized outcome. Do not send a second mutation merely to test publication.
20
20
 
21
21
  A genuinely terminal, command-scoped unavailable boundary may be documented only with evidence. Authentication, account tier, local transport, missing permission and ambiguous UI are retryable or user-specific blockers, not proof of app-wide absence. Keep existing working actions intact and defer unresolved work.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apilift/cli",
3
- "version": "1.5.4",
3
+ "version": "1.5.5-dev.1792427693.37eceded937e76934ee957dae4e8ea4e72935825",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,7 +36,7 @@
36
36
  "engines": {
37
37
  "node": ">=24.16.0 <27"
38
38
  },
39
- "gitHead": "77f4acfa3f2652928fea0a82245cc55b52a84e64",
39
+ "gitHead": "37eceded937e76934ee957dae4e8ea4e72935825",
40
40
  "repository": {
41
41
  "type": "git",
42
42
  "url": "git+https://github.com/egor-sergeev/apilift.git",