mentionable.dev

Card Invoke v0.1

A publisher sends a signed A2A publication to an approved channel. When someone opens that card or clicks one of its actions, the connector sends an authenticated HTTPS POST directly to the service that owns the card. This profile uses the Adaptive Cards Universal Action Model’s Invoke activity and InvokeResponse with a Mentionable extension for the publication binding and public status. Universal Action Model

Discovery and authorization

The service’s WebFinger-resolved Mentionable Agent Card declares https://mentionable.dev/ns/card-invoke/v0.1 in a2a.capabilities.extensions. Before requesting clicker credentials, the connector resolves the current WebFinger links, verifies that the publication identity still matches the approved principal, and reads the advertised Agent Card over public HTTPS. Its params.endpoint identifies the HTTP Invoke URL and OAuth protected resource. This URL must exactly match the operator’s configured service resource. The same extension declares its authorization server in params.authorization_server. A service can publish the following declaration independently of an A2A interface or an ordinary A2A OAuth federation declaration.

{
  "a2a": {
    "capabilities": {
      "extensions": [
        {
          "uri": "https://mentionable.dev/ns/card-invoke/v0.1",
          "params": {
            "endpoint": "https://fleet.example/card-actions",
            "authorization_server": "https://fleet.example/oauth"
          }
        }
      ]
    }
  }
}

The connector exchanges credentials for the clicking user with scope card:invoke and the advertised card endpoint as its OAuth resource. An ordinary A2A OAuth federation declaration can have its own resource. The card authorization server metadata, issuer and token endpoint share the pinned origin. The service must validate the bearer with its issuer, check its validity period, require the registered Activity endpoint as its audience and require the card:invoke scope on the presented token. It uses the verified subject to authorize access to the bound card and the requested action. The publication grant authorizes delivery of the public summary. Publication grants and bootstrap

Opening a card

POST the Invoke activity directly to the registered HTTPS URL. Send Content-Type: application/json and Authorization: Bearer <clicker access token>. Each automatic read uses a fresh UUID as its activity ID. The namespaced channelData binds the request to the sender, signing principal, destination, card ID and revision of the original signed publication.

{
  "type": "invoke",
  "name": "adaptiveCard/action",
  "id": "bd6048e1-1434-41d5-859e-501ff1225c4e",
  "channelData": {
    "https://mentionable.dev/ns/card-invoke/v0.1": {
      "binding": {
        "sender": "@ops@fleet.example",
        "principal": "https://fleet.example/signers/7",
        "destinationId": "dst-1",
        "cardId": "deployment-47",
        "revision": "v3"
      }
    }
  },
  "value": {
    "action": { "type": "Action.Execute", "verb": "view" },
    "trigger": "automatic"
  }
}

The initial publication includes refresh.action with the reserved verb view. Opening a card, checking current actions and recovering after an uncertain write all use this side-effect-free read. Services must reject automatic invocations of mutating actions.

Returning the next view

Both an automatic read and a manual action can return the standard InvokeResponse directly in the HTTP body. Place the next private Adaptive Card in value:

{
  "statusCode": 200,
  "type": "application/vnd.microsoft.card.adaptive",
  "value": {
    "type": "AdaptiveCard",
    "version": "1.4",
    "body": [{ "type": "TextBlock", "text": "Your deployment is running.", "wrap": true }],
    "actions": [{ "type": "Action.Execute", "title": "Refresh", "verb": "refresh" }]
  }
}

A standard response supplies a private view for the bound request. It makes no service assertion about the current revision and produces no public channel update. The service authorizes the clicker and checks its application preconditions before a manual action. For actions whose meaning depends on the published revision, the service must compare the bound revision with its authoritative state before committing the effect. A stale request can return 409 or 412. A private status lookup can use a standard handler throughout.

A manual action can instead finish with a standard text acknowledgement. Slack displays its value as plain text in an actionless private modal. The service can use this terminal response after a revision-checked action. The acknowledgement carries no card revision or public update and does not trigger a recovery read. Opening the card and checking currently available actions require a card response.

{
  "statusCode": 200,
  "type": "application/vnd.microsoft.activity.message",
  "value": "Deployment approved."
}

Optional published status and revision

