dsh-tender-workbench 0.2.1-beta.0
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 +21 -0
- package/README.md +108 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.js +17296 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +5 -0
- package/lib/types/client/TenderEntry.d.ts +14 -0
- package/lib/types/client/TenderEntry.d.ts.map +1 -0
- package/lib/types/client/TenderFilterPanel.d.ts +14 -0
- package/lib/types/client/TenderFilterPanel.d.ts.map +1 -0
- package/lib/types/client/TenderResultsEntry.d.ts +4 -0
- package/lib/types/client/TenderResultsEntry.d.ts.map +1 -0
- package/lib/types/client/TenderResultsPanel.d.ts +16 -0
- package/lib/types/client/TenderResultsPanel.d.ts.map +1 -0
- package/lib/types/client/area-data.d.ts +8 -0
- package/lib/types/client/area-data.d.ts.map +1 -0
- package/lib/types/client/area-utils.d.ts +15 -0
- package/lib/types/client/area-utils.d.ts.map +1 -0
- package/lib/types/client/drawer-coordinator.d.ts +5 -0
- package/lib/types/client/drawer-coordinator.d.ts.map +1 -0
- package/lib/types/client/fields/AdvancedFields.d.ts +4 -0
- package/lib/types/client/fields/AdvancedFields.d.ts.map +1 -0
- package/lib/types/client/fields/KeywordField.d.ts +4 -0
- package/lib/types/client/fields/KeywordField.d.ts.map +1 -0
- package/lib/types/client/fields/PublishTimeField.d.ts +4 -0
- package/lib/types/client/fields/PublishTimeField.d.ts.map +1 -0
- package/lib/types/client/fields/RegionField.d.ts +4 -0
- package/lib/types/client/fields/RegionField.d.ts.map +1 -0
- package/lib/types/client/fields/SearchTypeField.d.ts +9 -0
- package/lib/types/client/fields/SearchTypeField.d.ts.map +1 -0
- package/lib/types/client/fields/StageField.d.ts +4 -0
- package/lib/types/client/fields/StageField.d.ts.map +1 -0
- package/lib/types/client/fields/field-props.d.ts +11 -0
- package/lib/types/client/fields/field-props.d.ts.map +1 -0
- package/lib/types/client/fields/options.d.ts +18 -0
- package/lib/types/client/fields/options.d.ts.map +1 -0
- package/lib/types/client/format.d.ts +5 -0
- package/lib/types/client/format.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +13 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/locales.d.ts +384 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/merge-draft.d.ts +3 -0
- package/lib/types/client/merge-draft.d.ts.map +1 -0
- package/lib/types/client/qcc-request.d.ts +46 -0
- package/lib/types/client/qcc-request.d.ts.map +1 -0
- package/lib/types/client/result-adapters.d.ts +10 -0
- package/lib/types/client/result-adapters.d.ts.map +1 -0
- package/lib/types/client/result-parser.d.ts +13 -0
- package/lib/types/client/result-parser.d.ts.map +1 -0
- package/lib/types/client/result-summary.d.ts +31 -0
- package/lib/types/client/result-summary.d.ts.map +1 -0
- package/lib/types/client/result-types.d.ts +86 -0
- package/lib/types/client/result-types.d.ts.map +1 -0
- package/lib/types/client/tender-search-definition.d.ts +8 -0
- package/lib/types/client/tender-search-definition.d.ts.map +1 -0
- package/lib/types/client/types.d.ts +38 -0
- package/lib/types/client/types.d.ts.map +1 -0
- package/lib/types/client/validation.d.ts +12 -0
- package/lib/types/client/validation.d.ts.map +1 -0
- package/lib/types/client/write-session-draft.d.ts +4 -0
- package/lib/types/client/write-session-draft.d.ts.map +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.d.ts.map +1 -0
- package/package.json +99 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sunhh3221
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# dsh-tender-workbench
|
|
2
|
+
|
|
3
|
+
`dsh-tender-workbench` is an independent, Client-only DeepSeek Harness Web workbench for tender and proposed-project discovery. It adds a “招投标 / Tenders” action to the official `conversation.input.left` Slot, opens a Portal-based search drawer, and appends a deterministic qcc-tender request to the current Session draft through `SessionInput.setDraft()`. It also projects persisted qcc tool events into a Session Header result action and a replayable summary/list drawer with search history.
|
|
4
|
+
|
|
5
|
+
The first step selects **招投标搜索 / Tender search** or **拟建项目搜索 / Proposed-project search**. Tender search defaults to **不限 / All**, combining tender and award conditions, and can be narrowed to **招标 / Tender** or **中标 / Award**. These states mirror the visible fields and options of the corresponding 标找找 `ttender`, `ifb`, `wtb`, and `proposed` reference pages while remaining completely local to the plugin.
|
|
6
|
+
|
|
7
|
+
Frequently used conditions stay visible in one aligned filter workspace. Advanced fields use a compact reference-style toolbar and one shared in-place option panel instead of flattening every option. The combined All state uses a responsive 4/3/2-column grid, so labels stay on one line at desktop, compact, and mobile widths. Active triggers keep stable dimensions and expose their full values in a separate summary strip. Clicking outside closes either the advanced option panel or region cascader without clearing selections; Escape closes the active popup before the drawer.
|
|
8
|
+
|
|
9
|
+
The shared region field provides searchable province → city → district multi-selection using the bundled snapshot derived from `docs/area.ts`. Every region row is a large hit target: clicking a province selects it and opens its cities, and clicking a city selects it and opens its districts. No precise arrow click is required; selected regions are written as complete administrative paths.
|
|
10
|
+
|
|
11
|
+
The plugin does not modify DeepSeek Harness source, inspect or write the native composer DOM, submit messages, access the network, persist filter values, or depend on third-party DSH plugins.
|
|
12
|
+
|
|
13
|
+
Visible filters are limited to parameters supported by `mcp__qcc-tender__search_tenders` and `mcp__qcc-tender__search_proposed_projects`. Relative dates become fixed dates, closed custom date ranges are converted to the tool's open interval, region paths are normalized, and amounts are converted from 万元 to 元 before the prompt is generated. The prompt contains one exact tool name and valid JSON and explicitly disallows Web-search fallback.
|
|
14
|
+
|
|
15
|
+
## Documentation
|
|
16
|
+
|
|
17
|
+
- [Plugin design](docs/dsh-tender-workbench-plugin-design.md)
|
|
18
|
+
- [Province, city, and district source snapshot](docs/area.ts)
|
|
19
|
+
|
|
20
|
+
## Compatibility
|
|
21
|
+
|
|
22
|
+
This checkout targets DeepSeek Harness `0.1.1-rc.2`, the highest version currently published to the public npm registry (published under the `next` dist-tag; npm's `latest` dist-tag still points to `0.0.1-rc.1`). The plugin declares the matching public Client packages as peer and development dependencies, so it can be developed outside the Harness source workspace.
|
|
23
|
+
|
|
24
|
+
## Build and test
|
|
25
|
+
|
|
26
|
+
From this directory:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
pnpm install --ignore-workspace
|
|
30
|
+
pnpm run typecheck
|
|
31
|
+
pnpm run test
|
|
32
|
+
pnpm run build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The build emits the Host loader entry at `lib/index.js`, the DSH Client factory bundle at `lib/client.js`, and declarations under `lib/types/`.
|
|
36
|
+
|
|
37
|
+
## Install into the Web profile
|
|
38
|
+
|
|
39
|
+
### Install the internal preview from npm
|
|
40
|
+
|
|
41
|
+
The current release is an internal preview published under the `beta` dist-tag. It does not use or create the `latest` dist-tag:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
dsh plugin --profile web add dsh-tender-workbench@beta
|
|
45
|
+
dsh web --no-open
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
To install an exact version:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
dsh plugin --profile web add dsh-tender-workbench@0.2.1-beta.0
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
After a stable version is published to `latest`, users will be able to install it without an explicit tag:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
dsh plugin --profile web add dsh-tender-workbench
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Install from an independent source checkout
|
|
61
|
+
|
|
62
|
+
Build first, then run the following command from this plugin's own root directory when the public `dsh` CLI is available:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
dsh plugin --profile web add .
|
|
66
|
+
dsh web --no-open
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If `dsh` is only available through a separate DeepSeek Harness source checkout, pass this plugin's absolute path instead of assuming that it is nested inside the Harness repository:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
cd /path/to/deepseek-harness
|
|
73
|
+
pnpm dsh plugin --profile web add /absolute/path/to/dsh-tender-workbench
|
|
74
|
+
pnpm dsh web --no-open
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Install from a tarball
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
dsh plugin --profile web add ./dsh-tender-workbench-0.2.1-beta.0.tgz
|
|
81
|
+
dsh web --no-open
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Restart the Web profile after adding or removing the bundle. The plugin package's `dsh.bundle.patch` declaration activates `cordis.patch.yml`, whose only contribution is the `dsh-tender-workbench` Loader row.
|
|
85
|
+
|
|
86
|
+
To remove it:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
dsh plugin --profile web remove dsh-tender-workbench
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Runtime behavior
|
|
93
|
+
|
|
94
|
+
- Each Session-scoped entry retains its own temporary selections until remount or refresh.
|
|
95
|
+
- The default All state includes both tender and award filters without forcing a notice type; narrowed Tender, Award, and Proposed-project states render and output only their supported fields.
|
|
96
|
+
- Tender and Award use separate stage selections; Proposed-project has its own stage, approval, and investment filters.
|
|
97
|
+
- Preset and custom amount ranges are mutually exclusive and validated locally.
|
|
98
|
+
- Province, city, and district selections are canonicalized so an ancestor and its descendant are not output together.
|
|
99
|
+
- Empty filter values and unrestricted choices are omitted from the generated prompt.
|
|
100
|
+
- Keywords and regions are blocked above the tool limits of 10 and 20; unsupported Hong Kong, Macao, and Taiwan selections are rejected rather than silently dropped.
|
|
101
|
+
- Existing draft text is retained and separated from generated text by one blank line.
|
|
102
|
+
- Confirmation calls `setDraft()` exactly once and never calls `submit()`.
|
|
103
|
+
- A missing Session or input facade keeps the panel open and presents an error.
|
|
104
|
+
- Outside press dismisses the active advanced or region popup. Escape dismisses an active popup first; backdrop, Cancel, Close, or a second Escape dismisses the drawer and returns focus to the trigger.
|
|
105
|
+
- Persisted `tool/call` and append-surface `tool/result` events are paired by Turn and exact `callId`; historical replay and live append produce the same projection.
|
|
106
|
+
- A newly completed search Turn opens its result drawer once. Historical results do not auto-open and remain available from the Session Header.
|
|
107
|
+
- Result summaries combine the MCP query summary with statistics explicitly limited to loaded records. Lists contain only returned records, provide no guessed links or pagination, and deduplicate stable business IDs in result order.
|
|
108
|
+
- “最近待截止时间” means the earliest parseable deadline after the current time; expired values are excluded.
|
package/cordis.patch.yml
ADDED