Skip to content

SDK packages

TypeScript type definitions for the AppOS Plugin API. Declaration-only — zero runtime, zero bundle impact.

  • CorePluginContext, PluginManifest, activation lifecycle, dependency management types
  • Views — the ViewDescriptor union for declarative UI
  • Namespaces — typed APIs for all 43 context.* namespaces (legacy tier commands / fileOps / ui / shell / … plus the core-plugin tier store / vault / actions / scheduler / resources / entities / notifications / llm / …)
  • Permissions — all 135 canonical permission scopes plus legacy aliases
  • Colors / Fonts / Icons — design tokens matching the host app
Terminal window
npm install --save-dev @appos.space/plugin-types

Versioning: 3.0.x corresponds to the AppOS 1.0.0 host surface (waves fn-70 … fn-101 + fn-118). Earlier 2.4.x releases cover only the pre-fn-70 legacy tier (22 namespaces).

Typed builder helpers for ViewDescriptor. Produces plain object literals — zero runtime overhead, fully tree-shakeable.

import { vstack, section, listItem, button } from "@appos.space/view-builders";
const view = vstack([
section("Files", { icon: "doc.on.doc", badge: "3" }, [
listItem("readme.md", { icon: "doc", action: "open:readme" }),
]),
button("Add", { action: "add-file", tooltip: "Create a new file" }),
]);
CategoryHelpers
Containersvstack, hstack, scroll, list, grid, section
Contenttext, label, image, badge, button, listItem
Primitivesdivider, spacer, textField, progress, remoteImage
MenusmenuAction, menuDivider, encodeMenuActions

Pure utility functions — host-agnostic, side-effect free, tree-shakeable.

import { formatSize, urlToPath, pathToUrl, createActionRouter } from "@appos.space/plugin-utils";
urlToPath("file:///Users/foo/my%20file.txt"); // "/Users/foo/my file.txt"
formatSize(1_536); // "1.5 KB"
// Handlers are keyed by action prefix — the returned function splits each
// dispatched action on the first ":" and passes the remainder to the handler.
const router = createActionRouter({
open: (path) => { ctx.ui.openEditor(pathToUrl(path)); },
});
router("open:/docs/readme.md"); // calls the "open" handler with "/docs/readme.md"
ModuleExports
pathsurlToPath, pathToUrl, fileExtension, isTextFile
formatformatSize, formatDate, truncate
idsgenerateId, simpleHash
actionscreateActionRouter, ActionHandler, ActionRouterOptions
timingdebounce, throttle

The full symbol-level documentation for all three packages lives in the generated API Reference.