# Package

A package installs a Mini App together with its extensions and skills. This module lets the Mini App read its own package, so it knows which extensions came with it.

## MAESTROSDK.package.get() <Badge type="warning" text="Not yet released" />

Returns the package this Mini App was installed from. Cowork works out which Mini App is calling from the tab it runs in; a page cannot ask about another package.

### Parameters

None.

### Returns

`Promise<PackageInfo | null>`

| Field | Type | Description |
|---|---|---|
| `name` | `string` | Package name, from its `package.json` |
| `version` | `string` | Package version |
| `resources[].kind` | `'extension' \| 'skill' \| 'miniapp'` | What the resource is |
| `resources[].name` | `string` | Extension name, skill folder name, or Mini App `appId` |

`resources` lists only what this package actually loaded. A resource whose name is already taken by a separately installed copy, or whose own manifest cannot be read, is not listed. No paths or install sources are returned.

### Returns `null` when

| Case |
|---|
| The Mini App was installed on its own, not from a package |
| The page is not an installed Mini App (a built-in Mini App or a web page) |
| The package was uninstalled, or its folder is gone |
| The call fails |

### Example

```js
const info = await MAESTROSDK.package.get();
if (info) {
  const extensions = info.resources.filter((r) => r.kind === 'extension').map((r) => r.name);
  title.textContent = `${info.name} ${info.version}`;
  list.textContent = extensions.join(', ');
}
```

The result is read-only. It does not start, stop or approve an extension; that stays in **Settings › Extensions**.

## Related

- [Extension SDK](https://docs.micromeet.ai/extension-sdk/overview.md): What those extensions can call
- [Overview](https://docs.micromeet.ai/miniapp-sdk/overview.md): All modules of the Mini App SDK
