diff --git a/AGENTS.md b/AGENTS.md index a9809d72..cc3f5612 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,7 +35,7 @@ The `pnpm test` script intentionally runs `build` first so `tsnapi` snapshots co ## Conventions -- RPC functions must use `defineRpcFunction`; always namespace IDs (`my-plugin:fn-name`). +- RPC functions must use `defineRpcFunction`; always namespace IDs `devframes:plugin::` (matching the plugin's `@devframes/plugin-` package name). - Shared state via `devframe/utils/shared-state`; keep values serializable. - Utility imports use the package-path form `devframe/utils/*`, never relative `../utils/*`. - Dependencies go through the pnpm catalogs in `pnpm-workspace.yaml` (`cli`, `inlined`, `testing`, `types`) — add to a catalog and reference as `catalog:`, don't pin versions in `package.json`. diff --git a/docs/errors/DF8107.md b/docs/errors/DF8107.md index 5357639d..14552f40 100644 --- a/docs/errors/DF8107.md +++ b/docs/errors/DF8107.md @@ -16,11 +16,11 @@ This is a warning, not a thrown error: the activation is still broadcast so a do ## Fix -Pass a `dockId` that matches a registered dock entry. Ids are case-sensitive, so check for typos, and make sure the target dock is registered before activating it. For the terminals dock the id is `devframes-plugin-terminals`: +Pass a `dockId` that matches a registered dock entry. Ids are case-sensitive, so check for typos, and make sure the target dock is registered before activating it. For the terminals dock the id is `devframes_plugin_terminals`: ```ts await rpc.call('hub:docks:activate', { - dockId: 'devframes-plugin-terminals', + dockId: 'devframes_plugin_terminals', params: { sessionId }, }) ``` diff --git a/docs/guide/hub.md b/docs/guide/hub.md index a09130e3..7516b4a1 100644 --- a/docs/guide/hub.md +++ b/docs/guide/hub.md @@ -35,7 +35,7 @@ The viewer's active dock is client-local state — which dock is on screen lives ```ts // From inside a mounted devframe's iframe (its own RPC client): await rpc.call('hub:docks:activate', { - dockId: 'devframes-plugin-terminals', + dockId: 'devframes_plugin_terminals', params: { sessionId }, // opaque bag the target dock interprets }) ``` diff --git a/docs/plugins/code-server.md b/docs/plugins/code-server.md index ef48234f..7c67191c 100644 --- a/docs/plugins/code-server.md +++ b/docs/plugins/code-server.md @@ -49,7 +49,7 @@ export default createCodeServerDevframe({ ## RPC surface -All functions are namespaced `devframes-plugin-code-server:*`: +All functions are namespaced `devframes:plugin:code-server:*`: | Function | Type | Purpose | |----------|------|---------| diff --git a/docs/plugins/git.md b/docs/plugins/git.md index ba7938c6..66a5c6b4 100644 --- a/docs/plugins/git.md +++ b/docs/plugins/git.md @@ -41,12 +41,12 @@ await createCac(createGitDevframe({ repoRoot: process.cwd() })).parse() The read functions are each a `query` with `snapshot: true` — resolved live over WebSocket in dev, and served from a snapshot baked at build time for static deploys. Each degrades to an empty, `isRepo: false` result outside a git repository. -- `git:status` — branch, upstream tracking, and staged / unstaged / untracked files. -- `git:log` — paginated commit history including parent hashes, which drive the commit graph. -- `git:branches` — local branches with SHA, upstream, ahead / behind, and tip subject. -- `git:diff` — per-file added / deleted counts plus a unified patch for a selected file. +- `devframes:plugin:git:status` — branch, upstream tracking, and staged / unstaged / untracked files. +- `devframes:plugin:git:log` — paginated commit history including parent hashes, which drive the commit graph. +- `devframes:plugin:git:branches` — local branches with SHA, upstream, ahead / behind, and tip subject. +- `devframes:plugin:git:diff` — per-file added / deleted counts plus a unified patch for a selected file. -Write actions (`git:stage`, `git:unstage`, `git:commit`) are `action` functions, registered only when write mode is enabled. +Write actions (`devframes:plugin:git:stage`, `devframes:plugin:git:unstage`, `devframes:plugin:git:commit`) are `action` functions, registered only when write mode is enabled. ## Source diff --git a/docs/plugins/inspect.md b/docs/plugins/inspect.md index 23a68f90..c561bd2c 100644 --- a/docs/plugins/inspect.md +++ b/docs/plugins/inspect.md @@ -52,7 +52,7 @@ await createCac(createInspectDevframe({ port: 9100 })).parse() ## RPC surface -All functions are namespaced `devframes-plugin-inspect:*`: +All functions are namespaced `devframes:plugin:inspect:*`: | Function | Type | Returns | |----------|------|---------| diff --git a/docs/plugins/terminals.md b/docs/plugins/terminals.md index 2a5b291b..a066babf 100644 --- a/docs/plugins/terminals.md +++ b/docs/plugins/terminals.md @@ -52,7 +52,7 @@ export default createTerminalsDevframe({ ## Hub aggregation -Mounted into a hub, the plugin owns PTY/child-process spawning and its own streaming channel (`devframes-plugin-terminals:output`) — that's what the panel renders. It also mirrors every session it spawns into `ctx.terminals` (the hub's aggregate registry, streaming on `devframe:terminals`) so other tools — a launcher dock, a custom panel — see the same session list without depending on the plugin's own types. A session started the other way, via `ctx.terminals.startChildProcess` / `startPtySession` directly (e.g. from a launcher dock), shows up in the terminals panel too — the plugin reads foreign hub sessions read-only and renders them alongside its own, subscribing to the hub's channel for their output. +Mounted into a hub, the plugin owns PTY/child-process spawning and its own streaming channel (`devframes:plugin:terminals:output`) — that's what the panel renders. It also mirrors every session it spawns into `ctx.terminals` (the hub's aggregate registry, streaming on `devframe:terminals`) so other tools — a launcher dock, a custom panel — see the same session list without depending on the plugin's own types. A session started the other way, via `ctx.terminals.startChildProcess` / `startPtySession` directly (e.g. from a launcher dock), shows up in the terminals panel too — the plugin reads foreign hub sessions read-only and renders them alongside its own, subscribing to the hub's channel for their output. `ctx.terminals` is the source of truth for "what sessions exist"; the plugin is the panel that renders them and the one PTY-capable provider among possibly several session sources. The plugin never imports `@devframes/hub`'s types to stay mountable without a hub — it duck-types the minimal `register` / `update` / `events` shape it needs. @@ -60,12 +60,12 @@ A session from `ctx.terminals.startChildProcess()` carries a `getResult()` acces ## Focusing a session -The panel reacts to the hub's [cross-iframe dock activation](/guide/hub#cross-iframe-dock-activation): when an activation targets this dock (`dockId: 'devframes-plugin-terminals'`) and carries a `sessionId`, the panel selects that session. This lets another tool spawn a build and jump the user straight to its output: +The panel reacts to the hub's [cross-iframe dock activation](/guide/hub#cross-iframe-dock-activation): when an activation targets this dock (`dockId: 'devframes_plugin_terminals'`) and carries a `sessionId`, the panel selects that session. This lets another tool spawn a build and jump the user straight to its output: ```ts // e.g. right after ctx.terminals.startChildProcess(..., { id: sessionId, ... }) await rpc.call('hub:docks:activate', { - dockId: 'devframes-plugin-terminals', + dockId: 'devframes_plugin_terminals', params: { sessionId }, }) ``` diff --git a/examples/minimal-next-devframe-hub/tests/minimal-next-devframe-hub.test.ts b/examples/minimal-next-devframe-hub/tests/minimal-next-devframe-hub.test.ts index 3e5734c5..b957673c 100644 --- a/examples/minimal-next-devframe-hub/tests/minimal-next-devframe-hub.test.ts +++ b/examples/minimal-next-devframe-hub/tests/minimal-next-devframe-hub.test.ts @@ -39,8 +39,8 @@ describe('minimal-next-devframe-hub (example)', () => { expect(dockIds).toContain('~settings') expect(docks.find(d => d.id === '~settings')?.category).toBe('~builtin') // The dogfooded built-in plugin packages mount their own docks. - expect(dockIds).toContain('devframes-plugin-terminals') - expect(dockIds).toContain('devframes-plugin-messages') + expect(dockIds).toContain('devframes_plugin_terminals') + expect(dockIds).toContain('devframes_plugin_messages') }) it('lists startup and demo messages through the kit-local RPC', async () => { diff --git a/packages/hub/src/client/__tests__/host.test.ts b/packages/hub/src/client/__tests__/host.test.ts index 7460437b..31689040 100644 --- a/packages/hub/src/client/__tests__/host.test.ts +++ b/packages/hub/src/client/__tests__/host.test.ts @@ -125,17 +125,17 @@ describe('createDevframeClientHost', () => { it('switches the active dock when the hub broadcasts devframe:docks:activate', async () => { const { rpc, states, definitions } = createStubRpc() const host = await createDevframeClientHost({ rpc }) - states.get('devframe:docks')!.push([iframeEntry('one'), iframeEntry('devframes-plugin-terminals')]) + states.get('devframe:docks')!.push([iframeEntry('one'), iframeEntry('devframes_plugin_terminals')]) // Simulate the hub's server→client broadcast. const handler = definitions.get('devframe:docks:activate')!.handler! - handler({ dockId: 'devframes-plugin-terminals', params: { sessionId: 'sess-1' } }) - await vi.waitFor(() => expect(host.context.docks.selectedId).toBe('devframes-plugin-terminals')) + handler({ dockId: 'devframes_plugin_terminals', params: { sessionId: 'sess-1' } }) + await vi.waitFor(() => expect(host.context.docks.selectedId).toBe('devframes_plugin_terminals')) // Unknown dock ids degrade to a no-op (the previous selection stands). handler({ dockId: 'ghost' }) await new Promise(r => setTimeout(r, 0)) - expect(host.context.docks.selectedId).toBe('devframes-plugin-terminals') + expect(host.context.docks.selectedId).toBe('devframes_plugin_terminals') host.dispose() }) diff --git a/packages/hub/src/node/__tests__/context.test.ts b/packages/hub/src/node/__tests__/context.test.ts index 12ef9052..919e24ad 100644 --- a/packages/hub/src/node/__tests__/context.test.ts +++ b/packages/hub/src/node/__tests__/context.test.ts @@ -37,23 +37,23 @@ describe('createHubContext dock activation', () => { }) context.docks.register({ type: 'iframe', - id: 'devframes-plugin-terminals', + id: 'devframes_plugin_terminals', title: 'Terminals', icon: 'ph:terminal-window-duotone', - url: '/__devframes-plugin-terminals/', + url: '/__devframes_plugin_terminals/', }) const broadcast = vi.spyOn(context.rpc, 'broadcast').mockResolvedValue() - context.docks.activate('devframes-plugin-terminals', { sessionId: 'sess-1' }) + context.docks.activate('devframes_plugin_terminals', { sessionId: 'sess-1' }) const active = await context.rpc.sharedState.get<{ activation: unknown }>('devframe:docks:active') expect(active.value().activation).toEqual({ - dockId: 'devframes-plugin-terminals', + dockId: 'devframes_plugin_terminals', params: { sessionId: 'sess-1' }, }) expect(broadcast).toHaveBeenCalledWith({ method: 'devframe:docks:activate', - args: [{ dockId: 'devframes-plugin-terminals', params: { sessionId: 'sess-1' } }], + args: [{ dockId: 'devframes_plugin_terminals', params: { sessionId: 'sess-1' } }], }) broadcast.mockRestore() }) diff --git a/packages/hub/src/node/__tests__/rpc-builtins.test.ts b/packages/hub/src/node/__tests__/rpc-builtins.test.ts index ba3d2043..4bdce1e0 100644 --- a/packages/hub/src/node/__tests__/rpc-builtins.test.ts +++ b/packages/hub/src/node/__tests__/rpc-builtins.test.ts @@ -44,8 +44,8 @@ describe('hub docks activate RPC', () => { const ctx = { docks: { activate } } as unknown as DevframeHubContext const fn = await hubDocksActivate.setup!(ctx) - await fn.handler!({ dockId: 'devframes-plugin-terminals', params: { sessionId: 'sess-1' } }) - expect(activate).toHaveBeenCalledWith('devframes-plugin-terminals', { sessionId: 'sess-1' }) + await fn.handler!({ dockId: 'devframes_plugin_terminals', params: { sessionId: 'sess-1' } }) + expect(activate).toHaveBeenCalledWith('devframes_plugin_terminals', { sessionId: 'sess-1' }) }) it('forwards a bare dockId without params', async () => { @@ -53,7 +53,7 @@ describe('hub docks activate RPC', () => { const ctx = { docks: { activate } } as unknown as DevframeHubContext const fn = await hubDocksActivate.setup!(ctx) - await fn.handler!({ dockId: 'devframes-plugin-messages' }) - expect(activate).toHaveBeenCalledWith('devframes-plugin-messages', undefined) + await fn.handler!({ dockId: 'devframes_plugin_messages' }) + expect(activate).toHaveBeenCalledWith('devframes_plugin_messages', undefined) }) }) diff --git a/plans/014-git-show-dump-parallel.md b/plans/014-git-show-dump-parallel.md index 0ba9b995..53eac6e0 100644 --- a/plans/014-git-show-dump-parallel.md +++ b/plans/014-git-show-dump-parallel.md @@ -103,7 +103,7 @@ it('bakes one show record per commit in the snapshot', async () => { try { const ctx = await createDashboardContext(repo.dir, 'build') const dump = await collectStaticRpcDump(ctx.rpc.definitions.values(), ctx) - const entry = dump.manifest['git:show'] + const entry = dump.manifest['devframes:plugin:git:show'] expect(entry).toBeDefined() // The temp repo has 2 commits; both should be baked, each with a hash + output. const files = Object.values(dump.files).map(f => (f.data as any).output) @@ -117,7 +117,7 @@ it('bakes one show record per commit in the snapshot', async () => { ``` Adjust the assertion to how the git dump surfaces records in the manifest/files -(inspect `dump.manifest['git:show']` shape while writing). The key assertion: +(inspect `dump.manifest['devframes:plugin:git:show']` shape while writing). The key assertion: every commit in the window produced a record, and order/content match the serial version. diff --git a/plans/019-inspect-rpc-tests.md b/plans/019-inspect-rpc-tests.md index c231d6b5..16aac491 100644 --- a/plans/019-inspect-rpc-tests.md +++ b/plans/019-inspect-rpc-tests.md @@ -31,12 +31,12 @@ by plans 004 and 014, so this plan focuses on inspect.) ## Current state `plugins/inspect/src/rpc/functions/` defines (names verified): -- `devframes-plugin-inspect:list-functions` -- `devframes-plugin-inspect:invoke` -- `devframes-plugin-inspect:list-state-keys` -- `devframes-plugin-inspect:describe-agent` -- `devframes-plugin-inspect:read-agent-resource` -- `devframes-plugin-inspect:invoke-agent-tool` +- `devframes:plugin:inspect:list-functions` +- `devframes:plugin:inspect:invoke` +- `devframes:plugin:inspect:list-state-keys` +- `devframes:plugin:inspect:describe-agent` +- `devframes:plugin:inspect:read-agent-resource` +- `devframes:plugin:inspect:invoke-agent-tool` Existing tests: `plugins/inspect/test/{dev-server,static-build,function-name}.test.ts`. `dev-server.test.ts` already boots the inspect devframe over a real server — diff --git a/plugins/a11y/README.md b/plugins/a11y/README.md index 4b4168c7..46ce0cc7 100644 --- a/plugins/a11y/README.md +++ b/plugins/a11y/README.md @@ -65,7 +65,7 @@ behave identically; the panel's `websocket` / `static` tag is the only tell. Standalone, without a host app: ```sh -pnpm -C plugins/a11y dev # panel only, at /__devframe-a11y-inspector/ +pnpm -C plugins/a11y dev # panel only, at /__devframes_plugin_a11y/ ``` ## File map @@ -74,7 +74,7 @@ pnpm -C plugins/a11y dev # panel only, at /__devframe-a11y-inspector/ |------|--------|---------| | `src/index.ts` | `.` | `createA11yDevframe()` + the default `DevframeDefinition`; `a11yAgentBundlePath` — the agent module a hub attaches as this dock's client script | | `src/node/index.ts` | `/node` | `setupA11y(ctx)` — registers the RPC functions | -| `src/cli.ts` | `/cli` | `createA11yCli()` — backs the `devframe-a11y-inspector` bin | +| `src/cli.ts` | `/cli` | `createA11yCli()` — backs the `devframes_plugin_a11y` bin | | `src/vite.ts` | `/vite` | `a11yVitePlugin()` — mounts the panel into a Vite host | | `src/client/index.ts` | `/client` | `connectA11y()` — typed browser RPC client wrapper | | `src/rpc/` | — | `get-config` static RPC + the type-safe client registry | diff --git a/plugins/a11y/demo/index.html b/plugins/a11y/demo/index.html index f85d3c9d..30c7db33 100644 --- a/plugins/a11y/demo/index.html +++ b/plugins/a11y/demo/index.html @@ -157,7 +157,7 @@

