Sign In

@supersurkhet/sdk

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
This package has malicious versions linked to the ongoing "Mini Shai-Hulud" supply chain attack.

Affected versions:

0.0.20.0.30.0.4
+3 more
View campaign page

@supersurkhet/sdk

## Developer experience (today)

latest
npmnpm
Version
0.0.1
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

@supersurkhet/sdk

Developer experience (today)

This is the current flow (without auth/project selection yet):

  • Scaffold a project:
supersurkhet new my-plugin
cd my-plugin
  • Define schema docs in supersurkhet.config.mjs.

  • Generate local TS types from schema docs:

supersurkhet types --config supersurkhet.config.mjs --out supersurkhet/schema.types.ts
  • Link your local directory to a remote project:
supersurkhet link --project <project-id> --endpoint <api-url> --token <api-token>
  • Push local schema snapshot to remote project:
supersurkhet sync-up --config supersurkhet.config.mjs
  • Pull latest snapshot back down:
supersurkhet sync-down --config supersurkhet.config.mjs --out supersurkhet/schema.synced.json

SDK authoring APIs

Define actions + plugin

import { createActionRegistry, definePlugin, defineSchemaDoc } from '@supersurkhet/sdk';

const actions = createActionRegistry().defineAction({
  id: 'product.create',
  handler: async (input: { name: string }) => ({ ok: true, input }),
});

const productSchema = defineSchemaDoc({
  schemaId: 'product',
  fields: [
    {
      key: 'name',
      type: 'string',
      dataType: 'string',
      fieldType: 'string',
    },
    {
      key: 'price',
      type: 'number',
      dataType: 'number',
      fieldType: 'currency',
    },
  ],
});

export default definePlugin({
  pluginId: 'my.plugin',
  version: '0.0.1',
  actions,
  schemaDocs: [productSchema],
});

Zod schema conversion (SDK-patched Zod)

import { defineZodSchemaDoc } from '@supersurkhet/sdk';

const schema = defineZodSchemaDoc({
  schemaId: 'product',
  schema: ({ z }) =>
    z
      .object({
        name: z.string(),
        price: z.number().min(0),
      })
      .withDerivation('isPremium', z.boolean()),
});

Realtime-ready schema sync store

import { createSchemaSyncStore } from '@supersurkhet/sdk';

const store = createSchemaSyncStore();
store.subscribe((envelope) => {
  console.log(envelope.source, envelope.operations);
});
store.upsert(mySchema, 'cli');

FAQs

Package last updated on 25 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts