Generated Clients
Use domain methods for normal work and raw calls when you need escape hatches.
SiteKit packages are ordinary client libraries. They do not call an LLM at runtime.
Client methods hide the adapter backend. A method may use direct HTTP, Playwright browser automation, or a hybrid flow, but the TypeScript and Python surface remains stable.
Generated clients expose verified adapter operations. They do not include record synchronization, reconciliation rules, analytics policy, or other app-level workflow logic.
TypeScript
import { createDestinationPortalClient } from '@local/destination-portal';
const destination = await createDestinationPortalClient({
connection: 'destination_portal-local',
});
const users = await destination.users.list({ workspaceId: 'ws_123' });
const events = await destination.events.list({ workspaceId: 'ws_123' });
await destination.records.update({
recordId: 'rec_4745909',
status: 'scheduled',
location: 'Main Office',
confirm: true,
});await expensePortal.expenses.createDraft({
reportName: 'Quarterly field audit',
expenseType: 'Reimbursement',
amount: 146.52,
confirm: true,
});Python
from destination_portal import DestinationPortalClient
client = DestinationPortalClient.from_connection("destination_portal-cron")
events = client.events.list(workspace_id="ws_123")
reports = client.reports.list(workspace_id="ws_123")Connections
The generated client package contains adapter logic. Runtime credentials live in a connection selected by the caller:
sitekit connection create destination_portal-local \
--adapter destination_portal \
--provider 1password \
--item "Destination Portal"sitekit connection create destination_portal-cron \
--adapter destination_portal \
--provider env \
--prefix SITEKIT_DESTINATION_PORTALThis keeps the same generated package usable in a local MCP server, a laptop script, or a cloud pipeline without publishing credentials or session state.
Raw Access
Raw access is available for power users and repair work. It is still authenticated, rate limited, logged, and schema-aware when a schema exists.
const rawWorkspace = await destination.raw.get('/workspaces/ws_123', {
query: {
populate: 'events,users,locations',
},
});Validation
Responses are parsed through generated schemas before domain methods return.
SchemaValidationError
adapter: [email protected]
operation: events.list
path: events[0].location_id
expected: number
received: stringValidation failures are breakage signals. They should stop unattended jobs rather than silently producing wrong data.
Versioning
Adapters are versioned independently of your workflows.
sitekit version destination_portal patch
sitekit generate destination_portal --target typescript --target pythonDownstream pipelines update when they choose:
npm install @local/[email protected]
pip install ./packages/destination-portal-py