fix(headless): dsh run is a direct core front door
This commit is contained in:
30
packages/core/agent-default-model/src/invariant.ts
Normal file
30
packages/core/agent-default-model/src/invariant.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Package-owned invariant companion for the default Agent model selection.
|
||||
*
|
||||
* The service owns no independent event relationship: settings registration
|
||||
* already validates every mutable value before `currentSelection()` can observe it.
|
||||
* The empty installer keeps that absence explicit in composed invariant sets.
|
||||
*
|
||||
* @module @deepseek-ai/dsh-agent-default-model/invariant
|
||||
*/
|
||||
|
||||
import type { Context } from 'cordis'
|
||||
import type { InvariantInstaller } from '@deepseek-ai/dsh-invariants'
|
||||
|
||||
const PACKAGE_NAME = '@deepseek-ai/dsh-agent-default-model'
|
||||
|
||||
/** Cordis companion plugin name. */
|
||||
export const name = 'agent-default-model-invariant'
|
||||
/** Services required before the companion can register. */
|
||||
export const inject = ['invariants']
|
||||
|
||||
/** No runtime invariant: settings validation owns the only mutable-value relationship. */
|
||||
const install: InvariantInstaller = () => {}
|
||||
|
||||
/**
|
||||
* Register the intentionally empty invariant contribution.
|
||||
* @param ctx - Cordis context carrying the invariant service.
|
||||
* @returns the installed registration's disposer after setup succeeds.
|
||||
*/
|
||||
export const apply = (ctx: Context): Promise<() => void> =>
|
||||
Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install))
|
||||
Reference in New Issue
Block a user