Mysten Incubation
Internals

Refs and Dependencies

The current plugin dependency model.

Every root factory returns a plugin value. A plugin has one public id, may list dependsOn, and resolves to a typed value from start.

  • id: graph identity and generated default resource id.
  • dependsOn: a single plugin/ref, an array, or an object.
  • kind: lifecycle classification for the supervisor.
  • start: the effect that produces the resolved value.
  • capabilities: optional declarations for routing, snapshots, strategies, projection events, and generated files.

The public helpers are available from the root export:

import { definePlugin, defineCapability, codegenable } from '@mysten-incubation/devstack';

Direct plugin/resource references are the public cross-plugin pattern:

const publisher = account('publisher');
const hello = localPackage('hello', {
	sourcePath: './move/hello',
	publisher,
});

The package factory records publisher in dependsOn. The supervisor then orders the publisher before the publish step, and TypeScript can report a missing provider at the defineDevstack(...) call site.

Package exports:

  • The root package exports plugin-author helpers, capability declaration types, brands, lifecycle types, and manifest types.
  • /contracts and /substrate are not package exports. Internal modules may still exist in source, but app and plugin-author code should import from the root package or build-integration subpaths.