ChatGPTClaudeGrok / X / CursorGemini

Cordis Inherited Surface: What Plugins Get for Free

Plugin DevelopmentPublished 2026-11-18Author: DeepSeek Plugin Market
DeepSeek HarnessDSH pluginCordisContextTypeScript
Cordis Context gives plugins a shared inherited surface, but services, events, and config still need declarations. Learn the free layer and type/runtime drift.

The most common plugin-author assumption is that Context has everything. It does not: it gives framework-level public interfaces, while services, events, and config still need registration and type extension. Lifecycle, events, logging, and plugin mounting are inherited; your own capabilities are not (source). Separating those layers prevents half of all “type compiles, runtime missing” bugs.

DeepSeek Harness: What the inherited surface is

It is the public contract between the framework and a plugin, not the full set of plugin capabilities. Cordis puts a set of common abilities on Context; a plugin calls them in apply(ctx) instead of creating its own. (source)

The common trait is “every plugin may need this”: listen to events, register side effects, mount child plugins, write logs, declare dependencies. The framework implements them once.

The value is less duplication. If every plugin built its own lifecycle or logger, behavior would drift. The framework owns the mechanism; the plugin writes the business.

The boundary is equally clear: the surface does not contain your service. Whether ctx.myService exists depends on whether a plugin registered it, not on the Context type.

DeepSeek Harness: What the framework gives

The framework gives mechanisms, not business capabilities. Four groups (source):

  1. Lifecycle — load, unload, side effect registration, cleanup.
  2. Events — listen, emit, subscribe by scope.
  3. Dependencies and mounting — declare inject, mount children, access parent context.
  4. Infrastructure — logging, scope, plugin management.

Use the official inherited-surface docs for exact method names; do not write them from memory. A wrong name may compile under any and fail at runtime.

Another property: the surface applies to all plugins. If a capability matters only to one kind of plugin, it does not belong there; make it a Service or Registry.

Ask: remove the capability from Context; does every plugin suffer? If yes, it is inherited surface. If only some, it is business capability.

The surface also changes with framework versions. After upgrading Cordis or DeepSeek Harness, new inherited interfaces can change recommended patterns; “it worked before” is not proof.

DeepSeek Harness: What you must declare

Three things never appear automatically: services, events, and config. Handle them explicitly. (source)

  • Services — register into the context; consumers inject by name. Without registration, they are absent.
  • Events — extend SessionEventMap or the event domain. Without declaration, the type system does not know them and the runtime may reject them.
  • Config — declare fields and defaults in the schema. Without it, settings and patches do not know what to write.

The common rule is “declaration and registration in pairs.” Declare without register: type yes, runtime no. Register without declare: runtime yes, type no.

A useful habit: for every new service or event, write three places — runtime registration, type extension, README. Consumers then have a reliable path.

Config needs defaults and optionality. A required field without a default forces every deployment to supply it; an optional field needs a defined default behavior.

A schema is not a substitute for docs, and docs are not a substitute for a schema. Put descriptions, defaults, and ranges in the schema so forms and patches validate correctly.

DeepSeek Harness: Two type/runtime drift symptoms

Drift runs in two directions. Different symptoms, different fixes (source):

SymptomCommon causeCheck
Type exists, runtime missingdeclare module without registrationDid apply register it?
Runtime exists, type missingRegistration without type extensionAre Context/Events extended?
Both exist, names differRegistration and declaration use different stringsAlign the constant

The first is the most dangerous because compilation passes and runtime fails. It usually happens when types are written before the implementation and the implementation is forgotten.

The second does not fail loudly, but consumers fall back to any or string access. Over time, “everyone knows it exists, nobody dares change it.”

The third is the easiest to fix: define the name once as a constant and use it in both places.

DeepSeek Harness: Three self-checks

After writing a plugin, ask three questions. All three passing means the surface is used correctly (source):

  1. Does every plugin need this? If yes, inherited surface; if no, a Service or Registry.
  2. Is it registered? A type declaration is not registration; apply must contribute it.
  3. How does a consumer find it? Are name, type, and docs aligned? If not, someone will use it wrong.

The order is design, implementation, consumer view. Reversing it loses you in details.

If any answer is unclear, do not add another capability. Clean up the existing services and events first.

DeepSeek Harness: Verify with a consumer call

Verify with a smallest consumer call, not only provider code. Three steps (source):

  1. Type check — the consumer accesses the capability without any.
  2. Runtime call — the call executes, not a no-op.
  3. Unload — after the provider unloads, the consumer gets an explicit unavailable, not an old object.

All three mean surface, registration, and type extension align. Passing the first two only may be a leaked registration handle; passing only the first may be a type without an implementation.

The existing develop-cordis-primer covers Cordis basics, develop-plugin-typescript-augment covers type extension, and develop-plugin-events covers events; this article covers the inherited surface. Separate the free layer from your own, then discuss registration.

A type is a promise and a registration is the delivery; neither replaces the other.

Inherited mechanisms are free; your own capabilities are declared.

ChatGPTClaudeGrok / X / CursorGemini

FAQ

What does a DeepSeek Harness plugin inherit from Cordis Context?

A DeepSeek Harness plugin inherits framework-level public capabilities from Cordis Context, such as lifecycle, event listening, logging, plugin mounting, and dependency injection; the exact list is in the inherited surface docs.

Do a DeepSeek Harness plugin's own services come from Context automatically?

DeepSeek Harness does not work that way. DeepSeek Harness Context provides framework interfaces only; a plugin's services, events, and config need registration and type extension before consumers can see them.

Why does a DeepSeek Harness type exist while the runtime capability does not?

In DeepSeek Harness, usually only declare module was written without a real registration. A DeepSeek Harness TypeScript type does not create runtime capability; declaration and registration must be paired.

What breaks when a DeepSeek Harness capability exists at runtime but has no type?

In DeepSeek Harness, consumers cannot use it safely and may misspell names or arguments. A DeepSeek Harness plugin should extend types and export a clear interface, not leave a capability undocumented.

Related Terms

inherited surface
The inherited surface is the framework-level public interface Cordis Context gives a DeepSeek Harness plugin, including lifecycle, events, logging, and plugin management.— DeepSeek Harness reference - Inherited interface surface
Context
Context is the shared Cordis context a DeepSeek Harness plugin uses to register services, listen to events, mount plugins, and access framework capabilities.— DeepSeek Harness reference - Cordis primer
declare module
declare module is TypeScript module augmentation, used by DeepSeek Harness plugins to add custom services and events to Context and Events types.— DeepSeek Harness reference - Inherited interface surface
type/runtime drift
Type/runtime drift is a DeepSeek Harness state where TypeScript declares a capability that is not registered, or a runtime capability has no type.— DeepSeek Harness reference - Inherited interface surface

Sources