Skip to content

Agreement Call

call is the top-level asactl command used to execute an action against an agreement-defined interface.

Usage

asactl call <agreement> -a <action> [flags]

Flags

  • -a, --action <name>: action name (required)
  • -v, --version <ver>: agreement version (latest by default)
  • -h, --host <host>: target remote host
  • -q, --query <json>: action input JSON
  • --insecure: skip TLS certificate verification (development only)

Version rule:

  • use exact version strings with v prefix, for example v1.0.0

Examples

# local
asactl call auth -a login

# pinned version
asactl call auth -a login -v v1.0.0

# remote host
asactl call try -a ping -h https://service.example.com

# with parameters
asactl call auth -a userinfo -q '{"accessToken":"xxx"}'

Remote Host Pattern

asactl call <agreement> -a <action> -v <version> -h <host> [-q <json>] [--insecure]

Example:

asactl call shop -a order -v v1.0.0 -h 127.0.0.1:3000 -q '{"productId":"prod-1","quantity":1}'

Transport Envelope (NDJSON)

External CLI / HTTP / HTTPS / WS integrations use NDJSON envelopes.

Request:

{"type":"request","request":{"requestid":1,"module":"account","action":"userinfo","param":{}}}

Response:

{"type":"response","response":{"requestid":1,"via":"cli","module":"account","action":"userinfo","ok":true,"data":{}}}

Notes

  • call builds request payloads from agreement definitions and validates inputs.
  • Call metadata can be persisted into the local workspace for reuse.
  • The caller does not need to send via; runtime injects it automatically.
  • The -h host must point to a service that already implements the target agreement.