Official Plugins

StreetJS ships a set of official reference plugins built on the plugin system. Each declares a signed manifest, a config schema, capability metadata, a permission set, and lifecycle hooks, and exposes a client whose request building is deterministic and verified offline. The actual network call to the vendor API is a thin wrapper (exercised in CI / with real credentials).

PluginPackage symbolCapabilityDeterministic offline logic
S3S3Pluginobject-storageAWS SigV4 signing
SendGridSendGridPluginemailv3 mail/send request (bearer + JSON)
StripeStripePluginpaymentsform-encoded request (bearer)
TwilioTwilioPluginsmsBasic-auth + form-encoded request
Auth0Auth0Pluginauthclient-credentials token request (JSON)
R2R2Pluginobject-storageS3-compatible SigV4 (region=auto)
NATSNatsPluginmessaging / pubsubdependency-free NATS text protocol (PUB/SUB/MSG codec)
KafkaKafkaPluginmessaging / streamingwraps the dependency-free core Kafka protocol client
RabbitMQRabbitMqPluginmessaging / queuewraps the dependency-free core AMQP 0-9-1 transport
PostgreSQLPostgresPlugindatabase / sqlwraps the native core PgPool (wire v3 + SCRAM)
MySQLMysqlPlugindatabase / sqlwraps the native core MysqlPool
PayPalPayPalPluginpaymentsOAuth2 token + Orders v2 JSON request building
OpenAIOpenAiPluginai / llmbearer + JSON chat/embeddings request building
ClerkClerkPluginauth / identitybearer backend-API request building
SupabaseSupabasePlugindatabase / postgrestapikey + bearer PostgREST request building
FirebaseFirebasePluginauth / identityIdentity Toolkit REST request building
MongoDBMongoDbPlugindatabase / document-storeBSON + OP_MSG + SCRAM-SHA-256 (RFC 7677-verified)

All require permissions ['net','secrets','middleware'] and inject their client into ctx.state on load.

Examples

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { StripeClient } from 'streetjs';
new StripeClient({ apiKey: 'sk_live_…' }).buildCreatePaymentIntent(2000, 'usd');
// POST https://api.stripe.com/v1/payment_intents  body: amount=2000&currency=usd

import { TwilioClient } from 'streetjs';
new TwilioClient({ accountSid: 'AC…', authToken: '', defaultFrom: '+1555…' })
  .buildSendSmsRequest({ to: '+1555…', body: 'hi' });
// POST .../Accounts/AC…/Messages.json  Authorization: Basic base64(sid:token)

import { Auth0Client } from 'streetjs';
new Auth0Client({ domain: 'acme.auth0.com', clientId: 'c', clientSecret: 's', audience: 'https://api/' })
  .buildTokenRequest();
// POST https://acme.auth0.com/oauth/token  grant_type=client_credentials

import { R2Client } from 'streetjs';
new R2Client({ accountId: 'a', bucket: 'media', accessKeyId: 'AK', secretAccessKey: 'SK' })
  .signedObjectHeaders('GET', 'file.bin');
// SigV4 against a.r2.cloudflarestorage.com (service s3, region auto)

Install any of them through a signed PluginHost exactly like S3 / SendGrid.

Verification

  • packages/core/src/tests/plugins-official.test.ts (17 tests): per-plugin config schema, deterministic request building / SigV4 signing, signed install + enable through the host, capability discovery, and permission gating for all four.
  • S3 and SendGrid have their own suites (plugin-s3.test.ts, plugin-sendgrid.test.ts).
1
cd packages/core && npx tsc && node --test dist/src/tests/plugins-official.test.js