From b1a18b01a61626e0687712ca1258db450a1f7f89 Mon Sep 17 00:00:00 2001 From: Bonanza Date: Tue, 28 Jul 2026 03:34:37 -0700 Subject: [PATCH 1/3] docs(plugin-types): fix stale 2.4.x claims in README + namespaces.ts header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README: 22 namespaces/33 permissions -> 43 namespaces / 135-scope union; usage example now type-checks against the published 3.0.0 surface (ctx.fs.home() and ctx.ui.notify({title,body}) never existed; Permission is exported as PermissionScope; real calls: ctx.fileOps.getActiveDirectory() + ctx.ui.showNotification({message})) - namespaces.ts header: 'all 22 namespaces' -> 'the 22 host-core namespaces' with a pointer to namespaces-core-plugins.ts (43 total on PluginContext); @version 2.4.0-fn50 -> 3.0.0 (matches core.ts/permissions.ts/ namespaces-core-plugins.ts headers) The stale header is baked into the PUBLISHED 3.0.0 tarball's dist/namespaces.d.ts — immutable at 3.0.0 (no republish); this source fix means the next release carries the correction. Found by fn-165.1's knowledge-refresh audit. Task: fn-165.5 --- packages/plugin-types/README.md | 14 +++++++------- packages/plugin-types/src/namespaces.ts | 7 ++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/plugin-types/README.md b/packages/plugin-types/README.md index 97e54c5..333ba02 100644 --- a/packages/plugin-types/README.md +++ b/packages/plugin-types/README.md @@ -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 135-scope +permission union when authoring plugins for AppOS. ## Install @@ -22,12 +22,12 @@ 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}` }); } ``` @@ -35,8 +35,8 @@ export async function activate(ctx: PluginContext) { - **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 (plus 5 deprecated legacy aliases) you can request in `plugin.json` - **Colors / Fonts / Icons** — design tokens matching the host app ## Version diff --git a/packages/plugin-types/src/namespaces.ts b/packages/plugin-types/src/namespaces.ts index b54b254..1fdaa80 100644 --- a/packages/plugin-types/src/namespaces.ts +++ b/packages/plugin-types/src/namespaces.ts @@ -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"; From 34de6da55a8aad4d4f480334c051744d3c2cd489 Mon Sep 17 00:00:00 2001 From: Bonanza Date: Tue, 28 Jul 2026 17:48:22 -0700 Subject: [PATCH 2/3] Address PR review feedback (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README: legacy-alias bullet qualified per src/permissions.ts — only network.fetch is host-normalized; network/smartFolders/webview have no host entry; shell.uncontained never declarable --- packages/plugin-types/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-types/README.md b/packages/plugin-types/README.md index 333ba02..73d1d6f 100644 --- a/packages/plugin-types/README.md +++ b/packages/plugin-types/README.md @@ -36,7 +36,7 @@ export async function activate(ctx: PluginContext) { - **Core** — `PluginContext`, `PluginManifest`, activation lifecycle - **Views** — `ViewDescriptor` union for declarative UI - **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 (plus 5 deprecated legacy aliases) you can request in `plugin.json` +- **Permissions** — `PermissionScope`: the 135 canonical permission scopes you can request in `plugin.json`, 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 From f44b4365840db804c28c88d9c420a35e5826e222 Mon Sep 17 00:00:00 2001 From: Bonanza Date: Tue, 28 Jul 2026 18:56:33 -0700 Subject: [PATCH 3/3] Address PR review feedback round 2 (#7) - README: name the dynamic oauth.${string} scope family; '135-scope' now refers only to the canonical fixed set --- packages/plugin-types/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugin-types/README.md b/packages/plugin-types/README.md index 73d1d6f..dfc5233 100644 --- a/packages/plugin-types/README.md +++ b/packages/plugin-types/README.md @@ -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 43 plugin namespaces and the 135-scope -permission union 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 @@ -36,7 +36,7 @@ export async function activate(ctx: PluginContext) { - **Core** — `PluginContext`, `PluginManifest`, activation lifecycle - **Views** — `ViewDescriptor` union for declarative UI - **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 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`) +- **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