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.role: lifecycle classification for the supervisor ('service' | 'task' | …).start: the effect that produces the resolved value. Contributions (routing, snapshots, strategies, projection events, generated files) are emitted inline fromstartvia the per-pluginPluginContextservice —const ctx = yield* PluginContext, thenctx.codegen/ctx.endpoint/ctx.snapshotExtra/ctx.publish/ctx.provides. There is no separatecapabilitiesfield.
The public helpers are available from the root export:
import { definePlugin, PluginContext } 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.
Endpoint routing
Stack endpoints are reached through stable localhost hostnames rather than raw process or container
ports. A hostService(...) dev server binds an automatically assigned process port, while its
routed endpoint stays http://dev.<app>.localhost:5175. That stable route is what generated config,
Playwright helpers, wallet origin policy, and the manifest use.
The same router model covers service endpoints such as wallet, Sui RPC/faucet, Walrus, and Seal: plugins publish named endpoints into the manifest, and the router maps those names to the current upstream process or container port. Non-default stacks insert a stack segment into the hostname so parallel stacks coexist.
Package exports
- The root package exports plugin-author helpers, capability declaration types, brands, lifecycle types, and manifest types.
/contractsand/substrateare not package exports. Internal modules may still exist in source, but app and plugin-author code imports from the root package or build-integration subpaths.