This week's roasts

diff --git a/plugins/a11y/demo/server.mjs b/plugins/a11y/demo/server.mjs index 49a4f408..d8141b19 100644 --- a/plugins/a11y/demo/server.mjs +++ b/plugins/a11y/demo/server.mjs @@ -7,7 +7,7 @@ * * GET / → the demo page (intentional a11y bugs) * GET /__df-inject/inject.js → the injected agent bundle - * GET /__devframe-a11y-inspector/** → the Solid panel SPA + * GET /__devframes_plugin_a11y/** → the Solid panel SPA * * Two modes prove the plugin works either way: * diff --git a/plugins/a11y/package.json b/plugins/a11y/package.json index 0f016f32..c48d54a0 100644 --- a/plugins/a11y/package.json +++ b/plugins/a11y/package.json @@ -31,7 +31,7 @@ }, "types": "./dist/index.d.mts", "bin": { - "devframe-a11y-inspector": "./bin.mjs" + "devframes_plugin_a11y": "./bin.mjs" }, "files": [ "bin.mjs", diff --git a/plugins/a11y/src/cli.ts b/plugins/a11y/src/cli.ts index 9f153b34..426715ef 100644 --- a/plugins/a11y/src/cli.ts +++ b/plugins/a11y/src/cli.ts @@ -4,7 +4,7 @@ import a11yDevframe from './index.ts' /** * Build the standalone CLI for the a11y inspector — backs the package `bin` - * (`devframe-a11y-inspector`) and `npx @devframes/plugin-a11y`. Wraps the + * (`devframes_plugin_a11y`) and `npx @devframes/plugin-a11y`. Wraps the * default {@link createA11yDevframe} definition with devframe's * `dev` / `build` / `spa` command shell. */ diff --git a/plugins/a11y/src/index.ts b/plugins/a11y/src/index.ts index ccb034dc..ec787ca1 100644 --- a/plugins/a11y/src/index.ts +++ b/plugins/a11y/src/index.ts @@ -5,8 +5,8 @@ import pkg from '../package.json' with { type: 'json' } import { setupA11y } from './node/index.ts' /** Default devframe id — drives the standalone CLI command and the hosted mount path `/__/`. */ -const DEFAULT_ID = 'devframe-a11y-inspector' -const BASE_PATH = '/__devframe-a11y-inspector/' +const DEFAULT_ID = 'devframes_plugin_a11y' +const BASE_PATH = '/__devframes_plugin_a11y/' // The Solid panel SPA is built (by Vite) into `dist/spa`. From both the // source entry (`src/index.ts`, via the workspace alias) and the published @@ -34,7 +34,7 @@ export interface A11yDevframeOptions { /** Override the dock icon. */ icon?: string /** - * Override the mount path. Defaults to `/__devframe-a11y-inspector/` so the + * Override the mount path. Defaults to `/__devframes_plugin_a11y/` so the * panel iframe shares an origin with the host page it scans. */ basePath?: string diff --git a/plugins/a11y/src/inject/messages.ts b/plugins/a11y/src/inject/messages.ts index 691e3ebf..470a8827 100644 --- a/plugins/a11y/src/inject/messages.ts +++ b/plugins/a11y/src/inject/messages.ts @@ -41,9 +41,9 @@ export interface A11yAgentContext { } /** One deduplicated summary entry tracks the scan lifecycle. */ -const SCAN_MESSAGE_ID = 'devframe-a11y-inspector:scan' +const SCAN_MESSAGE_ID = 'devframes:plugin:a11y:scan' /** One deduplicated entry per violated rule; removed when the rule clears. */ -const RULE_MESSAGE_PREFIX = 'devframe-a11y-inspector:rule:' +const RULE_MESSAGE_PREFIX = 'devframes:plugin:a11y:rule:' const IMPACT_LEVEL: Record = { critical: 'error', diff --git a/plugins/a11y/src/rpc/functions/get-config.ts b/plugins/a11y/src/rpc/functions/get-config.ts index 8016dc4f..acbb8d1c 100644 --- a/plugins/a11y/src/rpc/functions/get-config.ts +++ b/plugins/a11y/src/rpc/functions/get-config.ts @@ -30,7 +30,7 @@ const IMPACT_COPY = { * same in both modes. */ export const getConfig = defineRpcFunction({ - name: 'devframe-a11y-inspector:get-config', + name: 'devframes:plugin:a11y:get-config', type: 'static', jsonSerializable: true, handler: () => ({ diff --git a/plugins/a11y/src/shared/protocol.ts b/plugins/a11y/src/shared/protocol.ts index 9aba1964..0c64c211 100644 --- a/plugins/a11y/src/shared/protocol.ts +++ b/plugins/a11y/src/shared/protocol.ts @@ -17,7 +17,7 @@ */ /** BroadcastChannel name. Namespaced with the devframe id, per convention. */ -export const A11Y_CHANNEL = 'devframe-a11y-inspector' +export const A11Y_CHANNEL = 'devframes:plugin:a11y' /** * Attribute the agent stamps on each violating element so the panel can ask diff --git a/plugins/a11y/src/spa/lib/devframe.ts b/plugins/a11y/src/spa/lib/devframe.ts index e4b83d18..e0022f89 100644 --- a/plugins/a11y/src/spa/lib/devframe.ts +++ b/plugins/a11y/src/spa/lib/devframe.ts @@ -55,7 +55,7 @@ export function connectDevframeState(): DevframeState { // The server-fn augmentation lives in `src/rpc` (node side); the client // bundle doesn't import it, so call by name with a local return type. const callConfig = rpc.callOptional as (name: string) => Promise - const cfg = await callConfig('devframe-a11y-inspector:get-config') + const cfg = await callConfig('devframes:plugin:a11y:get-config') if (cfg) setConfig(cfg) }) diff --git a/plugins/a11y/src/spa/vite.config.ts b/plugins/a11y/src/spa/vite.config.ts index 00bbed83..37e0d58d 100644 --- a/plugins/a11y/src/spa/vite.config.ts +++ b/plugins/a11y/src/spa/vite.config.ts @@ -6,7 +6,7 @@ import { alias } from '../../../../alias' // `base: './'` + `` keeps the bundle mount-path portable: // the same `dist/spa` works whether devframe serves it at `/` (standalone) -// or `/__devframe-a11y-inspector/` (mounted in a hub). `connectDevframe` +// or `/__devframes_plugin_a11y/` (mounted in a hub). `connectDevframe` // resolves its connection meta relative to `document.baseURI` to match. export default defineConfig({ base: './', diff --git a/plugins/a11y/src/vite.ts b/plugins/a11y/src/vite.ts index 10727f43..421bad0e 100644 --- a/plugins/a11y/src/vite.ts +++ b/plugins/a11y/src/vite.ts @@ -7,7 +7,7 @@ export type { ViteDevBridgeOptions } /** * Mount the a11y inspector panel into an existing Vite dev server. In the * default static-mount mode it serves the built panel at - * `/__devframe-a11y-inspector/`; pass `{ devMiddleware: true }` for the + * `/__devframes_plugin_a11y/`; pass `{ devMiddleware: true }` for the * bridge mode where the host owns the SPA and devframe runs a side-car * RPC + WS server. * diff --git a/plugins/a11y/tests/_utils.ts b/plugins/a11y/tests/_utils.ts index 18a55006..a391b59c 100644 --- a/plugins/a11y/tests/_utils.ts +++ b/plugins/a11y/tests/_utils.ts @@ -18,7 +18,7 @@ export const SPA_DIST = resolve(HERE, '../dist/spa') export function assertClientBuilt(): void { if (!existsSync(path.join(SPA_DIST, 'index.html'))) { throw new Error( - '[devframe-a11y-inspector] dist/spa missing — run `pnpm -C plugins/a11y run build` first.', + '[devframes_plugin_a11y] dist/spa missing — run `pnpm -C plugins/a11y run build` first.', ) } } diff --git a/plugins/a11y/tests/dev-server.test.ts b/plugins/a11y/tests/dev-server.test.ts index c5edf94b..7b456e18 100644 --- a/plugins/a11y/tests/dev-server.test.ts +++ b/plugins/a11y/tests/dev-server.test.ts @@ -42,12 +42,12 @@ describe('dev-server (CLI surface)', () => { }) const rpc = createRpcClient({}, { channel }) - const config = await rpc.$call('devframe-a11y-inspector:get-config') as { + const config = await rpc.$call('devframes:plugin:a11y:get-config') as { channel: string nodeAttr: string impacts: { id: string }[] } - expect(config.channel).toBe('devframe-a11y-inspector') + expect(config.channel).toBe('devframes:plugin:a11y') expect(config.nodeAttr).toBe('data-df-a11y-node') expect(config.impacts.map(i => i.id)).toEqual(['critical', 'serious', 'moderate', 'minor']) }) diff --git a/plugins/a11y/tests/inject-messages.test.ts b/plugins/a11y/tests/inject-messages.test.ts index ef697ef0..93eabe33 100644 --- a/plugins/a11y/tests/inject-messages.test.ts +++ b/plugins/a11y/tests/inject-messages.test.ts @@ -55,14 +55,14 @@ describe('createMessagesReporter', () => { reporter.scanning() expect(added.at(-1)).toMatchObject({ - id: 'devframe-a11y-inspector:scan', + id: 'devframes:plugin:a11y:scan', level: 'info', status: 'loading', }) reporter.report(report([])) expect(added.at(-1)).toMatchObject({ - id: 'devframe-a11y-inspector:scan', + id: 'devframes:plugin:a11y:scan', message: 'No accessibility issues found', level: 'success', status: 'idle', @@ -78,13 +78,13 @@ describe('createMessagesReporter', () => { reporter.report(report([violation('image-alt', 'critical', 2), violation('label', 'moderate')])) - const summary = added.find(m => m.id === 'devframe-a11y-inspector:scan') + const summary = added.find(m => m.id === 'devframes:plugin:a11y:scan') expect(summary).toMatchObject({ message: '3 accessibility issues across 2 rules', level: 'warn', }) - const imageAlt = added.find(m => m.id === 'devframe-a11y-inspector:rule:image-alt') + const imageAlt = added.find(m => m.id === 'devframes:plugin:a11y:rule:image-alt') expect(imageAlt).toMatchObject({ message: 'Fix image-alt (2)', level: 'error', @@ -95,12 +95,12 @@ describe('createMessagesReporter', () => { description: 'Fix the image-alt element', }, }) - expect(added.find(m => m.id === 'devframe-a11y-inspector:rule:label')).toMatchObject({ + expect(added.find(m => m.id === 'devframes:plugin:a11y:rule:label')).toMatchObject({ level: 'warn', labels: ['moderate', 'wcag2a'], }) // No resolver hit — the box is simply absent, never a throw. - expect(added.find(m => m.id === 'devframe-a11y-inspector:rule:label')?.elementPosition?.boundingBox) + expect(added.find(m => m.id === 'devframes:plugin:a11y:rule:label')?.elementPosition?.boundingBox) .toBeUndefined() }) @@ -111,9 +111,9 @@ describe('createMessagesReporter', () => { reporter.report(report([violation('image-alt', 'critical'), violation('label', 'minor')])) reporter.report(report([violation('label', 'minor')])) - expect(removed).toEqual(['devframe-a11y-inspector:rule:image-alt']) + expect(removed).toEqual(['devframes:plugin:a11y:rule:image-alt']) // The surviving rule was re-added (dedup by stable id updates in place). - expect(added.filter(m => m.id === 'devframe-a11y-inspector:rule:label')).toHaveLength(2) + expect(added.filter(m => m.id === 'devframes:plugin:a11y:rule:label')).toHaveLength(2) }) it('settles the summary entry as an error when a scan fails', () => { @@ -122,7 +122,7 @@ describe('createMessagesReporter', () => { reporter.failed(new Error('axe exploded')) expect(added.at(-1)).toMatchObject({ - id: 'devframe-a11y-inspector:scan', + id: 'devframes:plugin:a11y:scan', message: 'Accessibility scan failed', description: 'Error: axe exploded', level: 'error', diff --git a/plugins/a11y/tests/static-build.test.ts b/plugins/a11y/tests/static-build.test.ts index 9308eb13..acc6c879 100644 --- a/plugins/a11y/tests/static-build.test.ts +++ b/plugins/a11y/tests/static-build.test.ts @@ -22,7 +22,7 @@ describe('static build (CLI build surface)', () => { beforeAll(async () => { assertClientBuilt() - outBuild = await mkdtemp(path.join(os.tmpdir(), 'devframe-a11y-inspector-build-')) + outBuild = await mkdtemp(path.join(os.tmpdir(), 'devframes_plugin_a11y-build-')) }) afterAll(async () => { @@ -51,7 +51,7 @@ describe('static build (CLI build surface)', () => { await readFile(path.join(outBuild, DEVFRAME_RPC_DUMP_MANIFEST_FILENAME), 'utf-8'), ) as DumpManifest - const entry = manifest['devframe-a11y-inspector:get-config'] + const entry = manifest['devframes:plugin:a11y:get-config'] expect(entry).toMatchObject({ type: 'static' }) if (!('path' in entry)) throw new Error('expected static manifest entry') @@ -59,7 +59,7 @@ describe('static build (CLI build surface)', () => { const record = JSON.parse( await readFile(path.join(outBuild, entry.path), 'utf-8'), ) as { output: { channel: string, impacts: { id: string }[] } } - expect(record.output.channel).toBe('devframe-a11y-inspector') + expect(record.output.channel).toBe('devframes:plugin:a11y') expect(record.output.impacts.map(i => i.id)).toEqual(['critical', 'serious', 'moderate', 'minor']) }) }) diff --git a/plugins/code-server/README.md b/plugins/code-server/README.md index a3a3196f..7630fab8 100644 --- a/plugins/code-server/README.md +++ b/plugins/code-server/README.md @@ -61,13 +61,13 @@ export default { | Function | Type | Purpose | |----------|------|---------| -| `devframes-plugin-code-server:detect` | query | Re-probe for the binary; returns `{ installed, version, bin }`. | -| `devframes-plugin-code-server:status` | query | Current status + auth cookie when running. | -| `devframes-plugin-code-server:start` | action | Launch and wait for readiness. | -| `devframes-plugin-code-server:stop` | action | Stop the process. | +| `devframes:plugin:code-server:detect` | query | Re-probe for the binary; returns `{ installed, version, bin }`. | +| `devframes:plugin:code-server:status` | query | Current status + auth cookie when running. | +| `devframes:plugin:code-server:start` | action | Launch and wait for readiness. | +| `devframes:plugin:code-server:stop` | action | Stop the process. | Status (minus the auth cookie) is mirrored into the -`devframes-plugin-code-server:state` shared state for reactive UIs. +`devframes:plugin:code-server:state` shared state for reactive UIs. ## UI diff --git a/plugins/code-server/src/client/index.ts b/plugins/code-server/src/client/index.ts index 95b4b015..7013fdb3 100644 --- a/plugins/code-server/src/client/index.ts +++ b/plugins/code-server/src/client/index.ts @@ -93,7 +93,7 @@ export async function mountCodeServer( return busy = true sync() - const result = await call('devframes-plugin-code-server:start', {}) + const result = await call('devframes:plugin:code-server:start', {}) if (result) applyResult(result) busy = false @@ -105,7 +105,7 @@ export async function mountCodeServer( return busy = true sync() - const result = await call('devframes-plugin-code-server:stop') + const result = await call('devframes:plugin:code-server:stop') if (result) applyResult(result) auth = undefined @@ -118,7 +118,7 @@ export async function mountCodeServer( return busy = true sync() - await call('devframes-plugin-code-server:detect') + await call('devframes:plugin:code-server:detect') busy = false sync() } @@ -127,7 +127,7 @@ export async function mountCodeServer( sync() - const initial = await call('devframes-plugin-code-server:status') + const initial = await call('devframes:plugin:code-server:status') if (initial) applyResult(initial) sync() @@ -144,7 +144,7 @@ export async function mountCodeServer( server = full.server ?? server // Shared state never carries the cookie; fetch it when the server comes up. if (server.status === 'running' && !auth) { - void call('devframes-plugin-code-server:status').then((result) => { + void call('devframes:plugin:code-server:status').then((result) => { if (result?.auth) auth = result.auth sync() diff --git a/plugins/code-server/src/constants.ts b/plugins/code-server/src/constants.ts index 1a4e0e59..bf3b9b9c 100644 --- a/plugins/code-server/src/constants.ts +++ b/plugins/code-server/src/constants.ts @@ -1,5 +1,5 @@ /** Stable devframe id for the code-server plugin. */ -export const PLUGIN_ID = 'devframes-plugin-code-server' +export const PLUGIN_ID = 'devframes_plugin_code-server' /** * Shared-state key holding the serializable, secret-free server status and @@ -7,7 +7,7 @@ export const PLUGIN_ID = 'devframes-plugin-code-server' * is returned only from the `start` / `status` RPCs to the already-authorized * client (see {@link CodeServerAuth}). */ -export const STATE_KEY = 'devframes-plugin-code-server:state' +export const STATE_KEY = 'devframes:plugin:code-server:state' /** Default dev-server port for the plugin's own launcher SPA (standalone CLI). */ export const DEFAULT_PORT = 9013 diff --git a/plugins/code-server/src/rpc/functions/detect.ts b/plugins/code-server/src/rpc/functions/detect.ts index c7c60438..8d2f0ab8 100644 --- a/plugins/code-server/src/rpc/functions/detect.ts +++ b/plugins/code-server/src/rpc/functions/detect.ts @@ -3,7 +3,7 @@ import { defineRpcFunction } from 'devframe' import { getCodeServerSupervisor } from '../../node/context' export const detect = defineRpcFunction({ - name: 'devframes-plugin-code-server:detect', + name: 'devframes:plugin:code-server:detect', type: 'query', jsonSerializable: true, agent: { diff --git a/plugins/code-server/src/rpc/functions/start.ts b/plugins/code-server/src/rpc/functions/start.ts index a4b4d260..32fd761b 100644 --- a/plugins/code-server/src/rpc/functions/start.ts +++ b/plugins/code-server/src/rpc/functions/start.ts @@ -3,7 +3,7 @@ import { defineRpcFunction } from 'devframe' import { getCodeServerSupervisor } from '../../node/context' export const start = defineRpcFunction({ - name: 'devframes-plugin-code-server:start', + name: 'devframes:plugin:code-server:start', type: 'action', jsonSerializable: true, agent: { diff --git a/plugins/code-server/src/rpc/functions/status.ts b/plugins/code-server/src/rpc/functions/status.ts index cafdc83d..b2d86d0e 100644 --- a/plugins/code-server/src/rpc/functions/status.ts +++ b/plugins/code-server/src/rpc/functions/status.ts @@ -3,7 +3,7 @@ import { defineRpcFunction } from 'devframe' import { getCodeServerSupervisor } from '../../node/context' export const status = defineRpcFunction({ - name: 'devframes-plugin-code-server:status', + name: 'devframes:plugin:code-server:status', type: 'query', jsonSerializable: true, setup: ctx => ({ diff --git a/plugins/code-server/src/rpc/functions/stop.ts b/plugins/code-server/src/rpc/functions/stop.ts index 35fcfee2..eeef76b6 100644 --- a/plugins/code-server/src/rpc/functions/stop.ts +++ b/plugins/code-server/src/rpc/functions/stop.ts @@ -3,7 +3,7 @@ import { defineRpcFunction } from 'devframe' import { getCodeServerSupervisor } from '../../node/context' export const stop = defineRpcFunction({ - name: 'devframes-plugin-code-server:stop', + name: 'devframes:plugin:code-server:stop', type: 'action', jsonSerializable: true, agent: { diff --git a/plugins/code-server/src/rpc/index.ts b/plugins/code-server/src/rpc/index.ts index 0a1eb2eb..8fa1c24e 100644 --- a/plugins/code-server/src/rpc/index.ts +++ b/plugins/code-server/src/rpc/index.ts @@ -16,6 +16,6 @@ declare module 'devframe' { interface DevframeRpcServerFunctions extends RpcDefinitionsToFunctions {} interface DevframeRpcSharedStates { - 'devframes-plugin-code-server:state': CodeServerSharedState + 'devframes:plugin:code-server:state': CodeServerSharedState } } diff --git a/plugins/git/README.md b/plugins/git/README.md index 73dc2493..8b485054 100644 --- a/plugins/git/README.md +++ b/plugins/git/README.md @@ -57,21 +57,21 @@ WebSocket in dev, and served from a snapshot baked at build time for static deploys. Each degrades to an empty, `isRepo: false` result outside a git repository. -- `git:status` — branch, upstream tracking (ahead/behind), staged / unstaged / +- `devframes:plugin:git:status` — branch, upstream tracking (ahead/behind), staged / unstaged / untracked files, parsed from `git status --porcelain=v2`. Reports `canWrite`. -- `git:log` — paginated commit history (`limit` / `skip`) including parent +- `devframes:plugin:git:log` — paginated commit history (`limit` / `skip`) including parent hashes, which drive the commit graph. -- `git:branches` — local branches with SHA, upstream, ahead/behind, tip subject. -- `git:diff` — per-file added/deleted counts for the working tree or index, plus +- `devframes:plugin:git:branches` — local branches with SHA, upstream, ahead/behind, tip subject. +- `devframes:plugin:git:diff` — per-file added/deleted counts for the working tree or index, plus a unified patch for a selected file. Write actions are `action` functions, registered only when write mode is enabled (`createGitDevframe({ write: true })` or the `--write` flag) and gated behind `status.canWrite` in the UI. Each returns fresh status (commit returns a result): -- `git:stage` — `git add` the given paths. -- `git:unstage` — `git restore --staged` the given paths. -- `git:commit` — commit the staged changes with a message. +- `devframes:plugin:git:stage` — `git add` the given paths. +- `devframes:plugin:git:unstage` — `git restore --staged` the given paths. +- `devframes:plugin:git:commit` — commit the staged changes with a message. ## Develop diff --git a/plugins/git/src/client/components/commit-details-panel.tsx b/plugins/git/src/client/components/commit-details-panel.tsx index 93448b74..d8860794 100644 --- a/plugins/git/src/client/components/commit-details-panel.tsx +++ b/plugins/git/src/client/components/commit-details-panel.tsx @@ -13,7 +13,7 @@ export interface CommitDetailsPanelProps { export function CommitDetailsPanel({ hash, onClose }: CommitDetailsPanelProps) { const loader = useCallback( - (rpc: DevframeRpcClient): Promise => rpc.call('git:show', { hash }), + (rpc: DevframeRpcClient): Promise => rpc.call('devframes:plugin:git:show', { hash }), [hash], ) const { data, loading, error } = useRpcResource(loader) diff --git a/plugins/git/src/client/components/dashboard.tsx b/plugins/git/src/client/components/dashboard.tsx index 4c12e0a5..473d4d9d 100644 --- a/plugins/git/src/client/components/dashboard.tsx +++ b/plugins/git/src/client/components/dashboard.tsx @@ -156,7 +156,7 @@ function DashboardBody() { const rightRail = useRailWidth('devframe-git:rail-right', 480, 340, 760, -1) - const branchesLoader = useCallback((rpc: DevframeRpcClient) => rpc.call('git:branches'), []) + const branchesLoader = useCallback((rpc: DevframeRpcClient) => rpc.call('devframes:plugin:git:branches'), []) const { data: branches, loading: branchesLoading, diff --git a/plugins/git/src/client/components/log-panel.tsx b/plugins/git/src/client/components/log-panel.tsx index 4774f318..ef684f3f 100644 --- a/plugins/git/src/client/components/log-panel.tsx +++ b/plugins/git/src/client/components/log-panel.tsx @@ -40,7 +40,7 @@ export function LogPanel({ branch, selectedHash, onSelectCommit }: LogPanelProps setLoading(true) setError(null) try { - const page = await client.call('git:log', { + const page = await client.call('devframes:plugin:git:log', { limit: PAGE, skip: nextSkip, ref: branch ?? undefined, @@ -78,7 +78,7 @@ export function LogPanel({ branch, selectedHash, onSelectCommit }: LogPanelProps const loadStatus = useCallback(async (client: DevframeRpcClient) => { try { - const status = await client.call('git:status') + const status = await client.call('devframes:plugin:git:status') setCurrentBranch(status.branch) setWorkingChanges( status.staged.length + status.unstaged.length + status.untracked.length, @@ -116,7 +116,7 @@ export function LogPanel({ branch, selectedHash, onSelectCommit }: LogPanelProps (hash: string) => { if (!rpc) return Promise.reject(new Error('rpc unavailable')) - return rpc.call('git:show', { hash, patch: false }) + return rpc.call('devframes:plugin:git:show', { hash, patch: false }) }, [rpc], ) diff --git a/plugins/git/src/client/components/status-panel.tsx b/plugins/git/src/client/components/status-panel.tsx index a0898796..af34a45e 100644 --- a/plugins/git/src/client/components/status-panel.tsx +++ b/plugins/git/src/client/components/status-panel.tsx @@ -9,7 +9,7 @@ import { StatusPanelView } from './views/status-panel-view' function PatchViewer({ staged, path }: { staged: boolean, path: string }) { const loader = useCallback( - (rpc: DevframeRpcClient) => rpc.call('git:diff', { staged, path }), + (rpc: DevframeRpcClient) => rpc.call('devframes:plugin:git:diff', { staged, path }), [staged, path], ) const { data, loading } = useRpcResource(loader) @@ -30,7 +30,7 @@ function PatchViewer({ staged, path }: { staged: boolean, path: string }) { */ export function StatusPanel() { const { rpc } = useRpc() - const loader = useCallback((r: DevframeRpcClient) => r.call('git:status'), []) + const loader = useCallback((r: DevframeRpcClient) => r.call('devframes:plugin:git:status'), []) const { data, loading, refresh, setData } = useRpcResource(loader) const [busy, setBusy] = useState(false) const [message, setMessage] = useState('') @@ -45,7 +45,7 @@ export function StatusPanel() { setBusy(true) setNote(null) try { - setData(await rpc.call('git:stage', { paths })) + setData(await rpc.call('devframes:plugin:git:stage', { paths })) } finally { setBusy(false) @@ -58,7 +58,7 @@ export function StatusPanel() { setBusy(true) setNote(null) try { - setData(await rpc.call('git:unstage', { paths })) + setData(await rpc.call('devframes:plugin:git:unstage', { paths })) } finally { setBusy(false) @@ -71,7 +71,7 @@ export function StatusPanel() { setBusy(true) setNote(null) try { - const result = await rpc.call('git:commit', { message }) + const result = await rpc.call('devframes:plugin:git:commit', { message }) setData(result.status) if (result.ok) setMessage('') diff --git a/plugins/git/src/client/components/views/diff-panel-view.stories.tsx b/plugins/git/src/client/components/views/diff-panel-view.stories.tsx index db7a3530..cb64ef6a 100644 --- a/plugins/git/src/client/components/views/diff-panel-view.stories.tsx +++ b/plugins/git/src/client/components/views/diff-panel-view.stories.tsx @@ -8,7 +8,7 @@ index 1234567..89abcde 100644 --- a/src/rpc/functions/log.ts +++ b/src/rpc/functions/log.ts @@ -72,7 +72,7 @@ export const log = defineRpcFunction({ - name: 'git:log', + name: 'devframes:plugin:git:log', type: 'query', - snapshot: true, + dump: async (_ctx, handler) => { /* bake head of history */ }, diff --git a/plugins/git/src/client/components/views/log-panel-view.stories.tsx b/plugins/git/src/client/components/views/log-panel-view.stories.tsx index 94a4b66d..c6c29768 100644 --- a/plugins/git/src/client/components/views/log-panel-view.stories.tsx +++ b/plugins/git/src/client/components/views/log-panel-view.stories.tsx @@ -25,7 +25,7 @@ const commits: Commit[] = [ { hash: 'c12', shortHash: 'c12f2cd', parents: [], author: 'Ada Lovelace', email: 'ada@example.dev', date: at(9000), subject: 'Add type safety to date ordering', body: 'Types the comparator so bad inputs fail at compile time.', refs: ['tag: v0.1.0'] }, ] -// Stand-in for the `git:show` call the live dashboard makes to fill the hover +// Stand-in for the `devframes:plugin:git:show` call the live dashboard makes to fill the hover // card. Derives plausible changed-file stats from the hash so each commit reads // distinctly. async function loadDetail(hash: string): Promise { diff --git a/plugins/git/src/index.ts b/plugins/git/src/index.ts index 6c7da0e4..2dfd8059 100644 --- a/plugins/git/src/index.ts +++ b/plugins/git/src/index.ts @@ -25,7 +25,7 @@ export interface GitDevframeOptions { repoRoot?: string /** * Mount path override. Left to the adapter by default: `/` for standalone - * (cli / build / spa), `/__git/` for hosted (vite / embedded). + * (cli / build / spa), `/__devframes_plugin_git/` for hosted (vite / embedded). */ basePath?: string /** SPA dist directory. Defaults to the package's bundled SPA. */ @@ -49,7 +49,7 @@ export interface GitDevframeOptions { export function createGitDevframe(options: GitDevframeOptions = {}): DevframeDefinition { const distDir = options.distDir ?? resolve(PKG_ROOT, 'dist/client') return defineDevframe({ - id: 'git', + id: 'devframes_plugin_git', name: 'Git', version: pkg.version, packageName: pkg.name, diff --git a/plugins/git/src/rpc/functions/branches.ts b/plugins/git/src/rpc/functions/branches.ts index 0f4fed3d..979a57f4 100644 --- a/plugins/git/src/rpc/functions/branches.ts +++ b/plugins/git/src/rpc/functions/branches.ts @@ -42,7 +42,7 @@ function parseTrack(track: string): { ahead: number, behind: number, gone: boole } export const branches = defineRpcFunction({ - name: 'git:branches', + name: 'devframes:plugin:git:branches', type: 'query', snapshot: true, jsonSerializable: true, diff --git a/plugins/git/src/rpc/functions/commit.ts b/plugins/git/src/rpc/functions/commit.ts index 8eca967f..d2bcf4eb 100644 --- a/plugins/git/src/rpc/functions/commit.ts +++ b/plugins/git/src/rpc/functions/commit.ts @@ -21,7 +21,7 @@ export interface CommitResult { } export const commit = defineRpcFunction({ - name: 'git:commit', + name: 'devframes:plugin:git:commit', type: 'action', jsonSerializable: true, setup: (ctx) => { diff --git a/plugins/git/src/rpc/functions/diff.ts b/plugins/git/src/rpc/functions/diff.ts index cf9582a4..8e44fdc1 100644 --- a/plugins/git/src/rpc/functions/diff.ts +++ b/plugins/git/src/rpc/functions/diff.ts @@ -46,7 +46,7 @@ function parseNumstat(raw: string): DiffFile[] { } export const diff = defineRpcFunction({ - name: 'git:diff', + name: 'devframes:plugin:git:diff', type: 'query', snapshot: true, jsonSerializable: true, diff --git a/plugins/git/src/rpc/functions/log.ts b/plugins/git/src/rpc/functions/log.ts index d514dbf9..372bf300 100644 --- a/plugins/git/src/rpc/functions/log.ts +++ b/plugins/git/src/rpc/functions/log.ts @@ -76,7 +76,7 @@ function parseLog(raw: string): Commit[] { const SNAPSHOT_LIMIT = 200 export const log = defineRpcFunction({ - name: 'git:log', + name: 'devframes:plugin:git:log', type: 'query', jsonSerializable: true, // A static build can't run git on demand, so bake the head of history (up to diff --git a/plugins/git/src/rpc/functions/show.ts b/plugins/git/src/rpc/functions/show.ts index 59ba47b6..50be2ba3 100644 --- a/plugins/git/src/rpc/functions/show.ts +++ b/plugins/git/src/rpc/functions/show.ts @@ -7,7 +7,7 @@ import { getGitContext } from '../context.ts' /** Hard cap on the returned patch text to keep payloads bounded. */ const PATCH_CHAR_LIMIT = 200_000 -/** Matches the window `git:log` bakes, so any visible commit has a snapshot. */ +/** Matches the window `devframes:plugin:git:log` bakes, so any visible commit has a snapshot. */ const SNAPSHOT_LIMIT = 200 /** Read-only git detail work can run in parallel without overwhelming builds. */ @@ -207,11 +207,11 @@ async function readCommit(git: GitContext, hash: string, includePatch: boolean): } export const show = defineRpcFunction({ - name: 'git:show', + name: 'devframes:plugin:git:show', type: 'query', jsonSerializable: true, // Static builds can't run git per click, so bake one record per commit in the - // same window `git:log` snapshots. Patches are omitted from the baked records + // same window `devframes:plugin:git:log` snapshots. Patches are omitted from the baked records // to keep the bundle bounded — static detail panels show metadata + files. dump: async (ctx, _handler: (args: ShowArgs) => Promise) => { const git = getGitContext(ctx) diff --git a/plugins/git/src/rpc/functions/stage.ts b/plugins/git/src/rpc/functions/stage.ts index 43812bbf..8c1e11e9 100644 --- a/plugins/git/src/rpc/functions/stage.ts +++ b/plugins/git/src/rpc/functions/stage.ts @@ -10,7 +10,7 @@ export interface StageArgs { } export const stage = defineRpcFunction({ - name: 'git:stage', + name: 'devframes:plugin:git:stage', type: 'action', jsonSerializable: true, setup: (ctx) => { diff --git a/plugins/git/src/rpc/functions/status.ts b/plugins/git/src/rpc/functions/status.ts index 714e98d6..e99dcbb6 100644 --- a/plugins/git/src/rpc/functions/status.ts +++ b/plugins/git/src/rpc/functions/status.ts @@ -150,7 +150,7 @@ function parseStatus(root: string, raw: string): GitStatus { } /** - * Read the working-tree status for a git context. Shared by the `git:status` + * Read the working-tree status for a git context. Shared by the `devframes:plugin:git:status` * query and the write actions (which return fresh status after mutating). */ export async function readStatus(git: GitContext): Promise { @@ -164,7 +164,7 @@ export async function readStatus(git: GitContext): Promise { } export const status = defineRpcFunction({ - name: 'git:status', + name: 'devframes:plugin:git:status', type: 'query', snapshot: true, jsonSerializable: true, diff --git a/plugins/git/src/rpc/functions/unstage.ts b/plugins/git/src/rpc/functions/unstage.ts index a21ddcd2..1d87130f 100644 --- a/plugins/git/src/rpc/functions/unstage.ts +++ b/plugins/git/src/rpc/functions/unstage.ts @@ -10,7 +10,7 @@ export interface UnstageArgs { } export const unstage = defineRpcFunction({ - name: 'git:unstage', + name: 'devframes:plugin:git:unstage', type: 'action', jsonSerializable: true, setup: (ctx) => { diff --git a/plugins/git/test/git.test.ts b/plugins/git/test/git.test.ts index e3bffeee..94c7be29 100644 --- a/plugins/git/test/git.test.ts +++ b/plugins/git/test/git.test.ts @@ -40,7 +40,7 @@ describe('@devframes/plugin-git', () => { it('reports branch, staged, unstaged, and untracked status', async () => { const rpc = bootRpc(server.port) - const status = await rpc.$call('git:status') as GitStatus + const status = await rpc.$call('devframes:plugin:git:status') as GitStatus expect(status.isRepo).toBe(true) expect(status.branch).toBe('main') expect(status.detached).toBe(false) @@ -54,7 +54,7 @@ describe('@devframes/plugin-git', () => { it('returns the commit log newest-first', async () => { const rpc = bootRpc(server.port) - const log = await rpc.$call('git:log', { limit: 30 }) as GitLog + const log = await rpc.$call('devframes:plugin:git:log', { limit: 30 }) as GitLog expect(log.isRepo).toBe(true) expect(log.commits).toHaveLength(2) expect(log.commits[0].subject).toBe('feat: add a.txt') @@ -70,17 +70,17 @@ describe('@devframes/plugin-git', () => { it('paginates the log and flags more history', async () => { const rpc = bootRpc(server.port) - const page = await rpc.$call('git:log', { limit: 1 }) as GitLog + const page = await rpc.$call('devframes:plugin:git:log', { limit: 1 }) as GitLog expect(page.commits).toHaveLength(1) expect(page.commits[0].subject).toBe('feat: add a.txt') expect(page.hasMore).toBe(true) - const next = await rpc.$call('git:log', { limit: 1, skip: 1 }) as GitLog + const next = await rpc.$call('devframes:plugin:git:log', { limit: 1, skip: 1 }) as GitLog expect(next.commits).toHaveLength(1) expect(next.commits[0].subject).toBe('init: add readme') expect(next.hasMore).toBe(true) - const tail = await rpc.$call('git:log', { limit: 1, skip: 2 }) as GitLog + const tail = await rpc.$call('devframes:plugin:git:log', { limit: 1, skip: 2 }) as GitLog expect(tail.commits).toHaveLength(0) expect(tail.hasMore).toBe(false) }) @@ -89,7 +89,7 @@ describe('@devframes/plugin-git', () => { const rpc = bootRpc(server.port) const marker = join(repo.dir, 'log-injected.txt') - const log = await rpc.$call('git:log', { ref: `--output=${marker}` }) as GitLog + const log = await rpc.$call('devframes:plugin:git:log', { ref: `--output=${marker}` }) as GitLog expect(log.isRepo).toBe(true) expect(log.commits).toEqual([]) @@ -101,7 +101,7 @@ describe('@devframes/plugin-git', () => { const rpc = bootRpc(server.port) const marker = join(repo.dir, 'show-injected.txt') - const detail = await rpc.$call('git:show', { hash: `--output=${marker}` }) as CommitDetail + const detail = await rpc.$call('devframes:plugin:git:show', { hash: `--output=${marker}` }) as CommitDetail expect(detail.isRepo).toBe(true) expect(detail.found).toBe(false) @@ -110,9 +110,9 @@ describe('@devframes/plugin-git', () => { it('returns commit details for a valid hash', async () => { const rpc = bootRpc(server.port) - const log = await rpc.$call('git:log', { limit: 1 }) as GitLog + const log = await rpc.$call('devframes:plugin:git:log', { limit: 1 }) as GitLog - const detail = await rpc.$call('git:show', { hash: log.commits[0].hash }) as CommitDetail + const detail = await rpc.$call('devframes:plugin:git:show', { hash: log.commits[0].hash }) as CommitDetail expect(detail.isRepo).toBe(true) expect(detail.found).toBe(true) @@ -124,7 +124,7 @@ describe('@devframes/plugin-git', () => { it('lists local branches with the current one first', async () => { const rpc = bootRpc(server.port) - const result = await rpc.$call('git:branches', {}) as GitBranches + const result = await rpc.$call('devframes:plugin:git:branches', {}) as GitBranches expect(result.isRepo).toBe(true) expect(result.current).toBe('main') expect(result.branches).toHaveLength(2) @@ -135,7 +135,7 @@ describe('@devframes/plugin-git', () => { it('summarizes the working-tree diff', async () => { const rpc = bootRpc(server.port) - const diff = await rpc.$call('git:diff', {}) as GitDiff + const diff = await rpc.$call('devframes:plugin:git:diff', {}) as GitDiff expect(diff.isRepo).toBe(true) expect(diff.staged).toBe(false) expect(diff.files.map(f => f.path)).toContain('README.md') @@ -147,14 +147,14 @@ describe('@devframes/plugin-git', () => { it('summarizes the staged diff', async () => { const rpc = bootRpc(server.port) - const diff = await rpc.$call('git:diff', { staged: true }) as GitDiff + const diff = await rpc.$call('devframes:plugin:git:diff', { staged: true }) as GitDiff expect(diff.staged).toBe(true) expect(diff.files.map(f => f.path)).toContain('staged.txt') }) it('returns a unified patch for a single path', async () => { const rpc = bootRpc(server.port) - const diff = await rpc.$call('git:diff', { path: 'README.md' }) as GitDiff + const diff = await rpc.$call('devframes:plugin:git:diff', { path: 'README.md' }) as GitDiff expect(diff.path).toBe('README.md') expect(diff.files.map(f => f.path)).toEqual(['README.md']) expect(diff.patch).toContain('+more') @@ -178,19 +178,19 @@ describe('@devframes/plugin-git (non-repo directory)', () => { it('degrades gracefully outside a git repository', async () => { const rpc = bootRpc(server.port) - const status = await rpc.$call('git:status') as GitStatus + const status = await rpc.$call('devframes:plugin:git:status') as GitStatus expect(status.isRepo).toBe(false) expect(status.branch).toBeNull() expect(status.clean).toBe(true) - const log = await rpc.$call('git:log', {}) as GitLog + const log = await rpc.$call('devframes:plugin:git:log', {}) as GitLog expect(log.isRepo).toBe(false) expect(log.commits).toEqual([]) - const branches = await rpc.$call('git:branches', {}) as GitBranches + const branches = await rpc.$call('devframes:plugin:git:branches', {}) as GitBranches expect(branches.isRepo).toBe(false) - const diff = await rpc.$call('git:diff', {}) as GitDiff + const diff = await rpc.$call('devframes:plugin:git:diff', {}) as GitDiff expect(diff.isRepo).toBe(false) expect(diff.files).toEqual([]) }) @@ -203,7 +203,7 @@ describe('@devframes/plugin-git (build snapshot)', () => { const ctx = await createDashboardContext(repo.dir, 'build') const dump = await collectStaticRpcDump(ctx.rpc.definitions.values(), ctx) - const entry = dump.manifest['git:status'] + const entry = dump.manifest['devframes:plugin:git:status'] expect(entry).toBeDefined() expect(entry.type).toBe('query') expect(entry.fallback).toBeTruthy() @@ -225,7 +225,7 @@ describe('@devframes/plugin-git (build snapshot)', () => { const ctx = await createDashboardContext(repo.dir, 'build') const dump = await collectStaticRpcDump(ctx.rpc.definitions.values(), ctx) - const entry = dump.manifest['git:show'] + const entry = dump.manifest['devframes:plugin:git:show'] expect(entry).toBeDefined() expect(entry.type).toBe('query') expect(Object.keys(entry.records)).toHaveLength(2) @@ -257,26 +257,26 @@ describe('@devframes/plugin-git (write actions)', () => { try { const rpc = bootRpc(server.port) - const initial = await rpc.$call('git:status') as GitStatus + const initial = await rpc.$call('devframes:plugin:git:status') as GitStatus expect(initial.canWrite).toBe(true) // Stage the unstaged + untracked files. - let status = await rpc.$call('git:stage', { paths: ['README.md', 'untracked.txt'] }) as GitStatus + let status = await rpc.$call('devframes:plugin:git:stage', { paths: ['README.md', 'untracked.txt'] }) as GitStatus expect(status.staged.map(f => f.path)).toEqual( expect.arrayContaining(['staged.txt', 'README.md', 'untracked.txt']), ) expect(status.untracked).not.toContain('untracked.txt') // Unstage one of them again. - status = await rpc.$call('git:unstage', { paths: ['staged.txt'] }) as GitStatus + status = await rpc.$call('devframes:plugin:git:unstage', { paths: ['staged.txt'] }) as GitStatus expect(status.staged.map(f => f.path)).not.toContain('staged.txt') // Commit what's left staged. - const result = await rpc.$call('git:commit', { message: 'test: commit from ui' }) as CommitResult + const result = await rpc.$call('devframes:plugin:git:commit', { message: 'test: commit from ui' }) as CommitResult expect(result.ok).toBe(true) expect(result.hash).toMatch(/^[0-9a-f]+$/) - const log = await rpc.$call('git:log', {}) as GitLog + const log = await rpc.$call('devframes:plugin:git:log', {}) as GitLog expect(log.commits[0].subject).toBe('test: commit from ui') } finally { @@ -290,7 +290,7 @@ describe('@devframes/plugin-git (write actions)', () => { const server = await startDashboardServer(repo.dir, { write: true }) try { const rpc = bootRpc(server.port) - const result = await rpc.$call('git:commit', { message: ' ' }) as CommitResult + const result = await rpc.$call('devframes:plugin:git:commit', { message: ' ' }) as CommitResult expect(result.ok).toBe(false) expect(result.hash).toBeNull() } @@ -305,9 +305,9 @@ describe('@devframes/plugin-git (write actions)', () => { const server = await startDashboardServer(repo.dir) try { const rpc = bootRpc(server.port) - const status = await rpc.$call('git:status') as GitStatus + const status = await rpc.$call('devframes:plugin:git:status') as GitStatus expect(status.canWrite).toBe(false) - await expect(rpc.$call('git:stage', { paths: ['README.md'] })).rejects.toBeDefined() + await expect(rpc.$call('devframes:plugin:git:stage', { paths: ['README.md'] })).rejects.toBeDefined() } finally { await server.close() diff --git a/plugins/inspect/README.md b/plugins/inspect/README.md index 80b9c642..cc2ffcef 100644 --- a/plugins/inspect/README.md +++ b/plugins/inspect/README.md @@ -46,7 +46,7 @@ const devframe = createInspectDevframe({ port: 9100 }) ## RPC surface -All functions are namespaced `devframes-plugin-inspect:*`: +All functions are namespaced `devframes:plugin:inspect:*`: | Function | Type | What it returns | |----------|------|-----------------| diff --git a/plugins/inspect/src/diagnostics.ts b/plugins/inspect/src/diagnostics.ts index 73143e24..84ce9b76 100644 --- a/plugins/inspect/src/diagnostics.ts +++ b/plugins/inspect/src/diagnostics.ts @@ -12,7 +12,7 @@ export const diagnostics = defineDiagnostics({ DP_INSPECT_0001: { why: (p: { name: string }) => `Cannot invoke "${p.name}" — no RPC function with that name is registered on this connection.`, - fix: 'Call `devframes-plugin-inspect:list-functions` to see the registered names, or check for a typo.', + fix: 'Call `devframes:plugin:inspect:list-functions` to see the registered names, or check for a typo.', }, DP_INSPECT_0002: { why: (p: { name: string, type: string }) => diff --git a/plugins/inspect/src/index.ts b/plugins/inspect/src/index.ts index 489ab388..dbc79753 100644 --- a/plugins/inspect/src/index.ts +++ b/plugins/inspect/src/index.ts @@ -6,7 +6,7 @@ import pkg from '../package.json' with { type: 'json' } import { setupInspect } from './node/index' /** Default devframe id — drives the hosted mount path `/__/`. */ -const DEFAULT_ID = 'devframes-plugin-inspect' +const DEFAULT_ID = 'devframes_plugin_inspect' // The Vue SPA is built (by Vite) into `dist/spa`. From both the source // entry (`src/index.ts`, via the workspace alias) and the published diff --git a/plugins/inspect/src/rpc/functions/describe-agent.ts b/plugins/inspect/src/rpc/functions/describe-agent.ts index 54c626de..6d391a69 100644 --- a/plugins/inspect/src/rpc/functions/describe-agent.ts +++ b/plugins/inspect/src/rpc/functions/describe-agent.ts @@ -8,7 +8,7 @@ import { defineInspectRpc } from './_define' * the manifest into the static dump for `build`/`spa` mode. */ export const describeAgent = defineInspectRpc({ - name: 'devframes-plugin-inspect:describe-agent', + name: 'devframes:plugin:inspect:describe-agent', type: 'query', jsonSerializable: true, snapshot: true, diff --git a/plugins/inspect/src/rpc/functions/invoke-agent-tool.ts b/plugins/inspect/src/rpc/functions/invoke-agent-tool.ts index 9ae9b7ec..6907907d 100644 --- a/plugins/inspect/src/rpc/functions/invoke-agent-tool.ts +++ b/plugins/inspect/src/rpc/functions/invoke-agent-tool.ts @@ -2,7 +2,7 @@ import type { InvokeResult } from '../../types' import { defineInspectRpc } from './_define' export const invokeAgentTool = defineInspectRpc({ - name: 'devframes-plugin-inspect:invoke-agent-tool', + name: 'devframes:plugin:inspect:invoke-agent-tool', type: 'action', setup: ctx => ({ handler: async (id: string, args: unknown): Promise => { diff --git a/plugins/inspect/src/rpc/functions/invoke.ts b/plugins/inspect/src/rpc/functions/invoke.ts index fcd66e28..2bc1348b 100644 --- a/plugins/inspect/src/rpc/functions/invoke.ts +++ b/plugins/inspect/src/rpc/functions/invoke.ts @@ -14,7 +14,7 @@ const INVOKABLE_TYPES = new Set(['query', 'static']) * constraints that `jsonSerializable: true` would impose. */ export const invoke = defineInspectRpc({ - name: 'devframes-plugin-inspect:invoke', + name: 'devframes:plugin:inspect:invoke', type: 'action', setup: ctx => ({ handler: async (name: string, args: unknown[] = []): Promise => { diff --git a/plugins/inspect/src/rpc/functions/list-functions.ts b/plugins/inspect/src/rpc/functions/list-functions.ts index f8cfc9c3..000c56af 100644 --- a/plugins/inspect/src/rpc/functions/list-functions.ts +++ b/plugins/inspect/src/rpc/functions/list-functions.ts @@ -11,7 +11,7 @@ const INVOKABLE_TYPES = new Set(['query', 'static']) * inspector still lists functions in `build`/`spa` mode. */ export const listFunctions = defineInspectRpc({ - name: 'devframes-plugin-inspect:list-functions', + name: 'devframes:plugin:inspect:list-functions', type: 'query', jsonSerializable: true, snapshot: true, diff --git a/plugins/inspect/src/rpc/functions/list-state-keys.ts b/plugins/inspect/src/rpc/functions/list-state-keys.ts index c8a521f9..a99cb3d9 100644 --- a/plugins/inspect/src/rpc/functions/list-state-keys.ts +++ b/plugins/inspect/src/rpc/functions/list-state-keys.ts @@ -8,7 +8,7 @@ import { defineInspectRpc } from './_define' * `build`/`spa` mode. */ export const listStateKeys = defineInspectRpc({ - name: 'devframes-plugin-inspect:list-state-keys', + name: 'devframes:plugin:inspect:list-state-keys', type: 'query', jsonSerializable: true, snapshot: true, diff --git a/plugins/inspect/src/rpc/functions/read-agent-resource.ts b/plugins/inspect/src/rpc/functions/read-agent-resource.ts index 1d1b17a8..3ae7e86f 100644 --- a/plugins/inspect/src/rpc/functions/read-agent-resource.ts +++ b/plugins/inspect/src/rpc/functions/read-agent-resource.ts @@ -2,7 +2,7 @@ import type { InvokeResult } from '../../types' import { defineInspectRpc } from './_define' export const readAgentResource = defineInspectRpc({ - name: 'devframes-plugin-inspect:read-agent-resource', + name: 'devframes:plugin:inspect:read-agent-resource', type: 'action', setup: ctx => ({ handler: async (id: string): Promise => { diff --git a/plugins/inspect/src/rpc/index.ts b/plugins/inspect/src/rpc/index.ts index 5c5342de..c4fd25f3 100644 --- a/plugins/inspect/src/rpc/index.ts +++ b/plugins/inspect/src/rpc/index.ts @@ -8,7 +8,7 @@ import { readAgentResource } from './functions/read-agent-resource' /** * The introspection RPC functions registered by the inspector plugin. - * Namespaced `devframes-plugin-inspect:*` per the plugin convention. + * Namespaced `devframes:plugin:inspect:*` per the plugin convention. */ export const serverFunctions = [ listFunctions, diff --git a/plugins/inspect/src/spa/components/AgentSmart.vue b/plugins/inspect/src/spa/components/AgentSmart.vue index 52aa5171..b72846a1 100644 --- a/plugins/inspect/src/spa/components/AgentSmart.vue +++ b/plugins/inspect/src/spa/components/AgentSmart.vue @@ -13,7 +13,7 @@ const pending = reactive>({}) async function fetchData(): Promise { if (!rpc.value) return - manifest.value = await rpc.value.call('devframes-plugin-inspect:describe-agent') + manifest.value = await rpc.value.call('devframes:plugin:inspect:describe-agent') } useRefreshProvider(fetchData) @@ -24,7 +24,7 @@ async function onInvoke(id: string, parsedArgs: unknown) { return pending[id] = true try { - results[id] = await rpc.value.call('devframes-plugin-inspect:invoke-agent-tool', id, parsedArgs) + results[id] = await rpc.value.call('devframes:plugin:inspect:invoke-agent-tool', id, parsedArgs) } catch (e) { const err = e as Error @@ -40,7 +40,7 @@ async function onRead(id: string) { return pending[id] = true try { - results[id] = await rpc.value.call('devframes-plugin-inspect:read-agent-resource', id) + results[id] = await rpc.value.call('devframes:plugin:inspect:read-agent-resource', id) } catch (e) { const err = e as Error diff --git a/plugins/inspect/src/spa/components/FunctionsSmart.vue b/plugins/inspect/src/spa/components/FunctionsSmart.vue index e8302985..2a240060 100644 --- a/plugins/inspect/src/spa/components/FunctionsSmart.vue +++ b/plugins/inspect/src/spa/components/FunctionsSmart.vue @@ -13,7 +13,7 @@ const pending = reactive>({}) async function fetchData(): Promise { if (!rpc.value) return - functions.value = await rpc.value.call('devframes-plugin-inspect:list-functions') + functions.value = await rpc.value.call('devframes:plugin:inspect:list-functions') } useRefreshProvider(fetchData) @@ -24,7 +24,7 @@ async function onInvoke(fn: RpcFunctionInfo, parsedArgs: unknown[]): Promise | null = null async function fetchData(): Promise { if (!rpc.value) return - keys.value = await rpc.value.call('devframes-plugin-inspect:list-state-keys') + keys.value = await rpc.value.call('devframes:plugin:inspect:list-state-keys') } useRefreshProvider(fetchData) diff --git a/plugins/inspect/src/types.ts b/plugins/inspect/src/types.ts index 0f353309..9906730c 100644 --- a/plugins/inspect/src/types.ts +++ b/plugins/inspect/src/types.ts @@ -17,7 +17,7 @@ export interface RpcFunctionAgentInfo { /** * Serializable description of a single registered RPC function. Returned - * by `devframes-plugin-inspect:list-functions`. JSON-safe by construction + * by `devframes:plugin:inspect:list-functions`. JSON-safe by construction * — valibot schemas are projected to JSON Schema (best effort), never * sent as live objects. */ @@ -53,7 +53,7 @@ export interface RpcFunctionInfo { } /** - * Result envelope for `devframes-plugin-inspect:invoke`. Errors are + * Result envelope for `devframes:plugin:inspect:invoke`. Errors are * normalized to a serializable shape rather than thrown so the inspector * UI can render failures inline alongside successes. */ diff --git a/plugins/inspect/src/vite.ts b/plugins/inspect/src/vite.ts index 3bb3a733..9a25e2a2 100644 --- a/plugins/inspect/src/vite.ts +++ b/plugins/inspect/src/vite.ts @@ -6,7 +6,7 @@ export type { ViteDevBridgeOptions } /** * Mount the inspector into an existing Vite dev server. In the default - * static-mount mode it serves the built SPA at `/__devframes-plugin-inspect/`; + * static-mount mode it serves the built SPA at `/__devframes_plugin_inspect/`; * pass `{ devMiddleware: true }` for the bridge mode where the host owns * the SPA and devframe runs a side-car RPC + WS server. */ diff --git a/plugins/inspect/test/_utils.ts b/plugins/inspect/test/_utils.ts index 32138158..3a3c49dd 100644 --- a/plugins/inspect/test/_utils.ts +++ b/plugins/inspect/test/_utils.ts @@ -24,7 +24,7 @@ const SPA_DIST = inspectDevframe.cli!.distDir! export function assertSpaBuilt(): void { if (!existsSync(path.join(SPA_DIST, 'index.html'))) { throw new Error( - '[devframes-plugin-inspect] dist/spa missing — run `pnpm -C plugins/inspect run build` first.', + '[devframes_plugin_inspect] dist/spa missing — run `pnpm -C plugins/inspect run build` first.', ) } } diff --git a/plugins/inspect/test/dev-server.test.ts b/plugins/inspect/test/dev-server.test.ts index e40e21b6..d5ae8ba3 100644 --- a/plugins/inspect/test/dev-server.test.ts +++ b/plugins/inspect/test/dev-server.test.ts @@ -46,17 +46,17 @@ describe('inspector dev-server', () => { it('list-functions reports the inspector RPCs plus built-ins, with metadata', async () => { const rpc = connect(server) - const fns = await rpc.$call('devframes-plugin-inspect:list-functions') as RpcFunctionInfo[] + const fns = await rpc.$call('devframes:plugin:inspect:list-functions') as RpcFunctionInfo[] const names = fns.map(f => f.name) - expect(names).toContain('devframes-plugin-inspect:list-functions') - expect(names).toContain('devframes-plugin-inspect:invoke') - expect(names).toContain('devframes-plugin-inspect:list-state-keys') - expect(names).toContain('devframes-plugin-inspect:describe-agent') + expect(names).toContain('devframes:plugin:inspect:list-functions') + expect(names).toContain('devframes:plugin:inspect:invoke') + expect(names).toContain('devframes:plugin:inspect:list-state-keys') + expect(names).toContain('devframes:plugin:inspect:describe-agent') // The built-in shared-state RPCs are always registered on the host. expect(names).toContain('devframe:rpc:server-state:get') - const listFn = fns.find(f => f.name === 'devframes-plugin-inspect:list-functions')! + const listFn = fns.find(f => f.name === 'devframes:plugin:inspect:list-functions')! expect(listFn).toMatchObject({ type: 'query', jsonSerializable: true, @@ -65,15 +65,15 @@ describe('inspector dev-server', () => { }) expect(listFn.agent?.description).toBeTruthy() - const invokeFn = fns.find(f => f.name === 'devframes-plugin-inspect:invoke')! + const invokeFn = fns.find(f => f.name === 'devframes:plugin:inspect:invoke')! expect(invokeFn).toMatchObject({ type: 'action', invokable: false }) }) it('invoke runs a read-only query and returns a result envelope', async () => { const rpc = connect(server) const result = await rpc.$call( - 'devframes-plugin-inspect:invoke', - 'devframes-plugin-inspect:list-state-keys', + 'devframes:plugin:inspect:invoke', + 'devframes:plugin:inspect:list-state-keys', [], ) as InvokeResult expect(result.ok).toBe(true) @@ -84,22 +84,22 @@ describe('inspector dev-server', () => { it('invoke refuses to fire action / event functions', async () => { const rpc = connect(server) await expect( - rpc.$call('devframes-plugin-inspect:invoke', 'devframes-plugin-inspect:invoke', []), + rpc.$call('devframes:plugin:inspect:invoke', 'devframes:plugin:inspect:invoke', []), ).rejects.toThrow(/only read-only/) }) it('invoke rejects unknown function names', async () => { const rpc = connect(server) await expect( - rpc.$call('devframes-plugin-inspect:invoke', 'does-not:exist', []), + rpc.$call('devframes:plugin:inspect:invoke', 'does-not:exist', []), ).rejects.toThrow(/not registered|Cannot invoke/) }) it('describe-agent surfaces the agent-exposed inspector tools', async () => { const rpc = connect(server) - const manifest = await rpc.$call('devframes-plugin-inspect:describe-agent') as AgentManifest + const manifest = await rpc.$call('devframes:plugin:inspect:describe-agent') as AgentManifest const toolIds = manifest.tools.map(t => t.id) - expect(toolIds).toContain('devframes-plugin-inspect:list-functions') - expect(toolIds).toContain('devframes-plugin-inspect:describe-agent') + expect(toolIds).toContain('devframes:plugin:inspect:list-functions') + expect(toolIds).toContain('devframes:plugin:inspect:describe-agent') }) }) diff --git a/plugins/inspect/test/function-name.test.ts b/plugins/inspect/test/function-name.test.ts index 739fa677..106dddf0 100644 --- a/plugins/inspect/test/function-name.test.ts +++ b/plugins/inspect/test/function-name.test.ts @@ -3,16 +3,16 @@ import { parseNamespacedName } from '../src/spa/utils/color' describe('parseNamespacedName', () => { it('splits a single `:` namespace into a colored prefix and an uncolored leaf', () => { - const segments = parseNamespacedName('devframes-plugin-inspect:list-functions') + const segments = parseNamespacedName('foo:bar') expect(segments).toEqual([ - { text: 'devframes-plugin-inspect', separator: ':', isLeaf: false, color: expect.any(String) }, - { text: 'list-functions', separator: '', isLeaf: true, color: undefined }, + { text: 'foo', separator: ':', isLeaf: false, color: expect.any(String) }, + { text: 'bar', separator: '', isLeaf: true, color: undefined }, ]) }) it('splits deep `:` namespaces, coloring every namespace segment', () => { - const segments = parseNamespacedName('devframe:rpc:server-state:get') - expect(segments.map(s => s.text)).toEqual(['devframe', 'rpc', 'server-state', 'get']) + const segments = parseNamespacedName('devframes:plugin:inspect:list-functions') + expect(segments.map(s => s.text)).toEqual(['devframes', 'plugin', 'inspect', 'list-functions']) expect(segments.map(s => s.separator)).toEqual([':', ':', ':', '']) expect(segments.map(s => s.isLeaf)).toEqual([false, false, false, true]) // Every namespace gets a color; only the leaf is uncolored. diff --git a/plugins/inspect/test/static-build.test.ts b/plugins/inspect/test/static-build.test.ts index 046afe05..682f2c0d 100644 --- a/plugins/inspect/test/static-build.test.ts +++ b/plugins/inspect/test/static-build.test.ts @@ -15,7 +15,7 @@ describe('inspector static build', () => { beforeAll(async () => { assertSpaBuilt() - outDir = await mkdtemp(path.join(os.tmpdir(), 'devframes-plugin-inspect-build-')) + outDir = await mkdtemp(path.join(os.tmpdir(), 'devframes_plugin_inspect-build-')) await createBuild(inspectDevframe, { outDir }) }) @@ -43,10 +43,10 @@ describe('inspector static build', () => { ) as Record // `invoke` is an `action` with no dump — it must not appear. - expect(manifest['devframes-plugin-inspect:invoke']).toBeUndefined() + expect(manifest['devframes:plugin:inspect:invoke']).toBeUndefined() // The three snapshot `query` functions bake into the static dump. - expect(manifest['devframes-plugin-inspect:list-functions']).toBeTruthy() - expect(manifest['devframes-plugin-inspect:list-state-keys']).toBeTruthy() - expect(manifest['devframes-plugin-inspect:describe-agent']).toBeTruthy() + expect(manifest['devframes:plugin:inspect:list-functions']).toBeTruthy() + expect(manifest['devframes:plugin:inspect:list-state-keys']).toBeTruthy() + expect(manifest['devframes:plugin:inspect:describe-agent']).toBeTruthy() }) }) diff --git a/plugins/messages/src/client/App.vue b/plugins/messages/src/client/App.vue index e8309439..e0a30945 100644 --- a/plugins/messages/src/client/App.vue +++ b/plugins/messages/src/client/App.vue @@ -39,20 +39,20 @@ function reload(): void { const canOpenFile = computed(() => props.rpc.connectionMeta.backend !== 'static') async function onDismiss(id: string): Promise { - await props.rpc.call('devframes-plugin-messages:remove', id) + await props.rpc.call('devframes:plugin:messages:remove', id) } async function onDismissMany(ids: string[]): Promise { for (const id of ids) - await props.rpc.call('devframes-plugin-messages:remove', id) + await props.rpc.call('devframes:plugin:messages:remove', id) } async function onClear(): Promise { - await props.rpc.call('devframes-plugin-messages:clear') + await props.rpc.call('devframes:plugin:messages:clear') } async function onPersist(id: string): Promise { - await props.rpc.call('devframes-plugin-messages:update', id, { autoDelete: 0 }) + await props.rpc.call('devframes:plugin:messages:update', id, { autoDelete: 0 }) } async function onOpenFile(entry: DevframeMessageEntry): Promise { diff --git a/plugins/messages/src/client/components/MessagesView.vue b/plugins/messages/src/client/components/MessagesView.vue index 8374ca06..fd4fb589 100644 --- a/plugins/messages/src/client/components/MessagesView.vue +++ b/plugins/messages/src/client/components/MessagesView.vue @@ -9,7 +9,7 @@ import { fromEntries, getHashColorFromString, levelPriority, levels } from './Me // Ported from vitejs/devtools' `ViewBuiltinMessages.vue`, split into a dumb // view: the feed comes in as a prop, mutations go out as emits (the smart -// wrapper maps them onto the `devframes-plugin-messages:*` RPCs). +// wrapper maps them onto the `devframes:plugin:messages:*` RPCs). // // TODO(toasts): the upstream view also participates in toast selection — // `pendingSelectId` (set by clicking a toast) selects + scrolls an entry into diff --git a/plugins/messages/src/client/state/messages.ts b/plugins/messages/src/client/state/messages.ts index 3ae7ff59..968dbf15 100644 --- a/plugins/messages/src/client/state/messages.ts +++ b/plugins/messages/src/client/state/messages.ts @@ -40,8 +40,8 @@ export function useMessages(rpc: DevframeRpcClient): Reactive { // Omit the cursor on the first call — static builds serve the baked // no-args snapshot; live servers return the full list either way. const result = (lastVersion == null - ? await rpc.call('devframes-plugin-messages:list') - : await rpc.call('devframes-plugin-messages:list', lastVersion)) as DevframeMessagesListDelta + ? await rpc.call('devframes:plugin:messages:list') + : await rpc.call('devframes:plugin:messages:list', lastVersion)) as DevframeMessagesListDelta if (result.full) entryMap.clear() // Apply removals before upserts — an id can be evicted and re-added diff --git a/plugins/messages/src/constants.ts b/plugins/messages/src/constants.ts index c29792cd..e33d28b1 100644 --- a/plugins/messages/src/constants.ts +++ b/plugins/messages/src/constants.ts @@ -1,5 +1,5 @@ -/** Devframe id — drives the hosted mount path `/__/` and RPC namespacing. */ -export const PLUGIN_ID = 'devframes-plugin-messages' +/** Devframe id — drives the hosted mount path `/__/`. */ +export const PLUGIN_ID = 'devframes_plugin_messages' /** Preferred standalone CLI port (901x band shared by the core-ish plugins). */ export const DEFAULT_PORT = 9014 diff --git a/plugins/messages/src/rpc/functions/add.ts b/plugins/messages/src/rpc/functions/add.ts index 65a254ef..aa9ffcd1 100644 --- a/plugins/messages/src/rpc/functions/add.ts +++ b/plugins/messages/src/rpc/functions/add.ts @@ -8,7 +8,7 @@ import { defineMessagesRpc, getMessagesHost } from './_define' * when no messages host is attached. */ export const messagesAdd = defineMessagesRpc({ - name: 'devframes-plugin-messages:add', + name: 'devframes:plugin:messages:add', type: 'action', jsonSerializable: true, setup: ctx => ({ diff --git a/plugins/messages/src/rpc/functions/clear.ts b/plugins/messages/src/rpc/functions/clear.ts index 2d7fd434..a4b2081a 100644 --- a/plugins/messages/src/rpc/functions/clear.ts +++ b/plugins/messages/src/rpc/functions/clear.ts @@ -2,7 +2,7 @@ import { defineMessagesRpc, getMessagesHost } from './_define' /** Clear the whole message feed. */ export const messagesClear = defineMessagesRpc({ - name: 'devframes-plugin-messages:clear', + name: 'devframes:plugin:messages:clear', type: 'action', jsonSerializable: true, setup: ctx => ({ diff --git a/plugins/messages/src/rpc/functions/list.ts b/plugins/messages/src/rpc/functions/list.ts index fa46541d..bd21e396 100644 --- a/plugins/messages/src/rpc/functions/list.ts +++ b/plugins/messages/src/rpc/functions/list.ts @@ -10,7 +10,7 @@ import { defineMessagesRpc, getMessagesHost } from './_define' * renders the last captured feed without a live server. */ export const messagesList = defineMessagesRpc({ - name: 'devframes-plugin-messages:list', + name: 'devframes:plugin:messages:list', type: 'query', jsonSerializable: true, snapshot: true, diff --git a/plugins/messages/src/rpc/functions/remove.ts b/plugins/messages/src/rpc/functions/remove.ts index 798aacf0..67002f92 100644 --- a/plugins/messages/src/rpc/functions/remove.ts +++ b/plugins/messages/src/rpc/functions/remove.ts @@ -2,7 +2,7 @@ import { defineMessagesRpc, getMessagesHost } from './_define' /** Remove (dismiss) a single message entry by id. */ export const messagesRemove = defineMessagesRpc({ - name: 'devframes-plugin-messages:remove', + name: 'devframes:plugin:messages:remove', type: 'action', jsonSerializable: true, setup: ctx => ({ diff --git a/plugins/messages/src/rpc/functions/update.ts b/plugins/messages/src/rpc/functions/update.ts index 8f49126d..467b1408 100644 --- a/plugins/messages/src/rpc/functions/update.ts +++ b/plugins/messages/src/rpc/functions/update.ts @@ -8,7 +8,7 @@ import { defineMessagesRpc, getMessagesHost } from './_define' * attached. */ export const messagesUpdate = defineMessagesRpc({ - name: 'devframes-plugin-messages:update', + name: 'devframes:plugin:messages:update', type: 'action', jsonSerializable: true, setup: ctx => ({ diff --git a/plugins/messages/src/rpc/index.ts b/plugins/messages/src/rpc/index.ts index 2150f1cb..6ff4bcc1 100644 --- a/plugins/messages/src/rpc/index.ts +++ b/plugins/messages/src/rpc/index.ts @@ -8,7 +8,7 @@ import { messagesUpdate } from './functions/update' /** * The message-feed RPC functions registered by the plugin — thin, typed * wrappers over the hub's `ctx.messages` host. Namespaced - * `devframes-plugin-messages:*` per the plugin convention. + * `devframes:plugin:messages:*` per the plugin convention. */ export const serverFunctions = [ messagesList, diff --git a/plugins/messages/src/vite.ts b/plugins/messages/src/vite.ts index 91586b90..873feab3 100644 --- a/plugins/messages/src/vite.ts +++ b/plugins/messages/src/vite.ts @@ -6,7 +6,7 @@ export type { ViteDevBridgeOptions } /** * Mount the messages panel into an existing Vite dev server. In the default - * static-mount mode it serves the built SPA at `/__devframes-plugin-messages/`; + * static-mount mode it serves the built SPA at `/__devframes_plugin_messages/`; * pass `{ devMiddleware: true }` for the bridge mode where the host owns * the SPA and devframe runs a side-car RPC + WS server. */ diff --git a/plugins/messages/test/_utils.ts b/plugins/messages/test/_utils.ts index 1aa94db0..05b7ad13 100644 --- a/plugins/messages/test/_utils.ts +++ b/plugins/messages/test/_utils.ts @@ -29,7 +29,7 @@ const SPA_DIST = messagesDevframe.cli!.distDir! export function assertSpaBuilt(): void { if (!existsSync(path.join(SPA_DIST, 'index.html'))) { throw new Error( - '[devframes-plugin-messages] dist/spa missing — run `pnpm -C plugins/messages run build` first.', + '[devframes_plugin_messages] dist/spa missing — run `pnpm -C plugins/messages run build` first.', ) } } @@ -65,7 +65,7 @@ async function boot(options: BootOptions): Promise { const h3Host = createH3DevframeHost({ origin, appName: messagesDevframe.id, - workspaceRoot: await mkdtemp(path.join(os.tmpdir(), 'devframes-plugin-messages-test-')), + workspaceRoot: await mkdtemp(path.join(os.tmpdir(), 'devframes_plugin_messages-test-')), mount: (base, dir) => { mountStaticHandler(app, base, dir) }, diff --git a/plugins/messages/test/dev-server.test.ts b/plugins/messages/test/dev-server.test.ts index 207bc2f3..c7fc7e43 100644 --- a/plugins/messages/test/dev-server.test.ts +++ b/plugins/messages/test/dev-server.test.ts @@ -45,11 +45,11 @@ describe('messages dev-server (hub context)', () => { it('registers the open-in-editor recipe alongside the feed RPCs', () => { const names = Array.from(server.ctx.rpc.definitions.keys()) - expect(names).toContain('devframes-plugin-messages:list') - expect(names).toContain('devframes-plugin-messages:add') - expect(names).toContain('devframes-plugin-messages:update') - expect(names).toContain('devframes-plugin-messages:remove') - expect(names).toContain('devframes-plugin-messages:clear') + expect(names).toContain('devframes:plugin:messages:list') + expect(names).toContain('devframes:plugin:messages:add') + expect(names).toContain('devframes:plugin:messages:update') + expect(names).toContain('devframes:plugin:messages:remove') + expect(names).toContain('devframes:plugin:messages:clear') expect(names).toContain('devframe:open-in-editor') }) @@ -57,14 +57,14 @@ describe('messages dev-server (hub context)', () => { const rpc = connect(server) await server.ctx.messages.add({ id: 'from-server', level: 'info', message: 'hello' }) - const full = await rpc.$call('devframes-plugin-messages:list') as DevframeMessagesListDelta + const full = await rpc.$call('devframes:plugin:messages:list') as DevframeMessagesListDelta expect(full.full).toBe(true) expect(full.entries.map(e => e.id)).toContain('from-server') await server.ctx.messages.add({ id: 'later', level: 'warn', message: 'later' }) await server.ctx.messages.remove('from-server') - const delta = await rpc.$call('devframes-plugin-messages:list', full.version) as DevframeMessagesListDelta + const delta = await rpc.$call('devframes:plugin:messages:list', full.version) as DevframeMessagesListDelta expect(delta.full).toBe(false) expect(delta.entries.map(e => e.id)).toEqual(['later']) expect(delta.removedIds).toContain('from-server') @@ -73,24 +73,24 @@ describe('messages dev-server (hub context)', () => { it('add stamps browser origin; update patches; clear empties', async () => { const rpc = connect(server) - const added = await rpc.$call('devframes-plugin-messages:add', { + const added = await rpc.$call('devframes:plugin:messages:add', { level: 'info', message: 'from the panel', }) as DevframeMessageEntry expect(added.from).toBe('browser') expect(server.ctx.messages.entries.get(added.id)?.message).toBe('from the panel') - const updated = await rpc.$call('devframes-plugin-messages:update', added.id, { + const updated = await rpc.$call('devframes:plugin:messages:update', added.id, { level: 'success', }) as DevframeMessageEntry expect(updated.level).toBe('success') expect(updated.from).toBe('browser') - await rpc.$call('devframes-plugin-messages:remove', added.id) + await rpc.$call('devframes:plugin:messages:remove', added.id) expect(server.ctx.messages.entries.has(added.id)).toBe(false) await server.ctx.messages.add({ level: 'debug', message: 'leftover' }) - await rpc.$call('devframes-plugin-messages:clear') + await rpc.$call('devframes:plugin:messages:clear') expect(server.ctx.messages.entries.size).toBe(0) }) }) @@ -116,15 +116,15 @@ describe('messages dev-server (plain context — warn + noop)', () => { it('list no-ops with an empty full snapshot', async () => { const rpc = connect(server) - const result = await rpc.$call('devframes-plugin-messages:list') as DevframeMessagesListDelta + const result = await rpc.$call('devframes:plugin:messages:list') as DevframeMessagesListDelta expect(result).toEqual({ entries: [], removedIds: [], version: 0, full: true }) }) it('mutations no-op without throwing', async () => { const rpc = connect(server) - const added = await rpc.$call('devframes-plugin-messages:add', { level: 'info', message: 'x' }) + const added = await rpc.$call('devframes:plugin:messages:add', { level: 'info', message: 'x' }) expect(added).toBeNull() - await expect(rpc.$call('devframes-plugin-messages:remove', 'nope')).resolves.toBeUndefined() - await expect(rpc.$call('devframes-plugin-messages:clear')).resolves.toBeUndefined() + await expect(rpc.$call('devframes:plugin:messages:remove', 'nope')).resolves.toBeUndefined() + await expect(rpc.$call('devframes:plugin:messages:clear')).resolves.toBeUndefined() }) }) diff --git a/plugins/messages/test/static-build.test.ts b/plugins/messages/test/static-build.test.ts index 341ec797..c562637c 100644 --- a/plugins/messages/test/static-build.test.ts +++ b/plugins/messages/test/static-build.test.ts @@ -17,7 +17,7 @@ describe('messages static build', () => { beforeAll(async () => { assertSpaBuilt() - outDir = await mkdtemp(path.join(os.tmpdir(), 'devframes-plugin-messages-build-')) + outDir = await mkdtemp(path.join(os.tmpdir(), 'devframes_plugin_messages-build-')) await createBuild(messagesDevframe, { outDir }) }) @@ -47,8 +47,8 @@ describe('messages static build', () => { // The snapshot `query` bakes into the static dump; the mutating // `action` functions must not appear. - expect(manifest['devframes-plugin-messages:list']).toBeTruthy() - expect(manifest['devframes-plugin-messages:add']).toBeUndefined() - expect(manifest['devframes-plugin-messages:clear']).toBeUndefined() + expect(manifest['devframes:plugin:messages:list']).toBeTruthy() + expect(manifest['devframes:plugin:messages:add']).toBeUndefined() + expect(manifest['devframes:plugin:messages:clear']).toBeUndefined() }) }) diff --git a/plugins/terminals/src/client/App.svelte b/plugins/terminals/src/client/App.svelte index 1c2d15f3..90a40e66 100644 --- a/plugins/terminals/src/client/App.svelte +++ b/plugins/terminals/src/client/App.svelte @@ -179,7 +179,7 @@ onMount(async () => { let existing: TerminalSessionInfo[] | null = null try { - existing = await rpc.call('devframes-plugin-terminals:list') as TerminalSessionInfo[] + existing = await rpc.call('devframes:plugin:terminals:list') as TerminalSessionInfo[] } catch { existing = null @@ -200,7 +200,7 @@ async function spawn(req: any): Promise { try { - const info = await rpc.call('devframes-plugin-terminals:spawn', req) as any + const info = await rpc.call('devframes:plugin:terminals:spawn', req) as any if (info?.id) activeId = info.id } @@ -214,7 +214,7 @@ function commitRename(id: string, title: string): void { renamingId = null - rpc.call('devframes-plugin-terminals:rename', { id, title: title.trim() }).catch(() => {}) + rpc.call('devframes:plugin:terminals:rename', { id, title: title.trim() }).catch(() => {}) } function focusSelect(node: HTMLInputElement) { @@ -287,7 +287,7 @@ tabindex="-1" aria-label="Close terminal" class="i-ph-x op0 group-hover:op60 hover:op100! transition-opacity shrink-0" - onclick={(e) => { e.stopPropagation(); rpc.call('devframes-plugin-terminals:remove', { id: s.id }).catch(() => {}) }} + onclick={(e) => { e.stopPropagation(); rpc.call('devframes:plugin:terminals:remove', { id: s.id }).catch(() => {}) }} onkeydown={() => {}} > {/if} @@ -373,10 +373,10 @@
{#if !isExternal(s)} - - {/if} diff --git a/plugins/terminals/src/client/TerminalView.svelte b/plugins/terminals/src/client/TerminalView.svelte index 47526b07..de28b0a8 100644 --- a/plugins/terminals/src/client/TerminalView.svelte +++ b/plugins/terminals/src/client/TerminalView.svelte @@ -76,7 +76,7 @@ if (isForeign) rpc.call('hub:terminals:write', info.id, data).catch(() => {}) else - rpc.call('devframes-plugin-terminals:write', { id: info.id, data }).catch(() => {}) + rpc.call('devframes:plugin:terminals:write', { id: info.id, data }).catch(() => {}) }) } @@ -84,7 +84,7 @@ // (a read-only aggregated session has no controllable TTY). if (!isForeign) { term.onResize(({ cols, rows }) => { - rpc.call('devframes-plugin-terminals:resize', { id: info.id, cols, rows }).catch(() => {}) + rpc.call('devframes:plugin:terminals:resize', { id: info.id, cols, rows }).catch(() => {}) }) } else if (info.mode === 'interactive') { diff --git a/plugins/terminals/src/constants.ts b/plugins/terminals/src/constants.ts index 1d19ab2e..faada371 100644 --- a/plugins/terminals/src/constants.ts +++ b/plugins/terminals/src/constants.ts @@ -1,12 +1,12 @@ /** Stable devframe id for the terminals plugin. */ -export const PLUGIN_ID = 'devframes-plugin-terminals' +export const PLUGIN_ID = 'devframes_plugin_terminals' /** * Streaming channel carrying terminal output. Each session is a stream * keyed by the session id, so clients subscribe by id the moment they * see a session in the shared-state list. */ -export const TERMINAL_STREAM_CHANNEL = 'devframes-plugin-terminals:output' +export const TERMINAL_STREAM_CHANNEL = 'devframes:plugin:terminals:output' /** * Streaming channel the hub's own terminals subsystem (`ctx.terminals`) uses @@ -18,10 +18,10 @@ export const TERMINAL_STREAM_CHANNEL = 'devframes-plugin-terminals:output' export const HUB_TERMINAL_STREAM_CHANNEL = 'devframe:terminals' /** Shared-state key holding the serializable session list. */ -export const SESSIONS_STATE_KEY = 'devframes-plugin-terminals:sessions' +export const SESSIONS_STATE_KEY = 'devframes:plugin:terminals:sessions' /** Shared-state key holding the spawnable command presets. */ -export const PRESETS_STATE_KEY = 'devframes-plugin-terminals:presets' +export const PRESETS_STATE_KEY = 'devframes:plugin:terminals:presets' /** * Shared-state key the hub (`@devframes/hub`) mirrors the most recent dock diff --git a/plugins/terminals/src/node/manager.ts b/plugins/terminals/src/node/manager.ts index 12d05957..dcd5ab7a 100644 --- a/plugins/terminals/src/node/manager.ts +++ b/plugins/terminals/src/node/manager.ts @@ -109,7 +109,7 @@ function defaultShell(): string { /** * Owns terminal session lifecycle: spawns PTY / piped backends, streams - * their output over the `devframes-plugin-terminals:output` channel (one + * their output over the `devframes:plugin:terminals:output` channel (one * stream per session, stable for the session's whole life so restarts reuse * the same id), and mirrors a serializable session list into shared state. */ diff --git a/plugins/terminals/src/rpc/functions/list.ts b/plugins/terminals/src/rpc/functions/list.ts index b4f338b1..1f01bcf2 100644 --- a/plugins/terminals/src/rpc/functions/list.ts +++ b/plugins/terminals/src/rpc/functions/list.ts @@ -4,7 +4,7 @@ import { getTerminalManager } from '../../node/context' import { sessionInfoSchema } from '../schemas' export const list = defineRpcFunction({ - name: 'devframes-plugin-terminals:list', + name: 'devframes:plugin:terminals:list', type: 'query', jsonSerializable: true, snapshot: true, diff --git a/plugins/terminals/src/rpc/functions/presets.ts b/plugins/terminals/src/rpc/functions/presets.ts index 6d536f49..e5c71fee 100644 --- a/plugins/terminals/src/rpc/functions/presets.ts +++ b/plugins/terminals/src/rpc/functions/presets.ts @@ -4,7 +4,7 @@ import { getTerminalManager } from '../../node/context' import { presetSchema } from '../schemas' export const presets = defineRpcFunction({ - name: 'devframes-plugin-terminals:presets', + name: 'devframes:plugin:terminals:presets', type: 'query', jsonSerializable: true, snapshot: true, diff --git a/plugins/terminals/src/rpc/functions/remove.ts b/plugins/terminals/src/rpc/functions/remove.ts index a629ce19..be91aa1c 100644 --- a/plugins/terminals/src/rpc/functions/remove.ts +++ b/plugins/terminals/src/rpc/functions/remove.ts @@ -3,7 +3,7 @@ import * as v from 'valibot' import { getTerminalManager } from '../../node/context' export const remove = defineRpcFunction({ - name: 'devframes-plugin-terminals:remove', + name: 'devframes:plugin:terminals:remove', type: 'action', jsonSerializable: true, args: [v.object({ id: v.string() })], diff --git a/plugins/terminals/src/rpc/functions/rename.ts b/plugins/terminals/src/rpc/functions/rename.ts index 88b39f90..8eac1d0c 100644 --- a/plugins/terminals/src/rpc/functions/rename.ts +++ b/plugins/terminals/src/rpc/functions/rename.ts @@ -3,7 +3,7 @@ import * as v from 'valibot' import { getTerminalManager } from '../../node/context' export const rename = defineRpcFunction({ - name: 'devframes-plugin-terminals:rename', + name: 'devframes:plugin:terminals:rename', type: 'action', jsonSerializable: true, args: [v.object({ id: v.string(), title: v.string() })], diff --git a/plugins/terminals/src/rpc/functions/resize.ts b/plugins/terminals/src/rpc/functions/resize.ts index 142639ce..e92e0e0e 100644 --- a/plugins/terminals/src/rpc/functions/resize.ts +++ b/plugins/terminals/src/rpc/functions/resize.ts @@ -3,7 +3,7 @@ import * as v from 'valibot' import { getTerminalManager } from '../../node/context' export const resize = defineRpcFunction({ - name: 'devframes-plugin-terminals:resize', + name: 'devframes:plugin:terminals:resize', type: 'action', jsonSerializable: true, args: [v.object({ diff --git a/plugins/terminals/src/rpc/functions/restart.ts b/plugins/terminals/src/rpc/functions/restart.ts index f6ccc4f4..eb8f9f9c 100644 --- a/plugins/terminals/src/rpc/functions/restart.ts +++ b/plugins/terminals/src/rpc/functions/restart.ts @@ -4,7 +4,7 @@ import { getTerminalManager } from '../../node/context' import { sessionInfoSchema } from '../schemas' export const restart = defineRpcFunction({ - name: 'devframes-plugin-terminals:restart', + name: 'devframes:plugin:terminals:restart', type: 'action', jsonSerializable: true, args: [v.object({ id: v.string() })], diff --git a/plugins/terminals/src/rpc/functions/spawn.ts b/plugins/terminals/src/rpc/functions/spawn.ts index 187b8cf8..1c93262d 100644 --- a/plugins/terminals/src/rpc/functions/spawn.ts +++ b/plugins/terminals/src/rpc/functions/spawn.ts @@ -3,7 +3,7 @@ import { getTerminalManager } from '../../node/context' import { sessionInfoSchema, spawnRequestSchema } from '../schemas' export const spawn = defineRpcFunction({ - name: 'devframes-plugin-terminals:spawn', + name: 'devframes:plugin:terminals:spawn', type: 'action', jsonSerializable: true, args: [spawnRequestSchema], diff --git a/plugins/terminals/src/rpc/functions/terminate.ts b/plugins/terminals/src/rpc/functions/terminate.ts index b1da4af6..b3fc0dc6 100644 --- a/plugins/terminals/src/rpc/functions/terminate.ts +++ b/plugins/terminals/src/rpc/functions/terminate.ts @@ -3,7 +3,7 @@ import * as v from 'valibot' import { getTerminalManager } from '../../node/context' export const terminate = defineRpcFunction({ - name: 'devframes-plugin-terminals:terminate', + name: 'devframes:plugin:terminals:terminate', type: 'action', jsonSerializable: true, args: [v.object({ id: v.string() })], diff --git a/plugins/terminals/src/rpc/functions/write.ts b/plugins/terminals/src/rpc/functions/write.ts index b59461b8..147acbc3 100644 --- a/plugins/terminals/src/rpc/functions/write.ts +++ b/plugins/terminals/src/rpc/functions/write.ts @@ -3,7 +3,7 @@ import * as v from 'valibot' import { getTerminalManager } from '../../node/context' export const write = defineRpcFunction({ - name: 'devframes-plugin-terminals:write', + name: 'devframes:plugin:terminals:write', type: 'action', jsonSerializable: true, args: [v.object({ id: v.string(), data: v.string() })], diff --git a/plugins/terminals/src/rpc/index.ts b/plugins/terminals/src/rpc/index.ts index d5d1d175..520c916a 100644 --- a/plugins/terminals/src/rpc/index.ts +++ b/plugins/terminals/src/rpc/index.ts @@ -26,7 +26,7 @@ declare module 'devframe' { interface DevframeRpcServerFunctions extends RpcDefinitionsToFunctions {} interface DevframeRpcSharedStates { - 'devframes-plugin-terminals:sessions': TerminalsSharedState - 'devframes-plugin-terminals:presets': { presets: TerminalPreset[] } + 'devframes:plugin:terminals:sessions': TerminalsSharedState + 'devframes:plugin:terminals:presets': { presets: TerminalPreset[] } } } diff --git a/plugins/terminals/src/types.ts b/plugins/terminals/src/types.ts index 310016b5..fbb62ec2 100644 --- a/plugins/terminals/src/types.ts +++ b/plugins/terminals/src/types.ts @@ -17,7 +17,7 @@ export type TerminalBackend = 'pty' | 'pipe' /** * Serializable descriptor for a single terminal session. Lives in the - * `devframes-plugin-terminals:sessions` shared state and is returned by the + * `devframes:plugin:terminals:sessions` shared state and is returned by the * `list` RPC. */ export interface TerminalSessionInfo { diff --git a/plugins/terminals/test/terminals.test.ts b/plugins/terminals/test/terminals.test.ts index 4cccfe3c..afe81429 100644 --- a/plugins/terminals/test/terminals.test.ts +++ b/plugins/terminals/test/terminals.test.ts @@ -45,7 +45,7 @@ describe('@devframes/plugin-terminals', () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'process.stdout.write("hello-readonly")'], mode: 'readonly', @@ -69,7 +69,7 @@ describe('@devframes/plugin-terminals', () => { // A piped child has no TTY to apply ONLCR, so it emits bare `\n`. Without // normalization xterm renders a staircase; the backend must translate lone // `\n` to `\r\n` while leaving an existing `\r\n` untouched. - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'process.stdout.write("a\\nb\\r\\nc")'], mode: 'readonly', @@ -86,14 +86,14 @@ describe('@devframes/plugin-terminals', () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'setInterval(() => {}, 1000)'], mode: 'readonly', }) await expect( - call(client, 'devframes-plugin-terminals:write', { id: info.id, data: 'x' }), + call(client, 'devframes:plugin:terminals:write', { id: info.id, data: 'x' }), ).rejects.toThrow(/read-only/i) }) @@ -101,7 +101,7 @@ describe('@devframes/plugin-terminals', () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'process.stdin.on("data", d => process.stdout.write("echo:" + d)); setTimeout(() => {}, 4000)'], mode: 'interactive', @@ -110,7 +110,7 @@ describe('@devframes/plugin-terminals', () => { const reader = subscribe(client, info.id) await new Promise(r => setTimeout(r, 200)) - await call(client, 'devframes-plugin-terminals:write', { id: info.id, data: 'ping\n' }) + await call(client, 'devframes:plugin:terminals:write', { id: info.id, data: 'ping\n' }) const output = await collectUntil(reader, acc => acc.includes('echo:ping')) expect(output).toContain('echo:ping') @@ -120,7 +120,7 @@ describe('@devframes/plugin-terminals', () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'process.stdout.write("isTTY=" + process.stdout.isTTY)'], mode: 'interactive', @@ -135,7 +135,7 @@ describe('@devframes/plugin-terminals', () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'process.stdout.write("cols=" + process.stdout.columns); process.on("SIGWINCH", () => process.stdout.write(" winch=" + process.stdout.columns)); setInterval(() => {}, 4000)'], mode: 'interactive', @@ -145,7 +145,7 @@ describe('@devframes/plugin-terminals', () => { const reader = subscribe(client, info.id) await new Promise(r => setTimeout(r, 200)) - await call(client, 'devframes-plugin-terminals:resize', { id: info.id, cols: 120, rows: 40 }) + await call(client, 'devframes:plugin:terminals:resize', { id: info.id, cols: 120, rows: 40 }) const output = await collectUntil(reader, acc => acc.includes('winch=')) expect(output).toContain('winch=120') @@ -155,13 +155,13 @@ describe('@devframes/plugin-terminals', () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'process.stdout.write("run")'], mode: 'readonly', }) - const restarted = await call(client, 'devframes-plugin-terminals:restart', { id: info.id }) + const restarted = await call(client, 'devframes:plugin:terminals:restart', { id: info.id }) expect(restarted.id).toBe(info.id) expect(restarted.status).toBe('running') }) @@ -170,7 +170,7 @@ describe('@devframes/plugin-terminals', () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'setInterval(() => {}, 4000)'], mode: 'interactive', @@ -182,7 +182,7 @@ describe('@devframes/plugin-terminals', () => { expect(s?.processName?.toLowerCase()).toContain('node') }, { timeout: 4000 }) - await call(client, 'devframes-plugin-terminals:remove', { id: info.id }) + await call(client, 'devframes:plugin:terminals:remove', { id: info.id }) }) it('tracks the title and cwd a program reports via OSC escapes', async () => { @@ -191,7 +191,7 @@ describe('@devframes/plugin-terminals', () => { // OSC parsing rides the output stream, so it works for every backend — // a readonly piped session keeps this test deterministic cross-platform. - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'process.stdout.write("\\x1B]2;osc-title\\x07\\x1B]7;file://localhost/tmp/osc-cwd\\x07"); setInterval(() => {}, 1000)'], mode: 'readonly', @@ -204,46 +204,46 @@ describe('@devframes/plugin-terminals', () => { expect(s?.termCwd).toBe('/tmp/osc-cwd') }) - await call(client, 'devframes-plugin-terminals:remove', { id: info.id }) + await call(client, 'devframes:plugin:terminals:remove', { id: info.id }) }) it('supports custom renaming via the rename RPC', async () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'setInterval(() => {}, 4000)'], mode: 'readonly', }) - await call(client, 'devframes-plugin-terminals:rename', { id: info.id, title: 'My Build' }) - let list = await call(client, 'devframes-plugin-terminals:list') + await call(client, 'devframes:plugin:terminals:rename', { id: info.id, title: 'My Build' }) + let list = await call(client, 'devframes:plugin:terminals:list') expect(list.find(s => s.id === info.id)?.customTitle).toBe('My Build') // Empty string clears the custom name. - await call(client, 'devframes-plugin-terminals:rename', { id: info.id, title: ' ' }) - list = await call(client, 'devframes-plugin-terminals:list') + await call(client, 'devframes:plugin:terminals:rename', { id: info.id, title: ' ' }) + list = await call(client, 'devframes:plugin:terminals:list') expect(list.find(s => s.id === info.id)?.customTitle).toBeUndefined() - await call(client, 'devframes-plugin-terminals:remove', { id: info.id }) + await call(client, 'devframes:plugin:terminals:remove', { id: info.id }) }) it('lists sessions and removes them', async () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'setInterval(() => {}, 1000)'], mode: 'readonly', }) - let list = await call(client, 'devframes-plugin-terminals:list') + let list = await call(client, 'devframes:plugin:terminals:list') expect(list.some(s => s.id === info.id)).toBe(true) - await call(client, 'devframes-plugin-terminals:remove', { id: info.id }) - list = await call(client, 'devframes-plugin-terminals:list') + await call(client, 'devframes:plugin:terminals:remove', { id: info.id }) + list = await call(client, 'devframes:plugin:terminals:list') expect(list.some(s => s.id === info.id)).toBe(false) }) @@ -255,10 +255,10 @@ describe('@devframes/plugin-terminals', () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const presets = await call(client, 'devframes-plugin-terminals:presets') + const presets = await call(client, 'devframes:plugin:terminals:presets') expect(presets.map(p => p.id)).toContain('greet') - const info = await call(client, 'devframes-plugin-terminals:spawn', { presetId: 'greet' }) + const info = await call(client, 'devframes:plugin:terminals:spawn', { presetId: 'greet' }) expect(info.presetId).toBe('greet') const reader = subscribe(client, info.id) @@ -273,7 +273,7 @@ describe('@devframes/plugin-terminals', () => { await new Promise(r => setTimeout(r, 50)) await expect( - call(client, 'devframes-plugin-terminals:spawn', { command: 'definitely-not-allowed', mode: 'readonly' }), + call(client, 'devframes:plugin:terminals:spawn', { command: 'definitely-not-allowed', mode: 'readonly' }), ).rejects.toThrow() }) @@ -287,15 +287,15 @@ describe('@devframes/plugin-terminals', () => { // Another devframe (e.g. code-server) registers into the hub. hub.register({ - id: 'devframes-plugin-code-server', + id: 'devframes_plugin_code-server', title: 'Code Server', description: '/work', status: 'running', icon: 'ph:code-duotone', }) - const list = await call(client, 'devframes-plugin-terminals:list') - const cs = list.find(s => s.id === 'devframes-plugin-code-server') + const list = await call(client, 'devframes:plugin:terminals:list') + const cs = list.find(s => s.id === 'devframes_plugin_code-server') expect(cs).toBeDefined() expect(cs?.title).toBe('Code Server') // Hub dock icon normalized to the client's UnoCSS icon class. @@ -306,14 +306,14 @@ describe('@devframes/plugin-terminals', () => { expect(cs?.channel).toBe('devframe:terminals') // A stopped hub session maps onto the plugin's 'exited' status. - hub.update({ id: 'devframes-plugin-code-server', status: 'stopped' }) - const afterStop = await call(client, 'devframes-plugin-terminals:list') - expect(afterStop.find(s => s.id === 'devframes-plugin-code-server')?.status).toBe('exited') + hub.update({ id: 'devframes_plugin_code-server', status: 'stopped' }) + const afterStop = await call(client, 'devframes:plugin:terminals:list') + expect(afterStop.find(s => s.id === 'devframes_plugin_code-server')?.status).toBe('exited') // Removing it from the hub drops it from the plugin's list. - hub.remove({ id: 'devframes-plugin-code-server' }) - const afterRemove = await call(client, 'devframes-plugin-terminals:list') - expect(afterRemove.some(s => s.id === 'devframes-plugin-code-server')).toBe(false) + hub.remove({ id: 'devframes_plugin_code-server' }) + const afterRemove = await call(client, 'devframes:plugin:terminals:list') + expect(afterRemove.some(s => s.id === 'devframes_plugin_code-server')).toBe(false) }) it('mirrors its own sessions into the hub without looping', async () => { @@ -323,7 +323,7 @@ describe('@devframes/plugin-terminals', () => { const client = bootClient(server.port) await new Promise(r => setTimeout(r, 50)) - const info = await call(client, 'devframes-plugin-terminals:spawn', { + const info = await call(client, 'devframes:plugin:terminals:spawn', { command: NODE, args: ['-e', 'setInterval(() => {}, 1000)'], mode: 'readonly', @@ -334,12 +334,12 @@ describe('@devframes/plugin-terminals', () => { await vi.waitFor(() => { expect(hub.sessions.has(info.id)).toBe(true) }) - const list = await call(client, 'devframes-plugin-terminals:list') + const list = await call(client, 'devframes:plugin:terminals:list') expect(list.filter(s => s.id === info.id)).toHaveLength(1) // Own sessions carry no aggregation channel (owned + controllable). expect(list.find(s => s.id === info.id)?.channel).toBeUndefined() - await call(client, 'devframes-plugin-terminals:remove', { id: info.id }) + await call(client, 'devframes:plugin:terminals:remove', { id: info.id }) }) }) }) diff --git a/tests/__snapshots__/tsnapi/@devframes/plugin-code-server/rpc.snapshot.d.ts b/tests/__snapshots__/tsnapi/@devframes/plugin-code-server/rpc.snapshot.d.ts index bd2917ba..ca1fb917 100644 --- a/tests/__snapshots__/tsnapi/@devframes/plugin-code-server/rpc.snapshot.d.ts +++ b/tests/__snapshots__/tsnapi/@devframes/plugin-code-server/rpc.snapshot.d.ts @@ -3,7 +3,7 @@ */ // #region Variables export declare const serverFunctions: readonly [{ - name: "devframes-plugin-code-server:detect"; + name: "devframes:plugin:code-server:detect"; type?: "query" | undefined; cacheable?: boolean; args?: undefined; @@ -17,7 +17,7 @@ export declare const serverFunctions: readonly [{ __cache?: WeakMap>>> | undefined; __promise?: import("devframe/rpc").Thenable>> | undefined; }, { - name: "devframes-plugin-code-server:status"; + name: "devframes:plugin:code-server:status"; type?: "query" | undefined; cacheable?: boolean; args?: undefined; @@ -31,7 +31,7 @@ export declare const serverFunctions: readonly [{ __cache?: WeakMap>> | undefined; __promise?: import("devframe/rpc").Thenable> | undefined; }, { - name: "devframes-plugin-code-server:start"; + name: "devframes:plugin:code-server:start"; type?: "action" | undefined; cacheable?: boolean; args?: undefined; @@ -45,7 +45,7 @@ export declare const serverFunctions: readonly [{ __cache?: WeakMap>>> | undefined; __promise?: import("devframe/rpc").Thenable>> | undefined; }, { - name: "devframes-plugin-code-server:stop"; + name: "devframes:plugin:code-server:stop"; type?: "action" | undefined; cacheable?: boolean; args?: undefined; diff --git a/tests/__snapshots__/tsnapi/@devframes/plugin-messages/rpc.snapshot.d.ts b/tests/__snapshots__/tsnapi/@devframes/plugin-messages/rpc.snapshot.d.ts index eb5ffe46..1d267a3d 100644 --- a/tests/__snapshots__/tsnapi/@devframes/plugin-messages/rpc.snapshot.d.ts +++ b/tests/__snapshots__/tsnapi/@devframes/plugin-messages/rpc.snapshot.d.ts @@ -3,7 +3,7 @@ */ // #region Variables export declare const serverFunctions: readonly [{ - name: "devframes-plugin-messages:list"; + name: "devframes:plugin:messages:list"; type?: "query" | undefined; cacheable?: boolean; args?: undefined; @@ -17,7 +17,7 @@ export declare const serverFunctions: readonly [{ __cache?: WeakMap>>> | undefined; __promise?: import("devframe/rpc").Thenable>> | undefined; }, { - name: "devframes-plugin-messages:add"; + name: "devframes:plugin:messages:add"; type?: "action" | undefined; cacheable?: boolean; args?: undefined; @@ -31,7 +31,7 @@ export declare const serverFunctions: readonly [{ __cache?: WeakMap>>> | undefined; __promise?: import("devframe/rpc").Thenable>> | undefined; }, { - name: "devframes-plugin-messages:update"; + name: "devframes:plugin:messages:update"; type?: "action" | undefined; cacheable?: boolean; args?: undefined; @@ -45,7 +45,7 @@ export declare const serverFunctions: readonly [{ __cache?: WeakMap], Promise>>> | undefined; __promise?: import("devframe/rpc").Thenable], Promise>> | undefined; }, { - name: "devframes-plugin-messages:remove"; + name: "devframes:plugin:messages:remove"; type?: "action" | undefined; cacheable?: boolean; args?: undefined; @@ -59,7 +59,7 @@ export declare const serverFunctions: readonly [{ __cache?: WeakMap>>> | undefined; __promise?: import("devframe/rpc").Thenable>> | undefined; }, { - name: "devframes-plugin-messages:clear"; + name: "devframes:plugin:messages:clear"; type?: "action" | undefined; cacheable?: boolean; args?: undefined; diff --git a/tests/__snapshots__/tsnapi/@devframes/plugin-terminals/rpc.snapshot.d.ts b/tests/__snapshots__/tsnapi/@devframes/plugin-terminals/rpc.snapshot.d.ts index 4de51be1..5465556d 100644 --- a/tests/__snapshots__/tsnapi/@devframes/plugin-terminals/rpc.snapshot.d.ts +++ b/tests/__snapshots__/tsnapi/@devframes/plugin-terminals/rpc.snapshot.d.ts @@ -3,7 +3,7 @@ */ // #region Variables export declare const serverFunctions: readonly [{ - name: "devframes-plugin-terminals:list"; + name: "devframes:plugin:terminals:list"; type?: "query" | undefined; cacheable?: boolean; args: readonly []; @@ -131,7 +131,7 @@ export declare const serverFunctions: readonly [{ createdAt: number; }[]>> | undefined; }, { - name: "devframes-plugin-terminals:presets"; + name: "devframes:plugin:terminals:presets"; type?: "query" | undefined; cacheable?: boolean; args: readonly []; @@ -187,7 +187,7 @@ export declare const serverFunctions: readonly [{ icon?: string | undefined; }[]>> | undefined; }, { - name: "devframes-plugin-terminals:spawn"; + name: "devframes:plugin:terminals:spawn"; type?: "action" | undefined; cacheable?: boolean; args: readonly [import("valibot").ObjectSchema<{ @@ -385,7 +385,7 @@ export declare const serverFunctions: readonly [{ createdAt: number; }>> | undefined; }, { - name: "devframes-plugin-terminals:write"; + name: "devframes:plugin:terminals:write"; type?: "action" | undefined; cacheable?: boolean; args: readonly [import("valibot").ObjectSchema<{ @@ -417,7 +417,7 @@ export declare const serverFunctions: readonly [{ data: string; }], void>> | undefined; }, { - name: "devframes-plugin-terminals:resize"; + name: "devframes:plugin:terminals:resize"; type?: "action" | undefined; cacheable?: boolean; args: readonly [import("valibot").ObjectSchema<{ @@ -455,7 +455,7 @@ export declare const serverFunctions: readonly [{ rows: number; }], void>> | undefined; }, { - name: "devframes-plugin-terminals:terminate"; + name: "devframes:plugin:terminals:terminate"; type?: "action" | undefined; cacheable?: boolean; args: readonly [import("valibot").ObjectSchema<{ @@ -481,7 +481,7 @@ export declare const serverFunctions: readonly [{ id: string; }], void>> | undefined; }, { - name: "devframes-plugin-terminals:restart"; + name: "devframes:plugin:terminals:restart"; type?: "action" | undefined; cacheable?: boolean; args: readonly [import("valibot").ObjectSchema<{ @@ -621,7 +621,7 @@ export declare const serverFunctions: readonly [{ createdAt: number; }>> | undefined; }, { - name: "devframes-plugin-terminals:rename"; + name: "devframes:plugin:terminals:rename"; type?: "action" | undefined; cacheable?: boolean; args: readonly [import("valibot").ObjectSchema<{ @@ -653,7 +653,7 @@ export declare const serverFunctions: readonly [{ title: string; }], void>> | undefined; }, { - name: "devframes-plugin-terminals:remove"; + name: "devframes:plugin:terminals:remove"; type?: "action" | undefined; cacheable?: boolean; args: readonly [import("valibot").ObjectSchema<{