* refactor(exports): consolidate type entries and remove obsolete subpaths * fix(exports): preserve constructors while retiring brand subpaths * fix(exports): retain guide relocation after parent squash
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
/** Standalone command identities and compatibility constructors, without Cordis registration effects. */
|
|
|
|
import type { Branded } from '@deepseek-ai/dsh-brand'
|
|
|
|
/** Stable, plugin-owned identity of a command definition, independent of its name and copy. */
|
|
export type CommandDefinitionId = Branded<'CommandDefinitionId'>
|
|
|
|
/**
|
|
* Brand a plugin-namespaced command definition identity.
|
|
* @param id - stable identity chosen by the registering plugin.
|
|
* @returns the same string, branded; no validation is performed.
|
|
*/
|
|
export function CommandDefinitionId(id: string): CommandDefinitionId {
|
|
return id as CommandDefinitionId
|
|
}
|
|
|
|
/**
|
|
* Pairs one command execution's `command/run`/`command/done` lifecycle
|
|
* records with each other and with the `command.execute` admission response.
|
|
* Minted by the executor, monotonic per service instance.
|
|
*/
|
|
export type CommandId = Branded<'CommandId'>
|
|
|
|
/**
|
|
* Brand a string as a {@link CommandId}.
|
|
* @param id - the executor-minted pairing id.
|
|
* @returns the same string, branded; no validation is performed.
|
|
*/
|
|
export function CommandId(id: string): CommandId {
|
|
return id as CommandId
|
|
}
|