Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/plugin-types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
TypeScript type definitions for the **AppOS Plugin API**.

Declaration-only package — zero runtime, zero bundle impact. Gives you full
autocomplete and type checking for all 22 plugin namespaces and 33 permissions
when authoring plugins for AppOS.
autocomplete and type checking for all 43 plugin namespaces and the full
`PermissionScope` union when authoring plugins for AppOS.

## Install

Expand All @@ -22,21 +22,21 @@ import type {
PluginContext,
PluginManifest,
ViewDescriptor,
Permission,
PermissionScope,
} from "@appos.space/plugin-types";

export async function activate(ctx: PluginContext) {
const home = await ctx.fs.home();
ctx.ui.notify({ title: "Hello", body: home });
const dir = await ctx.fileOps.getActiveDirectory();
ctx.ui.showNotification({ message: `Hello from ${dir}` });
}
```

## What's included

- **Core** — `PluginContext`, `PluginManifest`, activation lifecycle
- **Views** — `ViewDescriptor` union for declarative UI
- **Namespaces** — typed APIs for `fs`, `ui`, `shell`, `http`, `kv`, `secrets`, and 16 more
- **Permissions** — the 33 permission literals you can request in `plugin.json`
- **Namespaces** — typed APIs for `fileOps`, `ui`, `shell`, `network`, `storage`, `actions`, and 37 more (the 22 host-core namespaces plus the 21 core-plugin namespaces)
- **Permissions** — `PermissionScope`: the 135 canonical permission scopes you can request in `plugin.json`, plus the dynamic `` oauth.${string} `` family for provider-specific OAuth scopes (e.g. `oauth.github`), plus 5 deprecated legacy aliases kept in the type union for compile-time compatibility only — of those, only `network.fetch` is recognized by the host (normalized to `network.outbound`); `network`, `smartFolders`, and `webview` have no host-side entry, and `shell.uncontained` is never declarable (the uncontained shell tier is inferred from `filesystem.readAll`)
- **Colors / Fonts / Icons** — design tokens matching the host app

## Version
Expand Down
7 changes: 4 additions & 3 deletions packages/plugin-types/src/namespaces.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/**
* API namespace interfaces — all 22 namespaces.
* Each maps to a property on PluginContext.
* API namespace interfaces — the 22 host-core namespaces.
* Each maps to a property on PluginContext. The 21 core-plugin namespaces
* live in namespaces-core-plugins.ts; PluginContext exposes all 43.
*
* @version 2.4.0-fn50
* @version 3.0.0
*/

import type { ViewDescriptor } from "./views";
Expand Down
Loading