Skip to main content
The shared package provides the common type definitions, validation schemas, and utility functions used across all Toolshed packages.

Schemas

See Schema Reference for the complete field-by-field documentation.
SchemaDescription
ToolDefinitionSchemaTool with path, name, schemas, destructive flag
RoleSchemaRole with ID, name, and glob patterns
AuditEntrySchemaAudit trail entry
ElicitationRequestSchemaPending approval request
ElicitationResponseSchemaApproval response with approved boolean
SerializedCatalogSchemaWire format for the tool catalog
ToolRegistrationSchemaTool entry in the catalog
SourceRegistrationSchemaSource entry in the catalog
RunRequestSchemaScript execution request
SearchToolsRequestSchemaTool search request
ReadToolRequestSchemaTool lookup request
ResumeRequestSchemaElicitation resume request

Types

TypeInferred fromDescription
ToolDefinitionToolDefinitionSchemaA registered tool
RoleRoleSchemaA user role
AuditEntryAuditEntrySchemaAn audit log entry
ElicitationRequestElicitationRequestSchemaAn approval request
ElicitationResponseElicitationResponseSchemaAn approval response

Interfaces

InterfaceDescription
PluginManifestPlugin metadata: id, name, description, tools, authProviders
AuthProviderAuth config: id, type, provider, scopes
PluginContextHandler context: userId, role, auth, elicit, logger
AuthResolvergetToken(provider): Promise<string>
ElicitFn(request) => Promise<ElicitationResponse>
Loggerinfo(), warn(), error() with optional metadata
See PluginContext Reference for full details.

Utility functions

serializeCatalog(tools, sources): SerializedCatalog

Serializes tools and sources into the wire format, deduplicating JSON Schema objects into a shared type dictionary.

deserializeCatalog(catalog): { tools, sources }

Deserializes the wire format back into ToolDefinition[] and SourceRegistration[].

searchTools(tools, query, limit?): ToolDefinition[]

Weighted fuzzy search across tool paths, names, and descriptions. Uses AND semantics for multi-token queries.