run_aiakiv_app_action
Destructive
Create or query data in an AiAkiv app.
Use this when the user asks to make or look up something in an AiAkiv app,
or to manage their AiAkiv account through the `console` app: teams and
invitations, org links, audit logs, save-target history, switching Main or
turning it off and on, project presets, and the cards they created. Do not
use it to save a memory; use `save_memory` for that. Cards are made with
`create_aiakiv_card`.
Writes when `action="create"`. Some apps publish the result to the open web:
the returned link is live the moment it comes back — unlisted, but reachable
by anyone holding the address — and that publication cannot be undone from
here. The content is written by the caller from memory the user can already
read; the server never calls a model.
Args:
app: The app name. An unknown one returns `available_apps`.
action: `"describe"` returns the app's field list and limits, which is
how the exact input shape for an app is established; `"create"`
writes. Apps may define further read actions, which `describe`
lists.
data: The app's payload — a JSON object, or a JSON string holding one.
The string form survives transports that mangle long multi-line
fields.
Returns:
`{ok, app, key, url, notice?}` on create, or `{error, hint}`. The returned
`url` is the link to the created item. A `notice` is the app stating what just
became public and how to undo it, which is information the user needs to
see rather than a detail to compress away. On a shape error the app names
the offending field.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | The app name. An unknown one returns `available_apps`. | |
| data | No | The app's payload — a JSON object, or a JSON string holding one. The string form survives transports that mangle long multi-line fields. | |
| action | No | `"describe"` returns the app's field list and limits, which is how the exact input shape for an app is established; `"create"` writes. Apps may define further read actions, which `describe` lists. | create |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||