# Power capabilities demo (test fixture)

Test fixture for opt-in capabilities. This is a **test fixture** used by the integration tests; it is not offered in the marketplace.

| Field | Value |
|---|---|
| Addon id | `integration-powerdemo` |
| Kind | `integration` |
| Provides | `powerdemo` |
| Engine | `wasm` |
| ABI | `0.2.0` |
| Version | 0.1.0 |
| Author | MythicalSystems |
| Source | `extensions/addons/fixture-power` |
| Permissions (shown at install) | none |

## Capabilities

| Capability | Value |
|---|---|
| [`auth_provider`](capabilities.md) | true |
| [`db`](capabilities.md) | `{"read":["clients","invoices"],"sql":true,"write":["client.note"]}` |
| [`exec`](capabilities.md) | `/bin/echo` |
| [`fs`](capabilities.md) | true |
| [`hooks`](capabilities.md) | `[{"event":"before:*","priority":10}]` |
| [`http`](capabilities.md) | `*` |
| [`http_private`](capabilities.md) | false |
| [`jobs`](capabilities.md) | `[{"every_secs":0,"op":"tick"}]` |
| [`kv`](capabilities.md) | true |
| [`money`](capabilities.md) | `{"modify":true}` |
| [`routes`](capabilities.md) | `[{"access":"admin","method":"POST","path":"/try","permission":"plugins.manage"}]` |

## Events and hooks

| What | Value |
|---|---|
| Listens to (`events`) | none |
| Hooks | `before:*` |
| Emits | none |
| Mixins | none |
| Scheduled jobs | `tick` every 0 s |

## Settings and secrets

No admin settings are declared in `addon.json` or in the source.

Secrets (stored encrypted, never returned by the API): none.

Outbound HTTP allowed to: `*`. `$server` is the hostname of the server configured for the product, `$setting:<key>` the host of that setting.

## HTTP routes

Mounted under `/api/v1/addons/integration-powerdemo/`.

| Method | Path | Access | Permission |
|---|---|---|---|
| POST | `/try` | admin | `plugins.manage` |

## addon.json

_extensions/addons/fixture-power/addon.json_

```json
{
  "abi": "0.2.0",
  "author": "MythicalSystems",
  "capabilities": {
    "auth_provider": true,
    "db": {
      "read": [
        "clients",
        "invoices"
      ],
      "sql": true,
      "write": [
        "client.note"
      ]
    },
    "exec": [
      "/bin/echo"
    ],
    "fs": true,
    "hooks": [
      {
        "event": "before:*",
        "priority": 10
      }
    ],
    "http": [
      "*"
    ],
    "http_private": false,
    "jobs": [
      {
        "every_secs": 0,
        "op": "tick"
      }
    ],
    "kv": true,
    "money": {
      "modify": true
    },
    "routes": [
      {
        "access": "admin",
        "method": "POST",
        "path": "/try",
        "permission": "plugins.manage"
      }
    ]
  },
  "description": "Test fixture for opt-in capabilities.",
  "engine": "wasm",
  "id": "integration-powerdemo",
  "kind": "integration",
  "limits": {
    "memory_mib": 128,
    "timeout_secs": 10
  },
  "name": "Power capabilities demo (test fixture)",
  "permissions": [],
  "provides": "powerdemo",
  "version": "0.1.0",
  "wasm": "addon.wasm"
}
```

