@sparkelf/dsh-plugin-dataops 0.1.0-rc.10

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/plus/dataops/README.md
5
+ README.md: c843fd3c7aac7ea489b5311e4c3c50e8498cab94
6
+ README.zh.md: 10fa42ed24dc8f8295dbe785a234ded025fcb1a4
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ ---
2
+ description: "DataOps target identity, browser PKCE authorization, credential lifecycle, authenticated MCP composition, and Settings UI."
3
+ kind: "package-reference"
4
+ ---
5
+
6
+ # @sparkelf/dsh-plugin-dataops
7
+
8
+ English | [中文](README.zh.md)
9
+
10
+ ## Summary
11
+
12
+ This complete Host and Client plugin owns one DataOps target identity, browser Authorization Code with PKCE, access and refresh credential lifecycle, authenticated MCP child composition, and a localized Settings section. Privileged local routes apply official Connection rejection before request inspection; the callback also requires one-use PKCE state.
13
+
14
+ ## Table of Contents
15
+
16
+ - [Use this package](#use-this-package)
17
+ - [Model Experience](#model-experience)
18
+ - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
19
+ - [Dev Note](#dev-note)
20
+
21
+ -----
22
+
23
+ <a id="use-this-package"></a>
24
+ ## Use this package
25
+
26
+ Set `DSH_DATAOPS_BASE_URL` to the DataOps Web origin that serves both `/auth/dsh/authorize` and proxied `/api`; `DSH_DATAOPS_CALLBACK_ORIGIN` optionally names a non-loopback DSH browser origin. The package stores the delegated access token and stable target identity under `dataops_access_token` and `dataops_target_ref`; DataOps ties the token lifetime to its authenticated browser session. When the current grant expires or its browser session is revoked, the DataOps Client contribution raises a DSH shell modal with **Later** and **Sign in again**; the latter opens the real OAuth popup from the user gesture. Settings also distinguishes the rejected stored grant from a never-connected state and keeps the same recovery action available. An authentication-rejected MCP call remains an error result inside the agent turn; it does not terminate the task, and Plus does not automatically replay an unconfirmed tool operation. Disconnect revokes account tokens but retains target identity. OAuth callback failures expose only a fixed, actionable stage in Settings; authorization codes, state, tokens, upstream bodies, and arbitrary error text remain outside the browser message.
27
+
28
+ -----
29
+
30
+ <a id="model-experience"></a>
31
+ ## Model Experience
32
+
33
+ ### Authorized DataOps MCP tools
34
+
35
+ #### What the model sees
36
+
37
+ After authorization, the model sees the DataOps server current tool schemas under the `dataops` namespace and the upstream MCP tool results. OAuth state, account data, target metadata, and token values never enter model context.
38
+
39
+ #### Token effect
40
+
41
+ Connected tool schemas add their current prefix cost, and calls add upstream arguments and results. OAuth and credential operations add zero model tokens.
42
+
43
+ #### KV Cache effect
44
+
45
+ Connecting, disconnecting, or MCP discovery changes can alter the tool-schema prefix. Stable connected operation adds no OAuth or token metadata to that prefix.
46
+
47
+ ## Known Limitations and Deferred Work
48
+
49
+ <a id="known-limitations-and-deferred-work"></a>
50
+
51
+ - **External authenticated account required**: the DataOps deployment must implement the DSH authorization and MCP endpoints and present an authenticated user session; this package provides no fallback token grant or login credential.
52
+
53
+ <a id="dev-note"></a>
54
+ ### Dev Note
55
+
56
+ <details>
57
+ <summary>Working context for maintainers, click to expand</summary>
58
+
59
+ This Dev Note is working context for maintainers; shipped behavior, limits, and rationale live in the sections above, the package code, and the linked Agent Note.
60
+
61
+ - `src/index.ts` owns authorization, credentials, access expiry, and MCP child lifecycle. `src/client/store.ts` and `src/client/controller.ts` own shared browser status and OAuth lifecycle; `src/client/DataOpsExpiryModal.tsx` contributes the shell prompt and `src/client/DataOpsSection.tsx` contributes Settings. The [distribution Agent Note](../../../.agents/notes/proposed/architecture/2026-08-29-ranged-plus-patchset-distribution.md) records the package boundary.
62
+
63
+ </details>
package/README.zh.md ADDED
@@ -0,0 +1,63 @@
1
+ ---
2
+ description: "DataOps target identity、browser PKCE authorization、credential lifecycle、authenticated MCP composition及Settings UI。"
3
+ kind: "package-reference"
4
+ ---
5
+
6
+ # @sparkelf/dsh-plugin-dataops
7
+
8
+ [English](README.md) | 中文
9
+
10
+ ## 概述
11
+
12
+ 该完整Host及Client plugin持有一个DataOps target identity、带PKCE的browser Authorization Code、access及refresh credential lifecycle、authenticated MCP child composition及localized Settings section。privileged local routes会在request inspection前应用official Connection rejection;callback还要求one-use PKCE state。
13
+
14
+ ## 目录
15
+
16
+ - [使用此软件包](#use-this-package)
17
+ - [模型体验](#model-experience)
18
+ - [已知限制和延期工作](#known-limitations-and-deferred-work)
19
+ - [开发备注](#dev-note)
20
+
21
+ -----
22
+
23
+ <a id="use-this-package"></a>
24
+ ## 使用此软件包
25
+
26
+ 把`DSH_DATAOPS_BASE_URL`设为同时提供`/auth/dsh/authorize`及proxied `/api`的DataOps Web origin;`DSH_DATAOPS_CALLBACK_ORIGIN`可选指定non-loopback DSH browser origin。该package把delegated access token及stable target identity存入`dataops_access_token`与`dataops_target_ref`;DataOps把token lifetime绑定到authenticated browser session。Current grant过期或其browser session被revoke时,DataOps Client contribution会弹出带**稍后**与**重新登录**的DSH shell modal;后者从用户手势打开real OAuth popup。Settings也会把rejected stored grant与never-connected state区分,并保留同一个恢复动作。Authentication-rejected MCP call仍是agent turn内的error result,不会终止task;Plus不会自动重放结果未知的tool operation。Disconnect会revoke account tokens但保留target identity。OAuth callback failure只在Settings暴露固定、可操作的failure stage;authorization code、state、token、upstream body及任意error text不会进入browser message。
27
+
28
+ -----
29
+
30
+ <a id="model-experience"></a>
31
+ ## 模型体验
32
+
33
+ ### Authorized DataOps MCP tools
34
+
35
+ #### 模型看到什么
36
+
37
+ authorization成功后,模型看到`dataops` namespace下DataOps server当前tool schemas及upstream MCP tool results。OAuth state、account data、target metadata及token values不会进入model context。
38
+
39
+ #### Token 影响
40
+
41
+ connected tool schemas增加当前prefix cost,call增加upstream arguments及results。OAuth及credential operations增加零model tokens。
42
+
43
+ #### KV Cache 影响
44
+
45
+ Connecting、disconnecting或MCP discovery change可能改变tool-schema prefix。稳定connected operation不会向该prefix加入OAuth或token metadata。
46
+
47
+ ## 已知限制和延期工作
48
+
49
+ <a id="known-limitations-and-deferred-work"></a>
50
+
51
+ - **需要external authenticated account**:DataOps deployment必须实现DSH authorization及MCP endpoints并提供authenticated user session;该package不提供fallback token grant或login credential。
52
+
53
+ <a id="dev-note"></a>
54
+ ### 开发备注
55
+
56
+ <details>
57
+ <summary>维护者工作上下文,点击展开</summary>
58
+
59
+ 该开发备注是maintainer working context;shipped behavior、limits及rationale以以上sections、package code及linked Agent Note为准。
60
+
61
+ - `src/index.ts`持有authorization、credentials、access expiry及MCP child lifecycle。`src/client/store.ts`与`src/client/controller.ts`持有shared browser status及OAuth lifecycle;`src/client/DataOpsExpiryModal.tsx`贡献shell prompt,`src/client/DataOpsSection.tsx`贡献Settings。[Distribution Agent Note](../../../.agents/notes/proposed/architecture/2026-08-29-ranged-plus-patchset-distribution.zh.md)记录package boundary。
62
+
63
+ </details>