A service can assert its current revision or publish channel-safe status by including the Mentionable namespace inside a response channelData object. If that namespace is present, it must contain the matching cardId and a valid revision. A different revision signals that the published card is superseded. publicUpdate is optional and applies only to the matching revision. The connector rejects a malformed Mentionable entry and ignores other namespaces in the object. A service can introduce the extension on a later response, for example to publish the result of a button click. Once an open modal or its pre-execution read has received a service revision, the connector requires subsequent card views for that click to retain it. If a new card view omits the revision after submission, the user must reopen the card to check the result before acting again.

This extended response uses the same private-card format:

{
  "statusCode": 200,
  "type": "application/vnd.microsoft.card.adaptive",
  "value": {
    "type": "AdaptiveCard",
    "version": "1.4",
    "body": [
      { "type": "TextBlock", "text": "Deployment status", "wrap": true },
      { "type": "FactSet", "facts": [{ "title": "Stage", "value": "Running checks" }] }
    ],
    "actions": [{ "type": "Action.Execute", "title": "Refresh", "verb": "refresh" }]
  },
  "channelData": {
    "https://mentionable.dev/ns/card-invoke/v0.1": {
      "cardId": "deployment-47",
      "revision": "v3",
      "publicUpdate": { "sequence": 2, "text": "Deployment checks are running." }
    }
  }
}

The connector checks the HTTP status and the InvokeResponse statusCode separately. An omitted or null statusCode on a successful card response defaults to 200. A service that handles the activity returns HTTP 200 even when its InvokeResponse denies the action. Universal Action Model response format

{
  "statusCode": 403,
  "type": "application/vnd.microsoft.error",
  "value": { "code": "Forbidden", "message": "You cannot use this action." }
}

Use 409 or 412 for a conflict or superseded revision. A subsequent read retrieves the authoritative view.

Invoking a displayed action

A manual click uses the same HTTP endpoint and bearer exchange. Copy the authorized action from the private view. Set the activity ID and extension invocationId to the same 64-character lowercase hexadecimal identifier.

{
  "type": "invoke",
  "name": "adaptiveCard/action",
  "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "channelData": {
    "https://mentionable.dev/ns/card-invoke/v0.1": {
      "binding": {
        "sender": "@ops@fleet.example",
        "principal": "https://fleet.example/signers/7",
        "destinationId": "dst-1",
        "cardId": "deployment-47",
        "revision": "v3"
      },
      "invocationId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    }
  },
  "value": {
    "action": { "type": "Action.Execute", "title": "Refresh", "verb": "refresh" },
    "trigger": "manual"
  }
}

A retry of one click retains its ID. A distinct click gets a distinct ID even for the same user and verb. The service must authorize the subject and atomically enforce the applicable preconditions and deduplication. Reusing an ID with different action data must never cause another effect. A font review can require one approval across all clicks. A deployment card can allow unlimited deliberate refresh clicks. The next view can retain, replace or remove actions. A change to the material being approved or the meaning of a verb requires a new revision and publication.

Slack card profile and visibility

Services can reuse existing adaptiveCard/action handlers and standard response bodies. For this endpoint, authentication uses the discovered card:invoke OAuth resource and the clicker’s bearer. A handler that normally authenticates Microsoft Bot Framework channel tokens needs an entry point for this credential. Publication still requires a signed card reference and the view bootstrap action.

The Slack connector supports Adaptive Cards 1.4 with up to 20 body elements, ten facts per fact set, and five actions with distinct verbs. Supported elements are plain-text TextBlock (optional wrap), FactSet and top-level Action.Execute with title and verb. Slack controls line wrapping. Empty body and action arrays may be omitted. Limits in UTF-16 code units are 3,000 for text, 64 for fact titles, 512 for fact values, 40 for action titles and 500 for public updates. Verbs follow the publication identifier rules. Response size is limited to 64 KiB. This subset accepts neither action data nor input controls.

Only the signed public summary and explicitly supplied publicUpdate.text reach the bound channel. The next card is private to the clicker. A new public status uses a greater nonnegative safe integer sequence within the card revision. Each sequence must denote the same text for every user. The connector retains the newest public update, can reconcile overlapping Slack writes, and can repair a failed channel update when the card is reopened. A new revision’s update must never be applied to an older card.