@deepseek-ai/dsh-client-ui-cordis 0.0.1-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js ADDED
@@ -0,0 +1,11 @@
1
+ //#region lib/types/index.js
2
+ /**
3
+ * Cordis dynamic-plugin card, node half. Pure UI plugin: the empty apply
4
+ * exists so the plugin appears in the host cordis.yml / Loader; the browser
5
+ * half ships via exports["./client"], discovered through the package.json
6
+ * dshClient declaration.
7
+ */
8
+ /** Host plugin body — no host-side behavior for this surface plugin. */
9
+ function apply() {}
10
+ //#endregion
11
+ export { apply };
@@ -0,0 +1,26 @@
1
+ //#region lib/types/invariant.js
2
+ /**
3
+ * Package-owned invariant companion for `@deepseek-ai/dsh-client-ui-cordis`.
4
+ * @module @deepseek-ai/dsh-client-ui-cordis/invariant
5
+ */
6
+ const PACKAGE_NAME = "@deepseek-ai/dsh-client-ui-cordis";
7
+ /** Cordis companion plugin name. */
8
+ const name = "client-ui-cordis-invariant";
9
+ /** Service required before the companion can reserve package ownership. */
10
+ const inject = ["invariants"];
11
+ /**
12
+ * No runtime invariant: a single keyed toolview registration whose disposal is
13
+ * proven by the HMR-safety spec. The one mutable relation this package owns —
14
+ * the per-definition run-state observable — lives in the browser process, out
15
+ * of reach of the host invariant service, and the node half emits no cordis
16
+ * events and holds no cross-plugin state.
17
+ */
18
+ const install = () => {};
19
+ /**
20
+ * Register this package's invariant companion.
21
+ * @param ctx - Cordis context carrying the invariant service.
22
+ * @returns the installed registration's disposer after setup succeeds.
23
+ */
24
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
25
+ //#endregion
26
+ export { apply, inject, name };
@@ -0,0 +1,8 @@
1
+ /** Localized cards for `cordis_stop` and `cordis_undefine`. */
2
+ import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
4
+ /** Full action-card props composed by the keyed Tool slot. */
5
+ export type CordisActionRowProps = ToolCallViewProps & PropsLocale<'cordis'>;
6
+ /** Render one Stop or Remove call with Cordis-owned localized copy. */
7
+ export declare function CordisActionRow({ callId, toolName, block, inspect, t }: CordisActionRowProps): import("react").JSX.Element;
8
+ //# sourceMappingURL=CordisActionRow.d.ts.map
@@ -0,0 +1,9 @@
1
+ /** Read-only `cordis_define` card with Host and Client source tabs. */
2
+ import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
4
+ import type { CordisCardFace } from './slots.ts';
5
+ /** Full card props composed by the keyed Tool slot. */
6
+ export type CordisDefineRowProps = ToolCallViewProps & InjectFace<CordisCardFace> & PropsLocale<'cordis'>;
7
+ /** Render one immutable Package definition. */
8
+ export declare function CordisDefineRow({ callId, block, inspect, useInventory, useLoaded, t, }: CordisDefineRowProps): import("react").JSX.Element;
9
+ //# sourceMappingURL=CordisDefineRow.d.ts.map
@@ -0,0 +1,8 @@
1
+ /** Frame-wide dynamic Plugin inventory, approvals, versions, and lifecycle actions. */
2
+ import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { CordisPanelFace } from './slots.ts';
4
+ /** Full panel props composed by the sidebar footer-action slot. */
5
+ export type CordisPanelProps = PropsRuntime<'sidebar.footer.action'> & InjectFace<CordisPanelFace> & PropsLocale<'cordis'>;
6
+ /** Render the inventory panel and its unified footer action. */
7
+ export declare function CordisPanel({ wide, useSessions, useInventory, useActiveRuns, useRunErrors, useLoaded, useRenderFailures, onApprove, onDecline, onRun, onStop, onRemove, onRefresh, t, }: CordisPanelProps): import("react").JSX.Element | null;
8
+ //# sourceMappingURL=CordisPanel.d.ts.map
@@ -0,0 +1,9 @@
1
+ /** `cordis_run` card and the host seat for Package-owned interactive UI. */
2
+ import type { InjectFace, PropsLocale, PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
4
+ import type { CordisRunCardFace } from './slots.ts';
5
+ /** Full Run-card props including its declared Package business-view child slot. */
6
+ export type CordisRunRowProps = ToolCallViewProps & InjectFace<CordisRunCardFace> & PropsRenderSlots<'tool.view.cordis'> & PropsLocale<'cordis'>;
7
+ /** Render one activation result and, when eligible, its Package-owned view. */
8
+ export declare function CordisRunRow({ callId, block, inspect, renderSlot, useInventory, useLoaded, useRunCards, useActiveRuns, onObserveRunCard, t, }: CordisRunRowProps): import("react").JSX.Element;
9
+ //# sourceMappingURL=CordisRunRow.d.ts.map
@@ -0,0 +1,56 @@
1
+ /** Replay-stable view models for Cordis lifecycle Tool calls. */
2
+ import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
3
+ import type { CordisDynamicPackageId, CordisDynamicPluginId, CordisDynamicPluginRunId, CordisDynamicRunMode } from './events.ts';
4
+ type Block = ToolCallViewProps['block'];
5
+ /** Lifecycle of the tool call itself. */
6
+ export type CordisToolState = 'running' | 'ok' | 'error' | 'stopped';
7
+ /** Frozen `cordis_define` presentation data. */
8
+ export interface CordisDefineCard {
9
+ readonly pluginId: CordisDynamicPluginId | null;
10
+ readonly packageId: CordisDynamicPackageId | null;
11
+ readonly name: string | null;
12
+ readonly purpose: string | null;
13
+ readonly hostCode: string | null;
14
+ readonly clientCode: string | null;
15
+ readonly output: string | null;
16
+ readonly errorSummary: string | null;
17
+ readonly state: CordisToolState;
18
+ }
19
+ /** Frozen `cordis_run` presentation data. */
20
+ export interface CordisRunCard {
21
+ readonly pluginId: CordisDynamicPluginId | null;
22
+ readonly packageId: CordisDynamicPackageId | null;
23
+ readonly pluginRunId: CordisDynamicPluginRunId | null;
24
+ readonly mode: CordisDynamicRunMode | null;
25
+ readonly seq: number | null;
26
+ readonly output: string | null;
27
+ readonly errorSummary: string | null;
28
+ readonly state: CordisToolState;
29
+ }
30
+ /** Frozen `cordis_stop` or `cordis_undefine` presentation data. */
31
+ export interface CordisActionCard {
32
+ readonly pluginId: CordisDynamicPluginId | null;
33
+ readonly output: string | null;
34
+ readonly errorSummary: string | null;
35
+ readonly state: CordisToolState;
36
+ }
37
+ /**
38
+ * Derive one Define card from its frozen call/result slice.
39
+ * @param block - active or settled tool-call block.
40
+ * @returns normalized Define card fields.
41
+ */
42
+ export declare function cordisDefineCard(block: Block): CordisDefineCard;
43
+ /**
44
+ * Derive one Run card and its successful activation metadata.
45
+ * @param block - active or settled tool-call block.
46
+ * @returns normalized Run card fields.
47
+ */
48
+ export declare function cordisRunCard(block: Block): CordisRunCard;
49
+ /**
50
+ * Derive one Stop or Remove card from its frozen call/result slice.
51
+ * @param block - active or settled tool-call block.
52
+ * @returns normalized lifecycle-action card fields.
53
+ */
54
+ export declare function cordisActionCard(block: Block): CordisActionCard;
55
+ export {};
56
+ //# sourceMappingURL=card-model.d.ts.map
@@ -0,0 +1,22 @@
1
+ /** Host operations used directly by the frame-wide Cordis panel. */
2
+ import type { SessionId } from '@deepseek-ai/dsh-client-connection/client';
3
+ import type { CordisDynamicPluginId, DynamicCordisInventoryRow } from './events.ts';
4
+ /** Result of a panel lifecycle gesture. */
5
+ export type CordisActionResult = {
6
+ readonly ok: true;
7
+ } | {
8
+ readonly ok: false;
9
+ readonly message: string;
10
+ };
11
+ /** RPC seam kept outside the React surface. */
12
+ export interface CordisDynamicPort {
13
+ /** Stop one Plugin while retaining its immutable Packages. */
14
+ stop(sessionId: SessionId, pluginId: CordisDynamicPluginId): Promise<CordisActionResult>;
15
+ /** Stop and remove one Plugin together with every Package. */
16
+ remove(sessionId: SessionId, pluginId: CordisDynamicPluginId): Promise<CordisActionResult>;
17
+ /** Read the frame-wide Plugin inventory. */
18
+ inventory(): Promise<readonly DynamicCordisInventoryRow[]>;
19
+ }
20
+ /** One stable Plugin row as the panel receives it. */
21
+ export type CordisInventoryRow = DynamicCordisInventoryRow;
22
+ //# sourceMappingURL=dynamic-port.d.ts.map
@@ -0,0 +1,3 @@
1
+ /** Client-safe dynamic Cordis vocabulary re-exported through the Remote assembly. */
2
+ export type { ApprovalRequestId, CordisDynamicPackageId, CordisDynamicPluginId, CordisDynamicPluginRunId, CordisDynamicRunMode, DynamicCordisInventoryRow, DynamicCordisPackage, DynamicCordisRequestResolved, DynamicCordisRetracted, DynamicCordisRunRequest, } from '@deepseek-ai/dsh-api-remotes/client';
3
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1,15 @@
1
+ /** Cordis dynamic-plugin cards, inventory panel, business-view host, and `@pluginId` source. */
2
+ import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
3
+ export type { CordisCardFace, CordisPanelFace, CordisRunCardFace, CordisToolViewOwnerProps } from './slots.ts';
4
+ export type { CordisActionResult, CordisDynamicPort, CordisInventoryRow } from './dynamic-port.ts';
5
+ export type { CordisDefineRowProps } from './CordisDefineRow.tsx';
6
+ export type { CordisActionRowProps } from './CordisActionRow.tsx';
7
+ export type { CordisRunRowProps } from './CordisRunRow.tsx';
8
+ export type { CordisRunCardPointer, CordisRunCardStore, CordisToolViewKey, } from './run-card-index.ts';
9
+ export type { ApprovalRequestId, CordisDynamicPackageId, CordisDynamicPluginId, CordisDynamicPluginRunId, DynamicCordisInventoryRow, DynamicCordisPackage, DynamicCordisRetracted, } from './events.ts';
10
+ export type { CordisKey } from './locales.ts';
11
+ /** Required services for the two Tool cards, panel, Remote lifecycle, and Slash source. */
12
+ export declare const inject: string[];
13
+ /** Mount every Cordis browser surface over the shared Host inventory. */
14
+ export declare function apply(ctx: ClientContext): void;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,51 @@
1
+ /**
2
+ * The host's definition registry as this page last read it, owned by the
3
+ * plugin's apply closure.
4
+ *
5
+ * The panel is a frame-wide surface, so it cannot derive this from any session:
6
+ * the registry is global and the read is a single global call. The rows are
7
+ * re-read rather than patched, because the wire announcements
8
+ * (`cordis/dynamic-package` / `/retract`) carry no labels and a definition
9
+ * can appear or disappear between them — a patch-in-place cache would drift into
10
+ * showing definitions the host no longer holds.
11
+ *
12
+ * Reads are single-flight: several announcements settling at once, or a badge
13
+ * opening while a reconnect re-reads, must not multiply the call. Single-flight
14
+ * alone would be wrong across a reconnect, though — the in-flight read belongs to
15
+ * the previous connection, so a reset both discards its answer and frees the slot
16
+ * for a fresh one. Without that, a reconnect either loses its re-read to the old
17
+ * call or has the old host's rows published on top of it.
18
+ */
19
+ import type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots';
20
+ import type { CordisDynamicPort, CordisInventoryRow } from './dynamic-port.ts';
21
+ import type { CordisDynamicPluginId } from './events.ts';
22
+ /** What the panel reads: the rows, and whether the first read has happened. */
23
+ export interface CordisInventorySnapshot {
24
+ readonly rows: readonly CordisInventoryRow[];
25
+ /** Plugins explicitly removed through this page, retained for historical cards. */
26
+ readonly removed: ReadonlySet<CordisDynamicPluginId>;
27
+ /**
28
+ * False until a read settles. The panel shows a loading line rather than an
29
+ * empty state, so "nothing defined yet" is never claimed before it is known.
30
+ */
31
+ readonly read: boolean;
32
+ /** Last read failure, so the panel can say why it is empty. */
33
+ readonly error?: string | undefined;
34
+ }
35
+ /** Inventory source: an observable of the rows plus the read trigger. */
36
+ export interface CordisInventory extends HostObservable<CordisInventorySnapshot> {
37
+ /** Read the registry unless a read is already in flight. */
38
+ refresh(): void;
39
+ /** Record an explicit remove and drop the live row immediately. */
40
+ retire(pluginId: CordisDynamicPluginId): void;
41
+ /** Drop what was read; the next refresh starts from nothing (a reconnect may be a new host). */
42
+ reset(): void;
43
+ }
44
+ /**
45
+ * Create the inventory source.
46
+ * @param port - the RPC seam the read goes through.
47
+ * @param onError - reporter for a failed read (console in production, captured in specs).
48
+ * @returns the inventory observable and its read trigger.
49
+ */
50
+ export declare function createCordisInventory(port: CordisDynamicPort, onError: (error: unknown) => void): CordisInventory;
51
+ //# sourceMappingURL=inventory.d.ts.map
@@ -0,0 +1,115 @@
1
+ /** Cordis dynamic-plugin UI dictionaries. */
2
+ export declare const NS = "cordis";
3
+ /** Simplified Chinese Cordis UI messages. */
4
+ export declare const zh: {
5
+ 'row.defineTitle': string;
6
+ 'row.runTitle': string;
7
+ 'row.updateTitle': string;
8
+ 'row.stopTitle': string;
9
+ 'row.removeTitle': string;
10
+ 'purpose.missing': string;
11
+ 'status.idle': string;
12
+ 'status.awaitingApproval': string;
13
+ 'status.failed': string;
14
+ 'status.clientPending': string;
15
+ 'status.running': string;
16
+ 'status.removed': string;
17
+ 'status.superseded': string;
18
+ 'run.removed': string;
19
+ 'run.superseded': string;
20
+ 'panel.hint': string;
21
+ 'panel.plugins.aria': string;
22
+ 'panel.approvals.aria': string;
23
+ 'panel.trigger': string;
24
+ 'panel.runningCount': string;
25
+ 'panel.title': string;
26
+ 'panel.empty': string;
27
+ 'panel.loading': string;
28
+ 'panel.readFailed': string;
29
+ 'panel.group.current': string;
30
+ 'panel.group.others': string;
31
+ 'panel.version': string;
32
+ 'panel.current': string;
33
+ 'panel.next': string;
34
+ 'action.approve': string;
35
+ 'action.approveOnce': string;
36
+ 'action.approvePlugin': string;
37
+ 'action.decline': string;
38
+ 'action.run': string;
39
+ 'action.stop': string;
40
+ 'action.remove': string;
41
+ 'action.retry': string;
42
+ 'action.rollback': string;
43
+ 'render.failedAbdicated': string;
44
+ 'render.failedHeld': string;
45
+ 'a11y.defining': string;
46
+ 'a11y.failed': string;
47
+ 'a11y.stopped': string;
48
+ 'body.source': string;
49
+ 'body.hostCode': string;
50
+ 'body.clientCode': string;
51
+ 'body.output': string;
52
+ 'body.copy': string;
53
+ 'body.copied': string;
54
+ };
55
+ /** Translation keys owned by the Cordis UI namespace. */
56
+ export type CordisKey = keyof typeof zh;
57
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
58
+ interface LocaleNamespaceMap {
59
+ /** Dynamic Cordis UI copy. */
60
+ cordis: CordisKey;
61
+ }
62
+ }
63
+ /** English Cordis UI messages. */
64
+ export declare const en: {
65
+ 'row.defineTitle': string;
66
+ 'row.runTitle': string;
67
+ 'row.updateTitle': string;
68
+ 'row.stopTitle': string;
69
+ 'row.removeTitle': string;
70
+ 'purpose.missing': string;
71
+ 'status.idle': string;
72
+ 'status.awaitingApproval': string;
73
+ 'status.failed': string;
74
+ 'status.clientPending': string;
75
+ 'status.running': string;
76
+ 'status.removed': string;
77
+ 'status.superseded': string;
78
+ 'run.removed': string;
79
+ 'run.superseded': string;
80
+ 'panel.hint': string;
81
+ 'panel.plugins.aria': string;
82
+ 'panel.approvals.aria': string;
83
+ 'panel.trigger': string;
84
+ 'panel.runningCount': string;
85
+ 'panel.title': string;
86
+ 'panel.empty': string;
87
+ 'panel.loading': string;
88
+ 'panel.readFailed': string;
89
+ 'panel.group.current': string;
90
+ 'panel.group.others': string;
91
+ 'panel.version': string;
92
+ 'panel.current': string;
93
+ 'panel.next': string;
94
+ 'action.approve': string;
95
+ 'action.approveOnce': string;
96
+ 'action.approvePlugin': string;
97
+ 'action.decline': string;
98
+ 'action.run': string;
99
+ 'action.stop': string;
100
+ 'action.remove': string;
101
+ 'action.retry': string;
102
+ 'action.rollback': string;
103
+ 'render.failedAbdicated': string;
104
+ 'render.failedHeld': string;
105
+ 'a11y.defining': string;
106
+ 'a11y.failed': string;
107
+ 'a11y.stopped': string;
108
+ 'body.source': string;
109
+ 'body.hostCode': string;
110
+ 'body.clientCode': string;
111
+ 'body.output': string;
112
+ 'body.copy': string;
113
+ 'body.copied': string;
114
+ };
115
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1,36 @@
1
+ /** Session-local ownership index for Package business views on `cordis_run` cards. */
2
+ import type { SessionId } from '@deepseek-ai/dsh-client-connection/client';
3
+ import type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots';
4
+ import type { CordisDynamicPackageId, CordisDynamicPluginId, CordisDynamicPluginRunId } from './events.ts';
5
+ /** Stable keyed-slot identity of one Package-owned business view. */
6
+ export type CordisToolViewKey = `${CordisDynamicPluginId}.${CordisDynamicPackageId}`;
7
+ /** One successful tool result competing to host a Package business view. */
8
+ export interface CordisRunCardPointer {
9
+ readonly key: CordisToolViewKey;
10
+ readonly callId: string;
11
+ readonly seq: number;
12
+ readonly pluginRunId: CordisDynamicPluginRunId;
13
+ }
14
+ /** Per-session observable index consumed by every mounted Run card. */
15
+ export interface CordisRunCardStore extends HostObservable<ReadonlyMap<CordisToolViewKey, CordisRunCardPointer>> {
16
+ /** Publish one successful Run result; only a greater log sequence can replace it. */
17
+ observe(pointer: CordisRunCardPointer): void;
18
+ }
19
+ /** Page-lifetime registry that gives all cards of one session the same Store. */
20
+ export declare class CordisRunCardRegistry {
21
+ private readonly sessions;
22
+ /**
23
+ * Return the persistent page-local Store for a session.
24
+ * @param sessionId - session whose cards share supersession state.
25
+ * @returns the page-local Store retained for that session.
26
+ */
27
+ forSession(sessionId: SessionId): CordisRunCardStore;
28
+ }
29
+ /**
30
+ * Build the Package business-view key shared by registrations and Run cards.
31
+ * @param pluginId - stable Plugin identity.
32
+ * @param packageId - immutable Package identity.
33
+ * @returns the shared business-view key.
34
+ */
35
+ export declare function cordisToolViewKey(pluginId: CordisDynamicPluginId, packageId: CordisDynamicPackageId): CordisToolViewKey;
36
+ //# sourceMappingURL=run-card-index.d.ts.map
@@ -0,0 +1,62 @@
1
+ /** Injected faces and the Package-owned `tool.view.cordis` slot declaration. */
2
+ import type { SessionId } from '@deepseek-ai/dsh-client-connection/client';
3
+ import type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots';
4
+ import type { CordisRunActivity, CordisRunFailure, CordisUserRunRequest, DynamicCordisLivePackage, DynamicCordisRenderFailure } from '@deepseek-ai/dsh-cordis-client-runner/client';
5
+ import type { CordisActionResult } from './dynamic-port.ts';
6
+ import type { CordisInventory } from './inventory.ts';
7
+ import type { CordisRunCardPointer, CordisRunCardStore } from './run-card-index.ts';
8
+ import type { ApprovalRequestId, CordisDynamicPackageId, CordisDynamicPluginId, CordisDynamicPluginRunId } from './events.ts';
9
+ /** Owner currency delivered to a dynamic Package's business view. */
10
+ export interface CordisToolViewOwnerProps {
11
+ readonly pluginId: CordisDynamicPluginId;
12
+ readonly packageId: CordisDynamicPackageId;
13
+ readonly pluginRunId: CordisDynamicPluginRunId;
14
+ }
15
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
16
+ interface SlotMap {
17
+ /**
18
+ * Interactive Package-owned region rendered inside the latest eligible
19
+ * `cordis_run` card in the conversation flow. Use it for controls and other
20
+ * UI the user can interact with. Dynamic Client code registers with
21
+ * `key: 'self'`; the Guard binds that key to the current Plugin and Package.
22
+ */
23
+ 'tool.view.cordis': {
24
+ kind: 'keyed';
25
+ scope: 'session';
26
+ owner: CordisToolViewOwnerProps;
27
+ };
28
+ }
29
+ }
30
+ /** Live facts used by the read-only Define card. */
31
+ export interface CordisCardFace {
32
+ hooks: {
33
+ inventory: CordisInventory;
34
+ loaded: HostObservable<readonly DynamicCordisLivePackage[]>;
35
+ };
36
+ }
37
+ /** Live facts used by the Run card and its business-view ownership index. */
38
+ export interface CordisRunCardFace extends CordisCardFace {
39
+ hooks: CordisCardFace['hooks'] & {
40
+ runCards: CordisRunCardStore;
41
+ activeRuns: HostObservable<ReadonlyMap<CordisDynamicPluginId, CordisRunActivity>>;
42
+ };
43
+ /** Publish this successful result into the session's latest-card index. */
44
+ onObserveRunCard(pointer: CordisRunCardPointer): void;
45
+ }
46
+ /** Frame-wide panel state and lifecycle verbs. */
47
+ export interface CordisPanelFace {
48
+ hooks: {
49
+ inventory: CordisInventory;
50
+ activeRuns: HostObservable<ReadonlyMap<CordisDynamicPluginId, CordisRunActivity>>;
51
+ runErrors: HostObservable<ReadonlyMap<CordisDynamicPluginId, CordisRunFailure>>;
52
+ renderFailures: HostObservable<ReadonlyMap<CordisDynamicPluginId, DynamicCordisRenderFailure>>;
53
+ loaded: HostObservable<readonly DynamicCordisLivePackage[]>;
54
+ };
55
+ onApprove(requestId: ApprovalRequestId, approveFutureVersions: boolean): Promise<void>;
56
+ onDecline(requestId: ApprovalRequestId): Promise<void>;
57
+ onRun(request: CordisUserRunRequest): Promise<void>;
58
+ onStop(sessionId: SessionId, pluginId: CordisDynamicPluginId): Promise<CordisActionResult>;
59
+ onRemove(sessionId: SessionId, pluginId: CordisDynamicPluginId): Promise<CordisActionResult>;
60
+ onRefresh(): void;
61
+ }
62
+ //# sourceMappingURL=slots.d.ts.map
@@ -0,0 +1,21 @@
1
+ /** Shared status derivation over Host inventory and this page's Client live set. */
2
+ import type { DynamicCordisLivePackage } from '@deepseek-ai/dsh-cordis-client-runner/client';
3
+ import type { CordisDynamicPackageId, DynamicCordisInventoryRow } from './events.ts';
4
+ /** The three product-visible lifecycle readings. */
5
+ export type CordisVisibleStatus = 'idle' | 'client-pending' | 'running';
6
+ /**
7
+ * Locate one immutable Package inside a Plugin row.
8
+ * @param row - owning Plugin inventory row.
9
+ * @param packageId - immutable Package identity to locate.
10
+ * @returns the matching Package metadata, or `undefined` when absent.
11
+ */
12
+ export declare function packageOf(row: DynamicCordisInventoryRow, packageId: CordisDynamicPackageId): DynamicCordisInventoryRow['packages'][number] | undefined;
13
+ /**
14
+ * Derive the visible state of one Package.
15
+ * @param row - owning Plugin inventory row.
16
+ * @param packageId - Package being described.
17
+ * @param loaded - Client activations loaded in this page.
18
+ * @returns idle, Host-running/Client-pending, or fully running.
19
+ */
20
+ export declare function cordisVisibleStatus(row: DynamicCordisInventoryRow, packageId: CordisDynamicPackageId, loaded: readonly DynamicCordisLivePackage[]): CordisVisibleStatus;
21
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Cordis dynamic-plugin card, node half. Pure UI plugin: the empty apply
3
+ * exists so the plugin appears in the host cordis.yml / Loader; the browser
4
+ * half ships via exports["./client"], discovered through the package.json
5
+ * dshClient declaration.
6
+ */
7
+ /** Host plugin body — no host-side behavior for this surface plugin. */
8
+ export declare function apply(): void;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Package-owned invariant companion for `@deepseek-ai/dsh-client-ui-cordis`.
3
+ * @module @deepseek-ai/dsh-client-ui-cordis/invariant
4
+ */
5
+ import type { Context } from '@deepseek-ai/cordis';
6
+ /** Cordis companion plugin name. */
7
+ export declare const name = "client-ui-cordis-invariant";
8
+ /** Service required before the companion can reserve package ownership. */
9
+ export declare const inject: string[];
10
+ /**
11
+ * Register this package's invariant companion.
12
+ * @param ctx - Cordis context carrying the invariant service.
13
+ * @returns the installed registration's disposer after setup succeeds.
14
+ */
15
+ export declare const apply: (ctx: Context) => Promise<() => void>;
16
+ //# sourceMappingURL=invariant.d.ts.map
package/package.json ADDED
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "@deepseek-ai/dsh-client-ui-cordis",
3
+ "description": "Cordis dynamic-plugin definition card: the keyed cordis_define tool row with its run/stop switch",
4
+ "version": "0.0.1-rc.3",
5
+ "publishConfig": {
6
+ "access": "restricted"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/extensions/ui-cordis"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./client": {
26
+ "types": "./lib/types/client/index.d.ts",
27
+ "default": "./lib/client.js"
28
+ },
29
+ "./src/*": "./src/*",
30
+ "./package.json": "./package.json"
31
+ },
32
+ "dsh": {
33
+ "client": {
34
+ "inject": [
35
+ "@deepseek-ai/dsh-client-runtime",
36
+ "@deepseek-ai/dsh-client-connection",
37
+ "@deepseek-ai/dsh-cordis-client-runner",
38
+ "@deepseek-ai/dsh-api-remotes",
39
+ "@deepseek-ai/dsh-client-locale",
40
+ "@deepseek-ai/dsh-client-ui-input-trigger",
41
+ "@deepseek-ai/dsh-client-ui-tool",
42
+ "@deepseek-ai/dsh-client-ui-sidebar"
43
+ ],
44
+ "platform": "web"
45
+ }
46
+ },
47
+ "license": "BSD-3-Clause",
48
+ "peerDependencies": {
49
+ "react": "^18.2.0",
50
+ "@deepseek-ai/dsh-api-remotes": "^0.0.1-rc.3",
51
+ "@deepseek-ai/dsh-client-connection": "^0.0.1-rc.3",
52
+ "@deepseek-ai/dsh-cordis-client-runner": "^0.0.1-rc.3",
53
+ "@deepseek-ai/dsh-client-locale": "^0.0.1-rc.3",
54
+ "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.3",
55
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.3",
56
+ "@deepseek-ai/dsh-client-ui-sidebar": "^0.0.1-rc.3",
57
+ "@deepseek-ai/dsh-client-ui-input-trigger": "^0.0.1-rc.3",
58
+ "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.3",
59
+ "@deepseek-ai/dsh-client-ui-tool": "^0.0.1-rc.3",
60
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.3",
61
+ "@deepseek-ai/cordis": "^4.0.1-rc.1"
62
+ },
63
+ "devDependencies": {
64
+ "@types/react": "~18.3.1",
65
+ "react": "^18.2.0",
66
+ "@deepseek-ai/dsh-client-connection": "^0.0.1-rc.3",
67
+ "@deepseek-ai/dsh-api-remotes": "^0.0.1-rc.3",
68
+ "@deepseek-ai/dsh-cordis-client-runner": "^0.0.1-rc.3",
69
+ "@deepseek-ai/dsh-client-locale": "^0.0.1-rc.3",
70
+ "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.3",
71
+ "@deepseek-ai/dsh-client-ui-sidebar": "^0.0.1-rc.3",
72
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.3",
73
+ "@deepseek-ai/dsh-client-ui-input-trigger": "^0.0.1-rc.3",
74
+ "@deepseek-ai/dsh-client-ui-tool": "^0.0.1-rc.3",
75
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.3",
76
+ "@deepseek-ai/cordis": "^4.0.1-rc.1",
77
+ "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.3"
78
+ },
79
+ "files": [
80
+ "lib/index.js",
81
+ "lib/invariant.js",
82
+ "lib/client.js",
83
+ "lib/types/**/*.d.ts"
84
+ ],
85
+ "scripts": {
86
+ "bundle": "tsdown",
87
+ "watch": "tsdown --watch"
88
+ }
89
+ }