@yejiming/dsh-data-agent 0.1.3 → 0.1.4
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/README.en.md +3 -1
- package/README.md +3 -1
- package/conformance/dsh-ecosystem/inventory.json +1 -0
- package/dsh-plugin.json +1 -1
- package/lib/client.js +386 -175
- package/lib/client.js.map +1 -1
- package/lib/types/catalog-tools.d.ts +1 -1
- package/lib/types/client/DataAgentHeroControls.d.ts +24 -0
- package/lib/types/client/DataAgentWorkbench.d.ts +8 -2
- package/lib/types/client/analysis-view-model.d.ts +1 -1
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/workbench-open.d.ts +37 -0
- package/lib/types/client/workbench-placeholder.d.ts +6 -0
- package/package.json +82 -53
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Read-only Catalog model tools. No scan or review service is injected here. */
|
|
2
2
|
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
-
import {
|
|
3
|
+
import type { JsonValue } from '@deepseek-ai/dsh-util-values';
|
|
4
4
|
export declare function applyCatalogTools(ctx: Context): void;
|
|
5
5
|
export declare function sanitizeToolValue(value: unknown): JsonValue;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { AgentPresetSeatProps, AgentPresetSeatState } from '@deepseek-ai/dsh-client-ui-agent-preset/client';
|
|
3
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
4
|
+
import { type ObservableSnapshot, type WorkbenchOpenSnapshot } from './workbench-open.ts';
|
|
5
|
+
export interface DataAgentHeroControlsInjected {
|
|
6
|
+
/** The host entry shadowed by this additive wrapper. */
|
|
7
|
+
originalSeat: ComponentType<AgentPresetSeatProps>;
|
|
8
|
+
/** Data-agent copy; the slot's own `t` remains bound to agent-preset copy. */
|
|
9
|
+
dataAgentT: TranslateNS<'data-agent'>;
|
|
10
|
+
requestWorkbench(): void;
|
|
11
|
+
useHeroWorkbench: <T>(selector: (snapshot: WorkbenchOpenSnapshot) => T) => T;
|
|
12
|
+
}
|
|
13
|
+
export type DataAgentHeroControlsProps = AgentPresetSeatProps & DataAgentHeroControlsInjected;
|
|
14
|
+
/** Render the original preset picker plus the database entry for data-agent. */
|
|
15
|
+
export declare function DataAgentHeroControls(props: DataAgentHeroControlsProps): import("react").JSX.Element;
|
|
16
|
+
/** Structural type of the host preset entry's raw inject face. */
|
|
17
|
+
export interface HostAgentPresetSeatFace {
|
|
18
|
+
hooks: {
|
|
19
|
+
agentPresetSeat: ObservableSnapshot<AgentPresetSeatState>;
|
|
20
|
+
};
|
|
21
|
+
load(): Promise<void>;
|
|
22
|
+
select(id: string): Promise<string | undefined>;
|
|
23
|
+
introduced(): void;
|
|
24
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import { type ObservableSnapshot, type WorkbenchOpenSnapshot } from './workbench-open.ts';
|
|
2
3
|
export type { DatabaseType } from '../database-types.ts';
|
|
3
4
|
/** The sessions-list slice the workbench needs (structural; avoids a runtime import). */
|
|
4
5
|
export interface SessionListLike {
|
|
6
|
+
current?: string;
|
|
5
7
|
byId: Record<string, {
|
|
6
|
-
|
|
8
|
+
projectionValues?: {
|
|
9
|
+
agentPreset?: string | null;
|
|
10
|
+
};
|
|
7
11
|
}>;
|
|
8
12
|
}
|
|
9
13
|
/** Registration-side business face: the sessions-list observable becomes `useSessions`. */
|
|
@@ -13,9 +17,11 @@ export interface DataAgentWorkbenchInjected {
|
|
|
13
17
|
getSnapshot(): SessionListLike;
|
|
14
18
|
subscribe(fn: () => void): () => void;
|
|
15
19
|
};
|
|
20
|
+
workbenchOpen: ObservableSnapshot<WorkbenchOpenSnapshot>;
|
|
16
21
|
};
|
|
22
|
+
acknowledgeWorkbenchOpen(revision: number): void;
|
|
17
23
|
}
|
|
18
24
|
/** The workbench's full component props: the composer-right seat + locale + sessions hook. */
|
|
19
25
|
export type DataAgentWorkbenchProps = PropsRuntime<'conversation.input.right'> & PropsLocale<'data-agent'> & InjectFace<DataAgentWorkbenchInjected>;
|
|
20
26
|
/** The database workbench body. */
|
|
21
|
-
export declare function DataAgentWorkbench({ sessionId, useSessions, t }: DataAgentWorkbenchProps): import("react").JSX.Element | null;
|
|
27
|
+
export declare function DataAgentWorkbench({ sessionId, useSessions, useWorkbenchOpen, acknowledgeWorkbenchOpen, t, }: DataAgentWorkbenchProps): import("react").JSX.Element | null;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* degrade to the safe model content text, never guess or re-query.
|
|
15
15
|
* @module @yejiming/dsh-data-agent/client/analysis-view-model
|
|
16
16
|
*/
|
|
17
|
-
import type { ToolCallBlock } from '@deepseek-ai/dsh-client-
|
|
17
|
+
import type { ToolCallBlock } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
18
18
|
import { type AnalysisReportV1 } from '../analysis.ts';
|
|
19
19
|
/** The five display states of one render-analysis call. */
|
|
20
20
|
export type AnalysisBlockState = 'running' | 'error' | 'interrupted' | 'report' | 'fallback';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `/plugins/data-agent/status` reports.
|
|
8
8
|
* @module @yejiming/dsh-data-agent/client
|
|
9
9
|
*/
|
|
10
|
-
import type { ClientContext } from '@deepseek-ai/
|
|
10
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
11
11
|
import { type DataAgentKey } from './locales.ts';
|
|
12
12
|
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
13
13
|
interface LocaleNamespaceMap {
|
|
@@ -15,7 +15,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
15
15
|
'data-agent': DataAgentKey;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
/** Required services:
|
|
18
|
+
/** Required services: locale/slots, Session state, and host New Session navigation. */
|
|
19
19
|
export declare const inject: string[];
|
|
20
20
|
/**
|
|
21
21
|
* Client plugin body: register the data-agent dictionaries and the database
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-surface hand-off for opening the session-scoped database workbench
|
|
3
|
+
* from the alpha.2 New Session hero, where no Session scope exists yet.
|
|
4
|
+
*/
|
|
5
|
+
import type { SessionListLike } from './DataAgentWorkbench.tsx';
|
|
6
|
+
/** The plugin preset id used by both the hero stage and Session projection. */
|
|
7
|
+
export declare const DATA_AGENT_PRESET = "data-agent";
|
|
8
|
+
/** Minimal observable contract consumed by the slot renderer's Hook binder. */
|
|
9
|
+
export interface ObservableSnapshot<T> {
|
|
10
|
+
getSnapshot(): T;
|
|
11
|
+
subscribe(fn: () => void): () => void;
|
|
12
|
+
}
|
|
13
|
+
/** One pending/ready request to open the workbench. */
|
|
14
|
+
export interface WorkbenchOpenSnapshot {
|
|
15
|
+
pending: boolean;
|
|
16
|
+
revision: number;
|
|
17
|
+
sessionId?: string;
|
|
18
|
+
}
|
|
19
|
+
/** The Session-list operations needed to bridge a root action into one Session. */
|
|
20
|
+
export interface SessionListSource extends ObservableSnapshot<SessionListLike> {
|
|
21
|
+
}
|
|
22
|
+
export interface WorkbenchOpenBridge {
|
|
23
|
+
store: ObservableSnapshot<WorkbenchOpenSnapshot>;
|
|
24
|
+
/** Start the host's New Session flow and open once data-agent is mounted. */
|
|
25
|
+
requestFromHero(): void;
|
|
26
|
+
/** Clear a delivered request after the target workbench accepts it. */
|
|
27
|
+
acknowledge(revision: number): void;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create the one-way hero → Session workbench bridge.
|
|
32
|
+
*
|
|
33
|
+
* The host remains responsible for workspace inheritance, Session creation,
|
|
34
|
+
* navigation, and applying the staged agent preset. This bridge only waits
|
|
35
|
+
* for the resulting Session projection before publishing an open request.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createWorkbenchOpenBridge(sessions: SessionListSource, startSession: () => void): WorkbenchOpenBridge;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply data-agent copy to one host composer card and return an exact cleanup.
|
|
3
|
+
* alpha.2's Lexical surface renders a visible placeholder sibling in addition
|
|
4
|
+
* to the editor attributes; older compatible surfaces still use a textarea.
|
|
5
|
+
*/
|
|
6
|
+
export declare function overrideComposerPlaceholder(card: ParentNode | null | undefined, placeholder: string): (() => void) | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yejiming/dsh-data-agent",
|
|
3
3
|
"description": "Data Agent for DSH Web and TUI: shared database connections, versioned metadata Catalog governance, secure credentials, SQL and Catalog tools, and the data-agent preset",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -49,15 +49,22 @@
|
|
|
49
49
|
"./cordis.patch.yml": "./cordis.patch.yml"
|
|
50
50
|
},
|
|
51
51
|
"dsh": {
|
|
52
|
+
"engines": {
|
|
53
|
+
"dsh": ">=0.1.2-alpha.2"
|
|
54
|
+
},
|
|
52
55
|
"bundle": {
|
|
53
56
|
"patch": "./cordis.patch.yml"
|
|
54
57
|
},
|
|
55
58
|
"client": {
|
|
56
59
|
"inject": [
|
|
60
|
+
"@deepseek-ai/dsh-api-session-controller",
|
|
57
61
|
"@deepseek-ai/dsh-client-locale",
|
|
58
|
-
"@deepseek-ai/dsh-client-
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-agent-preset",
|
|
59
63
|
"@deepseek-ai/dsh-client-ui-tool",
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-conversation"
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-session",
|
|
67
|
+
"@deepseek-ai/dsh-client-ui-workspace"
|
|
61
68
|
],
|
|
62
69
|
"platform": "web"
|
|
63
70
|
}
|
|
@@ -88,35 +95,43 @@
|
|
|
88
95
|
"zod": "^4.4.3"
|
|
89
96
|
},
|
|
90
97
|
"peerDependencies": {
|
|
91
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
92
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
93
|
-
"@deepseek-ai/dsh-agent-presets": "^0.1.
|
|
94
|
-
"@deepseek-ai/dsh-
|
|
95
|
-
"@deepseek-ai/dsh-client-
|
|
96
|
-
"@deepseek-ai/dsh-client-ui-
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-
|
|
98
|
-
"@deepseek-ai/dsh-client-ui-
|
|
99
|
-
"@deepseek-ai/dsh-client-ui-
|
|
100
|
-
"@deepseek-ai/dsh-
|
|
101
|
-
"@deepseek-ai/dsh-
|
|
102
|
-
"@deepseek-ai/dsh-
|
|
103
|
-
"@deepseek-ai/dsh-
|
|
104
|
-
"@deepseek-ai/dsh-
|
|
105
|
-
"@deepseek-ai/dsh-
|
|
106
|
-
"@deepseek-ai/dsh-
|
|
107
|
-
"@deepseek-ai/dsh-
|
|
108
|
-
"@deepseek-ai/dsh-
|
|
109
|
-
"@deepseek-ai/dsh-
|
|
110
|
-
"@deepseek-ai/dsh-
|
|
111
|
-
"@deepseek-ai/dsh-
|
|
112
|
-
"@deepseek-ai/dsh-
|
|
98
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
99
|
+
"@deepseek-ai/dsh-agent": "^0.1.2-alpha.2",
|
|
100
|
+
"@deepseek-ai/dsh-agent-presets": "^0.1.2-alpha.2",
|
|
101
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.2",
|
|
102
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.2",
|
|
103
|
+
"@deepseek-ai/dsh-client-ui-agent-preset": "^0.1.2-alpha.2",
|
|
104
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.2",
|
|
105
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.2",
|
|
106
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.2",
|
|
107
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.2-alpha.2",
|
|
108
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.2",
|
|
109
|
+
"@deepseek-ai/dsh-client-ui-tool": "^0.1.2-alpha.2",
|
|
110
|
+
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.2-alpha.2",
|
|
111
|
+
"@deepseek-ai/dsh-commands": "^0.1.2-alpha.2",
|
|
112
|
+
"@deepseek-ai/dsh-credentials": "^0.1.2-alpha.2",
|
|
113
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.2",
|
|
114
|
+
"@deepseek-ai/dsh-invariants": "^0.1.2-alpha.2",
|
|
115
|
+
"@deepseek-ai/dsh-llm": "^0.1.2-alpha.2",
|
|
116
|
+
"@deepseek-ai/dsh-scope": "^0.1.2-alpha.2",
|
|
117
|
+
"@deepseek-ai/dsh-session": "^0.1.2-alpha.2",
|
|
118
|
+
"@deepseek-ai/dsh-storage": "^0.1.2-alpha.2",
|
|
119
|
+
"@deepseek-ai/dsh-storage-domain": "^0.1.2-alpha.2",
|
|
120
|
+
"@deepseek-ai/dsh-storage-json": "^0.1.2-alpha.2",
|
|
121
|
+
"@deepseek-ai/dsh-subprocess": "^0.1.2-alpha.2",
|
|
122
|
+
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.2",
|
|
123
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.2-alpha.2",
|
|
124
|
+
"@deepseek-ai/dsh-util-values": "^0.1.2-alpha.2",
|
|
113
125
|
"react": "^18.2.0 || ^19.0.0"
|
|
114
126
|
},
|
|
115
127
|
"peerDependenciesMeta": {
|
|
116
128
|
"@deepseek-ai/dsh-client-locale": {
|
|
117
129
|
"optional": true
|
|
118
130
|
},
|
|
119
|
-
"@deepseek-ai/dsh-
|
|
131
|
+
"@deepseek-ai/dsh-api-session-controller": {
|
|
132
|
+
"optional": true
|
|
133
|
+
},
|
|
134
|
+
"@deepseek-ai/dsh-client-ui-agent-preset": {
|
|
120
135
|
"optional": true
|
|
121
136
|
},
|
|
122
137
|
"@deepseek-ai/dsh-client-ui-conversation": {
|
|
@@ -125,6 +140,12 @@
|
|
|
125
140
|
"@deepseek-ai/dsh-client-ui-primitives": {
|
|
126
141
|
"optional": true
|
|
127
142
|
},
|
|
143
|
+
"@deepseek-ai/dsh-client-ui-renderer": {
|
|
144
|
+
"optional": true
|
|
145
|
+
},
|
|
146
|
+
"@deepseek-ai/dsh-client-ui-session": {
|
|
147
|
+
"optional": true
|
|
148
|
+
},
|
|
128
149
|
"@deepseek-ai/dsh-client-ui-slots": {
|
|
129
150
|
"optional": true
|
|
130
151
|
},
|
|
@@ -139,36 +160,44 @@
|
|
|
139
160
|
},
|
|
140
161
|
"@deepseek-ai/dsh-client-ui-tool": {
|
|
141
162
|
"optional": true
|
|
163
|
+
},
|
|
164
|
+
"@deepseek-ai/dsh-client-ui-workspace": {
|
|
165
|
+
"optional": true
|
|
142
166
|
}
|
|
143
167
|
},
|
|
144
168
|
"devDependencies": {
|
|
145
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
146
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
147
|
-
"@deepseek-ai/dsh-agent-presets": "^0.1.
|
|
148
|
-
"@deepseek-ai/dsh-
|
|
149
|
-
"@deepseek-ai/dsh-
|
|
150
|
-
"@deepseek-ai/dsh-client-
|
|
151
|
-
"@deepseek-ai/dsh-client-ui-
|
|
152
|
-
"@deepseek-ai/dsh-client-ui-
|
|
153
|
-
"@deepseek-ai/dsh-client-ui-
|
|
154
|
-
"@deepseek-ai/dsh-client-ui-
|
|
155
|
-
"@deepseek-ai/dsh-client-ui-
|
|
156
|
-
"@deepseek-ai/dsh-
|
|
157
|
-
"@deepseek-ai/dsh-
|
|
158
|
-
"@deepseek-ai/dsh-
|
|
159
|
-
"@deepseek-ai/dsh-
|
|
160
|
-
"@deepseek-ai/dsh-
|
|
161
|
-
"@deepseek-ai/dsh-
|
|
162
|
-
"@deepseek-ai/dsh-
|
|
163
|
-
"@deepseek-ai/dsh-
|
|
164
|
-
"@deepseek-ai/dsh-
|
|
165
|
-
"@deepseek-ai/dsh-
|
|
166
|
-
"@deepseek-ai/dsh-
|
|
167
|
-
"@deepseek-ai/dsh-
|
|
168
|
-
"@deepseek-ai/dsh-
|
|
169
|
-
"@deepseek-ai/dsh-
|
|
170
|
-
"@deepseek-ai/dsh-
|
|
171
|
-
"@deepseek-ai/
|
|
169
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
170
|
+
"@deepseek-ai/dsh-agent": "^0.1.2-alpha.2",
|
|
171
|
+
"@deepseek-ai/dsh-agent-presets": "^0.1.2-alpha.2",
|
|
172
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.2",
|
|
173
|
+
"@deepseek-ai/dsh-attachment": "0.1.2-alpha.2",
|
|
174
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.2",
|
|
175
|
+
"@deepseek-ai/dsh-client-ui-agent-preset": "0.1.2-alpha.2",
|
|
176
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.2",
|
|
177
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.2",
|
|
178
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.2-alpha.2",
|
|
179
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.2-alpha.2",
|
|
180
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.2-alpha.2",
|
|
181
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.2",
|
|
182
|
+
"@deepseek-ai/dsh-client-ui-tool": "0.1.2-alpha.2",
|
|
183
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.1.2-alpha.2",
|
|
184
|
+
"@deepseek-ai/dsh-commands": "^0.1.2-alpha.2",
|
|
185
|
+
"@deepseek-ai/dsh-credentials": "^0.1.2-alpha.2",
|
|
186
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.2",
|
|
187
|
+
"@deepseek-ai/dsh-invariants": "^0.1.2-alpha.2",
|
|
188
|
+
"@deepseek-ai/dsh-llm": "0.1.2-alpha.2",
|
|
189
|
+
"@deepseek-ai/dsh-scope": "^0.1.2-alpha.2",
|
|
190
|
+
"@deepseek-ai/dsh-session": "0.1.2-alpha.2",
|
|
191
|
+
"@deepseek-ai/dsh-storage": "^0.1.2-alpha.2",
|
|
192
|
+
"@deepseek-ai/dsh-storage-domain": "^0.1.2-alpha.2",
|
|
193
|
+
"@deepseek-ai/dsh-storage-json": "^0.1.2-alpha.2",
|
|
194
|
+
"@deepseek-ai/dsh-subprocess": "^0.1.2-alpha.2",
|
|
195
|
+
"@deepseek-ai/dsh-subprocess-local": "0.1.2-alpha.2",
|
|
196
|
+
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.2",
|
|
197
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.2-alpha.2",
|
|
198
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.2-alpha.2",
|
|
199
|
+
"@deepseek-ai/dsh-util-values": "^0.1.2-alpha.2",
|
|
200
|
+
"@deepseek-ai/schemastery": "3.18.2",
|
|
172
201
|
"@dsh-std/adapter-dsh": "0.1.0-rc3",
|
|
173
202
|
"@dsh-std/command": "0.1.0-rc2",
|
|
174
203
|
"@dsh-std/core": "0.1.0-rc1",
|