mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Merge remote-tracking branch 'origin/master' into feat/web-message-feedback-ui
Resolve additive conflicts in the api-remotes client assembly by keeping both the message-feedback remote mount and master's forwarded-event allowlist, and regenerate the module graph.
This commit is contained in:
@@ -8,6 +8,23 @@ import type { TypeRTClientRemote } from '@deepseek-ai/dsh-type-meta'
|
||||
export type { TypeRTClientRemote as ClientRemote } from '@deepseek-ai/dsh-type-meta'
|
||||
export type {} from '@deepseek-ai/dsh-goal/remote'
|
||||
export type {} from '@deepseek-ai/dsh-message-feedback/remote'
|
||||
// The forwarded-event allowlist's selection seat: without it in the consumer's
|
||||
// compilation face `TypeRTRemoteEvent` is `never` and every `$on` call fails.
|
||||
export type { ApiRemoteForwardedEvent } from '../types.ts'
|
||||
// The owner packages' client-safe `./types` exports supply the `Events`
|
||||
// signatures `$on` hands to a listener, so a consumer reads the very
|
||||
// declaration the Host emits rather than a flattened restatement of it.
|
||||
export type {} from '@deepseek-ai/dsh-commands/types'
|
||||
export type {} from '@deepseek-ai/dsh-credentials/types'
|
||||
export type {} from '@deepseek-ai/dsh-llm/types'
|
||||
export type {} from '@deepseek-ai/dsh-agent-presets/types'
|
||||
export type {} from '@deepseek-ai/dsh-settings/types'
|
||||
/**
|
||||
* The Gateway Client face's own declaration merges, type-only: `ctx.remote` and
|
||||
* with it the `$on`/`$dispatch` surface. Erased at emit, so this facade still
|
||||
* carries no runtime edge to the Gateway implementation.
|
||||
*/
|
||||
export type {} from '@deepseek-ai/dsh-api-gateway/client'
|
||||
|
||||
declare module '@deepseek-ai/cordis' {
|
||||
interface Context {
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
/** Host BFF entry and Loader shell for the Remote contribution assembly. */
|
||||
|
||||
import type { TypeRTForwardableEvent } from '@deepseek-ai/dsh-type-meta'
|
||||
import { API_REMOTE_FORWARDED_EVENTS } from './remote-events.ts'
|
||||
|
||||
// The owner packages' client-safe `./types` exports carry the cordis `Events`
|
||||
// declarations for every allowlisted event. Pulling them into this face is what
|
||||
// makes the shape assertion below judge real signatures rather than an empty
|
||||
// event vocabulary.
|
||||
import type {} from '@deepseek-ai/dsh-commands/types'
|
||||
import type {} from '@deepseek-ai/dsh-credentials/types'
|
||||
import type {} from '@deepseek-ai/dsh-llm/types'
|
||||
import type {} from '@deepseek-ai/dsh-agent-presets/types'
|
||||
import type {} from '@deepseek-ai/dsh-settings/types'
|
||||
|
||||
export {
|
||||
ApiRemoteSessionNotFound,
|
||||
ApiRemoteSubagentSessionOwnership,
|
||||
@@ -13,6 +26,18 @@ export type {
|
||||
ApiRemoteAgentResult,
|
||||
ApiRemoteLookupError,
|
||||
} from './agent-lookup.ts'
|
||||
export { API_REMOTE_FORWARDED_EVENTS } from './remote-events.ts'
|
||||
export type { ApiRemoteForwardedEvent } from './types.ts'
|
||||
|
||||
// Shape gate over the allowlist, kept in the Host face because the Host's event
|
||||
// vocabulary is the authoritative one. It pins three things at compile time:
|
||||
// every entry NAMES a declared event (the predicate is keyed on `keyof
|
||||
// Events`), no entry BINDS a Scope (a scoped event's `ThisParameterType` is not
|
||||
// `unknown`, which is how "must not depend on AgentScope" is stated statically),
|
||||
// and every entry is ONE-WAY (a waterfall or bail shape returns something other
|
||||
// than void and is excluded). Widening the array to an event that fails any of
|
||||
// these fails here, not on the wire.
|
||||
API_REMOTE_FORWARDED_EVENTS satisfies readonly TypeRTForwardableEvent[]
|
||||
|
||||
/** Host plugin body; the selected contributions mount only in Client environments. */
|
||||
export function apply(): void {}
|
||||
|
||||
23
packages/api/remotes/src/remote-events.ts
Normal file
23
packages/api/remotes/src/remote-events.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* The one home of this application's forwarded-Host-event allowlist. Both
|
||||
* compiler faces list this file, so the Host forwarding loop and the consumer
|
||||
* `ctx.remote.$on` key face read one declaration instead of two copies that
|
||||
* could drift; `./types.ts` derives the type projection from it and stays
|
||||
* type-only.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Host events this application forwards to consumers verbatim: no projection,
|
||||
* no redaction, no renaming. The wire name is the Host cordis event name and
|
||||
* the payload is its argument list, so this array is simultaneously the whole
|
||||
* control point over what a consumer can receive and the legal key set of
|
||||
* `ctx.remote.$on`. Forwarding one more event is an entry here and nothing
|
||||
* else.
|
||||
*/
|
||||
export const API_REMOTE_FORWARDED_EVENTS = [
|
||||
'agent-preset/selected',
|
||||
'commands/change',
|
||||
'credentials/updated',
|
||||
'llm/adapters-updated',
|
||||
'settings/document-updated',
|
||||
] as const
|
||||
19
packages/api/remotes/src/types.ts
Normal file
19
packages/api/remotes/src/types.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Type face of the forwarded-Host-event allowlist: the consumer key projection
|
||||
* and the selection seat it fills. The allowlist VALUE lives in
|
||||
* `./remote-events.ts`, keeping this module type-only per the package
|
||||
* convention; both compiler faces list both files, so the Host forwarding loop
|
||||
* and the consumer `ctx.remote.$on` key face read one declaration instead of
|
||||
* two copies that could drift.
|
||||
*
|
||||
* @module @deepseek-ai/dsh-api-remotes/types
|
||||
*/
|
||||
|
||||
import type { API_REMOTE_FORWARDED_EVENTS } from './remote-events.ts'
|
||||
|
||||
/** Type projection of the allowlist; the consumer and the Host read this one. */
|
||||
export type ApiRemoteForwardedEvent = typeof API_REMOTE_FORWARDED_EVENTS[number]
|
||||
|
||||
declare module '@deepseek-ai/dsh-type-meta' {
|
||||
interface TypeRTRemoteEventSelection extends Record<ApiRemoteForwardedEvent, true> {}
|
||||
}
|
||||
Reference in New Issue
Block a user