PermissiveWorkspaceOptions
Type, in @jr2/orchestrator/src/workspace.ts. The signature of an export, or a type that it names, names this type. The Authoring surface page lists each export. This type is not an export of @jr2/orchestrator, so a workflow module does not import it by name.
type PermissiveWorkspaceOptions<TSlots extends string, TInput = unknown> = SandboxOptions<TSlots, TInput> & {
input?: never;
spec: (args: { input: TInput }) => WorkspaceSpec;
};The options of a workspace() with no input: it starts with any input. The input of spec is then unknown, and spec must check it before it reads a field.
Use it for a Workspace that a Pool or another Machine starts. Give the parameter of spec a type to say what that input is: spec: ({ input }: { input: Item }) => …. That also types the input of the Workspace. For a Workspace that a caller starts, declare input.
Fields: each field of SandboxOptions, and these:
input(optional):neverNot present: a
workspace()withoutinputstarts with any input.spec:(args: { input: TInput; }) => WorkspaceSpecA function from the input to the Workspace's
WorkspaceSpec. Itsinputisunknownunless you give the parameter a type:spec: ({ input }: { input: Item }) => ….