Scan your whole stack
Are you using @mosetta/server-action?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.0.42
@mosetta/server-action was last scanned on 27 Nov 2026 at version 0.0.42. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.0.42 LATEST | 27 Nov 2026 | No rules fired |
| 0.0.41 | 27 Nov 2026 | No rules fired |
| 0.0.40 | 27 Nov 2026 | No rules fired |
| 0.0.39 | 26 Nov 2026 | Not shown |
| 0.0.38 | 26 Nov 2026 | Not shown |
Findings for v0.0.42. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.0.42; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Server actions of the mosetta protocol: server code that ships with a tile and is called from its component side.
A tile's server side declares actions. Every action says who may call it (authorize), what it
takes (a zod schema) and what it does; the host vouches for the caller, the action decides:
// tiles/greeting/greeting.server.ts
import { ServerActionToken } from '@mosetta/server-action/core';
import { DiServerAction, defineServerSide, ServerAction } from '@mosetta/server-action/server';
import type { ICreateSchema, IServerActionPayload } from '@mosetta/server-action/server';
export const greetToken = new ServerActionToken<{ q: string }, { answer: string }>({ actionName: 'greet' });
@DiServerAction(greetToken)
class GreetAction extends ServerAction<{ q: string }, { answer: string }> {
authorize() {
return true; // anyone may ask
}
action({ input }: IServerActionPayload<{ q: string }>) {
return Promise.resolve({ answer: `hello ${input.q}` });
}
createSchema({ builder }: ICreateSchema) {
return builder.object({ q: builder.string() });
}
}
export default defineServerSide({ services: [GreetAction] });
The component side calls it with useServerAction from @mosetta/react/server-action; during
server rendering the same call runs on the server, so the page arrives with the data in it.
Beside the input, an action gets the block it is called from — block: { page, node, reference, settings, draft }, or null. The browser only says which block on which page calls; the host reads
that block from the page itself, so its settings are the site author's, never the caller's.
An action that works for a while and has something to say along the way — an answer written word by
word, a build's steps — answers with a stream of events. Its token is a
ServerActionStreamToken<TIn, TEvent>; the server side extends ServerStreamAction and sends events
with emit:
@DiServerStreamAction(askToken, { description: 'Answers a question as it is written' })
class Ask extends ServerStreamAction<{ question: string }, { text: string }> {
authorize({ caller }: IServerActionAccess<{ question: string }>) {
return Boolean(caller);
}
createSchema({ builder }: ICreateSchema) {
return builder.object({ question: builder.string().min(1) });
}
async stream({ input, signal, emit }: IServerStreamPayload<{ question: string }, { text: string }>) {
for await (const words of answer(input.question, { signal })) emit({ text: words });
}
}
Who may call it and what it takes are decided before the stream begins — a refusal is the usual 4xx.
A throw along the way ends the stream with an error the reader gets. When the reader goes away (the
tab closed, Stop pressed) the action's signal aborts and it finishes cleanly; a quiet stream beats
every few seconds, so a long step keeps its connection and a reader who left is noticed. The component
side reads it with useServerActionStream from @mosetta/react/server-action; anything else with a
fetch — streamServerAction from @mosetta/server-action/client.
An action may offer itself as a tool for assistants — a description and a mark beside its
token: @DiServerAction(token, { description: 'Orders, newest first', tool: true, readOnly: true }).
Editors put tools on a site's MCP address; an assistant calls them as the person who signed in, and
the action's authorize decides as always.
A module may also hold handlers: code that answers a route of the site whole — a webhook, a
feed. A handler extends ServerEndpoint, says who may call it (authorize) and answers with its own
Response (any status, headers, a stream):
@DiServerEndpoint('feed', { description: 'The newest articles as RSS', route: '/feed.xml' })
class Feed extends ServerEndpoint {
authorize() {
return true;
}
async handle({ request, endpoint }: IServerEndpointCall) {
return new Response(await rssOf(endpoint.settings), { headers: { 'content-type': 'application/rss+xml' } });
}
}
Any action may answer at an address too — called as at its own route (the JSON body its input, a
GET's query its input); address: { route } beside its description offers it there.
The site's editors give a handler its route (the workbench's API) and its settings: a handler declares
them (settings: (z) => z.object({...}) beside its description) and reads them as
endpoint.settings. What a module offers — its tools with their input as JSON Schema, its handlers
with their settings — its build writes into the site's catalog (describeServices); the site lists it
at GET /api/server-action/.
@mosetta/server-action/mcp speaks the Model Context Protocol from a handler: serveMcp(request, server), and siteActionTools(request, options) — a server whose tools are the site's actions,
each called with an ordinary request carrying the caller's own key. remoteMcpTools(url, options)
is a server whose tools are another MCP server's (a host's own tools for the site, for one), every
list and call forwarded with the caller's key; joinedMcpServers(name, servers, instructions) serves
several as one connector — the first server to name a tool serves it. A tool's answer may carry
pictures ({ type: 'image', data, mimeType }).
| Entry | What it holds |
|---|---|
@mosetta/server-action/server |
defineServerSide, ServerAction, DiServerAction, ServerStreamAction, DiServerStreamAction, ServerEndpoint, DiServerEndpoint, DiInject, jsonSchemaOf; what an action may ask for: the caller, the calling block (BLOCK_TOKEN), the request, the project's secrets by name (SECRETS_TOKEN), its stores (PROVIDERS_TOKEN), the site's tile hosts (TILE_HOSTS_TOKEN) |
@mosetta/server-action/client |
the browser's call of an action; streamServerAction — a streaming action read from anywhere with a fetch |
@mosetta/server-action/mcp |
serveMcp, siteActionTools, remoteMcpTools, joinedMcpServers, toolsOfOffers, signInFirst — MCP from a handler |
@mosetta/server-action/core |
ServerActionToken and ServerActionStreamToken (shared by the server and the component side), readServerActionStream, serialization, the caller and the calling block as the host vouches for them |
An action runs in an isolated line of the factory: its privileges are handed in, never assumed — no store key and no secret value sits in its environment.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.