Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.6 KB

File metadata and controls

58 lines (40 loc) · 1.6 KB

@appos.space/plugin-types

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.

Install

npm install --save-dev @appos.space/plugin-types

Usage

Either reference the types globally:

/// <reference types="@appos.space/plugin-types" />

Or import specific types:

import type {
  PluginContext,
  PluginManifest,
  ViewDescriptor,
  Permission,
} from "@appos.space/plugin-types";

export async function activate(ctx: PluginContext) {
  const home = await ctx.fs.home();
  ctx.ui.notify({ title: "Hello", body: home });
}

What's included

  • CorePluginContext, PluginManifest, activation lifecycle
  • ViewsViewDescriptor 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
  • Colors / Fonts / Icons — design tokens matching the host app

Version

Tracks the plugin API version. 2.4.x of this package ↔ plugin API 2.4.x.

Related packages

License

MIT © InstantlyEasy